Contents
About this report
Report parameters
Contexts
No contexts were selected, so all contexts were included by default.
Sites
The following sites were included:
- http://localhost:3000
(If no sites were selected, all sites were included by default.)
An included site must also be within one of the included contexts for its data to be included in the report.
Risk levels
Included: High, Medium, Low, Informational
Excluded: None
Confidence levels
Included: User Confirmed, High, Medium, Low
Excluded: User Confirmed, High, Medium, Low, False Positive
Summaries
Alert counts by risk and confidence
| Confidence | ||||||
|---|---|---|---|---|---|---|
| User Confirmed | High | Medium | Low | Total | ||
| Risk | High | 0 (0.0%) |
0 (0.0%) |
0 (0.0%) |
0 (0.0%) |
0 (0.0%) |
| Medium | 0 (0.0%) |
1 (12.5%) |
2 (25.0%) |
1 (12.5%) |
4 (50.0%) |
|
| Low | 0 (0.0%) |
0 (0.0%) |
2 (25.0%) |
1 (12.5%) |
3 (37.5%) |
|
| Informational | 0 (0.0%) |
0 (0.0%) |
0 (0.0%) |
1 (12.5%) |
1 (12.5%) |
|
| Total | 0 (0.0%) |
1 (12.5%) |
4 (50.0%) |
3 (37.5%) |
8 (100%) |
|
Alert counts by site and risk
| Risk | |||||
|---|---|---|---|---|---|
|
High (= High) |
Medium (>= Medium) |
Low (>= Low) |
Informational (>= Informational) |
||
| Site | http://localhost:3000 | 0 (0) |
4 (4) |
3 (7) |
1 (8) |
Alert counts by alert type
| Alert type | Risk | Count |
|---|---|---|
| Absence of Anti-CSRF Tokens | Medium | 1 (12.5%) |
| CSP: Wildcard Directive | Medium | 2 (25.0%) |
| Content Security Policy (CSP) Header Not Set | Medium | 1 (12.5%) |
| Missing Anti-clickjacking Header | Medium | 1 (12.5%) |
| Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s) | Low | 10 (125.0%) |
| Timestamp Disclosure - Unix | Low | 12 (150.0%) |
| X-Content-Type-Options Header Missing | Low | 8 (100.0%) |
| Information Disclosure - Suspicious Comments | Informational | 21 (262.5%) |
| Total | 8 |
Alerts
-
Risk=Medium, Confidence=High (1)
-
http://localhost:3000 (1)
-
Content Security Policy (CSP) Header Not Set (1)
GET http://localhost:3000
Alert tags Alert description Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.
Request Request line and header section (195 bytes)
GET http://localhost:3000 HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cacheRequest body (0 bytes)
Response Status line and header section (316 bytes)
HTTP/1.1 200 OK X-Powered-By: Express Accept-Ranges: bytes Cache-Control: public, max-age=0 Last-Modified: Fri, 08 Apr 2022 13:22:54 GMT ETag: W/"1e7-18009578ef9" Content-Type: text/html; charset=UTF-8 Content-Length: 487 Date: Fri, 08 Apr 2022 13:24:07 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (487 bytes)
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>D3</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="stylesheet" href="styles.css"></head> <body> <app-root></app-root> <script src="runtime.js" defer></script><script src="polyfills.js" defer></script><script src="vendor.js" defer></script><script src="main.js" defer></script></body> </html>Solution Ensure that your web server, application server, load balancer, etc. is configured to set the Content-Security-Policy header, to achieve optimal browser support: "Content-Security-Policy" for Chrome 25+, Firefox 23+ and Safari 7+, "X-Content-Security-Policy" for Firefox 4.0+ and Internet Explorer 10+, and "X-WebKit-CSP" for Chrome 14+ and Safari 6+.
-
-
-
Risk=Medium, Confidence=Medium (2)
-
http://localhost:3000 (2)
-
CSP: Wildcard Directive (1)
GET http://localhost:3000/robots.txt
Alert tags Alert description Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks. Including (but not limited to) Cross Site Scripting (XSS), and data injection attacks. These attacks are used for everything from data theft to site defacement or distribution of malware. CSP provides a set of standard HTTP headers that allow website owners to declare approved sources of content that browsers should be allowed to load on that page — covered types are JavaScript, CSS, HTML frames, fonts, images and embeddable objects such as Java applets, ActiveX, audio and video files.
Other info The following directives either allow wildcard sources (or ancestors), are not defined, or are overly broadly defined:
frame-ancestors, form-action
The directive(s): frame-ancestors, form-action are among the directives that do not fallback to default-src, missing/excluding them is the same as allowing anything.
Request Request line and header section (206 bytes)
GET http://localhost:3000/robots.txt HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cacheRequest body (0 bytes)
Response Status line and header section (272 bytes)
HTTP/1.1 404 Not Found X-Powered-By: Express Content-Security-Policy: default-src 'none' X-Content-Type-Options: nosniff Content-Type: text/html; charset=utf-8 Content-Length: 149 Date: Fri, 08 Apr 2022 13:24:08 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (149 bytes)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot GET /robots.txt</pre> </body> </html>Evidence default-src 'none'Solution Ensure that your web server, application server, load balancer, etc. is properly configured to set the Content-Security-Policy header.
-
Missing Anti-clickjacking Header (1)
GET http://localhost:3000
Alert tags Alert description The response does not include either Content-Security-Policy with 'frame-ancestors' directive or X-Frame-Options to protect against 'ClickJacking' attacks.
Request Request line and header section (195 bytes)
GET http://localhost:3000 HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cacheRequest body (0 bytes)
Response Status line and header section (316 bytes)
HTTP/1.1 200 OK X-Powered-By: Express Accept-Ranges: bytes Cache-Control: public, max-age=0 Last-Modified: Fri, 08 Apr 2022 13:22:54 GMT ETag: W/"1e7-18009578ef9" Content-Type: text/html; charset=UTF-8 Content-Length: 487 Date: Fri, 08 Apr 2022 13:24:07 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (487 bytes)
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>D3</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="stylesheet" href="styles.css"></head> <body> <app-root></app-root> <script src="runtime.js" defer></script><script src="polyfills.js" defer></script><script src="vendor.js" defer></script><script src="main.js" defer></script></body> </html>Parameter X-Frame-OptionsSolution Modern Web browsers support the Content-Security-Policy and X-Frame-Options HTTP headers. Ensure one of them is set on all web pages returned by your site/app.
If you expect the page to be framed only by pages on your server (e.g. it's part of a FRAMESET) then you'll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. Alternatively consider implementing Content Security Policy's "frame-ancestors" directive.
-
-
-
Risk=Medium, Confidence=Low (1)
-
http://localhost:3000 (1)
-
Absence of Anti-CSRF Tokens (1)
GET http://localhost:3000/vendor.js
Alert tags Alert description No Anti-CSRF tokens were found in a HTML submission form.
A cross-site request forgery is an attack that involves forcing a victim to send an HTTP request to a target destination without their knowledge or intent in order to perform an action as the victim. The underlying cause is application functionality using predictable URL/form actions in a repeatable way. The nature of the attack is that CSRF exploits the trust that a web site has for a user. By contrast, cross-site scripting (XSS) exploits the trust that a user has for a web site. Like XSS, CSRF attacks are not necessarily cross-site, but they can be. Cross-site request forgery is also known as CSRF, XSRF, one-click attack, session riding, confused deputy, and sea surf.
CSRF attacks are effective in a number of situations, including:
* The victim has an active session on the target site.
* The victim is authenticated via HTTP auth on the target site.
* The victim is on the same local network as the target site.
CSRF has primarily been used to perform an action against a target site using the victim's privileges, but recent techniques have been discovered to disclose information by gaining access to the response. The risk of information disclosure is dramatically increased when the target site is vulnerable to XSS, because XSS can be used as a platform for CSRF, allowing the attack to operate within the bounds of the same-origin policy.
Other info No known Anti-CSRF token [anticsrf, CSRFToken, __RequestVerificationToken, csrfmiddlewaretoken, authenticity_token, OWASP_CSRFTOKEN, anoncsrf, csrf_token, _csrf, _csrfSecret, __csrf_magic, CSRF, _token, _csrf_token] was found in the following HTML form: [Form 1: "" ].
Request Request line and header section (237 bytes)
GET http://localhost:3000/vendor.js HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cache Referer: http://localhost:3000Request body (0 bytes)
Response Status line and header section (336 bytes)
HTTP/1.1 200 OK X-Powered-By: Express Accept-Ranges: bytes Cache-Control: public, max-age=0 Last-Modified: Fri, 08 Apr 2022 12:35:28 GMT ETag: W/"3a1f58-180092c200f" Content-Type: application/javascript; charset=UTF-8 Content-Length: 3809112 Date: Fri, 08 Apr 2022 13:24:08 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (3809112 bytes)
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"],{ /***/ "+3eq": /*!*******************************************!*\ !*** ./node_modules/d3-ease/src/index.js ***! \*******************************************/ /*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "ZRP+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__["linear"]; }); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ "TXIv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); /* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ "iSFD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); /* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ "5Xrj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); /* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ "62fh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); /* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ "LOX7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); /* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ "tIkd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); /* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ "MHiR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceInOut"]; }); /* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ "iUY2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); /* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ "uc95"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticInOut"]; }); /***/ }), /***/ "+HKQ": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/attr.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace.js */ "bNSl"); function attrRemove(name) { return function() { this.removeAttribute(name); }; } function attrRemoveNS(fullname) { return function() { this.removeAttributeNS(fullname.space, fullname.local); }; } function attrConstant(name, value) { return function() { this.setAttribute(name, value); }; } function attrConstantNS(fullname, value) { return function() { this.setAttributeNS(fullname.space, fullname.local, value); }; } function attrFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttribute(name); else this.setAttribute(name, v); }; } function attrFunctionNS(fullname, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttributeNS(fullname.space, fullname.local); else this.setAttributeNS(fullname.space, fullname.local, v); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name); if (arguments.length < 2) { var node = this.node(); return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname); } return this.each((value == null ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction) : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); }); /***/ }), /***/ "+Nd1": /*!****************************************************!*\ !*** ./node_modules/d3-hierarchy/src/partition.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _treemap_round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round.js */ "DdT1"); /* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice.js */ "FPPI"); /* harmony default export */ __webpack_exports__["default"] = (function() { var dx = 1, dy = 1, padding = 0, round = false; function partition(root) { var n = root.height + 1; root.x0 = root.y0 = padding; root.x1 = dx; root.y1 = dy / n; root.eachBefore(positionNode(dy, n)); if (round) root.eachBefore(_treemap_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); return root; } function positionNode(dy, n) { return function(node) { if (node.children) { Object(_treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); } var x0 = node.x0, y0 = node.y0, x1 = node.x1 - padding, y1 = node.y1 - padding; if (x1 < x0) x0 = x1 = (x0 + x1) / 2; if (y1 < y0) y0 = y1 = (y0 + y1) / 2; node.x0 = x0; node.y0 = y0; node.x1 = x1; node.y1 = y1; }; } partition.round = function(x) { return arguments.length ? (round = !!x, partition) : round; }; partition.size = function(x) { return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy]; }; partition.padding = function(x) { return arguments.length ? (padding = +x, partition) : padding; }; return partition; }); /***/ }), /***/ "+O7D": /*!***********************************************!*\ !*** ./node_modules/d3-time/src/utcMinute.js ***! \***********************************************/ /*! exports provided: default, utcMinutes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return utcMinutes; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCSeconds(0, 0); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; }, function(date) { return date.getUTCMinutes(); }); /* harmony default export */ __webpack_exports__["default"] = (utcMinute); var utcMinutes = utcMinute.range; /***/ }), /***/ "+Tjx": /*!****************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/descendants.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return Array.from(this); }); /***/ }), /***/ "+WWN": /*!**********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/equalEarth.js ***! \**********************************************************/ /*! exports provided: equalEarthRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equalEarthRaw", function() { return equalEarthRaw; }); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "1ibS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); var A1 = 1.340264, A2 = -0.081106, A3 = 0.000893, A4 = 0.003796, M = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(3) / 2, iterations = 12; function equalEarthRaw(lambda, phi) { var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(M * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi)), l2 = l * l, l6 = l2 * l2 * l2; return [ lambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) ]; } equalEarthRaw.invert = function(x, y) { var l = y, l2 = l * l, l6 = l2 * l2 * l2; for (var i = 0, delta, fy, fpy; i < iterations; ++i) { fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) break; } return [ M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(l) / M) ]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equalEarthRaw) .scale(177.158); }); /***/ }), /***/ "+s1I": /*!*******************************************!*\ !*** ./node_modules/d3-axis/src/array.js ***! \*******************************************/ /*! exports provided: slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var slice = Array.prototype.slice; /***/ }), /***/ "+u7/": /*!********************************************!*\ !*** ./node_modules/d3-chord/src/index.js ***! \********************************************/ /*! exports provided: chord, chordTranspose, chordDirected, ribbon, ribbonArrow */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _chord_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chord.js */ "22Jt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordTranspose", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__["chordTranspose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordDirected", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__["chordDirected"]; }); /* harmony import */ var _ribbon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ribbon.js */ "SKGk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return _ribbon_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbonArrow", function() { return _ribbon_js__WEBPACK_IMPORTED_MODULE_1__["ribbonArrow"]; }); /***/ }), /***/ "+ugm": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/line.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curve/linear.js */ "SDD1"); /* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ "/aQN"); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { var defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(true), context = null, curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__["default"], output = null; x = typeof x === "function" ? x : (x === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_4__["x"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x); y = typeof y === "function" ? y : (y === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_4__["y"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(y); function line(data) { var i, n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data)).length, d, defined0 = false, buffer; if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); for (i = 0; i <= n; ++i) { if (!(i < n && defined(d = data[i], i, data)) === defined0) { if (defined0 = !defined0) output.lineStart(); else output.lineEnd(); } if (defined0) output.point(+x(d, i, data), +y(d, i, data)); } if (buffer) return output = null, buffer + "" || null; } line.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), line) : x; }; line.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), line) : y; }; line.defined = function(_) { return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(!!_), line) : defined; }; line.curve = function(_) { return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; }; line.context = function(_) { return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; }; return line; }); /***/ }), /***/ "+w/h": /*!**************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/selectAll.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "wibz"); /* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectorAll.js */ "QjDJ"); function arrayAll(select) { return function() { var group = select.apply(this, arguments); return group == null ? [] : Object(_array_js__WEBPACK_IMPORTED_MODULE_1__["default"])(group); }; } /* harmony default export */ __webpack_exports__["default"] = (function(select) { if (typeof select === "function") select = arrayAll(select); else select = Object(_selectorAll_js__WEBPACK_IMPORTED_MODULE_2__["default"])(select); for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { subgroups.push(select.call(node, node.__data__, i, group)); parents.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, parents); }); /***/ }), /***/ "+y6k": /*!******************************************!*\ !*** ./node_modules/d3-array/src/zip.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose.js */ "cyYV"); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_transpose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments); }); /***/ }), /***/ "/+7g": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/attr.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ "Nehl"); /* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ "5aFE"); function attrRemove(name) { return function() { this.removeAttribute(name); }; } function attrRemoveNS(fullname) { return function() { this.removeAttributeNS(fullname.space, fullname.local); }; } function attrConstant(name, interpolate, value1) { var string00, string1 = value1 + "", interpolate0; return function() { var string0 = this.getAttribute(name); return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1); }; } function attrConstantNS(fullname, interpolate, value1) { var string00, string1 = value1 + "", interpolate0; return function() { var string0 = this.getAttributeNS(fullname.space, fullname.local); return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1); }; } function attrFunction(name, interpolate, value) { var string00, string10, interpolate0; return function() { var string0, value1 = value(this), string1; if (value1 == null) return void this.removeAttribute(name); string0 = this.getAttribute(name); string1 = value1 + ""; return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; } function attrFunctionNS(fullname, interpolate, value) { var string00, string10, interpolate0; return function() { var string0, value1 = value(this), string1; if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); string0 = this.getAttributeNS(fullname.space, fullname.local); string1 = value1 + ""; return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["namespace"])(name), i = fullname === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformSvg"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__["default"]; return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__["tweenValue"])(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); }); /***/ }), /***/ "/CzE": /*!*************************************************!*\ !*** ./node_modules/d3-array/src/leastIndex.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return leastIndex; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minIndex.js */ "JQqb"); function leastIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { if (compare.length === 1) return Object(_minIndex_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, compare); let minValue; let min = -1; let index = -1; for (const value of values) { ++index; if (min < 0 ? compare(value, value) === 0 : compare(value, minValue) < 0) { minValue = value; min = index; } } return min; } /***/ }), /***/ "/KiP": /*!*************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/remove.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function removeFunction(id) { return function() { var parent = this.parentNode; for (var i in this.__transition) if (+i !== id) return; if (parent) parent.removeChild(this); }; } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.on("end.remove", removeFunction(this._id)); }); /***/ }), /***/ "/TIM": /*!************************************************!*\ !*** ./node_modules/d3-selection/src/index.js ***! \************************************************/ /*! exports provided: create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create.js */ "qLhn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return _create_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator.js */ "V/Wt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return _creator_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _local_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local.js */ "HFJB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return _local_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher.js */ "Cnj1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return _matcher_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./namespace.js */ "bNSl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return _namespace_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespaces.js */ "4xGt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return _namespaces_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointer.js */ "XoFe"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointer", function() { return _pointer_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _pointers_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pointers.js */ "90/1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointers", function() { return _pointers_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select.js */ "AKWm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return _select_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll.js */ "Enya"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return _selectAll_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index.js */ "5Iso"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return _selection_index_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector.js */ "b9Oj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return _selector_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll.js */ "QjDJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _selection_style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style.js */ "Nkvg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return _selection_style_js__WEBPACK_IMPORTED_MODULE_13__["styleValue"]; }); /* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./window.js */ "oxeV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _window_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /***/ }), /***/ "/aQN": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/point.js ***! \********************************************/ /*! exports provided: x, y */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); function x(p) { return p[0]; } function y(p) { return p[1]; } /***/ }), /***/ "/d8p": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/repeat.js ***! \*****************************************************************/ /*! exports provided: repeat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); function repeat(count = -1) { return (source) => { if (count === 0) { return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_1__["empty"])(); } else if (count < 0) { return source.lift(new RepeatOperator(-1, source)); } else { return source.lift(new RepeatOperator(count - 1, source)); } }; } class RepeatOperator { constructor(count, source) { this.count = count; this.source = source; } call(subscriber, source) { return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source)); } } class RepeatSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, count, source) { super(destination); this.count = count; this.source = source; } complete() { if (!this.isStopped) { const { source, count } = this; if (count === 0) { return super.complete(); } else if (count > -1) { this.count = count - 1; } source.subscribe(this._unsubscribeAndRecycle()); } } } //# sourceMappingURL=repeat.js.map /***/ }), /***/ "/uUt": /*!*******************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js ***! \*******************************************************************************/ /*! exports provided: distinctUntilChanged */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function distinctUntilChanged(compare, keySelector) { return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector)); } class DistinctUntilChangedOperator { constructor(compare, keySelector) { this.compare = compare; this.keySelector = keySelector; } call(subscriber, source) { return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector)); } } class DistinctUntilChangedSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, compare, keySelector) { super(destination); this.keySelector = keySelector; this.hasKey = false; if (typeof compare === 'function') { this.compare = compare; } } compare(x, y) { return x === y; } _next(value) { let key; try { const { keySelector } = this; key = keySelector ? keySelector(value) : value; } catch (err) { return this.destination.error(err); } let result = false; if (this.hasKey) { try { const { compare } = this; result = compare(this.key, key); } catch (err) { return this.destination.error(err); } } else { this.hasKey = true; } if (!result) { this.key = key; this.destination.next(value); } } } //# sourceMappingURL=distinctUntilChanged.js.map /***/ }), /***/ "02Lk": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/distinct.js ***! \*******************************************************************/ /*! exports provided: distinct, DistinctSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function distinct(keySelector, flushes) { return (source) => source.lift(new DistinctOperator(keySelector, flushes)); } class DistinctOperator { constructor(keySelector, flushes) { this.keySelector = keySelector; this.flushes = flushes; } call(subscriber, source) { return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes)); } } class DistinctSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, keySelector, flushes) { super(destination); this.keySelector = keySelector; this.values = new Set(); if (flushes) { this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(flushes, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } } notifyNext() { this.values.clear(); } notifyError(error) { this._error(error); } _next(value) { if (this.keySelector) { this._useKeySelector(value); } else { this._finalizeNext(value, value); } } _useKeySelector(value) { let key; const { destination } = this; try { key = this.keySelector(value); } catch (err) { destination.error(err); return; } this._finalizeNext(key, value); } _finalizeNext(key, value) { const { values } = this; if (!values.has(key)) { values.add(key); this.destination.next(value); } } } //# sourceMappingURL=distinct.js.map /***/ }), /***/ "04ZW": /*!****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEventPattern.js ***! \****************************************************************************/ /*! exports provided: fromEventPattern */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "n6bG"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "lJxs"); function fromEventPattern(addHandler, removeHandler, resultSelector) { if (resultSelector) { return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const handler = (...e) => subscriber.next(e.length === 1 ? e[0] : e); let retValue; try { retValue = addHandler(handler); } catch (err) { subscriber.error(err); return undefined; } if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) { return undefined; } return () => removeHandler(handler, retValue); }); } //# sourceMappingURL=fromEventPattern.js.map /***/ }), /***/ "05l1": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publishReplay.js ***! \************************************************************************/ /*! exports provided: publishReplay */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; }); /* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "jtHE"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) { if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') { scheduler = selectorOrScheduler; } const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined; const subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler); return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(() => subject, selector)(source); } //# sourceMappingURL=publishReplay.js.map /***/ }), /***/ "0EUg": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concatAll.js ***! \********************************************************************/ /*! exports provided: concatAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; }); /* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeAll */ "bHdf"); function concatAll() { return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1); } //# sourceMappingURL=concatAll.js.map /***/ }), /***/ "0K5P": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/noop.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() {}); /***/ }), /***/ "0LFD": /*!*********************************************!*\ !*** ./node_modules/d3-force/src/center.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { var nodes, strength = 1; if (x == null) x = 0; if (y == null) y = 0; function force() { var i, n = nodes.length, node, sx = 0, sy = 0; for (i = 0; i < n; ++i) { node = nodes[i], sx += node.x, sy += node.y; } for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) { node = nodes[i], node.x -= sx, node.y -= sy; } } force.initialize = function(_) { nodes = _; }; force.x = function(_) { return arguments.length ? (x = +_, force) : x; }; force.y = function(_) { return arguments.length ? (y = +_, force) : y; }; force.strength = function(_) { return arguments.length ? (strength = +_, force) : strength; }; return force; }); /***/ }), /***/ "0ND3": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/style.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ "Nehl"); /* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ "5aFE"); function styleNull(name, interpolate) { var string00, string10, interpolate0; return function() { var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1); }; } function styleRemove(name) { return function() { this.style.removeProperty(name); }; } function styleConstant(name, interpolate, value1) { var string00, string1 = value1 + "", interpolate0; return function() { var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name); return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1); }; } function styleFunction(name, interpolate, value) { var string00, string10, interpolate0; return function() { var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), value1 = value(this), string1 = value1 + ""; if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; } function styleMaybeRemove(id, name) { var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; return function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["set"])(this, id), on = schedule.on, listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; // If this node shared a dispatch with the previous node, // just assign the updated shared dispatch and we’re done! // Otherwise, copy-on-write. if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); schedule.on = on1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { var i = (name += "") === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformCss"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__["default"]; return value == null ? this .styleTween(name, styleNull(name, i)) .on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__["tweenValue"])(this, "style." + name, value))) .each(styleMaybeRemove(this._id, name)) : this .styleTween(name, styleConstant(name, i, value), priority) .on("end.style." + name, null); }); /***/ }), /***/ "0Pi8": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/endWith.js ***! \******************************************************************/ /*! exports provided: endWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; }); /* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); /* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/of */ "LRne"); function endWith(...array) { return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(...array)); } //# sourceMappingURL=endWith.js.map /***/ }), /***/ "0RZX": /*!*****************************************************!*\ !*** ./node_modules/d3-random/src/defaultSource.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (Math.random); /***/ }), /***/ "0T5i": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/offset/none.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 1)) return; for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { s0 = s1, s1 = series[order[i]]; for (j = 0; j < m; ++j) { s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; } } }); /***/ }), /***/ "0W9s": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/index.js ***! \************************************************************/ /*! exports provided: Transition, default, newId */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transition", function() { return Transition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newId", function() { return newId; }); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ "/+7g"); /* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ "DF+l"); /* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ "hl/D"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ "8nbz"); /* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ "WFWS"); /* harmony import */ var _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./easeVarying.js */ "KpFn"); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filter.js */ "zyLn"); /* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./merge.js */ "qR3b"); /* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./on.js */ "aNk7"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./remove.js */ "/KiP"); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./select.js */ "r5Py"); /* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectAll.js */ "7VZX"); /* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection.js */ "cKk/"); /* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.js */ "0ND3"); /* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./styleTween.js */ "D/GG"); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./text.js */ "31Y3"); /* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./textTween.js */ "Xl5i"); /* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./transition.js */ "4bGx"); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tween.js */ "Nehl"); /* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./end.js */ "mKzq"); var id = 0; function Transition(groups, parents, name, id) { this._groups = groups; this._parents = parents; this._name = name; this._id = id; } function transition(name) { return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"])().transition(name); } function newId() { return ++id; } var selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype; Transition.prototype = transition.prototype = { constructor: Transition, select: _select_js__WEBPACK_IMPORTED_MODULE_11__["default"], selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_12__["default"], filter: _filter_js__WEBPACK_IMPORTED_MODULE_7__["default"], merge: _merge_js__WEBPACK_IMPORTED_MODULE_8__["default"], selection: _selection_js__WEBPACK_IMPORTED_MODULE_13__["default"], transition: _transition_js__WEBPACK_IMPORTED_MODULE_18__["default"], call: selection_prototype.call, nodes: selection_prototype.nodes, node: selection_prototype.node, size: selection_prototype.size, empty: selection_prototype.empty, each: selection_prototype.each, on: _on_js__WEBPACK_IMPORTED_MODULE_9__["default"], attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__["default"], attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__["default"], style: _style_js__WEBPACK_IMPORTED_MODULE_14__["default"], styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_15__["default"], text: _text_js__WEBPACK_IMPORTED_MODULE_16__["default"], textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_17__["default"], remove: _remove_js__WEBPACK_IMPORTED_MODULE_10__["default"], tween: _tween_js__WEBPACK_IMPORTED_MODULE_19__["default"], delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__["default"], duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__["default"], ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__["default"], easeVarying: _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__["default"], end: _end_js__WEBPACK_IMPORTED_MODULE_20__["default"], [Symbol.iterator]: selection_prototype[Symbol.iterator] }; /***/ }), /***/ "0llg": /*!***************************************************!*\ !*** ./node_modules/d3-selection/src/constant.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "0rNn": /*!****************************************!*\ !*** ./node_modules/d3-force/src/y.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony default export */ __webpack_exports__["default"] = (function(y) { var strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), nodes, strengths, yz; if (typeof y !== "function") y = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(y == null ? 0 : +y); function force(alpha) { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; } } function initialize() { if (!nodes) return; var i, n = nodes.length; strengths = new Array(n); yz = new Array(n); for (i = 0; i < n; ++i) { strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); } } force.initialize = function(_) { nodes = _; initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; }; force.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : y; }; return force; }); /***/ }), /***/ "0sQp": /*!*************************************************!*\ !*** ./node_modules/d3-array/src/descending.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; }); /***/ }), /***/ "0xxc": /*!***************************************************************!*\ !*** ./node_modules/d3-transition/src/selection/interrupt.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ "dW/k"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { return this.each(function() { Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, name); }); }); /***/ }), /***/ "128B": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/reduce.js ***! \*****************************************************************/ /*! exports provided: reduce */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; }); /* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scan */ "Kqap"); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./takeLast */ "BFxc"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/pipe */ "mCNh"); function reduce(accumulator, seed) { if (arguments.length >= 2) { return function reduceOperatorFunctionWithSeed(source) { return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source); }; } return function reduceOperatorFunction(source) { return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])((acc, value, index) => accumulator(acc, value, index + 1)), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source); }; } //# sourceMappingURL=reduce.js.map /***/ }), /***/ "1Cbu": /*!*************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/resquarify.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "FPPI"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "7IPS"); /* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify.js */ "I4jL"); /* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { function resquarify(parent, x0, y0, x1, y1) { if ((rows = parent._squarify) && (rows.ratio === ratio)) { var rows, row, nodes, i, j = -1, n, m = rows.length, value = parent.value; while (++j < m) { row = rows[j], nodes = row.children; for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1); else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1); value -= row.value; } } else { parent._squarify = rows = Object(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["squarifyRatio"])(ratio, parent, x0, y0, x1, y1); rows.ratio = ratio; } } resquarify.ratio = function(x) { return custom((x = +x) > 1 ? x : 1); }; return resquarify; })(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["phi"])); /***/ }), /***/ "1G5W": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js ***! \********************************************************************/ /*! exports provided: takeUntil */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function takeUntil(notifier) { return (source) => source.lift(new TakeUntilOperator(notifier)); } class TakeUntilOperator { constructor(notifier) { this.notifier = notifier; } call(subscriber, source) { const takeUntilSubscriber = new TakeUntilSubscriber(subscriber); const notifierSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](takeUntilSubscriber)); if (notifierSubscription && !takeUntilSubscriber.seenValue) { takeUntilSubscriber.add(notifierSubscription); return source.subscribe(takeUntilSubscriber); } return takeUntilSubscriber; } } class TakeUntilSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination) { super(destination); this.seenValue = false; } notifyNext() { this.seenValue = true; this.complete(); } notifyComplete() { } } //# sourceMappingURL=takeUntil.js.map /***/ }), /***/ "1Ix/": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/init.js ***! \*******************************************/ /*! exports provided: initRange, initInterpolator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initRange", function() { return initRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initInterpolator", function() { return initInterpolator; }); function initRange(domain, range) { switch (arguments.length) { case 0: break; case 1: this.range(domain); break; default: this.range(range).domain(domain); break; } return this; } function initInterpolator(domain, interpolator) { switch (arguments.length) { case 0: break; case 1: { if (typeof domain === "function") this.interpolator(domain); else this.range(domain); break; } default: { this.domain(domain); if (typeof interpolator === "function") this.interpolator(interpolator); else this.range(interpolator); break; } } return this; } /***/ }), /***/ "1OKp": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/identity.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return identity; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number.js */ "4m7i"); function identity(domain) { var unknown; function scale(x) { return x == null || isNaN(x = +x) ? unknown : x; } scale.invert = scale; scale.domain = scale.range = function(_) { return arguments.length ? (domain = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_1__["default"]), scale) : domain.slice(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return identity(domain).unknown(unknown); }; domain = arguments.length ? Array.from(domain, _number_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : [0, 1]; return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); } /***/ }), /***/ "1SON": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/greatest.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return greatest; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); function greatest(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { let max; let defined = false; if (compare.length === 1) { let maxValue; for (const element of values) { const value = compare(element); if (defined ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, maxValue) > 0 : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, value) === 0) { max = element; maxValue = value; defined = true; } } } else { for (const value of values) { if (defined ? compare(value, max) > 0 : compare(value, value) === 0) { max = value; defined = true; } } } return max; } /***/ }), /***/ "1Ykd": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/sampleTime.js ***! \*********************************************************************/ /*! exports provided: sampleTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); function sampleTime(period, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { return (source) => source.lift(new SampleTimeOperator(period, scheduler)); } class SampleTimeOperator { constructor(period, scheduler) { this.period = period; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler)); } } class SampleTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, period, scheduler) { super(destination); this.period = period; this.scheduler = scheduler; this.hasValue = false; this.add(scheduler.schedule(dispatchNotification, period, { subscriber: this, period })); } _next(value) { this.lastValue = value; this.hasValue = true; } notifyNext() { if (this.hasValue) { this.hasValue = false; this.destination.next(this.lastValue); } } } function dispatchNotification(state) { let { subscriber, period } = state; subscriber.notifyNext(); this.schedule(state, period); } //# sourceMappingURL=sampleTime.js.map /***/ }), /***/ "1afE": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/square.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var w = Math.sqrt(size), x = -w / 2; context.rect(x, x, w, w); } }); /***/ }), /***/ "1byx": /*!***********************************************!*\ !*** ./node_modules/d3-timer/src/interval.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "dPRQ"); /* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"], total = delay; if (delay == null) return t.restart(callback, delay, time), t; t._restart = t.restart; t.restart = function(callback, delay, time) { delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__["now"])() : +time; t._restart(function tick(elapsed) { elapsed += total; t._restart(tick, total += delay, time); callback(elapsed); }, delay, time); } t.restart(callback, delay, time); return t; }); /***/ }), /***/ "1ibS": /*!*****************************************************!*\ !*** ./node_modules/d3-geo/src/projection/index.js ***! \*****************************************************/ /*! exports provided: default, projectionMutator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return projection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projectionMutator", function() { return projectionMutator; }); /* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian.js */ "9ZWv"); /* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle.js */ "PQSO"); /* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle.js */ "F2eR"); /* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose.js */ "pbho"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity.js */ "IYKK"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation.js */ "cwsO"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform.js */ "t9E6"); /* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit.js */ "XAaG"); /* harmony import */ var _resample_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample.js */ "TKDR"); var transformRadians = Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ point: function(x, y) { this.stream.point(x * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], y * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); } }); function transformRotate(rotate) { return Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ point: function(x, y) { var r = rotate(x, y); return this.stream.point(r[0], r[1]); } }); } function scaleTranslate(k, dx, dy, sx, sy) { function transform(x, y) { x *= sx; y *= sy; return [dx + k * x, dy - k * y]; } transform.invert = function(x, y) { return [(x - dx) / k * sx, (dy - y) / k * sy]; }; return transform; } function scaleTranslateRotate(k, dx, dy, sx, sy, alpha) { if (!alpha) return scaleTranslate(k, dx, dy, sx, sy); var cosAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["cos"])(alpha), sinAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sin"])(alpha), a = cosAlpha * k, b = sinAlpha * k, ai = cosAlpha / k, bi = sinAlpha / k, ci = (sinAlpha * dy - cosAlpha * dx) / k, fi = (sinAlpha * dx + cosAlpha * dy) / k; function transform(x, y) { x *= sx; y *= sy; return [a * x - b * y + dx, dy - b * x - a * y]; } transform.invert = function(x, y) { return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)]; }; return transform; } function projection(project) { return projectionMutator(function() { return project; })(); } function projectionMutator(projectAt) { var project, k = 150, // scale x = 480, y = 250, // translate lambda = 0, phi = 0, // center deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate alpha = 0, // post-rotate angle sx = 1, // reflectX sy = 1, // reflectX theta = null, preclip = _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"], // pre-clip angle x0 = null, y0, x1, y1, postclip = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], // post-clip extent delta2 = 0.5, // precision projectResample, projectTransform, projectRotateTransform, cache, cacheStream; function projection(point) { return projectRotateTransform(point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); } function invert(point) { point = projectRotateTransform.invert(point[0], point[1]); return point && [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; } projection.stream = function(stream) { return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); }; projection.preclip = function(_) { return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; }; projection.postclip = function(_) { return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; }; projection.clipAngle = function(_) { return arguments.length ? (preclip = +_ ? Object(_clip_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(theta = _ * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]) : (theta = null, _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"]), reset()) : theta * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; }; projection.clipExtent = function(_) { return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; }; projection.scale = function(_) { return arguments.length ? (k = +_, recenter()) : k; }; projection.translate = function(_) { return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; }; projection.center = function(_) { return arguments.length ? (lambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], phi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : [lambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], phi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; }; projection.rotate = function(_) { return arguments.length ? (deltaLambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaPhi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaGamma = _.length > 2 ? _[2] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"] : 0, recenter()) : [deltaLambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaPhi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaGamma * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; }; projection.angle = function(_) { return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; }; projection.reflectX = function(_) { return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0; }; projection.reflectY = function(_) { return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0; }; projection.precision = function(_) { return arguments.length ? (projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2 = _ * _), reset()) : Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sqrt"])(delta2); }; projection.fitExtent = function(extent, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitExtent"])(projection, extent, object); }; projection.fitSize = function(size, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitSize"])(projection, size, object); }; projection.fitWidth = function(width, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitWidth"])(projection, width, object); }; projection.fitHeight = function(height, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitHeight"])(projection, height, object); }; function recenter() { var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha); rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_6__["rotateRadians"])(deltaLambda, deltaPhi, deltaGamma); projectTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(project, transform); projectRotateTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(rotate, projectTransform); projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2); return reset(); } function reset() { cache = cacheStream = null; return projection; } return function() { project = projectAt.apply(this, arguments); projection.invert = project.invert && invert; return recenter(); }; } /***/ }), /***/ "1jur": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Set1.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")); /***/ }), /***/ "1nUc": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/curve/basisOpen.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "jICm"); function BasisOpen(context) { this._context = context; } BasisOpen.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN; this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; case 3: this._point = 4; // proceed default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new BasisOpen(context); }); /***/ }), /***/ "1uah": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/zip.js ***! \***************************************************************/ /*! exports provided: zip, ZipOperator, ZipSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; }); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fromArray */ "yCtX"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../internal/symbol/iterator */ "Lhse"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function zip(...observables) { const resultSelector = observables[observables.length - 1]; if (typeof resultSelector === 'function') { observables.pop(); } return Object(_fromArray__WEBPACK_IMPORTED_MODULE_0__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector)); } class ZipOperator { constructor(resultSelector) { this.resultSelector = resultSelector; } call(subscriber, source) { return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector)); } } class ZipSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, resultSelector, values = Object.create(null)) { super(destination); this.resultSelector = resultSelector; this.iterators = []; this.active = 0; this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined; } _next(value) { const iterators = this.iterators; if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(value)) { iterators.push(new StaticArrayIterator(value)); } else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]] === 'function') { iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]())); } else { iterators.push(new ZipBufferIterator(this.destination, this, value)); } } _complete() { const iterators = this.iterators; const len = iterators.length; this.unsubscribe(); if (len === 0) { this.destination.complete(); return; } this.active = len; for (let i = 0; i < len; i++) { let iterator = iterators[i]; if (iterator.stillUnsubscribed) { const destination = this.destination; destination.add(iterator.subscribe()); } else { this.active--; } } } notifyInactive() { this.active--; if (this.active === 0) { this.destination.complete(); } } checkIterators() { const iterators = this.iterators; const len = iterators.length; const destination = this.destination; for (let i = 0; i < len; i++) { let iterator = iterators[i]; if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) { return; } } let shouldComplete = false; const args = []; for (let i = 0; i < len; i++) { let iterator = iterators[i]; let result = iterator.next(); if (iterator.hasCompleted()) { shouldComplete = true; } if (result.done) { destination.complete(); return; } args.push(result.value); } if (this.resultSelector) { this._tryresultSelector(args); } else { destination.next(args); } if (shouldComplete) { destination.complete(); } } _tryresultSelector(args) { let result; try { result = this.resultSelector.apply(this, args); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } class StaticIterator { constructor(iterator) { this.iterator = iterator; this.nextResult = iterator.next(); } hasValue() { return true; } next() { const result = this.nextResult; this.nextResult = this.iterator.next(); return result; } hasCompleted() { const nextResult = this.nextResult; return Boolean(nextResult && nextResult.done); } } class StaticArrayIterator { constructor(array) { this.array = array; this.index = 0; this.length = 0; this.length = array.length; } [_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]() { return this; } next(value) { const i = this.index++; const array = this.array; return i < this.length ? { value: array[i], done: false } : { value: null, done: true }; } hasValue() { return this.array.length > this.index; } hasCompleted() { return this.array.length === this.index; } } class ZipBufferIterator extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleOuterSubscriber"] { constructor(destination, parent, observable) { super(destination); this.parent = parent; this.observable = observable; this.stillUnsubscribed = true; this.buffer = []; this.isComplete = false; } [_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]() { return this; } next() { const buffer = this.buffer; if (buffer.length === 0 && this.isComplete) { return { value: null, done: true }; } else { return { value: buffer.shift(), done: false }; } } hasValue() { return this.buffer.length > 0; } hasCompleted() { return this.buffer.length === 0 && this.isComplete; } notifyComplete() { if (this.buffer.length > 0) { this.isComplete = true; this.parent.notifyInactive(); } else { this.destination.complete(); } } notifyNext(innerValue) { this.buffer.push(innerValue); this.parent.checkIterators(); } subscribe() { return Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["innerSubscribe"])(this.observable, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleInnerSubscriber"](this)); } } //# sourceMappingURL=zip.js.map /***/ }), /***/ "2/3s": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/selection/transition.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ "0W9s"); /* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ "rtYu"); /* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ "+3eq"); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ "ta7q"); var defaultTiming = { time: null, // Set on use. delay: 0, duration: 250, ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__["easeCubicInOut"] }; function inherit(node, id) { var timing; while (!(timing = node.__transition) || !(timing = timing[id])) { if (!(node = node.parentNode)) { throw new Error(`transition ${id} not found`); } } return timing; } /* harmony default export */ __webpack_exports__["default"] = (function(name) { var id, timing; if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]) { id = name._id, name = name._name; } else { id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), name = name == null ? null : name + ""; } for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id, i, group, timing || inherit(node, id)); } } } return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id); }); /***/ }), /***/ "22Jt": /*!********************************************!*\ !*** ./node_modules/d3-chord/src/chord.js ***! \********************************************/ /*! exports provided: default, chordTranspose, chordDirected */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chordTranspose", function() { return chordTranspose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chordDirected", function() { return chordDirected; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "mJZf"); function range(i, j) { return Array.from({length: j - i}, (_, k) => i + k); } function compareValue(compare) { return function(a, b) { return compare( a.source.value + a.target.value, b.source.value + b.target.value ); }; } /* harmony default export */ __webpack_exports__["default"] = (function() { return chord(false, false); }); function chordTranspose() { return chord(false, true); } function chordDirected() { return chord(true, false); } function chord(directed, transpose) { var padAngle = 0, sortGroups = null, sortSubgroups = null, sortChords = null; function chord(matrix) { var n = matrix.length, groupSums = new Array(n), groupIndex = range(0, n), chords = new Array(n * n), groups = new Array(n), k = 0, dx; matrix = Float64Array.from({length: n * n}, transpose ? (_, i) => matrix[i % n][i / n | 0] : (_, i) => matrix[i / n | 0][i % n]); // Compute the scaling factor from value to angle in [0, 2pi]. for (let i = 0; i < n; ++i) { let x = 0; for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i]; k += groupSums[i] = x; } k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["max"])(0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] - padAngle * n) / k; dx = k ? padAngle : _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / n; // Compute the angles for each group and constituent chord. { let x = 0; if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b])); for (const i of groupIndex) { const x0 = x; if (directed) { const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]); if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b])); for (const j of subgroupIndex) { if (j < 0) { const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null}); chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]}; } else { const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; } } groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; } else { const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]); if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b])); for (const j of subgroupIndex) { let chord; if (i < j) { chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; } else { chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null}); chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; if (i === j) chord.source = chord.target; } if (chord.source && chord.target && chord.source.value < chord.target.value) { const source = chord.source; chord.source = chord.target; chord.target = source; } } groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; } x += dx; } } // Remove empty chords. chords = Object.values(chords); chords.groups = groups; return sortChords ? chords.sort(sortChords) : chords; } chord.padAngle = function(_) { return arguments.length ? (padAngle = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["max"])(0, _), chord) : padAngle; }; chord.sortGroups = function(_) { return arguments.length ? (sortGroups = _, chord) : sortGroups; }; chord.sortSubgroups = function(_) { return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups; }; chord.sortChords = function(_) { return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._; }; return chord; } /***/ }), /***/ "230S": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/append.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ "V/Wt"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { var create = typeof name === "function" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name); return this.select(function() { return this.appendChild(create.apply(this, arguments)); }); }); /***/ }), /***/ "2K37": /*!***********************************************!*\ !*** ./node_modules/d3-shape/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function constant() { return x; }; }); /***/ }), /***/ "2QA8": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js ***! \********************************************************************/ /*! exports provided: rxSubscriber, $$rxSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; }); const rxSubscriber = (() => typeof Symbol === 'function' ? Symbol('rxSubscriber') : '@@rxSubscriber_' + Math.random())(); const $$rxSubscriber = rxSubscriber; //# sourceMappingURL=rxSubscriber.js.map /***/ }), /***/ "2QGa": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/partition.js ***! \*********************************************************************/ /*! exports provided: partition */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; }); /* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/not */ "F97/"); /* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeTo */ "SeVD"); /* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/filter */ "pLZG"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ "HDdC"); function partition(source, predicate, thisArg) { return [ Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))), Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))) ]; } //# sourceMappingURL=partition.js.map /***/ }), /***/ "2TPD": /*!*******************************************************!*\ !*** ./node_modules/d3-format/src/precisionPrefix.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony default export */ __webpack_exports__["default"] = (function(step, value) { return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); }); /***/ }), /***/ "2TRZ": /*!*******************************************!*\ !*** ./node_modules/d3-zoom/src/index.js ***! \*******************************************/ /*! exports provided: zoom, zoomTransform, zoomIdentity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoom.js */ "hkWm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ "hjfa"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["identity"]; }); /***/ }), /***/ "2Vo4": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js ***! \****************************************************************/ /*! exports provided: BehaviorSubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); /* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); class BehaviorSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor(_value) { super(); this._value = _value; } get value() { return this.getValue(); } _subscribe(subscriber) { const subscription = super._subscribe(subscriber); if (subscription && !subscription.closed) { subscriber.next(this._value); } return subscription; } getValue() { if (this.hasError) { throw this.thrownError; } else if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__["ObjectUnsubscribedError"](); } else { return this._value; } } next(value) { super.next(this._value = value); } } //# sourceMappingURL=BehaviorSubject.js.map /***/ }), /***/ "2Ynt": /*!******************************************************!*\ !*** ./node_modules/d3-format/src/precisionRound.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony default export */ __webpack_exports__["default"] = (function(step, max) { step = Math.abs(step), max = Math.abs(max) - step; return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(step)) + 1; }); /***/ }), /***/ "2YwT": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "f7fcb9addd8e31a354", "ffffccc2e69978c679238443", "ffffccc2e69978c67931a354006837", "ffffccd9f0a3addd8e78c67931a354006837", "ffffccd9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "2bil": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "2fFW": /*!*******************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/config.js ***! \*******************************************************/ /*! exports provided: config */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; }); let _enable_super_gross_mode_that_will_cause_bad_things = false; const config = { Promise: undefined, set useDeprecatedSynchronousErrorHandling(value) { if (value) { const error = new Error(); console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack); } else if (_enable_super_gross_mode_that_will_cause_bad_things) { console.log('RxJS: Back to a better error behavior. Thank you. <3'); } _enable_super_gross_mode_that_will_cause_bad_things = value; }, get useDeprecatedSynchronousErrorHandling() { return _enable_super_gross_mode_that_will_cause_bad_things; }, }; //# sourceMappingURL=config.js.map /***/ }), /***/ "2kEi": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fff7bcfec44fd95f0e", "ffffd4fed98efe9929cc4c02", "ffffd4fed98efe9929d95f0e993404", "ffffd4fee391fec44ffe9929d95f0e993404", "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "2nV0": /*!************************************************************!*\ !*** ./node_modules/d3-interpolate/src/transform/parse.js ***! \************************************************************/ /*! exports provided: parseCss, parseSvg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCss", function() { return parseCss; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSvg", function() { return parseSvg; }); /* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ "Mlif"); var svgNode; /* eslint-disable no-undef */ function parseCss(value) { const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); return m.isIdentity ? _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"] : Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(m.a, m.b, m.c, m.d, m.e, m.f); } function parseSvg(value) { if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); svgNode.setAttribute("transform", value); if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; value = value.matrix; return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value.a, value.b, value.c, value.d, value.e, value.f); } /***/ }), /***/ "2tFh": /*!******************************************************!*\ !*** ./node_modules/d3-format/src/precisionFixed.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony default export */ __webpack_exports__["default"] = (function(step) { return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); }); /***/ }), /***/ "30U6": /*!***********************************************!*\ !*** ./node_modules/d3-dispatch/src/index.js ***! \***********************************************/ /*! exports provided: dispatch */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ "xo8x"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /***/ }), /***/ "31Y3": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/text.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ "Nehl"); function textConstant(value) { return function() { this.textContent = value; }; } function textFunction(value) { return function() { var value1 = value(this); this.textContent = value1 == null ? "" : value1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { return this.tween("text", typeof value === "function" ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__["tweenValue"])(this, "text", value)) : textConstant(value == null ? "" : value + "")); }); /***/ }), /***/ "32Ea": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skipWhile.js ***! \********************************************************************/ /*! exports provided: skipWhile */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function skipWhile(predicate) { return (source) => source.lift(new SkipWhileOperator(predicate)); } class SkipWhileOperator { constructor(predicate) { this.predicate = predicate; } call(subscriber, source) { return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate)); } } class SkipWhileSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate) { super(destination); this.predicate = predicate; this.skipping = true; this.index = 0; } _next(value) { const destination = this.destination; if (this.skipping) { this.tryCallPredicate(value); } if (!this.skipping) { destination.next(value); } } tryCallPredicate(value) { try { const result = this.predicate(value, this.index++); this.skipping = Boolean(result); } catch (err) { this.destination.error(err); } } } //# sourceMappingURL=skipWhile.js.map /***/ }), /***/ "3E0/": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/delay.js ***! \****************************************************************/ /*! exports provided: delay */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isDate */ "mlxB"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Notification */ "WMd4"); function delay(delay, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { const absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__["isDate"])(delay); const delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay); return (source) => source.lift(new DelayOperator(delayFor, scheduler)); } class DelayOperator { constructor(delay, scheduler) { this.delay = delay; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler)); } } class DelaySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, delay, scheduler) { super(destination); this.delay = delay; this.scheduler = scheduler; this.queue = []; this.active = false; this.errored = false; } static dispatch(state) { const source = state.source; const queue = source.queue; const scheduler = state.scheduler; const destination = state.destination; while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) { queue.shift().notification.observe(destination); } if (queue.length > 0) { const delay = Math.max(0, queue[0].time - scheduler.now()); this.schedule(state, delay); } else { this.unsubscribe(); source.active = false; } } _schedule(scheduler) { this.active = true; const destination = this.destination; destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, { source: this, destination: this.destination, scheduler: scheduler })); } scheduleNotification(notification) { if (this.errored === true) { return; } const scheduler = this.scheduler; const message = new DelayMessage(scheduler.now() + this.delay, notification); this.queue.push(message); if (this.active === false) { this._schedule(scheduler); } } _next(value) { this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createNext(value)); } _error(err) { this.errored = true; this.queue = []; this.destination.error(err); this.unsubscribe(); } _complete() { this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createComplete()); this.unsubscribe(); } } class DelayMessage { constructor(time, notification) { this.time = time; this.notification = notification; } } //# sourceMappingURL=delay.js.map /***/ }), /***/ "3N8a": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js ***! \**********************************************************************/ /*! exports provided: AsyncAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; }); /* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ "7ve7"); class AsyncAction extends _Action__WEBPACK_IMPORTED_MODULE_0__["Action"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; this.pending = false; } schedule(state, delay = 0) { if (this.closed) { return this; } this.state = state; const id = this.id; const scheduler = this.scheduler; if (id != null) { this.id = this.recycleAsyncId(scheduler, id, delay); } this.pending = true; this.delay = delay; this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); return this; } requestAsyncId(scheduler, id, delay = 0) { return setInterval(scheduler.flush.bind(scheduler, this), delay); } recycleAsyncId(scheduler, id, delay = 0) { if (delay !== null && this.delay === delay && this.pending === false) { return id; } clearInterval(id); return undefined; } execute(state, delay) { if (this.closed) { return new Error('executing a cancelled action'); } this.pending = false; const error = this._execute(state, delay); if (error) { return error; } else if (this.pending === false && this.id != null) { this.id = this.recycleAsyncId(this.scheduler, this.id, null); } } _execute(state, delay) { let errored = false; let errorValue = undefined; try { this.work(state); } catch (e) { errored = true; errorValue = !!e && e || new Error(e); } if (errored) { this.unsubscribe(); return errorValue; } } _unsubscribe() { const id = this.id; const scheduler = this.scheduler; const actions = scheduler.actions; const index = actions.indexOf(this); this.work = null; this.state = null; this.pending = false; this.scheduler = null; if (index !== -1) { actions.splice(index, 1); } if (id != null) { this.id = this.recycleAsyncId(scheduler, id, null); } this.delay = null; } } //# sourceMappingURL=AsyncAction.js.map /***/ }), /***/ "3O/B": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/superset.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return superset; }); function superset(values, other) { const iterator = values[Symbol.iterator](), set = new Set(); for (const o of other) { if (set.has(o)) continue; let value, done; while (({value, done} = iterator.next())) { if (done) return false; set.add(value); if (Object.is(o, value)) break; } } return true; } /***/ }), /***/ "3Ryo": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/reduce.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return reduce; }); function reduce(values, reducer, value) { if (typeof reducer !== "function") throw new TypeError("reducer is not a function"); const iterator = values[Symbol.iterator](); let done, next, index = -1; if (arguments.length < 3) { ({done, value} = iterator.next()); if (done) return; ++index; } while (({done, value: next} = iterator.next()), !done) { value = reducer(value, next, ++index, values); } return value; } /***/ }), /***/ "3UWI": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/auditTime.js ***! \********************************************************************/ /*! exports provided: auditTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./audit */ "tnsW"); /* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/timer */ "PqYM"); function auditTime(duration, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(() => Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler)); } //# sourceMappingURL=auditTime.js.map /***/ }), /***/ "3Ygs": /*!*************************************************!*\ !*** ./node_modules/d3-delaunay/src/voronoi.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Voronoi; }); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "8SsQ"); /* harmony import */ var _polygon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./polygon.js */ "WDTS"); class Voronoi { constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) { if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error("invalid bounds"); this.delaunay = delaunay; this._circumcenters = new Float64Array(delaunay.points.length * 2); this.vectors = new Float64Array(delaunay.points.length * 2); this.xmax = xmax, this.xmin = xmin; this.ymax = ymax, this.ymin = ymin; this._init(); } update() { this.delaunay.update(); this._init(); return this; } _init() { const {delaunay: {points, hull, triangles}, vectors} = this; // Compute circumcenters. const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2); for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) { const t1 = triangles[i] * 2; const t2 = triangles[i + 1] * 2; const t3 = triangles[i + 2] * 2; const x1 = points[t1]; const y1 = points[t1 + 1]; const x2 = points[t2]; const y2 = points[t2 + 1]; const x3 = points[t3]; const y3 = points[t3 + 1]; const dx = x2 - x1; const dy = y2 - y1; const ex = x3 - x1; const ey = y3 - y1; const bl = dx * dx + dy * dy; const cl = ex * ex + ey * ey; const ab = (dx * ey - dy * ex) * 2; if (!ab) { // degenerate case (collinear diagram) x = (x1 + x3) / 2 - 1e8 * ey; y = (y1 + y3) / 2 + 1e8 * ex; } else if (Math.abs(ab) < 1e-8) { // almost equal points (degenerate triangle) x = (x1 + x3) / 2; y = (y1 + y3) / 2; } else { const d = 1 / ab; x = x1 + (ey * bl - dy * cl) * d; y = y1 + (dx * cl - ex * bl) * d; } circumcenters[j] = x; circumcenters[j + 1] = y; } // Compute exterior cell rays. let h = hull[hull.length - 1]; let p0, p1 = h * 4; let x0, x1 = points[2 * h]; let y0, y1 = points[2 * h + 1]; vectors.fill(0); for (let i = 0; i < hull.length; ++i) { h = hull[i]; p0 = p1, x0 = x1, y0 = y1; p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1]; vectors[p0 + 2] = vectors[p1] = y0 - y1; vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0; } } render(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__["default"] : undefined; const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this; if (hull.length <= 1) return null; for (let i = 0, n = halfedges.length; i < n; ++i) { const j = halfedges[i]; if (j < i) continue; const ti = Math.floor(i / 3) * 2; const tj = Math.floor(j / 3) * 2; const xi = circumcenters[ti]; const yi = circumcenters[ti + 1]; const xj = circumcenters[tj]; const yj = circumcenters[tj + 1]; this._renderSegment(xi, yi, xj, yj, context); } let h0, h1 = hull[hull.length - 1]; for (let i = 0; i < hull.length; ++i) { h0 = h1, h1 = hull[i]; const t = Math.floor(inedges[h1] / 3) * 2; const x = circumcenters[t]; const y = circumcenters[t + 1]; const v = h0 * 4; const p = this._project(x, y, vectors[v + 2], vectors[v + 3]); if (p) this._renderSegment(x, y, p[0], p[1], context); } return buffer && buffer.value(); } renderBounds(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__["default"] : undefined; context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin); return buffer && buffer.value(); } renderCell(i, context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__["default"] : undefined; const points = this._clip(i); if (points === null || !points.length) return; context.moveTo(points[0], points[1]); let n = points.length; while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2; for (let i = 2; i < n; i += 2) { if (points[i] !== points[i-2] || points[i+1] !== points[i-1]) context.lineTo(points[i], points[i + 1]); } context.closePath(); return buffer && buffer.value(); } *cellPolygons() { const {delaunay: {points}} = this; for (let i = 0, n = points.length / 2; i < n; ++i) { const cell = this.cellPolygon(i); if (cell) cell.index = i, yield cell; } } cellPolygon(i) { const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_1__["default"]; this.renderCell(i, polygon); return polygon.value(); } _renderSegment(x0, y0, x1, y1, context) { let S; const c0 = this._regioncode(x0, y0); const c1 = this._regioncode(x1, y1); if (c0 === 0 && c1 === 0) { context.moveTo(x0, y0); context.lineTo(x1, y1); } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) { context.moveTo(S[0], S[1]); context.lineTo(S[2], S[3]); } } contains(i, x, y) { if ((x = +x, x !== x) || (y = +y, y !== y)) return false; return this.delaunay._step(i, x, y) === i; } *neighbors(i) { const ci = this._clip(i); if (ci) for (const j of this.delaunay.neighbors(i)) { const cj = this._clip(j); // find the common edge if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) { for (let aj = 0, lj = cj.length; aj < lj; aj += 2) { if (ci[ai] == cj[aj] && ci[ai + 1] == cj[aj + 1] && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj] && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj] ) { yield j; break loop; } } } } } _cell(i) { const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this; const e0 = inedges[i]; if (e0 === -1) return null; // coincident point const points = []; let e = e0; do { const t = Math.floor(e / 3); points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]); e = e % 3 === 2 ? e - 2 : e + 1; if (triangles[e] !== i) break; // bad triangulation e = halfedges[e]; } while (e !== e0 && e !== -1); return points; } _clip(i) { // degenerate case (1 valid point: return the box) if (i === 0 && this.delaunay.hull.length === 1) { return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; } const points = this._cell(i); if (points === null) return null; const {vectors: V} = this; const v = i * 4; return V[v] || V[v + 1] ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) : this._clipFinite(i, points); } _clipFinite(i, points) { const n = points.length; let P = null; let x0, y0, x1 = points[n - 2], y1 = points[n - 1]; let c0, c1 = this._regioncode(x1, y1); let e0, e1; for (let j = 0; j < n; j += 2) { x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1]; c0 = c1, c1 = this._regioncode(x1, y1); if (c0 === 0 && c1 === 0) { e0 = e1, e1 = 0; if (P) P.push(x1, y1); else P = [x1, y1]; } else { let S, sx0, sy0, sx1, sy1; if (c0 === 0) { if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue; [sx0, sy0, sx1, sy1] = S; } else { if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue; [sx1, sy1, sx0, sy0] = S; e0 = e1, e1 = this._edgecode(sx0, sy0); if (e0 && e1) this._edge(i, e0, e1, P, P.length); if (P) P.push(sx0, sy0); else P = [sx0, sy0]; } e0 = e1, e1 = this._edgecode(sx1, sy1); if (e0 && e1) this._edge(i, e0, e1, P, P.length); if (P) P.push(sx1, sy1); else P = [sx1, sy1]; } } if (P) { e0 = e1, e1 = this._edgecode(P[0], P[1]); if (e0 && e1) this._edge(i, e0, e1, P, P.length); } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; } return P; } _clipSegment(x0, y0, x1, y1, c0, c1) { while (true) { if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1]; if (c0 & c1) return null; let x, y, c = c0 || c1; if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax; else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin; else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax; else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin; if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0); else x1 = x, y1 = y, c1 = this._regioncode(x1, y1); } } _clipInfinite(i, points, vx0, vy0, vxn, vyn) { let P = Array.from(points), p; if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]); if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]); if (P = this._clipFinite(i, P)) { for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) { c0 = c1, c1 = this._edgecode(P[j], P[j + 1]); if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length; } } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]; } return P; } _edge(i, e0, e1, P, j) { while (e0 !== e1) { let x, y; switch (e0) { case 0b0101: e0 = 0b0100; continue; // top-left case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top case 0b0110: e0 = 0b0010; continue; // top-right case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right case 0b1010: e0 = 0b1000; continue; // bottom-right case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom case 0b1001: e0 = 0b0001; continue; // bottom-left case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left } if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) { P.splice(j, 0, x, y), j += 2; } } if (P.length > 4) { for (let i = 0; i < P.length; i+= 2) { const j = (i + 2) % P.length, k = (i + 4) % P.length; if (P[i] === P[j] && P[j] === P[k] || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) P.splice(j, 2), i -= 2; } } return j; } _project(x0, y0, vx, vy) { let t = Infinity, c, x, y; if (vy < 0) { // top if (y0 <= this.ymin) return null; if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx; } else if (vy > 0) { // bottom if (y0 >= this.ymax) return null; if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx; } if (vx > 0) { // right if (x0 >= this.xmax) return null; if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy; } else if (vx < 0) { // left if (x0 <= this.xmin) return null; if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy; } return [x, y]; } _edgecode(x, y) { return (x === this.xmin ? 0b0001 : x === this.xmax ? 0b0010 : 0b0000) | (y === this.ymin ? 0b0100 : y === this.ymax ? 0b1000 : 0b0000); } _regioncode(x, y) { return (x < this.xmin ? 0b0001 : x > this.xmax ? 0b0010 : 0b0000) | (y < this.ymin ? 0b0100 : y > this.ymax ? 0b1000 : 0b0000); } } /***/ }), /***/ "3oVi": /*!*************************************************!*\ !*** ./node_modules/d3-array/src/difference.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return difference; }); function difference(values, ...others) { values = new Set(values); for (const other of others) { for (const value of other) { values.delete(value); } } return values; } /***/ }), /***/ "3pBD": /*!**********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/count.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function count(node) { var sum = 0, children = node.children, i = children && children.length; if (!i) sum = 1; else while (--i >= 0) sum += children[i].value; node.value = sum; } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.eachAfter(count); }); /***/ }), /***/ "3xmg": /*!**********************************************!*\ !*** ./node_modules/d3-scale/src/ordinal.js ***! \**********************************************/ /*! exports provided: implicit, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "implicit", function() { return implicit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ordinal; }); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init.js */ "1Ix/"); const implicit = Symbol("implicit"); function ordinal() { var index = new Map(), domain = [], range = [], unknown = implicit; function scale(d) { var key = d + "", i = index.get(key); if (!i) { if (unknown !== implicit) return unknown; index.set(key, i = domain.push(d)); } return range[(i - 1) % range.length]; } scale.domain = function(_) { if (!arguments.length) return domain.slice(); domain = [], index = new Map(); for (const value of _) { const key = value + ""; if (index.has(key)) continue; index.set(key, domain.push(value)); } return scale; }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), scale) : range.slice(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return ordinal(domain, range).unknown(unknown); }; _init_js__WEBPACK_IMPORTED_MODULE_0__["initRange"].apply(scale, arguments); return scale; } /***/ }), /***/ "42CK": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/rgb.js ***! \************************************************/ /*! exports provided: default, rgbBasis, rgbBasisClosed */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasis", function() { return rgbBasis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasisClosed", function() { return rgbBasisClosed; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "yEp2"); /* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ "S83q"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ "sFV2"); /* harmony default export */ __webpack_exports__["default"] = ((function rgbGamma(y) { var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["gamma"])(y); function rgb(start, end) { var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(end)).r), g = color(start.g, end.g), b = color(start.b, end.b), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["default"])(start.opacity, end.opacity); return function(t) { start.r = r(t); start.g = g(t); start.b = b(t); start.opacity = opacity(t); return start + ""; }; } rgb.gamma = rgbGamma; return rgb; })(1)); function rgbSpline(spline) { return function(colors) { var n = colors.length, r = new Array(n), g = new Array(n), b = new Array(n), i, color; for (i = 0; i < n; ++i) { color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(colors[i]); r[i] = color.r || 0; g[i] = color.g || 0; b[i] = color.b || 0; } r = spline(r); g = spline(g); b = spline(b); color.opacity = 1; return function(t) { color.r = r(t); color.g = g(t); color.b = b(t); return color + ""; }; }; } var rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__["default"]); var rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__["default"]); /***/ }), /***/ "44y/": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/area.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curve/linear.js */ "SDD1"); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./line.js */ "+ugm"); /* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./point.js */ "/aQN"); /* harmony default export */ __webpack_exports__["default"] = (function(x0, y0, y1) { var x1 = null, defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(true), context = null, curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__["default"], output = null; x0 = typeof x0 === "function" ? x0 : (x0 === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_5__["x"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+x0); y0 = typeof y0 === "function" ? y0 : (y0 === undefined) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(0) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+y0); y1 = typeof y1 === "function" ? y1 : (y1 === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_5__["y"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+y1); function area(data) { var i, j, k, n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data)).length, d, defined0 = false, buffer, x0z = new Array(n), y0z = new Array(n); if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); for (i = 0; i <= n; ++i) { if (!(i < n && defined(d = data[i], i, data)) === defined0) { if (defined0 = !defined0) { j = i; output.areaStart(); output.lineStart(); } else { output.lineEnd(); output.lineStart(); for (k = i - 1; k >= j; --k) { output.point(x0z[k], y0z[k]); } output.lineEnd(); output.areaEnd(); } } if (defined0) { x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); } } if (buffer) return output = null, buffer + "" || null; } function arealine() { return Object(_line_js__WEBPACK_IMPORTED_MODULE_4__["default"])().defined(defined).curve(curve).context(context); } area.x = function(_) { return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), x1 = null, area) : x0; }; area.x0 = function(_) { return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : x0; }; area.x1 = function(_) { return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : x1; }; area.y = function(_) { return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), y1 = null, area) : y0; }; area.y0 = function(_) { return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : y0; }; area.y1 = function(_) { return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : y1; }; area.lineX0 = area.lineY0 = function() { return arealine().x(x0).y(y0); }; area.lineY1 = function() { return arealine().x(x0).y(y1); }; area.lineX1 = function() { return arealine().x(x1).y(y0); }; area.defined = function(_) { return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(!!_), area) : defined; }; area.curve = function(_) { return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; }; area.context = function(_) { return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; }; return area; }); /***/ }), /***/ "4A3s": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/ignoreElements.js ***! \*************************************************************************/ /*! exports provided: ignoreElements */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function ignoreElements() { return function ignoreElementsOperatorFunction(source) { return source.lift(new IgnoreElementsOperator()); }; } class IgnoreElementsOperator { call(subscriber, source) { return source.subscribe(new IgnoreElementsSubscriber(subscriber)); } } class IgnoreElementsSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { _next(unused) { } } //# sourceMappingURL=ignoreElements.js.map /***/ }), /***/ "4I5i": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js ***! \*****************************************************************************/ /*! exports provided: ArgumentOutOfRangeError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; }); const ArgumentOutOfRangeErrorImpl = (() => { function ArgumentOutOfRangeErrorImpl() { Error.call(this); this.message = 'argument out of range'; this.name = 'ArgumentOutOfRangeError'; return this; } ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype); return ArgumentOutOfRangeErrorImpl; })(); const ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; //# sourceMappingURL=ArgumentOutOfRangeError.js.map /***/ }), /***/ "4JcG": /*!**************************************************!*\ !*** ./node_modules/d3-delaunay/src/delaunay.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Delaunay; }); /* harmony import */ var delaunator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! delaunator */ "jqAh"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "8SsQ"); /* harmony import */ var _polygon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polygon.js */ "WDTS"); /* harmony import */ var _voronoi_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./voronoi.js */ "3Ygs"); const tau = 2 * Math.PI, pow = Math.pow; function pointX(p) { return p[0]; } function pointY(p) { return p[1]; } // A triangulation is collinear if all its triangles have a non-null area function collinear(d) { const {triangles, coords} = d; for (let i = 0; i < triangles.length; i += 3) { const a = 2 * triangles[i], b = 2 * triangles[i + 1], c = 2 * triangles[i + 2], cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]); if (cross > 1e-10) return false; } return true; } function jitter(x, y, r) { return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r]; } class Delaunay { static from(points, fx = pointX, fy = pointY, that) { return new Delaunay("length" in points ? flatArray(points, fx, fy, that) : Float64Array.from(flatIterable(points, fx, fy, that))); } constructor(points) { this._delaunator = new delaunator__WEBPACK_IMPORTED_MODULE_0__["default"](points); this.inedges = new Int32Array(points.length / 2); this._hullIndex = new Int32Array(points.length / 2); this.points = this._delaunator.coords; this._init(); } update() { this._delaunator.update(); this._init(); return this; } _init() { const d = this._delaunator, points = this.points; // check for collinear if (d.hull && d.hull.length > 2 && collinear(d)) { this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i) .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors const e = this.collinear[0], f = this.collinear[this.collinear.length - 1], bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ], r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]); for (let i = 0, n = points.length / 2; i < n; ++i) { const p = jitter(points[2 * i], points[2 * i + 1], r); points[2 * i] = p[0]; points[2 * i + 1] = p[1]; } this._delaunator = new delaunator__WEBPACK_IMPORTED_MODULE_0__["default"](points); } else { delete this.collinear; } const halfedges = this.halfedges = this._delaunator.halfedges; const hull = this.hull = this._delaunator.hull; const triangles = this.triangles = this._delaunator.triangles; const inedges = this.inedges.fill(-1); const hullIndex = this._hullIndex.fill(-1); // Compute an index from each point to an (arbitrary) incoming halfedge // Used to give the first neighbor of each point; for this reason, // on the hull we give priority to exterior halfedges for (let e = 0, n = halfedges.length; e < n; ++e) { const p = triangles[e % 3 === 2 ? e - 2 : e + 1]; if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e; } for (let i = 0, n = hull.length; i < n; ++i) { hullIndex[hull[i]] = i; } // degenerate case: 1 or 2 (distinct) points if (hull.length <= 2 && hull.length > 0) { this.triangles = new Int32Array(3).fill(-1); this.halfedges = new Int32Array(3).fill(-1); this.triangles[0] = hull[0]; this.triangles[1] = hull[1]; this.triangles[2] = hull[1]; inedges[hull[0]] = 1; if (hull.length === 2) inedges[hull[1]] = 0; } } voronoi(bounds) { return new _voronoi_js__WEBPACK_IMPORTED_MODULE_3__["default"](this, bounds); } *neighbors(i) { const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this; // degenerate case with several collinear points if (collinear) { const l = collinear.indexOf(i); if (l > 0) yield collinear[l - 1]; if (l < collinear.length - 1) yield collinear[l + 1]; return; } const e0 = inedges[i]; if (e0 === -1) return; // coincident point let e = e0, p0 = -1; do { yield p0 = triangles[e]; e = e % 3 === 2 ? e - 2 : e + 1; if (triangles[e] !== i) return; // bad triangulation e = halfedges[e]; if (e === -1) { const p = hull[(_hullIndex[i] + 1) % hull.length]; if (p !== p0) yield p; return; } } while (e !== e0); } find(x, y, i = 0) { if ((x = +x, x !== x) || (y = +y, y !== y)) return -1; const i0 = i; let c; while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c; return c; } _step(i, x, y) { const {inedges, hull, _hullIndex, halfedges, triangles, points} = this; if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1); let c = i; let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2); const e0 = inedges[i]; let e = e0; do { let t = triangles[e]; const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2); if (dt < dc) dc = dt, c = t; e = e % 3 === 2 ? e - 2 : e + 1; if (triangles[e] !== i) break; // bad triangulation e = halfedges[e]; if (e === -1) { e = hull[(_hullIndex[i] + 1) % hull.length]; if (e !== t) { if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e; } break; } } while (e !== e0); return c; } render(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {points, halfedges, triangles} = this; for (let i = 0, n = halfedges.length; i < n; ++i) { const j = halfedges[i]; if (j < i) continue; const ti = triangles[i] * 2; const tj = triangles[j] * 2; context.moveTo(points[ti], points[ti + 1]); context.lineTo(points[tj], points[tj + 1]); } this.renderHull(context); return buffer && buffer.value(); } renderPoints(context, r = 2) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {points} = this; for (let i = 0, n = points.length; i < n; i += 2) { const x = points[i], y = points[i + 1]; context.moveTo(x + r, y); context.arc(x, y, r, 0, tau); } return buffer && buffer.value(); } renderHull(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {hull, points} = this; const h = hull[0] * 2, n = hull.length; context.moveTo(points[h], points[h + 1]); for (let i = 1; i < n; ++i) { const h = 2 * hull[i]; context.lineTo(points[h], points[h + 1]); } context.closePath(); return buffer && buffer.value(); } hullPolygon() { const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_2__["default"]; this.renderHull(polygon); return polygon.value(); } renderTriangle(i, context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {points, triangles} = this; const t0 = triangles[i *= 3] * 2; const t1 = triangles[i + 1] * 2; const t2 = triangles[i + 2] * 2; context.moveTo(points[t0], points[t0 + 1]); context.lineTo(points[t1], points[t1 + 1]); context.lineTo(points[t2], points[t2 + 1]); context.closePath(); return buffer && buffer.value(); } *trianglePolygons() { const {triangles} = this; for (let i = 0, n = triangles.length / 3; i < n; ++i) { yield this.trianglePolygon(i); } } trianglePolygon(i) { const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_2__["default"]; this.renderTriangle(i, polygon); return polygon.value(); } } function flatArray(points, fx, fy, that) { const n = points.length; const array = new Float64Array(n * 2); for (let i = 0; i < n; ++i) { const p = points[i]; array[i * 2] = fx.call(that, p, i, points); array[i * 2 + 1] = fy.call(that, p, i, points); } return array; } function* flatIterable(points, fx, fy, that) { let i = 0; for (const p of points) { yield fx.call(that, p, i, points); yield fy.call(that, p, i, points); ++i; } } /***/ }), /***/ "4O5X": /*!****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/bindNodeCallback.js ***! \****************************************************************************/ /*! exports provided: bindNodeCallback */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); /* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "8Qeq"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); function bindNodeCallback(callbackFunc, resultSelector, scheduler) { if (resultSelector) { if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) { scheduler = resultSelector; } else { return (...args) => bindNodeCallback(callbackFunc, scheduler)(...args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } } return function (...args) { const params = { subject: undefined, args, callbackFunc, scheduler, context: this, }; return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const { context } = params; let { subject } = params; if (!scheduler) { if (!subject) { subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { const err = innerArgs.shift(); if (err) { subject.error(err); return; } subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); subject.complete(); }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) { subject.error(err); } else { console.warn(err); } } } return subject.subscribe(subscriber); } else { return scheduler.schedule(dispatch, 0, { params, subscriber, context }); } }); }; } function dispatch(state) { const { params, subscriber, context } = state; const { callbackFunc, args, scheduler } = params; let subject = params.subject; if (!subject) { subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { const err = innerArgs.shift(); if (err) { this.add(scheduler.schedule(dispatchError, 0, { err, subject })); } else { const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; this.add(scheduler.schedule(dispatchNext, 0, { value, subject })); } }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { this.add(scheduler.schedule(dispatchError, 0, { err, subject })); } } this.add(subject.subscribe(subscriber)); } function dispatchNext(arg) { const { value, subject } = arg; subject.next(value); subject.complete(); } function dispatchError(arg) { const { err, subject } = arg; subject.error(err); } //# sourceMappingURL=bindNodeCallback.js.map /***/ }), /***/ "4S0P": /*!***********************************************!*\ !*** ./node_modules/d3-random/src/poisson.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _binomial_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./binomial.js */ "BTWs"); /* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gamma.js */ "b54z"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomPoisson(source) { var G = _gamma_js__WEBPACK_IMPORTED_MODULE_2__["default"].source(source), B = _binomial_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomPoisson(lambda) { return function() { var acc = 0, l = lambda; while (l > 16) { var n = Math.floor(0.875 * l), t = G(n)(); if (t > l) return acc + B(n - 1, l / t)(); acc += n; l -= t; } for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source()); return acc + k; }; } randomPoisson.source = sourceRandomPoisson; return randomPoisson; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "4TqM": /*!********************************************!*\ !*** ./node_modules/d3-array/src/group.js ***! \********************************************/ /*! exports provided: default, groups, rollup, rollups, index, indexes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return group; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return groups; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return rollup; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return rollups; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "index", function() { return index; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return indexes; }); /* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ "vobT"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "i202"); function group(values, ...keys) { return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], keys); } function groups(values, ...keys) { return nest(values, Array.from, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], keys); } function rollup(values, reduce, ...keys) { return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], reduce, keys); } function rollups(values, reduce, ...keys) { return nest(values, Array.from, reduce, keys); } function index(values, ...keys) { return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], unique, keys); } function indexes(values, ...keys) { return nest(values, Array.from, unique, keys); } function unique(values) { if (values.length !== 1) throw new Error("duplicate key"); return values[0]; } function nest(values, map, reduce, keys) { return (function regroup(values, i) { if (i >= keys.length) return reduce(values); const groups = new internmap__WEBPACK_IMPORTED_MODULE_0__["InternMap"](); const keyof = keys[i++]; let index = -1; for (const value of values) { const key = keyof(value, ++index, values); const group = groups.get(key); if (group) group.push(value); else groups.set(key, [value]); } for (const [key, values] of groups) { groups.set(key, regroup(values, i)); } return map(groups); })(values, 0); } /***/ }), /***/ "4bGx": /*!*****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/transition.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function() { var name = this._name, id0 = this._id, id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(); for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["get"])(node, id0); Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id1, i, group, { time: inherit.time + inherit.delay + inherit.duration, delay: 0, duration: inherit.duration, ease: inherit.ease }); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id1); }); /***/ }), /***/ "4bmp": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/offset/diverging.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0)) return; for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { for (yp = yn = 0, i = 0; i < n; ++i) { if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { d[0] = yp, d[1] = yp += dy; } else if (dy < 0) { d[1] = yn, d[0] = yn += dy; } else { d[0] = 0, d[1] = dy; } } } }); /***/ }), /***/ "4f8F": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/race.js ***! \***************************************************************/ /*! exports provided: race */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/race */ "Nv8m"); function race(...observables) { return function raceOperatorFunction(source) { if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { observables = observables[0]; } return source.lift.call(Object(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"])(source, ...observables)); }; } //# sourceMappingURL=race.js.map /***/ }), /***/ "4hIw": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timeInterval.js ***! \***********************************************************************/ /*! exports provided: timeInterval, TimeInterval */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scan */ "Kqap"); /* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/defer */ "NXyV"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "lJxs"); function timeInterval(scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return (source) => Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(() => { return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(({ current }, value) => ({ value, current: scheduler.now(), last: current }), { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(({ current, last, value }) => new TimeInterval(value, current - last))); }); } class TimeInterval { constructor(value, interval) { this.value = value; this.interval = interval; } } //# sourceMappingURL=timeInterval.js.map /***/ }), /***/ "4jfb": /*!**************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conicConformal.js ***! \**************************************************************/ /*! exports provided: conicConformalRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicConformalRaw", function() { return conicConformalRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "bN2o"); /* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator.js */ "LZ5Q"); function tany(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + y) / 2); } function conicConformalRaw(y0, y1) { var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(cy0 / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(tany(y1) / tany(y0)), f = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y0), n) / n; if (!n) return _mercator_js__WEBPACK_IMPORTED_MODULE_2__["mercatorRaw"]; function project(x, y) { if (f > 0) { if (y < -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } else { if (y > _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } var r = f / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y), n); return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(n * x), f - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(n * x)]; } project.invert = function(x, y) { var fy = f - y, r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + fy * fy), l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(fy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(fy); if (fy * n < 0) l -= _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(fy); return [l / n, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(f / r, 1 / n)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; }; return project; } /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicConformalRaw) .scale(109.5) .parallels([30, 30]); }); /***/ }), /***/ "4m7i": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/number.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return number; }); function number(x) { return +x; } /***/ }), /***/ "4xGt": /*!*****************************************************!*\ !*** ./node_modules/d3-selection/src/namespaces.js ***! \*****************************************************/ /*! exports provided: xhtml, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xhtml", function() { return xhtml; }); var xhtml = "http://www.w3.org/1999/xhtml"; /* harmony default export */ __webpack_exports__["default"] = ({ svg: "http://www.w3.org/2000/svg", xhtml: xhtml, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" }); /***/ }), /***/ "4xfg": /*!***************************************************!*\ !*** ./node_modules/d3-interpolate/src/number.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a = +a, b = +b, function(t) { return a * (1 - t) + b * t; }; }); /***/ }), /***/ "4yVj": /*!**************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js ***! \**************************************************************************/ /*! exports provided: schedulePromise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function schedulePromise(input, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); sub.add(scheduler.schedule(() => input.then(value => { sub.add(scheduler.schedule(() => { subscriber.next(value); sub.add(scheduler.schedule(() => subscriber.complete())); })); }, err => { sub.add(scheduler.schedule(() => subscriber.error(err))); }))); return sub; }); } //# sourceMappingURL=schedulePromise.js.map /***/ }), /***/ "5+tZ": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js ***! \*******************************************************************/ /*! exports provided: mergeMap, MergeMapOperator, MergeMapSubscriber, flatMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return flatMap; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) { if (typeof resultSelector === 'function') { return (source) => source.pipe(mergeMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))), concurrent)); } else if (typeof resultSelector === 'number') { concurrent = resultSelector; } return (source) => source.lift(new MergeMapOperator(project, concurrent)); } class MergeMapOperator { constructor(project, concurrent = Number.POSITIVE_INFINITY) { this.project = project; this.concurrent = concurrent; } call(observer, source) { return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent)); } } class MergeMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) { super(destination); this.project = project; this.concurrent = concurrent; this.hasCompleted = false; this.buffer = []; this.active = 0; this.index = 0; } _next(value) { if (this.active < this.concurrent) { this._tryNext(value); } else { this.buffer.push(value); } } _tryNext(value) { let result; const index = this.index++; try { result = this.project(value, index); } catch (err) { this.destination.error(err); return; } this.active++; this._innerSub(result); } _innerSub(ish) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(ish, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } _complete() { this.hasCompleted = true; if (this.active === 0 && this.buffer.length === 0) { this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { this.destination.next(innerValue); } notifyComplete() { const buffer = this.buffer; this.active--; if (buffer.length > 0) { this._next(buffer.shift()); } else if (this.active === 0 && this.hasCompleted) { this.destination.complete(); } } } const flatMap = mergeMap; //# sourceMappingURL=mergeMap.js.map /***/ }), /***/ "5/wc": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/extent.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle.js */ "F2eR"); /* harmony default export */ __webpack_exports__["default"] = (function() { var x0 = 0, y0 = 0, x1 = 960, y1 = 500, cache, cacheStream, clip; return clip = { stream: function(stream) { return cache && cacheStream === stream ? cache : cache = Object(_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0, y0, x1, y1)(cacheStream = stream); }, extent: function(_) { return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]]; } }; }); /***/ }), /***/ "50A1": /*!***********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***! \***********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fee0d2fc9272de2d26", "fee5d9fcae91fb6a4acb181d", "fee5d9fcae91fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "51Bx": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeScan.js ***! \********************************************************************/ /*! exports provided: mergeScan, MergeScanOperator, MergeScanSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function mergeScan(accumulator, seed, concurrent = Number.POSITIVE_INFINITY) { return (source) => source.lift(new MergeScanOperator(accumulator, seed, concurrent)); } class MergeScanOperator { constructor(accumulator, seed, concurrent) { this.accumulator = accumulator; this.seed = seed; this.concurrent = concurrent; } call(subscriber, source) { return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent)); } } class MergeScanSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, accumulator, acc, concurrent) { super(destination); this.accumulator = accumulator; this.acc = acc; this.concurrent = concurrent; this.hasValue = false; this.hasCompleted = false; this.buffer = []; this.active = 0; this.index = 0; } _next(value) { if (this.active < this.concurrent) { const index = this.index++; const destination = this.destination; let ish; try { const { accumulator } = this; ish = accumulator(this.acc, value, index); } catch (e) { return destination.error(e); } this.active++; this._innerSub(ish); } else { this.buffer.push(value); } } _innerSub(ish) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(ish, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } _complete() { this.hasCompleted = true; if (this.active === 0 && this.buffer.length === 0) { if (this.hasValue === false) { this.destination.next(this.acc); } this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { const { destination } = this; this.acc = innerValue; this.hasValue = true; destination.next(innerValue); } notifyComplete() { const buffer = this.buffer; this.active--; if (buffer.length > 0) { this._next(buffer.shift()); } else if (this.active === 0 && this.hasCompleted) { if (this.hasValue === false) { this.destination.next(this.acc); } this.destination.complete(); } } } //# sourceMappingURL=mergeScan.js.map /***/ }), /***/ "51Dv": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js ***! \****************************************************************/ /*! exports provided: InnerSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); class InnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent, outerValue, outerIndex) { super(); this.parent = parent; this.outerValue = outerValue; this.outerIndex = outerIndex; this.index = 0; } _next(value) { this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this); } _error(error) { this.parent.notifyError(error, this); this.unsubscribe(); } _complete() { this.parent.notifyComplete(this); this.unsubscribe(); } } //# sourceMappingURL=InnerSubscriber.js.map /***/ }), /***/ "5B2Y": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleObservable.js ***! \*****************************************************************************/ /*! exports provided: scheduleObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); function scheduleObservable(input, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); sub.add(scheduler.schedule(() => { const observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]](); sub.add(observable.subscribe({ next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); }, error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); }, complete() { sub.add(scheduler.schedule(() => subscriber.complete())); }, })); })); return sub; }); } //# sourceMappingURL=scheduleObservable.js.map /***/ }), /***/ "5D8y": /*!**************************************************!*\ !*** ./node_modules/d3-geo/src/path/centroid.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); // TODO Enforce positive area for exterior, negative area for interior? var X0 = 0, Y0 = 0, Z0 = 0, X1 = 0, Y1 = 0, Z1 = 0, X2 = 0, Y2 = 0, Z2 = 0, x00, y00, x0, y0; var centroidStream = { point: centroidPoint, lineStart: centroidLineStart, lineEnd: centroidLineEnd, polygonStart: function() { centroidStream.lineStart = centroidRingStart; centroidStream.lineEnd = centroidRingEnd; }, polygonEnd: function() { centroidStream.point = centroidPoint; centroidStream.lineStart = centroidLineStart; centroidStream.lineEnd = centroidLineEnd; }, result: function() { var centroid = Z2 ? [X2 / Z2, Y2 / Z2] : Z1 ? [X1 / Z1, Y1 / Z1] : Z0 ? [X0 / Z0, Y0 / Z0] : [NaN, NaN]; X0 = Y0 = Z0 = X1 = Y1 = Z1 = X2 = Y2 = Z2 = 0; return centroid; } }; function centroidPoint(x, y) { X0 += x; Y0 += y; ++Z0; } function centroidLineStart() { centroidStream.point = centroidPointFirstLine; } function centroidPointFirstLine(x, y) { centroidStream.point = centroidPointLine; centroidPoint(x0 = x, y0 = y); } function centroidPointLine(x, y) { var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); X1 += z * (x0 + x) / 2; Y1 += z * (y0 + y) / 2; Z1 += z; centroidPoint(x0 = x, y0 = y); } function centroidLineEnd() { centroidStream.point = centroidPoint; } function centroidRingStart() { centroidStream.point = centroidPointFirstRing; } function centroidRingEnd() { centroidPointRing(x00, y00); } function centroidPointFirstRing(x, y) { centroidStream.point = centroidPointRing; centroidPoint(x00 = x0 = x, y00 = y0 = y); } function centroidPointRing(x, y) { var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); X1 += z * (x0 + x) / 2; Y1 += z * (y0 + y) / 2; Z1 += z; z = y0 * x - x0 * y; X2 += z * (x0 + x); Y2 += z * (y0 + y); Z2 += z * 3; centroidPoint(x0 = x, y0 = y); } /* harmony default export */ __webpack_exports__["default"] = (centroidStream); /***/ }), /***/ "5Iso": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/index.js ***! \**********************************************************/ /*! exports provided: root, Selection, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "root", function() { return root; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; }); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select.js */ "uvNp"); /* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll.js */ "+w/h"); /* harmony import */ var _selectChild_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectChild.js */ "sb9E"); /* harmony import */ var _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectChildren.js */ "bBIG"); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filter.js */ "DN/c"); /* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data.js */ "EgnQ"); /* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./enter.js */ "9om9"); /* harmony import */ var _exit_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./exit.js */ "87ba"); /* harmony import */ var _join_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./join.js */ "P3dq"); /* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./merge.js */ "i3vF"); /* harmony import */ var _order_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./order.js */ "oUm1"); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sort.js */ "yp+X"); /* harmony import */ var _call_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./call.js */ "Ct04"); /* harmony import */ var _nodes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./nodes.js */ "mwYI"); /* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./node.js */ "luAU"); /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./size.js */ "mrS5"); /* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./empty.js */ "yhWi"); /* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./each.js */ "zv5K"); /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./attr.js */ "+HKQ"); /* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./style.js */ "Nkvg"); /* harmony import */ var _property_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./property.js */ "zcMM"); /* harmony import */ var _classed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./classed.js */ "ULlS"); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./text.js */ "YbCY"); /* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./html.js */ "skEf"); /* harmony import */ var _raise_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./raise.js */ "GRP9"); /* harmony import */ var _lower_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./lower.js */ "F8PK"); /* harmony import */ var _append_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./append.js */ "230S"); /* harmony import */ var _insert_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./insert.js */ "WmHh"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./remove.js */ "JZGO"); /* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./clone.js */ "6hMD"); /* harmony import */ var _datum_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./datum.js */ "yAGa"); /* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./on.js */ "AWXE"); /* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./dispatch.js */ "TisH"); /* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./iterator.js */ "oAyw"); var root = [null]; function Selection(groups, parents) { this._groups = groups; this._parents = parents; } function selection() { return new Selection([[document.documentElement]], root); } function selection_selection() { return this; } Selection.prototype = selection.prototype = { constructor: Selection, select: _select_js__WEBPACK_IMPORTED_MODULE_0__["default"], selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_1__["default"], selectChild: _selectChild_js__WEBPACK_IMPORTED_MODULE_2__["default"], selectChildren: _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__["default"], filter: _filter_js__WEBPACK_IMPORTED_MODULE_4__["default"], data: _data_js__WEBPACK_IMPORTED_MODULE_5__["default"], enter: _enter_js__WEBPACK_IMPORTED_MODULE_6__["default"], exit: _exit_js__WEBPACK_IMPORTED_MODULE_7__["default"], join: _join_js__WEBPACK_IMPORTED_MODULE_8__["default"], merge: _merge_js__WEBPACK_IMPORTED_MODULE_9__["default"], selection: selection_selection, order: _order_js__WEBPACK_IMPORTED_MODULE_10__["default"], sort: _sort_js__WEBPACK_IMPORTED_MODULE_11__["default"], call: _call_js__WEBPACK_IMPORTED_MODULE_12__["default"], nodes: _nodes_js__WEBPACK_IMPORTED_MODULE_13__["default"], node: _node_js__WEBPACK_IMPORTED_MODULE_14__["default"], size: _size_js__WEBPACK_IMPORTED_MODULE_15__["default"], empty: _empty_js__WEBPACK_IMPORTED_MODULE_16__["default"], each: _each_js__WEBPACK_IMPORTED_MODULE_17__["default"], attr: _attr_js__WEBPACK_IMPORTED_MODULE_18__["default"], style: _style_js__WEBPACK_IMPORTED_MODULE_19__["default"], property: _property_js__WEBPACK_IMPORTED_MODULE_20__["default"], classed: _classed_js__WEBPACK_IMPORTED_MODULE_21__["default"], text: _text_js__WEBPACK_IMPORTED_MODULE_22__["default"], html: _html_js__WEBPACK_IMPORTED_MODULE_23__["default"], raise: _raise_js__WEBPACK_IMPORTED_MODULE_24__["default"], lower: _lower_js__WEBPACK_IMPORTED_MODULE_25__["default"], append: _append_js__WEBPACK_IMPORTED_MODULE_26__["default"], insert: _insert_js__WEBPACK_IMPORTED_MODULE_27__["default"], remove: _remove_js__WEBPACK_IMPORTED_MODULE_28__["default"], clone: _clone_js__WEBPACK_IMPORTED_MODULE_29__["default"], datum: _datum_js__WEBPACK_IMPORTED_MODULE_30__["default"], on: _on_js__WEBPACK_IMPORTED_MODULE_31__["default"], dispatch: _dispatch_js__WEBPACK_IMPORTED_MODULE_32__["default"], [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_33__["default"] }; /* harmony default export */ __webpack_exports__["default"] = (selection); /***/ }), /***/ "5NTL": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/curve/bump.js ***! \*************************************************/ /*! exports provided: bumpX, bumpY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bumpX", function() { return bumpX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bumpY", function() { return bumpY; }); class Bump { constructor(context, x) { this._context = context; this._x = x; } areaStart() { this._line = 0; } areaEnd() { this._line = NaN; } lineStart() { this._point = 0; } lineEnd() { if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; } point(x, y) { x = +x, y = +y; switch (this._point) { case 0: { this._point = 1; if (this._line) this._context.lineTo(x, y); else this._context.moveTo(x, y); break; } case 1: this._point = 2; // proceed default: { if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y); else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y); break; } } this._x0 = x, this._y0 = y; } } function bumpX(context) { return new Bump(context, true); } function bumpY(context) { return new Bump(context, false); } /***/ }), /***/ "5Xrj": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/poly.js ***! \******************************************/ /*! exports provided: polyIn, polyOut, polyInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyIn", function() { return polyIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyOut", function() { return polyOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyInOut", function() { return polyInOut; }); var exponent = 3; var polyIn = (function custom(e) { e = +e; function polyIn(t) { return Math.pow(t, e); } polyIn.exponent = custom; return polyIn; })(exponent); var polyOut = (function custom(e) { e = +e; function polyOut(t) { return 1 - Math.pow(1 - t, e); } polyOut.exponent = custom; return polyOut; })(exponent); var polyInOut = (function custom(e) { e = +e; function polyInOut(t) { return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; } polyInOut.exponent = custom; return polyInOut; })(exponent); /***/ }), /***/ "5aFE": /*!******************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/interpolate.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var c; return (typeof b === "number" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"] : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"] : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"]) : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateString"])(a, b); }); /***/ }), /***/ "5xK/": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/rejoin.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual.js */ "fnXD"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); function Intersection(point, points, other, entry) { this.x = point; this.z = points; this.o = other; // another intersection this.e = entry; // is an entry? this.v = false; // visited this.n = this.p = null; // next & previous } // A generalized polygon clipping algorithm: given a polygon that has been cut // into its visible line segments, and rejoins the segments by interpolating // along the clip edge. /* harmony default export */ __webpack_exports__["default"] = (function(segments, compareIntersection, startInside, interpolate, stream) { var subject = [], clip = [], i, n; segments.forEach(function(segment) { if ((n = segment.length - 1) <= 0) return; var n, p0 = segment[0], p1 = segment[n], x; if (Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__["default"])(p0, p1)) { if (!p0[2] && !p1[2]) { stream.lineStart(); for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); stream.lineEnd(); return; } // handle degenerate cases by moving the point p1[0] += 2 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; } subject.push(x = new Intersection(p0, segment, null, true)); clip.push(x.o = new Intersection(p0, null, x, false)); subject.push(x = new Intersection(p1, segment, null, false)); clip.push(x.o = new Intersection(p1, null, x, true)); }); if (!subject.length) return; clip.sort(compareIntersection); link(subject); link(clip); for (i = 0, n = clip.length; i < n; ++i) { clip[i].e = startInside = !startInside; } var start = subject[0], points, point; while (1) { // Find first unvisited intersection. var current = start, isSubject = true; while (current.v) if ((current = current.n) === start) return; points = current.z; stream.lineStart(); do { current.v = current.o.v = true; if (current.e) { if (isSubject) { for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); } else { interpolate(current.x, current.n.x, 1, stream); } current = current.n; } else { if (isSubject) { points = current.p.z; for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); } else { interpolate(current.x, current.p.x, -1, stream); } current = current.p; } current = current.o; points = current.z; isSubject = !isSubject; } while (!current.v); stream.lineEnd(); } }); function link(array) { if (!(n = array.length)) return; var n, i = 0, a = array[0], b; while (++i < n) { a.n = b = array[i]; b.p = a; a = b; } a.n = b = array[0]; b.p = a; } /***/ }), /***/ "5yfJ": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/never.js ***! \*****************************************************************/ /*! exports provided: NEVER, never */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ "KqfI"); const NEVER = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]); function never() { return NEVER; } //# sourceMappingURL=never.js.map /***/ }), /***/ "62fh": /*!*****************************************!*\ !*** ./node_modules/d3-ease/src/sin.js ***! \*****************************************/ /*! exports provided: sinIn, sinOut, sinInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinIn", function() { return sinIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinOut", function() { return sinOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinInOut", function() { return sinInOut; }); var pi = Math.PI, halfPi = pi / 2; function sinIn(t) { return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi); } function sinOut(t) { return Math.sin(t * halfPi); } function sinInOut(t) { return (1 - Math.cos(pi * t)) / 2; } /***/ }), /***/ "6YF4": /*!*************************************************!*\ !*** ./node_modules/d3-scale/src/continuous.js ***! \*************************************************/ /*! exports provided: identity, copy, transformer, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return continuous; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "TfGn"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ "4m7i"); var unit = [0, 1]; function identity(x) { return x; } function normalize(a, b) { return (b -= (a = +a)) ? function(x) { return (x - a) / b; } : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(isNaN(b) ? NaN : 0.5); } function clamper(a, b) { var t; if (a > b) t = a, a = b, b = t; return function(x) { return Math.max(a, Math.min(b, x)); }; } // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. function bimap(domain, range, interpolate) { var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); return function(x) { return r0(d0(x)); }; } function polymap(domain, range, interpolate) { var j = Math.min(domain.length, range.length) - 1, d = new Array(j), r = new Array(j), i = -1; // Reverse descending domains. if (domain[j] < domain[0]) { domain = domain.slice().reverse(); range = range.slice().reverse(); } while (++i < j) { d[i] = normalize(domain[i], domain[i + 1]); r[i] = interpolate(range[i], range[i + 1]); } return function(x) { var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 1, j) - 1; return r[i](d[i](x)); }; } function copy(source, target) { return target .domain(source.domain()) .range(source.range()) .interpolate(source.interpolate()) .clamp(source.clamp()) .unknown(source.unknown()); } function transformer() { var domain = unit, range = unit, interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolate"], transform, untransform, unknown, clamp = identity, piecewise, output, input; function rescale() { var n = Math.min(domain.length, range.length); if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]); piecewise = n > 2 ? polymap : bimap; output = input = null; return scale; } function scale(x) { return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); } scale.invert = function(y) { return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"])))(y))); }; scale.domain = function(_) { return arguments.length ? (domain = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_3__["default"]), rescale()) : domain.slice(); }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); }; scale.rangeRound = function(_) { return range = Array.from(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRound"], rescale(); }; scale.clamp = function(_) { return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; }; scale.interpolate = function(_) { return arguments.length ? (interpolate = _, rescale()) : interpolate; }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; return function(t, u) { transform = t, untransform = u; return rescale(); }; } function continuous() { return transformer()(identity, identity); } /***/ }), /***/ "6ZHU": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/math.js ***! \******************************************/ /*! exports provided: tpmt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tpmt", function() { return tpmt; }); // tpmt is two power minus ten times t scaled to [0,1] function tpmt(x) { return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494; } /***/ }), /***/ "6eBy": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/debounce.js ***! \*******************************************************************/ /*! exports provided: debounce */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function debounce(durationSelector) { return (source) => source.lift(new DebounceOperator(durationSelector)); } class DebounceOperator { constructor(durationSelector) { this.durationSelector = durationSelector; } call(subscriber, source) { return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector)); } } class DebounceSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, durationSelector) { super(destination); this.durationSelector = durationSelector; this.hasValue = false; } _next(value) { try { const result = this.durationSelector.call(this, value); if (result) { this._tryNext(value, result); } } catch (err) { this.destination.error(err); } } _complete() { this.emitValue(); this.destination.complete(); } _tryNext(value, duration) { let subscription = this.durationSubscription; this.value = value; this.hasValue = true; if (subscription) { subscription.unsubscribe(); this.remove(subscription); } subscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)); if (subscription && !subscription.closed) { this.add(this.durationSubscription = subscription); } } notifyNext() { this.emitValue(); } notifyComplete() { this.emitValue(); } emitValue() { if (this.hasValue) { const value = this.value; const subscription = this.durationSubscription; if (subscription) { this.durationSubscription = undefined; subscription.unsubscribe(); this.remove(subscription); } this.value = undefined; this.hasValue = false; super._next(value); } } } //# sourceMappingURL=debounce.js.map /***/ }), /***/ "6h3Y": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/value.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ "42CK"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ "ZzDG"); /* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "G21l"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ "4xfg"); /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ "cb2h"); /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ "kO9b"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ "xpj1"); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "Ud7J"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var t = typeof b, c; return b == null || t === "boolean" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__["default"])(b) : (t === "number" ? _number_js__WEBPACK_IMPORTED_MODULE_4__["default"] : t === "string" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__["default"]) : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"] : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__["default"] : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"] : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__["genericArray"] : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__["default"] : _number_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b); }); /***/ }), /***/ "6hMD": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/clone.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function selection_cloneShallow() { var clone = this.cloneNode(false), parent = this.parentNode; return parent ? parent.insertBefore(clone, this.nextSibling) : clone; } function selection_cloneDeep() { var clone = this.cloneNode(true), parent = this.parentNode; return parent ? parent.insertBefore(clone, this.nextSibling) : clone; } /* harmony default export */ __webpack_exports__["default"] = (function(deep) { return this.select(deep ? selection_cloneDeep : selection_cloneShallow); }); /***/ }), /***/ "6hg5": /*!*********************************************!*\ !*** ./node_modules/d3-dsv/src/autoType.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoType; }); function autoType(object) { for (var key in object) { var value = object[key].trim(), number, m; if (!value) value = null; else if (value === "true") value = true; else if (value === "false") value = false; else if (value === "NaN") value = NaN; else if (!isNaN(number = +value)) value = number; else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); value = new Date(value); } else continue; object[key] = value; } return object; } // https://github.com/d3/d3-dsv/issues/45 const fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); /***/ }), /***/ "6nXi": /*!**************************************************!*\ !*** ./node_modules/d3-transition/src/active.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ "0W9s"); /* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ "rtYu"); var root = [null]; /* harmony default export */ __webpack_exports__["default"] = (function(node, name) { var schedules = node.__transition, schedule, i; if (schedules) { name = name == null ? null : name + ""; for (i in schedules) { if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["SCHEDULED"] && schedule.name === name) { return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]([[node]], root, name, +i); } } } return null; }); /***/ }), /***/ "6txh": /*!******************************************!*\ !*** ./node_modules/d3-path/src/path.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); const pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon; function Path() { this._x0 = this._y0 = // start of current subpath this._x1 = this._y1 = null; // end of current subpath this._ = ""; } function path() { return new Path; } Path.prototype = path.prototype = { constructor: Path, moveTo: function(x, y) { this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); }, closePath: function() { if (this._x1 !== null) { this._x1 = this._x0, this._y1 = this._y0; this._ += "Z"; } }, lineTo: function(x, y) { this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); }, quadraticCurveTo: function(x1, y1, x, y) { this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); }, bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); }, arcTo: function(x1, y1, x2, y2, r) { x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01; // Is the radius negative? Error. if (r < 0) throw new Error("negative radius: " + r); // Is this path empty? Move to (x1,y1). if (this._x1 === null) { this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); } // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. else if (!(l01_2 > epsilon)); // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? // Equivalently, is (x1,y1) coincident with (x2,y2)? // Or, is the radius zero? Line to (x1,y1). else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); } // Otherwise, draw an arc! else { var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21; // If the start tangent is not coincident with (x0,y0), line to. if (Math.abs(t01 - 1) > epsilon) { this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); } this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); } }, arc: function(x, y, r, a0, a1, ccw) { x = +x, y = +y, r = +r, ccw = !!ccw; var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x + dx, y0 = y + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0; // Is the radius negative? Error. if (r < 0) throw new Error("negative radius: " + r); // Is this path empty? Move to (x0,y0). if (this._x1 === null) { this._ += "M" + x0 + "," + y0; } // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { this._ += "L" + x0 + "," + y0; } // Is this arc empty? We’re done. if (!r) return; // Does the angle go the wrong way? Flip the direction. if (da < 0) da = da % tau + tau; // Is this a complete circle? Draw two arcs to complete the circle. if (da > tauEpsilon) { this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); } // Is this arc non-empty? Draw an arc! else if (da > epsilon) { this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); } }, rect: function(x, y, w, h) { this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; }, toString: function() { return this._; } }; /* harmony default export */ __webpack_exports__["default"] = (path); /***/ }), /***/ "6x6I": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/each.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { let index = -1; for (const node of this) { callback.call(that, node, ++index, this); } return this; }); /***/ }), /***/ "7+OI": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isObservable.js ***! \******************************************************************/ /*! exports provided: isObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); function isObservable(obj) { return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function')); } //# sourceMappingURL=isObservable.js.map /***/ }), /***/ "7FHc": /*!****************************************************!*\ !*** ./node_modules/d3-geo/src/polygonContains.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian.js */ "YzSS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "R0y8"); function longitude(point) { if (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) <= _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) return point[0]; else return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sign"])(point[0]) * ((Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) + _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]); } /* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { var lambda = longitude(point), phi = point[1], sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi), normal = [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(lambda), -Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda), 0], angle = 0, winding = 0; var sum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); if (sinPhi === 1) phi = _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; else if (sinPhi === -1) phi = -_math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; for (var i = 0, n = polygon.length; i < n; ++i) { if (!(m = (ring = polygon[i]).length)) continue; var ring, m, point0 = ring[m - 1], lambda0 = longitude(point0), phi0 = point0[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi0), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi0); for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { var point1 = ring[j], lambda1 = longitude(point1), phi1 = point1[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], sinPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi1), cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi1), delta = lambda1 - lambda0, sign = delta >= 0 ? 1 : -1, absDelta = sign * delta, antimeridian = absDelta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], k = sinPhi0 * sinPhi1; sum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(k * sign * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(absDelta))); angle += antimeridian ? delta + sign * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] : delta; // Are the longitudes either side of the point’s meridian (lambda), // and are the latitudes smaller than the parallel (phi)? if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { var arc = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point0), Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point1)); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(arc); var intersection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(normal, arc); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(intersection); var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(intersection[2]); if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { winding += antimeridian ^ delta >= 0 ? 1 : -1; } } } } // First, determine whether the South pole is inside or outside: // // It is inside if: // * the polygon winds around it in a clockwise direction. // * the polygon does not (cumulatively) wind around it, but has a negative // (counter-clockwise) area. // // Second, count the (signed) number of times a segment crosses a lambda // from the point to the South pole. If it is zero, then the point is the // same side as the South pole. return (angle < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] || angle < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] && sum < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon2"]) ^ (winding & 1); }); /***/ }), /***/ "7HRe": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduled.js ***! \********************************************************************/ /*! exports provided: scheduled */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; }); /* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scheduleObservable */ "5B2Y"); /* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedulePromise */ "4yVj"); /* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scheduleArray */ "jZKg"); /* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scheduleIterable */ "MBAA"); /* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isInteropObservable */ "QIAL"); /* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isPromise */ "c2HN"); /* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/isArrayLike */ "I55L"); /* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/isIterable */ "CMyj"); function scheduled(input, scheduler) { if (input != null) { if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) { return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler); } else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) { return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler); } else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) { return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler); } else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') { return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler); } } throw new TypeError((input !== null && typeof input || input) + ' is not observable'); } //# sourceMappingURL=scheduled.js.map /***/ }), /***/ "7Hc7": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/asap.js ***! \***************************************************************/ /*! exports provided: asapScheduler, asap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return asapScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; }); /* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsapAction */ "Pz8W"); /* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsapScheduler */ "RUbi"); const asapScheduler = new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]); const asap = asapScheduler; //# sourceMappingURL=asap.js.map /***/ }), /***/ "7IPS": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/slice.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { var nodes = parent.children, node, i = -1, n = nodes.length, k = parent.value && (y1 - y0) / parent.value; while (++i < n) { node = nodes[i], node.x0 = x0, node.x1 = x1; node.y0 = y0, node.y1 = y0 += node.value * k; } }); /***/ }), /***/ "7MRl": /*!*********************************************!*\ !*** ./node_modules/d3-random/src/index.js ***! \*********************************************/ /*! exports provided: randomUniform, randomInt, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, randomPareto, randomBernoulli, randomGeometric, randomBinomial, randomGamma, randomBeta, randomWeibull, randomCauchy, randomLogistic, randomPoisson, randomLcg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _uniform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniform.js */ "NScU"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return _uniform_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _int_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./int.js */ "m+hS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomInt", function() { return _int_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normal.js */ "ptze"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return _normal_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _logNormal_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logNormal.js */ "G4XB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return _logNormal_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _bates_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bates.js */ "XJJ9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return _bates_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _irwinHall_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./irwinHall.js */ "hSnb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return _irwinHall_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _exponential_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./exponential.js */ "eTLM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return _exponential_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _pareto_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pareto.js */ "wG9p"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPareto", function() { return _pareto_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _bernoulli_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./bernoulli.js */ "Ijfk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBernoulli", function() { return _bernoulli_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _geometric_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./geometric.js */ "FWfd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGeometric", function() { return _geometric_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _binomial_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./binomial.js */ "BTWs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBinomial", function() { return _binomial_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./gamma.js */ "b54z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGamma", function() { return _gamma_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _beta_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./beta.js */ "xD94"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBeta", function() { return _beta_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _weibull_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./weibull.js */ "e94d"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomWeibull", function() { return _weibull_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _cauchy_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./cauchy.js */ "yPTl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomCauchy", function() { return _cauchy_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _logistic_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./logistic.js */ "G3Uy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogistic", function() { return _logistic_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _poisson_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./poisson.js */ "4S0P"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPoisson", function() { return _poisson_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _lcg_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./lcg.js */ "ofxX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLcg", function() { return _lcg_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /***/ }), /***/ "7Mu7": /*!*******************************************************!*\ !*** ./node_modules/d3-hierarchy/src/pack/enclose.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ "j1BO"); /* harmony default export */ __webpack_exports__["default"] = (function(circles) { var i = 0, n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["shuffle"])(Array.from(circles))).length, B = [], p, e; while (i < n) { p = circles[i]; if (e && enclosesWeak(e, p)) ++i; else e = encloseBasis(B = extendBasis(B, p)), i = 0; } return e; }); function extendBasis(B, p) { var i, j; if (enclosesWeakAll(p, B)) return [p]; // If we get here then B must have at least one element. for (i = 0; i < B.length; ++i) { if (enclosesNot(p, B[i]) && enclosesWeakAll(encloseBasis2(B[i], p), B)) { return [B[i], p]; } } // If we get here then B must have at least two elements. for (i = 0; i < B.length - 1; ++i) { for (j = i + 1; j < B.length; ++j) { if (enclosesNot(encloseBasis2(B[i], B[j]), p) && enclosesNot(encloseBasis2(B[i], p), B[j]) && enclosesNot(encloseBasis2(B[j], p), B[i]) && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) { return [B[i], B[j], p]; } } } // If we get here then something is very wrong. throw new Error; } function enclosesNot(a, b) { var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y; return dr < 0 || dr * dr < dx * dx + dy * dy; } function enclosesWeak(a, b) { var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y; return dr > 0 && dr * dr > dx * dx + dy * dy; } function enclosesWeakAll(a, B) { for (var i = 0; i < B.length; ++i) { if (!enclosesWeak(a, B[i])) { return false; } } return true; } function encloseBasis(B) { switch (B.length) { case 1: return encloseBasis1(B[0]); case 2: return encloseBasis2(B[0], B[1]); case 3: return encloseBasis3(B[0], B[1], B[2]); } } function encloseBasis1(a) { return { x: a.x, y: a.y, r: a.r }; } function encloseBasis2(a, b) { var x1 = a.x, y1 = a.y, r1 = a.r, x2 = b.x, y2 = b.y, r2 = b.r, x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, l = Math.sqrt(x21 * x21 + y21 * y21); return { x: (x1 + x2 + x21 / l * r21) / 2, y: (y1 + y2 + y21 / l * r21) / 2, r: (l + r1 + r2) / 2 }; } function encloseBasis3(a, b, c) { var x1 = a.x, y1 = a.y, r1 = a.r, x2 = b.x, y2 = b.y, r2 = b.r, x3 = c.x, y3 = c.y, r3 = c.r, a2 = x1 - x2, a3 = x1 - x3, b2 = y1 - y2, b3 = y1 - y3, c2 = r2 - r1, c3 = r3 - r1, d1 = x1 * x1 + y1 * y1 - r1 * r1, d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, ab = a3 * b2 - a2 * b3, xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, xb = (b3 * c2 - b2 * c3) / ab, ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, yb = (a2 * c3 - a3 * c2) / ab, A = xb * xb + yb * yb - 1, B = 2 * (r1 + xa * xb + ya * yb), C = xa * xa + ya * ya - r1 * r1, r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B); return { x: x1 + xa + xb * r, y: y1 + ya + yb * r, r: r }; } /***/ }), /***/ "7NYn": /*!*******************************************!*\ !*** ./node_modules/d3-fetch/src/text.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseText(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); return response.text(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseText); }); /***/ }), /***/ "7VZX": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/selectAll.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function(select) { var name = this._name, id = this._id; if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selectorAll"])(select); for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id), k = 0, l = children.length; k < l; ++k) { if (child = children[k]) { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(child, name, id, k, children, inherit); } } subgroups.push(children); parents.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, parents, name, id); }); /***/ }), /***/ "7o/Q": /*!***********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Subscriber.js ***! \***********************************************************/ /*! exports provided: Subscriber, SafeSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; }); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isFunction */ "n6bG"); /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observer */ "gRHU"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); /* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "2QA8"); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "2fFW"); /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/hostReportError */ "NJ4a"); class Subscriber extends _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"] { constructor(destinationOrNext, error, complete) { super(); this.syncErrorValue = null; this.syncErrorThrown = false; this.syncErrorThrowable = false; this.isStopped = false; switch (arguments.length) { case 0: this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]; break; case 1: if (!destinationOrNext) { this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]; break; } if (typeof destinationOrNext === 'object') { if (destinationOrNext instanceof Subscriber) { this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; this.destination = destinationOrNext; destinationOrNext.add(this); } else { this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext); } break; } default: this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext, error, complete); break; } } [_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__["rxSubscriber"]]() { return this; } static create(next, error, complete) { const subscriber = new Subscriber(next, error, complete); subscriber.syncErrorThrowable = false; return subscriber; } next(value) { if (!this.isStopped) { this._next(value); } } error(err) { if (!this.isStopped) { this.isStopped = true; this._error(err); } } complete() { if (!this.isStopped) { this.isStopped = true; this._complete(); } } unsubscribe() { if (this.closed) { return; } this.isStopped = true; super.unsubscribe(); } _next(value) { this.destination.next(value); } _error(err) { this.destination.error(err); this.unsubscribe(); } _complete() { this.destination.complete(); this.unsubscribe(); } _unsubscribeAndRecycle() { const { _parentOrParents } = this; this._parentOrParents = null; this.unsubscribe(); this.closed = false; this.isStopped = false; this._parentOrParents = _parentOrParents; return this; } } class SafeSubscriber extends Subscriber { constructor(_parentSubscriber, observerOrNext, error, complete) { super(); this._parentSubscriber = _parentSubscriber; let next; let context = this; if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(observerOrNext)) { next = observerOrNext; } else if (observerOrNext) { next = observerOrNext.next; error = observerOrNext.error; complete = observerOrNext.complete; if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]) { context = Object.create(observerOrNext); if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(context.unsubscribe)) { this.add(context.unsubscribe.bind(context)); } context.unsubscribe = this.unsubscribe.bind(this); } } this._context = context; this._next = next; this._error = error; this._complete = complete; } next(value) { if (!this.isStopped && this._next) { const { _parentSubscriber } = this; if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(this._next, value); } else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { this.unsubscribe(); } } } error(err) { if (!this.isStopped) { const { _parentSubscriber } = this; const { useDeprecatedSynchronousErrorHandling } = _config__WEBPACK_IMPORTED_MODULE_4__["config"]; if (this._error) { if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(this._error, err); this.unsubscribe(); } else { this.__tryOrSetError(_parentSubscriber, this._error, err); this.unsubscribe(); } } else if (!_parentSubscriber.syncErrorThrowable) { this.unsubscribe(); if (useDeprecatedSynchronousErrorHandling) { throw err; } Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); } else { if (useDeprecatedSynchronousErrorHandling) { _parentSubscriber.syncErrorValue = err; _parentSubscriber.syncErrorThrown = true; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); } this.unsubscribe(); } } } complete() { if (!this.isStopped) { const { _parentSubscriber } = this; if (this._complete) { const wrappedComplete = () => this._complete.call(this._context); if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(wrappedComplete); this.unsubscribe(); } else { this.__tryOrSetError(_parentSubscriber, wrappedComplete); this.unsubscribe(); } } else { this.unsubscribe(); } } } __tryOrUnsub(fn, value) { try { fn.call(this._context, value); } catch (err) { this.unsubscribe(); if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { throw err; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); } } } __tryOrSetError(parent, fn, value) { if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { throw new Error('bad call'); } try { fn.call(this._context, value); } catch (err) { if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { parent.syncErrorValue = err; parent.syncErrorThrown = true; return true; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); return true; } } return false; } _unsubscribe() { const { _parentSubscriber } = this; this._context = null; this._parentSubscriber = null; _parentSubscriber.unsubscribe(); } } //# sourceMappingURL=Subscriber.js.map /***/ }), /***/ "7sdT": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/variance.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return variance; }); function variance(values, valueof) { let count = 0; let delta; let mean = 0; let sum = 0; if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { delta = value - mean; mean += delta / ++count; sum += delta * (value - mean); } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { delta = value - mean; mean += delta / ++count; sum += delta * (value - mean); } } } if (count > 1) return sum / (count - 1); } /***/ }), /***/ "7ssf": /*!********************************************!*\ !*** ./node_modules/d3-array/src/ticks.js ***! \********************************************/ /*! exports provided: default, tickIncrement, tickStep */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return tickIncrement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return tickStep; }); var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2); /* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count) { var reverse, i = -1, n, ticks, step; stop = +stop, start = +start, count = +count; if (start === stop && count > 0) return [start]; if (reverse = stop < start) n = start, start = stop, stop = n; if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; if (step > 0) { let r0 = Math.round(start / step), r1 = Math.round(stop / step); if (r0 * step < start) ++r0; if (r1 * step > stop) --r1; ticks = new Array(n = r1 - r0 + 1); while (++i < n) ticks[i] = (r0 + i) * step; } else { step = -step; let r0 = Math.round(start * step), r1 = Math.round(stop * step); if (r0 / step < start) ++r0; if (r1 / step > stop) --r1; ticks = new Array(n = r1 - r0 + 1); while (++i < n) ticks[i] = (r0 + i) / step; } if (reverse) ticks.reverse(); return ticks; }); function tickIncrement(start, stop, count) { var step = (stop - start) / Math.max(0, count), power = Math.floor(Math.log(step) / Math.LN10), error = step / Math.pow(10, power); return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); } function tickStep(start, stop, count) { var step0 = Math.abs(stop - start) / Math.max(0, count), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error = step0 / step1; if (error >= e10) step1 *= 10; else if (error >= e5) step1 *= 5; else if (error >= e2) step1 *= 2; return stop < start ? -step1 : step1; } /***/ }), /***/ "7ve7": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/Action.js ***! \*****************************************************************/ /*! exports provided: Action */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); class Action extends _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"] { constructor(scheduler, work) { super(); } schedule(state, delay = 0) { return this; } } //# sourceMappingURL=Action.js.map /***/ }), /***/ "7wxJ": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/combineAll.js ***! \*********************************************************************/ /*! exports provided: combineAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; }); /* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/combineLatest */ "itXk"); function combineAll(project) { return (source) => source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); } //# sourceMappingURL=combineAll.js.map /***/ }), /***/ "83xM": /*!*******************************************!*\ !*** ./node_modules/d3-path/src/index.js ***! \*******************************************/ /*! exports provided: path */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "6txh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /***/ }), /***/ "87ba": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/exit.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ "aY1w"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function() { return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._exit || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); }); /***/ }), /***/ "89eD": /*!*******************************************!*\ !*** ./node_modules/d3-force/src/link.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle.js */ "QupR"); function index(d) { return d.index; } function find(nodeById, nodeId) { var node = nodeById.get(nodeId); if (!node) throw new Error("node not found: " + nodeId); return node; } /* harmony default export */ __webpack_exports__["default"] = (function(links) { var id = index, strength = defaultStrength, strengths, distance = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(30), distances, nodes, count, bias, random, iterations = 1; if (links == null) links = []; function defaultStrength(link) { return 1 / Math.min(count[link.source.index], count[link.target.index]); } function force(alpha) { for (var k = 0, n = links.length; k < iterations; ++k) { for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { link = links[i], source = link.source, target = link.target; x = target.x + target.vx - source.x - source.vx || Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(random); y = target.y + target.vy - source.y - source.vy || Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(random); l = Math.sqrt(x * x + y * y); l = (l - distances[i]) / l * alpha * strengths[i]; x *= l, y *= l; target.vx -= x * (b = bias[i]); target.vy -= y * b; source.vx += x * (b = 1 - b); source.vy += y * b; } } } function initialize() { if (!nodes) return; var i, n = nodes.length, m = links.length, nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])), link; for (i = 0, count = new Array(n); i < m; ++i) { link = links[i], link.index = i; if (typeof link.source !== "object") link.source = find(nodeById, link.source); if (typeof link.target !== "object") link.target = find(nodeById, link.target); count[link.source.index] = (count[link.source.index] || 0) + 1; count[link.target.index] = (count[link.target.index] || 0) + 1; } for (i = 0, bias = new Array(m); i < m; ++i) { link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); } strengths = new Array(m), initializeStrength(); distances = new Array(m), initializeDistance(); } function initializeStrength() { if (!nodes) return; for (var i = 0, n = links.length; i < n; ++i) { strengths[i] = +strength(links[i], i, links); } } function initializeDistance() { if (!nodes) return; for (var i = 0, n = links.length; i < n; ++i) { distances[i] = +distance(links[i], i, links); } } force.initialize = function(_nodes, _random) { nodes = _nodes; random = _random; initialize(); }; force.links = function(_) { return arguments.length ? (links = _, initialize(), force) : links; }; force.id = function(_) { return arguments.length ? (id = _, force) : id; }; force.iterations = function(_) { return arguments.length ? (iterations = +_, force) : iterations; }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeStrength(), force) : strength; }; force.distance = function(_) { return arguments.length ? (distance = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeDistance(), force) : distance; }; return force; }); /***/ }), /***/ "8F7Y": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e0f3dba8ddb543a2ca", "f0f9e8bae4bc7bccc42b8cbe", "f0f9e8bae4bc7bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "8Qeq": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/canReportError.js ***! \********************************************************************/ /*! exports provided: canReportError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function canReportError(observer) { while (observer) { const { closed, destination, isStopped } = observer; if (closed || isStopped) { return false; } else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) { observer = destination; } else { observer = null; } } return true; } //# sourceMappingURL=canReportError.js.map /***/ }), /***/ "8SsQ": /*!**********************************************!*\ !*** ./node_modules/d3-delaunay/src/path.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Path; }); const epsilon = 1e-6; class Path { constructor() { this._x0 = this._y0 = // start of current subpath this._x1 = this._y1 = null; // end of current subpath this._ = ""; } moveTo(x, y) { this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`; } closePath() { if (this._x1 !== null) { this._x1 = this._x0, this._y1 = this._y0; this._ += "Z"; } } lineTo(x, y) { this._ += `L${this._x1 = +x},${this._y1 = +y}`; } arc(x, y, r) { x = +x, y = +y, r = +r; const x0 = x + r; const y0 = y; if (r < 0) throw new Error("negative radius"); if (this._x1 === null) this._ += `M${x0},${y0}`; else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += "L" + x0 + "," + y0; if (!r) return; this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`; } rect(x, y, w, h) { this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`; } value() { return this._ || null; } } /***/ }), /***/ "8XJe": /*!******************************************!*\ !*** ./node_modules/d3-array/src/set.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return set; }); function set(values) { return values instanceof Set ? values : new Set(values); } /***/ }), /***/ "8cru": /*!******************************************!*\ !*** ./node_modules/d3-fetch/src/dsv.js ***! \******************************************/ /*! exports provided: default, csv, tsv */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dsv; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return csv; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return tsv; }); /* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ "Ri0D"); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text.js */ "7NYn"); function dsvParse(parse) { return function(input, init, row) { if (arguments.length === 2 && typeof init === "function") row = init, init = undefined; return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { return parse(response, row); }); }; } function dsv(delimiter, input, init, row) { if (arguments.length === 3 && typeof init === "function") row = init, init = undefined; var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["dsvFormat"])(delimiter); return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { return format.parse(response, row); }); } var csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["csvParse"]); var tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["tsvParse"]); /***/ }), /***/ "8d86": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/index.js ***! \********************************************/ /*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBumpX, curveBumpY, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ "ZQwz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "44y/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "+ugm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ "iPFw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ "GpRi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ "TI0E"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ "EyRP"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ "Goif"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkHorizontal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkVertical"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkRadial"]; }); /* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ "kVCJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["symbols"]; }); /* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ "GvAG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ "oKyY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ "ms7Z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ "1afE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ "CAOx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ "rkAg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ "xJQu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ "muaG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ "1nUc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ "jICm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bump.js */ "5NTL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpX", function() { return _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__["bumpX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpY", function() { return _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__["bumpY"]; }); /* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/bundle.js */ "d4SJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ "O03L"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ "sK06"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/cardinal.js */ "d5JU"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ "VkQ2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ "Q43v"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/catmullRom.js */ "Kcim"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linearClosed.js */ "zD5G"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/linear.js */ "SDD1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/monotone.js */ "pL0w"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__["monotoneX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__["monotoneY"]; }); /* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/natural.js */ "qE0H"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./curve/step.js */ "e9ab"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__["stepAfter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__["stepBefore"]; }); /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stack.js */ "wIsI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/expand.js */ "GjTP"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/diverging.js */ "4bmp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/none.js */ "0T5i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/silhouette.js */ "NtxT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./offset/wiggle.js */ "8eK0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/appearance.js */ "T17Z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/ascending.js */ "WuDp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/descending.js */ "9c/f"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/insideOut.js */ "Oo5A"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/none.js */ "qqpY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./order/reverse.js */ "UFbn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_43__["default"]; }); // Note: radialArea is deprecated! // Note: radialLine is deprecated! /***/ }), /***/ "8eK0": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/offset/wiggle.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "0T5i"); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; for (var y = 0, j = 1, s0, m, n; j < m; ++j) { for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { var si = series[order[i]], sij0 = si[j][1] || 0, sij1 = si[j - 1][1] || 0, s3 = (sij0 - sij1) / 2; for (var k = 0; k < i; ++k) { var sk = series[order[k]], skj0 = sk[j][1] || 0, skj1 = sk[j - 1][1] || 0; s3 += skj0 - skj1; } s1 += sij0, s2 += s3 * sij0; } s0[j - 1][1] += s0[j - 1][0] = y; if (s1) y -= s2 / s1; } s0[j - 1][1] += s0[j - 1][0] = y; Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), /***/ "8efb": /*!********************************************!*\ !*** ./node_modules/d3-chord/src/array.js ***! \********************************************/ /*! exports provided: slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var slice = Array.prototype.slice; /***/ }), /***/ "8moF": /*!******************************************!*\ !*** ./node_modules/d3-fetch/src/xml.js ***! \******************************************/ /*! exports provided: default, html, svg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html", function() { return html; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return svg; }); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text.js */ "7NYn"); function parser(type) { return (input, init) => Object(_text_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input, init) .then(text => (new DOMParser).parseFromString(text, type)); } /* harmony default export */ __webpack_exports__["default"] = (parser("application/xml")); var html = parser("text/html"); var svg = parser("image/svg+xml"); /***/ }), /***/ "8nOX": /*!*************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/naturalEarth1.js ***! \*************************************************************/ /*! exports provided: naturalEarth1Raw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "naturalEarth1Raw", function() { return naturalEarth1Raw; }); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "1ibS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); function naturalEarth1Raw(lambda, phi) { var phi2 = phi * phi, phi4 = phi2 * phi2; return [ lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) ]; } naturalEarth1Raw.invert = function(x, y) { var phi = y, i = 25, delta; do { var phi2 = phi * phi, phi4 = phi2 * phi2; phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4))); } while (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && --i > 0); return [ x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), phi ]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(naturalEarth1Raw) .scale(175.295); }); /***/ }), /***/ "8nbz": /*!***************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/duration.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function durationFunction(id, value) { return function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = +value.apply(this, arguments); }; } function durationConstant(id, value) { return value = +value, function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = value; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var id = this._id; return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).duration; }); /***/ }), /***/ "90/1": /*!***************************************************!*\ !*** ./node_modules/d3-selection/src/pointers.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pointer.js */ "XoFe"); /* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sourceEvent.js */ "T9TN"); /* harmony default export */ __webpack_exports__["default"] = (function(events, node) { if (events.target) { // i.e., instanceof Event, not TouchList or iterable events = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__["default"])(events); if (node === undefined) node = events.currentTarget; events = events.touches || [events]; } return Array.from(events, event => Object(_pointer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(event, node)); }); /***/ }), /***/ "9ABZ": /*!***********************************************!*\ !*** ./node_modules/d3-quadtree/src/cover.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points var x0 = this._x0, y0 = this._y0, x1 = this._x1, y1 = this._y1; // If the quadtree has no extent, initialize them. // Integer extent are necessary so that if we later double the extent, // the existing quadrant boundaries don’t change due to floating point error! if (isNaN(x0)) { x1 = (x0 = Math.floor(x)) + 1; y1 = (y0 = Math.floor(y)) + 1; } // Otherwise, double repeatedly to cover. else { var z = x1 - x0 || 1, node = this._root, parent, i; while (x0 > x || x >= x1 || y0 > y || y >= y1) { i = (y < y0) << 1 | (x < x0); parent = new Array(4), parent[i] = node, node = parent, z *= 2; switch (i) { case 0: x1 = x0 + z, y1 = y0 + z; break; case 1: x0 = x1 - z, y1 = y0 + z; break; case 2: x1 = x0 + z, y0 = y1 - z; break; case 3: x0 = x1 - z, y0 = y1 - z; break; } } if (this._root && this._root.length) this._root = node; } this._x0 = x0; this._y0 = y0; this._x1 = x1; this._y1 = y1; return this; }); /***/ }), /***/ "9M8c": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferCount.js ***! \**********************************************************************/ /*! exports provided: bufferCount */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function bufferCount(bufferSize, startBufferEvery = null) { return function bufferCountOperatorFunction(source) { return source.lift(new BufferCountOperator(bufferSize, startBufferEvery)); }; } class BufferCountOperator { constructor(bufferSize, startBufferEvery) { this.bufferSize = bufferSize; this.startBufferEvery = startBufferEvery; if (!startBufferEvery || bufferSize === startBufferEvery) { this.subscriberClass = BufferCountSubscriber; } else { this.subscriberClass = BufferSkipCountSubscriber; } } call(subscriber, source) { return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery)); } } class BufferCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, bufferSize) { super(destination); this.bufferSize = bufferSize; this.buffer = []; } _next(value) { const buffer = this.buffer; buffer.push(value); if (buffer.length == this.bufferSize) { this.destination.next(buffer); this.buffer = []; } } _complete() { const buffer = this.buffer; if (buffer.length > 0) { this.destination.next(buffer); } super._complete(); } } class BufferSkipCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, bufferSize, startBufferEvery) { super(destination); this.bufferSize = bufferSize; this.startBufferEvery = startBufferEvery; this.buffers = []; this.count = 0; } _next(value) { const { bufferSize, startBufferEvery, buffers, count } = this; this.count++; if (count % startBufferEvery === 0) { buffers.push([]); } for (let i = buffers.length; i--;) { const buffer = buffers[i]; buffer.push(value); if (buffer.length === bufferSize) { buffers.splice(i, 1); this.destination.next(buffer); } } } _complete() { const { buffers, destination } = this; while (buffers.length > 0) { let buffer = buffers.shift(); if (buffer.length > 0) { destination.next(buffer); } } super._complete(); } } //# sourceMappingURL=bufferCount.js.map /***/ }), /***/ "9ZWv": /*!******************************************************!*\ !*** ./node_modules/d3-geo/src/clip/antimeridian.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "pb3N"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])( function() { return true; }, clipAntimeridianLine, clipAntimeridianInterpolate, [-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]] )); // Takes a line and cuts into visible segments. Return values: 0 - there were // intersections or the line was empty; 1 - no intersections; 2 - there were // intersections, and the first and last segments should be rejoined. function clipAntimeridianLine(stream) { var lambda0 = NaN, phi0 = NaN, sign0 = NaN, clean; // no intersections return { lineStart: function() { stream.lineStart(); clean = 1; }, point: function(lambda1, phi1) { var sign1 = lambda1 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - lambda0); if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { // line crosses a pole stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]); stream.point(sign0, phi0); stream.lineEnd(); stream.lineStart(); stream.point(sign1, phi0); stream.point(lambda1, phi0); clean = 0; } else if (sign0 !== sign1 && delta >= _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) { // line crosses antimeridian if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - sign0) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda0 -= sign0 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; // handle degeneracies if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - sign1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda1 -= sign1 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); stream.point(sign0, phi0); stream.lineEnd(); stream.lineStart(); stream.point(sign1, phi0); clean = 0; } stream.point(lambda0 = lambda1, phi0 = phi1); sign0 = sign1; }, lineEnd: function() { stream.lineEnd(); lambda0 = phi0 = NaN; }, clean: function() { return 2 - clean; // if intersections, rejoin first and last segments } }; } function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { var cosPhi0, cosPhi1, sinLambda0Lambda1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0 - lambda1); return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(sinLambda0Lambda1) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan"])((Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi0) * (cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi1)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda1) - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi1) * (cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi0)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0)) / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) : (phi0 + phi1) / 2; } function clipAntimeridianInterpolate(from, to, direction, stream) { var phi; if (from == null) { phi = direction * _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]; stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); stream.point(0, phi); stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); stream.point(0, -phi); stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); } else if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(from[0] - to[0]) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { var lambda = from[0] < to[0] ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]; phi = direction * lambda / 2; stream.point(-lambda, phi); stream.point(0, phi); stream.point(lambda, phi); } else { stream.point(to[0], to[1]); } } /***/ }), /***/ "9c/f": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/order/descending.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "WuDp"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); }); /***/ }), /***/ "9iN3": /*!*********************************************!*\ !*** ./node_modules/d3-time/src/utcHour.js ***! \*********************************************/ /*! exports provided: default, utcHours */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return utcHours; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; }, function(date) { return date.getUTCHours(); }); /* harmony default export */ __webpack_exports__["default"] = (utcHour); var utcHours = utcHour.range; /***/ }), /***/ "9ihq": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/elementAt.js ***! \********************************************************************/ /*! exports provided: elementAt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; }); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); /* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./take */ "IzEk"); function elementAt(index, defaultValue) { if (index < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); } const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => i === index), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(() => new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]())); } //# sourceMappingURL=elementAt.js.map /***/ }), /***/ "9j6y": /*!********************************************!*\ !*** ./node_modules/d3-array/src/cross.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cross; }); function length(array) { return array.length | 0; } function empty(length) { return !(length > 0); } function arrayify(values) { return typeof values !== "object" || "length" in values ? values : Array.from(values); } function reducer(reduce) { return values => reduce(...values); } function cross(...values) { const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop()); values = values.map(arrayify); const lengths = values.map(length); const j = values.length - 1; const index = new Array(j + 1).fill(0); const product = []; if (j < 0 || lengths.some(empty)) return product; while (true) { product.push(index.map((j, i) => values[i][j])); let i = j; while (++index[i] === lengths[i]) { if (i === 0) return reduce ? product.map(reduce) : product; index[i--] = 0; } } } /***/ }), /***/ "9l1u": /*!*********************************************!*\ !*** ./node_modules/d3-quadtree/src/add.js ***! \*********************************************/ /*! exports provided: default, addAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAll", function() { return addAll; }); /* harmony default export */ __webpack_exports__["default"] = (function(d) { const x = +this._x.call(null, d), y = +this._y.call(null, d); return add(this.cover(x, y), x, y, d); }); function add(tree, x, y, d) { if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points var parent, node = tree._root, leaf = {data: d}, x0 = tree._x0, y0 = tree._y0, x1 = tree._x1, y1 = tree._y1, xm, ym, xp, yp, right, bottom, i, j; // If the tree is empty, initialize the root as a leaf. if (!node) return tree._root = leaf, tree; // Find the existing leaf for the new point, or add it. while (node.length) { if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; } // Is the new point is exactly coincident with the existing point? xp = +tree._x.call(null, node.data); yp = +tree._y.call(null, node.data); if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; // Otherwise, split the leaf node until the old and new point are separated. do { parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); return parent[j] = node, parent[i] = leaf, tree; } function addAll(data) { var d, i, n = data.length, x, y, xz = new Array(n), yz = new Array(n), x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity; // Compute the points and their extent. for (i = 0; i < n; ++i) { if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; xz[i] = x; yz[i] = y; if (x < x0) x0 = x; if (x > x1) x1 = x; if (y < y0) y0 = y; if (y > y1) y1 = y; } // If there were no (valid) points, abort. if (x0 > x1 || y0 > y1) return this; // Expand the tree to cover the new points. this.cover(x0, y0).cover(x1, y1); // Add the new points. for (i = 0; i < n; ++i) { add(this, xz[i], yz[i], data[i]); } return this; } /***/ }), /***/ "9om9": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/enter.js ***! \**********************************************************/ /*! exports provided: default, EnterNode */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnterNode", function() { return EnterNode; }); /* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ "aY1w"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function() { return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._enter || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); }); function EnterNode(parent, datum) { this.ownerDocument = parent.ownerDocument; this.namespaceURI = parent.namespaceURI; this._next = null; this._parent = parent; this.__data__ = datum; } EnterNode.prototype = { constructor: EnterNode, appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, querySelector: function(selector) { return this._parent.querySelector(selector); }, querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } }; /***/ }), /***/ "9ppp": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js ***! \*****************************************************************************/ /*! exports provided: ObjectUnsubscribedError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; }); const ObjectUnsubscribedErrorImpl = (() => { function ObjectUnsubscribedErrorImpl() { Error.call(this); this.message = 'object unsubscribed'; this.name = 'ObjectUnsubscribedError'; return this; } ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype); return ObjectUnsubscribedErrorImpl; })(); const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; //# sourceMappingURL=ObjectUnsubscribedError.js.map /***/ }), /***/ "A3iJ": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/partition.js ***! \********************************************************************/ /*! exports provided: partition */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; }); /* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/not */ "F97/"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); function partition(predicate, thisArg) { return (source) => [ Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source), Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source) ]; } //# sourceMappingURL=partition.js.map /***/ }), /***/ "AHz+": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "998ec3f7f7f7f1a340", "5e3c99b2abd2fdb863e66101", "5e3c99b2abd2f7f7f7fdb863e66101", "542788998ec3d8daebfee0b6f1a340b35806", "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "AJ/N": /*!******************************************!*\ !*** ./node_modules/d3-drag/src/drag.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ "tU+D"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ "cdIC"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ "OqQA"); /* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ "TKo5"); // Ignore right-click, since that should open the context menu. function defaultFilter(event) { return !event.ctrlKey && !event.button; } function defaultContainer() { return this.parentNode; } function defaultSubject(event, d) { return d == null ? {x: event.x, y: event.y} : d; } function defaultTouchable() { return navigator.maxTouchPoints || ("ontouchstart" in this); } /* harmony default export */ __webpack_exports__["default"] = (function() { var filter = defaultFilter, container = defaultContainer, subject = defaultSubject, touchable = defaultTouchable, gestures = {}, listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "drag", "end"), active = 0, mousedownx, mousedowny, mousemoving, touchending, clickDistance2 = 0; function drag(selection) { selection .on("mousedown.drag", mousedowned) .filter(touchable) .on("touchstart.drag", touchstarted) .on("touchmove.drag", touchmoved) .on("touchend.drag touchcancel.drag", touchended) .style("touch-action", "none") .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } function mousedowned(event, d) { if (touchending || !filter.call(this, event, d)) return; var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse"); if (!gesture) return; Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["default"])(event.view); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(event); mousemoving = false; mousedownx = event.clientX; mousedowny = event.clientY; gesture("start", event); } function mousemoved(event) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(event); if (!mousemoving) { var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; mousemoving = dx * dx + dy * dy > clickDistance2; } gestures.mouse("drag", event); } function mouseupped(event) { Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(event.view).on("mousemove.drag mouseup.drag", null); Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["yesdrag"])(event.view, mousemoving); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(event); gestures.mouse("end", event); } function touchstarted(event, d) { if (!filter.call(this, event, d)) return; var touches = event.changedTouches, c = container.call(this, event, d), n = touches.length, i, gesture; for (i = 0; i < n; ++i) { if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(event); gesture("start", event, touches[i]); } } } function touchmoved(event) { var touches = event.changedTouches, n = touches.length, i, gesture; for (i = 0; i < n; ++i) { if (gesture = gestures[touches[i].identifier]) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(event); gesture("drag", event, touches[i]); } } } function touchended(event) { var touches = event.changedTouches, n = touches.length, i, gesture; if (touchending) clearTimeout(touchending); touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! for (i = 0; i < n; ++i) { if (gesture = gestures[touches[i].identifier]) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(event); gesture("end", event, touches[i]); } } } function beforestart(that, container, event, d, identifier, touch) { var dispatch = listeners.copy(), p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["pointer"])(touch || event, container), dx, dy, s; if ((s = subject.call(that, new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"]("beforestart", { sourceEvent: event, target: drag, identifier, active, x: p[0], y: p[1], dx: 0, dy: 0, dispatch }), d)) == null) return; dx = s.x - p[0] || 0; dy = s.y - p[1] || 0; return function gesture(type, event, touch) { var p0 = p, n; switch (type) { case "start": gestures[identifier] = gesture, n = active++; break; case "end": delete gestures[identifier], --active; // nobreak case "drag": p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["pointer"])(touch || event, container), n = active; break; } dispatch.call( type, that, new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](type, { sourceEvent: event, subject: s, target: drag, identifier, active: n, x: p[0] + dx, y: p[1] + dy, dx: p[0] - p0[0], dy: p[1] - p0[1], dispatch }), d ); }; } drag.filter = function(_) { return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : filter; }; drag.container = function(_) { return arguments.length ? (container = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : container; }; drag.subject = function(_) { return arguments.length ? (subject = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : subject; }; drag.touchable = function(_) { return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : touchable; }; drag.on = function() { var value = listeners.on.apply(listeners, arguments); return value === listeners ? drag : value; }; drag.clickDistance = function(_) { return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); }; return drag; }); /***/ }), /***/ "AKWm": /*!*************************************************!*\ !*** ./node_modules/d3-selection/src/select.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return typeof selector === "string" ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[document.querySelector(selector)]], [document.documentElement]) : new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[selector]], _selection_index_js__WEBPACK_IMPORTED_MODULE_0__["root"]); }); /***/ }), /***/ "APuy": /*!************************************************!*\ !*** ./node_modules/d3-array/src/ascending.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; }); /***/ }), /***/ "AUoe": /*!******************************************************!*\ !*** ./node_modules/d3-format/src/formatNumerals.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(numerals) { return function(value) { return value.replace(/[0-9]/g, function(i) { return numerals[+i]; }); }; }); /***/ }), /***/ "AWXE": /*!*******************************************************!*\ !*** ./node_modules/d3-selection/src/selection/on.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function contextListener(listener) { return function(event) { listener.call(this, event, this.__data__); }; } function parseTypenames(typenames) { return typenames.trim().split(/^|\s+/).map(function(t) { var name = "", i = t.indexOf("."); if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); return {type: t, name: name}; }); } function onRemove(typename) { return function() { var on = this.__on; if (!on) return; for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { this.removeEventListener(o.type, o.listener, o.options); } else { on[++i] = o; } } if (++i) on.length = i; else delete this.__on; }; } function onAdd(typename, value, options) { return function() { var on = this.__on, o, listener = contextListener(value); if (on) for (var j = 0, m = on.length; j < m; ++j) { if ((o = on[j]).type === typename.type && o.name === typename.name) { this.removeEventListener(o.type, o.listener, o.options); this.addEventListener(o.type, o.listener = listener, o.options = options); o.value = value; return; } } this.addEventListener(typename.type, listener, options); o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options}; if (!on) this.__on = [o]; else on.push(o); }; } /* harmony default export */ __webpack_exports__["default"] = (function(typename, value, options) { var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; if (arguments.length < 2) { var on = this.node().__on; if (on) for (var j = 0, m = on.length, o; j < m; ++j) { for (i = 0, o = on[j]; i < n; ++i) { if ((t = typenames[i]).type === o.type && t.name === o.name) { return o.value; } } } return; } on = value ? onAdd : onRemove; for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options)); return this; }); /***/ }), /***/ "AgzO": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/filter.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return filter; }); function filter(values, test) { if (typeof test !== "function") throw new TypeError("test is not a function"); const array = []; let index = -1; for (const value of values) { if (test(value, ++index, values)) { array.push(value); } } return array; } /***/ }), /***/ "B/+g": /*!*********************************************************!*\ !*** ./node_modules/d3-scale/src/sequentialQuantile.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequentialQuantile; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function sequentialQuantile() { var domain = [], interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"]; function scale(x) { if (x != null && !isNaN(x = +x)) return interpolator((Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 1) - 1) / (domain.length - 1)); } scale.domain = function(_) { if (!arguments.length) return domain.slice(); domain = []; for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); return scale; }; scale.interpolator = function(_) { return arguments.length ? (interpolator = _, scale) : interpolator; }; scale.range = function() { return domain.map((d, i) => interpolator(i / (domain.length - 1))); }; scale.quantiles = function(n) { return Array.from({length: n + 1}, (_, i) => Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["quantile"])(domain, i / n)); }; scale.copy = function() { return sequentialQuantile(interpolator).domain(domain); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } /***/ }), /***/ "BFxc": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/takeLast.js ***! \*******************************************************************/ /*! exports provided: takeLast */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); function takeLast(count) { return function takeLastOperatorFunction(source) { if (count === 0) { return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); } else { return source.lift(new TakeLastOperator(count)); } }; } class TakeLastOperator { constructor(total) { this.total = total; if (this.total < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; } } call(subscriber, source) { return source.subscribe(new TakeLastSubscriber(subscriber, this.total)); } } class TakeLastSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, total) { super(destination); this.total = total; this.ring = new Array(); this.count = 0; } _next(value) { const ring = this.ring; const total = this.total; const count = this.count++; if (ring.length < total) { ring.push(value); } else { const index = count % total; ring[index] = value; } } _complete() { const destination = this.destination; let count = this.count; if (count > 0) { const total = this.count >= this.total ? this.total : this.count; const ring = this.ring; for (let i = 0; i < total; i++) { const idx = (count++) % total; destination.next(ring[idx]); } } destination.complete(); } } //# sourceMappingURL=takeLast.js.map /***/ }), /***/ "BTWs": /*!************************************************!*\ !*** ./node_modules/d3-random/src/binomial.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _beta_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./beta.js */ "xD94"); /* harmony import */ var _geometric_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./geometric.js */ "FWfd"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBinomial(source) { var G = _geometric_js__WEBPACK_IMPORTED_MODULE_2__["default"].source(source), B = _beta_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomBinomial(n, p) { n = +n; if ((p = +p) >= 1) return () => n; if (p <= 0) return () => 0; return function() { var acc = 0, nn = n, pp = p; while (nn * pp > 16 && nn * (1 - pp) > 16) { var i = Math.floor((nn + 1) * pp), y = B(i, nn - i + 1)(); if (y <= pp) { acc += i; nn -= i; pp = (pp - y) / (1 - y); } else { nn = i - 1; pp /= y; } } var sign = pp < 0.5, pFinal = sign ? pp : 1 - pp, g = G(pFinal); for (var s = g(), k = 0; s <= nn; ++k) s += g(); return acc + (sign ? k : nn - k); }; } randomBinomial.source = sourceRandomBinomial; return randomBinomial; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "BvdE": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(), pi_1_3 = Math.PI / 3, pi_2_3 = Math.PI * 2 / 3; /* harmony default export */ __webpack_exports__["default"] = (function(t) { var x; t = (0.5 - t) * Math.PI; c.r = 255 * (x = Math.sin(t)) * x; c.g = 255 * (x = Math.sin(t + pi_1_3)) * x; c.b = 255 * (x = Math.sin(t + pi_2_3)) * x; return c + ""; }); /***/ }), /***/ "C33F": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Set3.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")); /***/ }), /***/ "CAOx": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/star.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "CYYh"); var ka = 0.89081309152928522810, kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10), kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr, ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr; /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size * ka), x = kx * r, y = ky * r; context.moveTo(0, -r); context.lineTo(x, y); for (var i = 1; i < 5; ++i) { var a = _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] * i / 5, c = Math.cos(a), s = Math.sin(a); context.lineTo(s * r, -c * r); context.lineTo(c * x - s * y, s * x + c * y); } context.closePath(); } }); /***/ }), /***/ "CDC2": /*!************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/sliceDice.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "FPPI"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "7IPS"); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { (parent.depth & 1 ? _slice_js__WEBPACK_IMPORTED_MODULE_1__["default"] : _dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(parent, x0, y0, x1, y1); }); /***/ }), /***/ "CKiT": /*!*******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***! \*******************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fc8d59ffffbf99d594", "d7191cfdae61abdda42b83ba", "d7191cfdae61ffffbfabdda42b83ba", "d53e4ffc8d59fee08be6f59899d5943288bd", "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "CMyj": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isIterable.js ***! \****************************************************************/ /*! exports provided: isIterable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; }); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); function isIterable(input) { return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function'; } //# sourceMappingURL=isIterable.js.map /***/ }), /***/ "CRDf": /*!***************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js ***! \***************************************************************************/ /*! exports provided: subscribeToObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; }); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); const subscribeToObservable = (obj) => (subscriber) => { const obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]](); if (typeof obs.subscribe !== 'function') { throw new TypeError('Provided object does not correctly implement Symbol.observable'); } else { return obs.subscribe(subscriber); } }; //# sourceMappingURL=subscribeToObservable.js.map /***/ }), /***/ "CSvP": /*!***************************************************!*\ !*** ./node_modules/d3-hierarchy/src/constant.js ***! \***************************************************/ /*! exports provided: constantZero, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "constantZero", function() { return constantZero; }); function constantZero() { return 0; } /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "CXbD": /*!************************************************!*\ !*** ./node_modules/d3-array/src/groupSort.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return groupSort; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group.js */ "4TqM"); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sort.js */ "Exv/"); function groupSort(values, reduce, key) { return (reduce.length === 1 ? Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__["rollup"])(values, reduce, key), (([ak, av], [bk, bv]) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ak, bk))) : Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ak, bk)))) .map(([key]) => key); } /***/ }), /***/ "CYYh": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/math.js ***! \*******************************************/ /*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); var abs = Math.abs; var atan2 = Math.atan2; var cos = Math.cos; var max = Math.max; var min = Math.min; var sin = Math.sin; var sqrt = Math.sqrt; var epsilon = 1e-12; var pi = Math.PI; var halfPi = pi / 2; var tau = 2 * pi; function acos(x) { return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); } function asin(x) { return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); } /***/ }), /***/ "CbjS": /*!*******************************************************!*\ !*** ./node_modules/d3-format/src/formatSpecifier.js ***! \*******************************************************/ /*! exports provided: default, FormatSpecifier */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatSpecifier; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return FormatSpecifier; }); // [[fill]align][sign][symbol][0][width][,][.precision][~][type] var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; function formatSpecifier(specifier) { if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); var match; return new FormatSpecifier({ fill: match[1], align: match[2], sign: match[3], symbol: match[4], zero: match[5], width: match[6], comma: match[7], precision: match[8] && match[8].slice(1), trim: match[9], type: match[10] }); } formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof function FormatSpecifier(specifier) { this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; this.align = specifier.align === undefined ? ">" : specifier.align + ""; this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; this.zero = !!specifier.zero; this.width = specifier.width === undefined ? undefined : +specifier.width; this.comma = !!specifier.comma; this.precision = specifier.precision === undefined ? undefined : +specifier.precision; this.trim = !!specifier.trim; this.type = specifier.type === undefined ? "" : specifier.type + ""; } FormatSpecifier.prototype.toString = function() { return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type; }; /***/ }), /***/ "CcBx": /*!************************************************!*\ !*** ./node_modules/d3-array/src/deviation.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return deviation; }); /* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance.js */ "7sdT"); function deviation(values, valueof) { const v = Object(_variance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, valueof); return v ? Math.sqrt(v) : v; } /***/ }), /***/ "Cfvw": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/from.js ***! \****************************************************************/ /*! exports provided: from */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeTo */ "SeVD"); /* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduled */ "7HRe"); function from(input, scheduler) { if (!scheduler) { if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) { return input; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input)); } else { return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler); } } //# sourceMappingURL=from.js.map /***/ }), /***/ "CiDq": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/number.js ***! \*********************************************/ /*! exports provided: default, numbers */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "numbers", function() { return numbers; }); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x === null ? NaN : +x; }); function* numbers(values, valueof) { if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { yield value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { yield value; } } } } /***/ }), /***/ "Ckr6": /*!********************************************!*\ !*** ./node_modules/d3-force/src/index.js ***! \********************************************/ /*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _center_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center.js */ "0LFD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return _center_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _collide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collide.js */ "iQ9W"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return _collide_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link.js */ "89eD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return _link_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _manyBody_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./manyBody.js */ "Z9Ww"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return _manyBody_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _radial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./radial.js */ "Wtxg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return _radial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _simulation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./simulation.js */ "VIHS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return _simulation_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./x.js */ "cnUW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return _x_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./y.js */ "0rNn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return _y_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /***/ }), /***/ "Cnj1": /*!**************************************************!*\ !*** ./node_modules/d3-selection/src/matcher.js ***! \**************************************************/ /*! exports provided: default, childMatcher */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "childMatcher", function() { return childMatcher; }); /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return function() { return this.matches(selector); }; }); function childMatcher(selector) { return function(node) { return node.matches(selector); }; } /***/ }), /***/ "CqXF": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mapTo.js ***! \****************************************************************/ /*! exports provided: mapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function mapTo(value) { return (source) => source.lift(new MapToOperator(value)); } class MapToOperator { constructor(value) { this.value = value; } call(subscriber, source) { return source.subscribe(new MapToSubscriber(subscriber, this.value)); } } class MapToSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, value) { super(destination); this.value = value; } _next(x) { this.destination.next(this.value); } } //# sourceMappingURL=mapTo.js.map /***/ }), /***/ "Ct04": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/call.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var callback = arguments[0]; arguments[0] = this; callback.apply(null, arguments); return this; }); /***/ }), /***/ "Cuxv": /*!********************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***! \********************************************************************/ /*! exports provided: azimuthalEquidistantRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEquidistantRaw", function() { return azimuthalEquidistantRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); var azimuthalEquidistantRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(c) { return (c = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["acos"])(c)) && c / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c); }); azimuthalEquidistantRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { return z; }); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEquidistantRaw) .scale(79.4188) .clipAngle(180 - 1e-3); }); /***/ }), /***/ "D/GG": /*!*****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/styleTween.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function styleInterpolate(name, i, priority) { return function(t) { this.style.setProperty(name, i.call(this, t), priority); }; } function styleTween(name, value, priority) { var t, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority); return t; } tween._value = value; return tween; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { var key = "style." + (name += ""); if (arguments.length < 2) return (key = this.tween(key)) && key._value; if (value == null) return this.tween(key, null); if (typeof value !== "function") throw new Error; return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); }); /***/ }), /***/ "D0XW": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/async.js ***! \****************************************************************/ /*! exports provided: asyncScheduler, async */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return asyncScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); const asyncScheduler = new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]); const async = asyncScheduler; //# sourceMappingURL=async.js.map /***/ }), /***/ "DF+l": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/attrTween.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); function attrInterpolate(name, i) { return function(t) { this.setAttribute(name, i.call(this, t)); }; } function attrInterpolateNS(fullname, i) { return function(t) { this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); }; } function attrTweenNS(fullname, value) { var t0, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i); return t0; } tween._value = value; return tween; } function attrTween(name, value) { var t0, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i); return t0; } tween._value = value; return tween; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var key = "attr." + name; if (arguments.length < 2) return (key = this.tween(key)) && key._value; if (value == null) return this.tween(key, null); if (typeof value !== "function") throw new Error; var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["namespace"])(name); return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); }); /***/ }), /***/ "DH7j": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isArray.js ***! \*************************************************************/ /*! exports provided: isArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; }); const isArray = (() => Array.isArray || ((x) => x && typeof x.length === 'number'))(); //# sourceMappingURL=isArray.js.map /***/ }), /***/ "DHg+": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ece2f0a6bddb1c9099", "f6eff7bdc9e167a9cf02818a", "f6eff7bdc9e167a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "DN/c": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/filter.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher.js */ "Cnj1"); /* harmony default export */ __webpack_exports__["default"] = (function(match) { if (typeof match !== "function") match = Object(_matcher_js__WEBPACK_IMPORTED_MODULE_1__["default"])(match); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { if ((node = group[i]) && match.call(node, node.__data__, i, group)) { subgroup.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); }); /***/ }), /***/ "DdT1": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/round.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(node) { node.x0 = Math.round(node.x0); node.y0 = Math.round(node.y0); node.x1 = Math.round(node.x1); node.y1 = Math.round(node.y1); }); /***/ }), /***/ "DiG6": /*!*************************************************!*\ !*** ./node_modules/d3-contour/src/constant.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "E//B": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "edf8b17fcdbb2c7fb8", "ffffcca1dab441b6c4225ea8", "ffffcca1dab441b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "EQ5u": /*!*********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js ***! \*********************************************************************************/ /*! exports provided: ConnectableObservable, connectableObservableDescriptor */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../operators/refCount */ "x+ZX"); class ConnectableObservable extends _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"] { constructor(source, subjectFactory) { super(); this.source = source; this.subjectFactory = subjectFactory; this._refCount = 0; this._isComplete = false; } _subscribe(subscriber) { return this.getSubject().subscribe(subscriber); } getSubject() { const subject = this._subject; if (!subject || subject.isStopped) { this._subject = this.subjectFactory(); } return this._subject; } connect() { let connection = this._connection; if (!connection) { this._isComplete = false; connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"](); connection.add(this.source .subscribe(new ConnectableSubscriber(this.getSubject(), this))); if (connection.closed) { this._connection = null; connection = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY; } } return connection; } refCount() { return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_4__["refCount"])()(this); } } const connectableObservableDescriptor = (() => { const connectableProto = ConnectableObservable.prototype; return { operator: { value: null }, _refCount: { value: 0, writable: true }, _subject: { value: null, writable: true }, _connection: { value: null, writable: true }, _subscribe: { value: connectableProto._subscribe }, _isComplete: { value: connectableProto._isComplete, writable: true }, getSubject: { value: connectableProto.getSubject }, connect: { value: connectableProto.connect }, refCount: { value: connectableProto.refCount } }; })(); class ConnectableSubscriber extends _Subject__WEBPACK_IMPORTED_MODULE_0__["SubjectSubscriber"] { constructor(destination, connectable) { super(destination); this.connectable = connectable; } _error(err) { this._unsubscribe(); super._error(err); } _complete() { this.connectable._isComplete = true; this._unsubscribe(); super._complete(); } _unsubscribe() { const connectable = this.connectable; if (connectable) { this.connectable = null; const connection = connectable._connection; connectable._refCount = 0; connectable._subject = null; connectable._connection = null; if (connection) { connection.unsubscribe(); } } } } class RefCountOperator { constructor(connectable) { this.connectable = connectable; } call(subscriber, source) { const { connectable } = this; connectable._refCount++; const refCounter = new RefCountSubscriber(subscriber, connectable); const subscription = source.subscribe(refCounter); if (!refCounter.closed) { refCounter.connection = connectable.connect(); } return subscription; } } class RefCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, connectable) { super(destination); this.connectable = connectable; } _unsubscribe() { const { connectable } = this; if (!connectable) { this.connection = null; return; } this.connectable = null; const refCount = connectable._refCount; if (refCount <= 0) { this.connection = null; return; } connectable._refCount = refCount - 1; if (refCount > 1) { this.connection = null; return; } const { connection } = this; const sharedConnection = connectable._connection; this.connection = null; if (sharedConnection && (!connection || sharedConnection === connection)) { sharedConnection.unsubscribe(); } } } //# sourceMappingURL=ConnectableObservable.js.map /***/ }), /***/ "EUnC": /*!************************************************!*\ !*** ./node_modules/d3-format/src/identity.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x; }); /***/ }), /***/ "EVP4": /*!***********************************************!*\ !*** ./node_modules/d3-quadtree/src/visit.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "p/7N"); /* harmony default export */ __webpack_exports__["default"] = (function(callback) { var quads = [], q, node = this._root, child, x0, y0, x1, y1; if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, this._x0, this._y0, this._x1, this._y1)); while (q = quads.pop()) { if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); } } return this; }); /***/ }), /***/ "EY2u": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/empty.js ***! \*****************************************************************/ /*! exports provided: EMPTY, empty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); const EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => subscriber.complete()); function empty(scheduler) { return scheduler ? emptyScheduled(scheduler) : EMPTY; } function emptyScheduled(scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => scheduler.schedule(() => subscriber.complete())); } //# sourceMappingURL=empty.js.map /***/ }), /***/ "EgnQ": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/data.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter.js */ "9om9"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../array.js */ "wibz"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ "0llg"); function bindIndex(parent, group, enter, update, exit, data) { var i = 0, node, groupLength = group.length, dataLength = data.length; // Put any non-null nodes that fit into update. // Put any null nodes into enter. // Put any remaining data into enter. for (; i < dataLength; ++i) { if (node = group[i]) { node.__data__ = data[i]; update[i] = node; } else { enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); } } // Put any non-null nodes that don’t fit into exit. for (; i < groupLength; ++i) { if (node = group[i]) { exit[i] = node; } } } function bindKey(parent, group, enter, update, exit, data, key) { var i, node, nodeByKeyValue = new Map, groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; // Compute the key for each node. // If multiple nodes have the same key, the duplicates are added to exit. for (i = 0; i < groupLength; ++i) { if (node = group[i]) { keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; if (nodeByKeyValue.has(keyValue)) { exit[i] = node; } else { nodeByKeyValue.set(keyValue, node); } } } // Compute the key for each datum. // If there a node associated with this key, join and add it to update. // If there is not (or the key is a duplicate), add it to enter. for (i = 0; i < dataLength; ++i) { keyValue = key.call(parent, data[i], i, data) + ""; if (node = nodeByKeyValue.get(keyValue)) { update[i] = node; node.__data__ = data[i]; nodeByKeyValue.delete(keyValue); } else { enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); } } // Add any remaining nodes that were not bound to data to exit. for (i = 0; i < groupLength; ++i) { if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) { exit[i] = node; } } } function datum(node) { return node.__data__; } /* harmony default export */ __webpack_exports__["default"] = (function(value, key) { if (!arguments.length) return Array.from(this, datum); var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups; if (typeof value !== "function") value = Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(value); for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { var parent = parents[j], group = groups[j], groupLength = group.length, data = Object(_array_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength); bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); // Now connect the enter nodes to their following update node, such that // appendChild can insert the materialized enter node before this node, // rather than at the end of the parent node. for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { if (previous = enterGroup[i0]) { if (i0 >= i1) i1 = i0 + 1; while (!(next = updateGroup[i1]) && ++i1 < dataLength); previous._next = next || null; } } } update = new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](update, parents); update._enter = enter; update._exit = exit; return update; }); /***/ }), /***/ "EjHT": /*!*****************************************************!*\ !*** ./node_modules/d3-format/src/defaultLocale.js ***! \*****************************************************/ /*! exports provided: format, formatPrefix, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return formatPrefix; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "sXBl"); var locale; var format; var formatPrefix; defaultLocale({ thousands: ",", grouping: [3], currency: ["$", ""] }); function defaultLocale(definition) { locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); format = locale.format; formatPrefix = locale.formatPrefix; return locale; } /***/ }), /***/ "El5h": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/lab.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function lab(start, end) { var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(end)).l), a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.a, end.a), b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.b, end.b), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.l = l(t); start.a = a(t); start.b = b(t); start.opacity = opacity(t); return start + ""; }; } /***/ }), /***/ "Enya": /*!****************************************************!*\ !*** ./node_modules/d3-selection/src/selectAll.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "wibz"); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selection/index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return typeof selector === "string" ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"]([document.querySelectorAll(selector)], [document.documentElement]) : new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"]([selector == null ? [] : Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(selector)], _selection_index_js__WEBPACK_IMPORTED_MODULE_1__["root"]); }); /***/ }), /***/ "Exv/": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/sort.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sort; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./permute.js */ "MiBC"); function sort(values, ...F) { if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); values = Array.from(values); let [f = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]] = F; if (f.length === 1 || F.length > 1) { const index = Uint32Array.from(values, (d, i) => i); if (F.length > 1) { F = F.map(f => values.map(f)); index.sort((i, j) => { for (const f of F) { const c = Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(f[i], f[j]); if (c) return c; } }); } else { f = values.map(f); index.sort((i, j) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(f[i], f[j])); } return Object(_permute_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, index); } return values.sort(f); } /***/ }), /***/ "EyRP": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/pointRadial.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; }); /***/ }), /***/ "EyUX": /*!*************************************************!*\ !*** ./node_modules/d3-geo/src/path/measure.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "mPOO"); var lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), lengthRing, x00, y00, x0, y0; var lengthStream = { point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: function() { lengthStream.point = lengthPointFirst; }, lineEnd: function() { if (lengthRing) lengthPoint(x00, y00); lengthStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }, polygonStart: function() { lengthRing = true; }, polygonEnd: function() { lengthRing = null; }, result: function() { var length = +lengthSum; lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); return length; } }; function lengthPointFirst(x, y) { lengthStream.point = lengthPoint; x00 = x0 = x, y00 = y0 = y; } function lengthPoint(x, y) { x0 -= x, y0 -= y; lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x0 * x0 + y0 * y0)); x0 = x, y0 = y; } /* harmony default export */ __webpack_exports__["default"] = (lengthStream); /***/ }), /***/ "F2eR": /*!***************************************************!*\ !*** ./node_modules/d3-geo/src/clip/rectangle.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return clipRectangle; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ "ODVu"); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "SGTC"); /* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin.js */ "5xK/"); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "vBe5"); var clipMax = 1e9, clipMin = -clipMax; // TODO Use d3-polygon’s polygonContains here for the ring check? // TODO Eliminate duplicate buffering in clipBuffer and polygon.push? function clipRectangle(x0, y0, x1, y1) { function visible(x, y) { return x0 <= x && x <= x1 && y0 <= y && y <= y1; } function interpolate(from, to, direction, stream) { var a = 0, a1 = 0; if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoint(from, to) < 0 ^ direction > 0) { do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); while ((a = (a + direction + 4) % 4) !== a1); } else { stream.point(to[0], to[1]); } } function corner(p, direction) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 0 : 3 : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x1) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 2 : 1 : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[1] - y0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon } function compareIntersection(a, b) { return comparePoint(a.x, b.x); } function comparePoint(a, b) { var ca = corner(a, 1), cb = corner(b, 1); return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0]; } return function(stream) { var activeStream = stream, bufferStream = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), segments, polygon, ring, x__, y__, v__, // first point x_, y_, v_, // previous point first, clean; var clipStream = { point: point, lineStart: lineStart, lineEnd: lineEnd, polygonStart: polygonStart, polygonEnd: polygonEnd }; function point(x, y) { if (visible(x, y)) activeStream.point(x, y); } function polygonInside() { var winding = 0; for (var i = 0, n = polygon.length; i < n; ++i) { for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } } } return winding; } // Buffer geometry within a polygon and then clip it en masse. function polygonStart() { activeStream = bufferStream, segments = [], polygon = [], clean = true; } function polygonEnd() { var startInside = polygonInside(), cleanInside = clean && startInside, visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments)).length; if (cleanInside || visible) { stream.polygonStart(); if (cleanInside) { stream.lineStart(); interpolate(null, null, 1, stream); stream.lineEnd(); } if (visible) { Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_3__["default"])(segments, compareIntersection, startInside, interpolate, stream); } stream.polygonEnd(); } activeStream = stream, segments = polygon = ring = null; } function lineStart() { clipStream.point = linePoint; if (polygon) polygon.push(ring = []); first = true; v_ = false; x_ = y_ = NaN; } // TODO rather than special-case polygons, simply handle them separately. // Ideally, coincident intersection points should be jittered to avoid // clipping issues. function lineEnd() { if (segments) { linePoint(x__, y__); if (v__ && v_) bufferStream.rejoin(); segments.push(bufferStream.result()); } clipStream.point = point; if (v_) activeStream.lineEnd(); } function linePoint(x, y) { var v = visible(x, y); if (polygon) ring.push([x, y]); if (first) { x__ = x, y__ = y, v__ = v; first = false; if (v) { activeStream.lineStart(); activeStream.point(x, y); } } else { if (v && v_) activeStream.point(x, y); else { var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; if (Object(_line_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b, x0, y0, x1, y1)) { if (!v_) { activeStream.lineStart(); activeStream.point(a[0], a[1]); } activeStream.point(b[0], b[1]); if (!v) activeStream.lineEnd(); clean = false; } else if (v) { activeStream.lineStart(); activeStream.point(x, y); clean = false; } } } x_ = x, y_ = y, v_ = v; } return clipStream; }; } /***/ }), /***/ "F8PK": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/lower.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function lower() { if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.each(lower); }); /***/ }), /***/ "F97/": /*!*********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/not.js ***! \*********************************************************/ /*! exports provided: not */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; }); function not(pred, thisArg) { function notPred() { return !(notPred.pred.apply(notPred.thisArg, arguments)); } notPred.pred = pred; notPred.thisArg = thisArg; return notPred; } //# sourceMappingURL=not.js.map /***/ }), /***/ "FD9M": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferToggle.js ***! \***********************************************************************/ /*! exports provided: bufferToggle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); function bufferToggle(openings, closingSelector) { return function bufferToggleOperatorFunction(source) { return source.lift(new BufferToggleOperator(openings, closingSelector)); }; } class BufferToggleOperator { constructor(openings, closingSelector) { this.openings = openings; this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector)); } } class BufferToggleSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, openings, closingSelector) { super(destination); this.closingSelector = closingSelector; this.contexts = []; this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, openings)); } _next(value) { const contexts = this.contexts; const len = contexts.length; for (let i = 0; i < len; i++) { contexts[i].buffer.push(value); } } _error(err) { const contexts = this.contexts; while (contexts.length > 0) { const context = contexts.shift(); context.subscription.unsubscribe(); context.buffer = null; context.subscription = null; } this.contexts = null; super._error(err); } _complete() { const contexts = this.contexts; while (contexts.length > 0) { const context = contexts.shift(); this.destination.next(context.buffer); context.subscription.unsubscribe(); context.buffer = null; context.subscription = null; } this.contexts = null; super._complete(); } notifyNext(outerValue, innerValue) { outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue); } notifyComplete(innerSub) { this.closeBuffer(innerSub.context); } openBuffer(value) { try { const closingSelector = this.closingSelector; const closingNotifier = closingSelector.call(this, value); if (closingNotifier) { this.trySubscribe(closingNotifier); } } catch (err) { this._error(err); } } closeBuffer(context) { const contexts = this.contexts; if (contexts && context) { const { buffer, subscription } = context; this.destination.next(buffer); contexts.splice(contexts.indexOf(context), 1); this.remove(subscription); subscription.unsubscribe(); } } trySubscribe(closingNotifier) { const contexts = this.contexts; const buffer = []; const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"](); const context = { buffer, subscription }; contexts.push(context); const innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, closingNotifier, context); if (!innerSubscription || innerSubscription.closed) { this.closeBuffer(context); } else { innerSubscription.context = context; this.add(innerSubscription); subscription.add(innerSubscription); } } } //# sourceMappingURL=bufferToggle.js.map /***/ }), /***/ "FPPI": /*!*******************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/dice.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { var nodes = parent.children, node, i = -1, n = nodes.length, k = parent.value && (x1 - x0) / parent.value; while (++i < n) { node = nodes[i], node.y0 = y0, node.y1 = y1; node.x0 = x0, node.x1 = x0 += node.value * k; } }); /***/ }), /***/ "FQpF": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/expand.js ***! \*****************************************************************/ /*! exports provided: expand, ExpandOperator, ExpandSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler) { concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent; return (source) => source.lift(new ExpandOperator(project, concurrent, scheduler)); } class ExpandOperator { constructor(project, concurrent, scheduler) { this.project = project; this.concurrent = concurrent; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler)); } } class ExpandSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, project, concurrent, scheduler) { super(destination); this.project = project; this.concurrent = concurrent; this.scheduler = scheduler; this.index = 0; this.active = 0; this.hasCompleted = false; if (concurrent < Number.POSITIVE_INFINITY) { this.buffer = []; } } static dispatch(arg) { const { subscriber, result, value, index } = arg; subscriber.subscribeToProjection(result, value, index); } _next(value) { const destination = this.destination; if (destination.closed) { this._complete(); return; } const index = this.index++; if (this.active < this.concurrent) { destination.next(value); try { const { project } = this; const result = project(value, index); if (!this.scheduler) { this.subscribeToProjection(result, value, index); } else { const state = { subscriber: this, result, value, index }; const destination = this.destination; destination.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state)); } } catch (e) { destination.error(e); } } else { this.buffer.push(value); } } subscribeToProjection(result, value, index) { this.active++; const destination = this.destination; destination.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } _complete() { this.hasCompleted = true; if (this.hasCompleted && this.active === 0) { this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { this._next(innerValue); } notifyComplete() { const buffer = this.buffer; this.active--; if (buffer && buffer.length > 0) { this._next(buffer.shift()); } if (this.hasCompleted && this.active === 0) { this.destination.complete(); } } } //# sourceMappingURL=expand.js.map /***/ }), /***/ "FTmn": /*!********************************************!*\ !*** ./node_modules/d3-array/src/merge.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return merge; }); function* flatten(arrays) { for (const array of arrays) { yield* array; } } function merge(arrays) { return Array.from(flatten(arrays)); } /***/ }), /***/ "FWfd": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/geometric.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomGeometric(source) { function randomGeometric(p) { if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); if (p === 0) return () => Infinity; if (p === 1) return () => 1; p = Math.log1p(-p); return function() { return 1 + Math.floor(Math.log1p(-source()) / p); }; } randomGeometric.source = sourceRandomGeometric; return randomGeometric; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "FZB8": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/min.js ***! \**************************************************************/ /*! exports provided: min */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); function min(comparer) { const min = (typeof comparer === 'function') ? (x, y) => comparer(x, y) < 0 ? x : y : (x, y) => x < y ? x : y; return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min); } //# sourceMappingURL=min.js.map /***/ }), /***/ "Faen": /*!************************************************!*\ !*** ./node_modules/d3-color/src/cubehelix.js ***! \************************************************/ /*! exports provided: default, Cubehelix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cubehelix; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubehelix", function() { return Cubehelix; }); /* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "Y62N"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "FmoU"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "Uwo/"); var A = -0.14861, B = +1.78277, C = -0.29227, D = -0.90649, E = +1.97294, ED = E * D, EB = E * B, BC_DA = B * C - D * A; function cubehelixConvert(o) { if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); var r = o.r / 255, g = o.g / 255, b = o.b / 255, l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), bl = b - l, k = (E * (g - l) - C * bl) / D, s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"] - 120 : NaN; return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); } function cubehelix(h, s, l, opacity) { return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); } function Cubehelix(h, s, l, opacity) { this.h = +h; this.s = +s; this.l = +l; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { brighter: function(k) { k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"], k); return new Cubehelix(this.h, this.s, this.l * k, this.opacity); }, darker: function(k) { k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["darker"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["darker"], k); return new Cubehelix(this.h, this.s, this.l * k, this.opacity); }, rgb: function() { var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], l = +this.l, a = isNaN(this.s) ? 0 : this.s * l * (1 - l), cosh = Math.cos(h), sinh = Math.sin(h); return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( 255 * (l + a * (A * cosh + B * sinh)), 255 * (l + a * (C * cosh + D * sinh)), 255 * (l + a * (E * cosh)), this.opacity ); } })); /***/ }), /***/ "FmoU": /*!********************************************!*\ !*** ./node_modules/d3-color/src/color.js ***! \********************************************/ /*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darker", function() { return darker; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brighter", function() { return brighter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return color; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbConvert", function() { return rgbConvert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rgb", function() { return Rgb; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslConvert", function() { return hslConvert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; }); /* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "Y62N"); function Color() {} var darker = 0.7; var brighter = 1 / darker; var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); var named = { aliceblue: 0xf0f8ff, antiquewhite: 0xfaebd7, aqua: 0x00ffff, aquamarine: 0x7fffd4, azure: 0xf0ffff, beige: 0xf5f5dc, bisque: 0xffe4c4, black: 0x000000, blanchedalmond: 0xffebcd, blue: 0x0000ff, blueviolet: 0x8a2be2, brown: 0xa52a2a, burlywood: 0xdeb887, cadetblue: 0x5f9ea0, chartreuse: 0x7fff00, chocolate: 0xd2691e, coral: 0xff7f50, cornflowerblue: 0x6495ed, cornsilk: 0xfff8dc, crimson: 0xdc143c, cyan: 0x00ffff, darkblue: 0x00008b, darkcyan: 0x008b8b, darkgoldenrod: 0xb8860b, darkgray: 0xa9a9a9, darkgreen: 0x006400, darkgrey: 0xa9a9a9, darkkhaki: 0xbdb76b, darkmagenta: 0x8b008b, darkolivegreen: 0x556b2f, darkorange: 0xff8c00, darkorchid: 0x9932cc, darkred: 0x8b0000, darksalmon: 0xe9967a, darkseagreen: 0x8fbc8f, darkslateblue: 0x483d8b, darkslategray: 0x2f4f4f, darkslategrey: 0x2f4f4f, darkturquoise: 0x00ced1, darkviolet: 0x9400d3, deeppink: 0xff1493, deepskyblue: 0x00bfff, dimgray: 0x696969, dimgrey: 0x696969, dodgerblue: 0x1e90ff, firebrick: 0xb22222, floralwhite: 0xfffaf0, forestgreen: 0x228b22, fuchsia: 0xff00ff, gainsboro: 0xdcdcdc, ghostwhite: 0xf8f8ff, gold: 0xffd700, goldenrod: 0xdaa520, gray: 0x808080, green: 0x008000, greenyellow: 0xadff2f, grey: 0x808080, honeydew: 0xf0fff0, hotpink: 0xff69b4, indianred: 0xcd5c5c, indigo: 0x4b0082, ivory: 0xfffff0, khaki: 0xf0e68c, lavender: 0xe6e6fa, lavenderblush: 0xfff0f5, lawngreen: 0x7cfc00, lemonchiffon: 0xfffacd, lightblue: 0xadd8e6, lightcoral: 0xf08080, lightcyan: 0xe0ffff, lightgoldenrodyellow: 0xfafad2, lightgray: 0xd3d3d3, lightgreen: 0x90ee90, lightgrey: 0xd3d3d3, lightpink: 0xffb6c1, lightsalmon: 0xffa07a, lightseagreen: 0x20b2aa, lightskyblue: 0x87cefa, lightslategray: 0x778899, lightslategrey: 0x778899, lightsteelblue: 0xb0c4de, lightyellow: 0xffffe0, lime: 0x00ff00, limegreen: 0x32cd32, linen: 0xfaf0e6, magenta: 0xff00ff, maroon: 0x800000, mediumaquamarine: 0x66cdaa, mediumblue: 0x0000cd, mediumorchid: 0xba55d3, mediumpurple: 0x9370db, mediumseagreen: 0x3cb371, mediumslateblue: 0x7b68ee, mediumspringgreen: 0x00fa9a, mediumturquoise: 0x48d1cc, mediumvioletred: 0xc71585, midnightblue: 0x191970, mintcream: 0xf5fffa, mistyrose: 0xffe4e1, moccasin: 0xffe4b5, navajowhite: 0xffdead, navy: 0x000080, oldlace: 0xfdf5e6, olive: 0x808000, olivedrab: 0x6b8e23, orange: 0xffa500, orangered: 0xff4500, orchid: 0xda70d6, palegoldenrod: 0xeee8aa, palegreen: 0x98fb98, paleturquoise: 0xafeeee, palevioletred: 0xdb7093, papayawhip: 0xffefd5, peachpuff: 0xffdab9, peru: 0xcd853f, pink: 0xffc0cb, plum: 0xdda0dd, powderblue: 0xb0e0e6, purple: 0x800080, rebeccapurple: 0x663399, red: 0xff0000, rosybrown: 0xbc8f8f, royalblue: 0x4169e1, saddlebrown: 0x8b4513, salmon: 0xfa8072, sandybrown: 0xf4a460, seagreen: 0x2e8b57, seashell: 0xfff5ee, sienna: 0xa0522d, silver: 0xc0c0c0, skyblue: 0x87ceeb, slateblue: 0x6a5acd, slategray: 0x708090, slategrey: 0x708090, snow: 0xfffafa, springgreen: 0x00ff7f, steelblue: 0x4682b4, tan: 0xd2b48c, teal: 0x008080, thistle: 0xd8bfd8, tomato: 0xff6347, turquoise: 0x40e0d0, violet: 0xee82ee, wheat: 0xf5deb3, white: 0xffffff, whitesmoke: 0xf5f5f5, yellow: 0xffff00, yellowgreen: 0x9acd32 }; Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, { copy: function(channels) { return Object.assign(new this.constructor, this, channels); }, displayable: function() { return this.rgb().displayable(); }, hex: color_formatHex, // Deprecated! Use color.formatHex. formatHex: color_formatHex, formatHsl: color_formatHsl, formatRgb: color_formatRgb, toString: color_formatRgb }); function color_formatHex() { return this.rgb().formatHex(); } function color_formatHsl() { return hslConvert(this).formatHsl(); } function color_formatRgb() { return this.rgb().formatRgb(); } function color(format) { var m, l; format = (format + "").trim().toLowerCase(); return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 : null) // invalid hex : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; } function rgbn(n) { return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); } function rgba(r, g, b, a) { if (a <= 0) r = g = b = NaN; return new Rgb(r, g, b, a); } function rgbConvert(o) { if (!(o instanceof Color)) o = color(o); if (!o) return new Rgb; o = o.rgb(); return new Rgb(o.r, o.g, o.b, o.opacity); } function rgb(r, g, b, opacity) { return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); } function Rgb(r, g, b, opacity) { this.r = +r; this.g = +g; this.b = +b; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { brighter: function(k) { k = k == null ? brighter : Math.pow(brighter, k); return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); }, darker: function(k) { k = k == null ? darker : Math.pow(darker, k); return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); }, rgb: function() { return this; }, displayable: function() { return (-0.5 <= this.r && this.r < 255.5) && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1); }, hex: rgb_formatHex, // Deprecated! Use color.formatHex. formatHex: rgb_formatHex, formatRgb: rgb_formatRgb, toString: rgb_formatRgb })); function rgb_formatHex() { return "#" + hex(this.r) + hex(this.g) + hex(this.b); } function rgb_formatRgb() { var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")"); } function hex(value) { value = Math.max(0, Math.min(255, Math.round(value) || 0)); return (value < 16 ? "0" : "") + value.toString(16); } function hsla(h, s, l, a) { if (a <= 0) h = s = l = NaN; else if (l <= 0 || l >= 1) h = s = NaN; else if (s <= 0) h = NaN; return new Hsl(h, s, l, a); } function hslConvert(o) { if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); if (!(o instanceof Color)) o = color(o); if (!o) return new Hsl; if (o instanceof Hsl) return o; o = o.rgb(); var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h = NaN, s = max - min, l = (max + min) / 2; if (s) { if (r === max) h = (g - b) / s + (g < b) * 6; else if (g === max) h = (b - r) / s + 2; else h = (r - g) / s + 4; s /= l < 0.5 ? max + min : 2 - max - min; h *= 60; } else { s = l > 0 && l < 1 ? 0 : h; } return new Hsl(h, s, l, o.opacity); } function hsl(h, s, l, opacity) { return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); } function Hsl(h, s, l, opacity) { this.h = +h; this.s = +s; this.l = +l; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { brighter: function(k) { k = k == null ? brighter : Math.pow(brighter, k); return new Hsl(this.h, this.s, this.l * k, this.opacity); }, darker: function(k) { k = k == null ? darker : Math.pow(darker, k); return new Hsl(this.h, this.s, this.l * k, this.opacity); }, rgb: function() { var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2; return new Rgb( hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity ); }, displayable: function() { return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1); }, formatHsl: function() { var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")"); } })); /* From FvD 13.37, CSS Color Module Level 3 */ function hsl2rgb(h, m1, m2) { return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; } /***/ }), /***/ "Fzhe": /*!**********************************************!*\ !*** ./node_modules/d3-time/src/duration.js ***! \**********************************************/ /*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationSecond", function() { return durationSecond; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationMinute", function() { return durationMinute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationHour", function() { return durationHour; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationDay", function() { return durationDay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationWeek", function() { return durationWeek; }); var durationSecond = 1e3; var durationMinute = 6e4; var durationHour = 36e5; var durationDay = 864e5; var durationWeek = 6048e5; /***/ }), /***/ "G0FW": /*!************************************************!*\ !*** ./node_modules/d3-quadtree/src/remove.js ***! \************************************************/ /*! exports provided: default, removeAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAll", function() { return removeAll; }); /* harmony default export */ __webpack_exports__["default"] = (function(d) { if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points var parent, node = this._root, retainer, previous, next, x0 = this._x0, y0 = this._y0, x1 = this._x1, y1 = this._y1, x, y, xm, ym, right, bottom, i, j; // If the tree is empty, initialize the root as a leaf. if (!node) return this; // Find the leaf node for the point. // While descending, also retain the deepest parent with a non-removed sibling. if (node.length) while (true) { if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; if (!(parent = node, node = node[i = bottom << 1 | right])) return this; if (!node.length) break; if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; } // Find the point to remove. while (node.data !== d) if (!(previous = node, node = node.next)) return this; if (next = node.next) delete node.next; // If there are multiple coincident points, remove just the point. if (previous) return (next ? previous.next = next : delete previous.next), this; // If this is the root point, remove it. if (!parent) return this._root = next, this; // Remove this leaf. next ? parent[i] = next : delete parent[i]; // If the parent now contains exactly one leaf, collapse superfluous parents. if ((node = parent[0] || parent[1] || parent[2] || parent[3]) && node === (parent[3] || parent[2] || parent[1] || parent[0]) && !node.length) { if (retainer) retainer[j] = node; else this._root = node; } return this; }); function removeAll(data) { for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); return this; } /***/ }), /***/ "G21l": /*!*************************************************!*\ !*** ./node_modules/d3-interpolate/src/date.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var d = new Date; return a = +a, b = +b, function(t) { return d.setTime(a * (1 - t) + b * t), d; }; }); /***/ }), /***/ "G3Uy": /*!************************************************!*\ !*** ./node_modules/d3-random/src/logistic.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomLogistic(source) { function randomLogistic(a, b) { a = a == null ? 0 : +a; b = b == null ? 1 : +b; return function() { var u = source(); return a + b * Math.log(u / (1 - u)); }; } randomLogistic.source = sourceRandomLogistic; return randomLogistic; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "G4XB": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/logNormal.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal.js */ "ptze"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomLogNormal(source) { var N = _normal_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomLogNormal() { var randomNormal = N.apply(this, arguments); return function() { return Math.exp(randomNormal()); }; } randomLogNormal.source = sourceRandomLogNormal; return randomLogNormal; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "GAlb": /*!*************************************************!*\ !*** ./node_modules/d3-time/src/millisecond.js ***! \*************************************************/ /*! exports provided: default, milliseconds */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "milliseconds", function() { return milliseconds; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function() { // noop }, function(date, step) { date.setTime(+date + step); }, function(start, end) { return end - start; }); // An optimized implementation for this simple case. millisecond.every = function(k) { k = Math.floor(k); if (!isFinite(k) || !(k > 0)) return null; if (!(k > 1)) return millisecond; return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(Math.floor(date / k) * k); }, function(date, step) { date.setTime(+date + step * k); }, function(start, end) { return (end - start) / k; }); }; /* harmony default export */ __webpack_exports__["default"] = (millisecond); var milliseconds = millisecond.range; /***/ }), /***/ "GHWt": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/quantile.js ***! \***********************************************/ /*! exports provided: default, quantileSorted */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return quantileSorted; }); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./max.js */ "gj+k"); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ "mrVq"); /* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quickselect.js */ "WHjf"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ "CiDq"); function quantile(values, p, valueof) { values = Float64Array.from(Object(_number_js__WEBPACK_IMPORTED_MODULE_3__["numbers"])(values, valueof)); if (!(n = values.length)) return; if ((p = +p) <= 0 || n < 2) return Object(_min_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values); if (p >= 1) return Object(_max_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values); var n, i = (n - 1) * p, i0 = Math.floor(i), value0 = Object(_max_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_quickselect_js__WEBPACK_IMPORTED_MODULE_2__["default"])(values, i0).subarray(0, i0 + 1)), value1 = Object(_min_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values.subarray(i0 + 1)); return value0 + (value1 - value0) * (i - i0); } function quantileSorted(values, p, valueof = _number_js__WEBPACK_IMPORTED_MODULE_3__["default"]) { if (!(n = values.length)) return; if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); if (p >= 1) return +valueof(values[n - 1], n - 1, values); var n, i = (n - 1) * p, i0 = Math.floor(i), value0 = +valueof(values[i0], i0, values), value1 = +valueof(values[i0 + 1], i0 + 1, values); return value0 + (value1 - value0) * (i - i0); } /***/ }), /***/ "GJmQ": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js ***! \********************************************************************/ /*! exports provided: takeWhile */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function takeWhile(predicate, inclusive = false) { return (source) => source.lift(new TakeWhileOperator(predicate, inclusive)); } class TakeWhileOperator { constructor(predicate, inclusive) { this.predicate = predicate; this.inclusive = inclusive; } call(subscriber, source) { return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive)); } } class TakeWhileSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, inclusive) { super(destination); this.predicate = predicate; this.inclusive = inclusive; this.index = 0; } _next(value) { const destination = this.destination; let result; try { result = this.predicate(value, this.index++); } catch (err) { destination.error(err); return; } this.nextOrComplete(value, result); } nextOrComplete(value, predicateResult) { const destination = this.destination; if (Boolean(predicateResult)) { destination.next(value); } else { if (this.inclusive) { destination.next(value); } destination.complete(); } } } //# sourceMappingURL=takeWhile.js.map /***/ }), /***/ "GOKn": /*!**********************************************!*\ !*** ./node_modules/d3-time/src/interval.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return newInterval; }); var t0 = new Date, t1 = new Date; function newInterval(floori, offseti, count, field) { function interval(date) { return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; } interval.floor = function(date) { return floori(date = new Date(+date)), date; }; interval.ceil = function(date) { return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; }; interval.round = function(date) { var d0 = interval(date), d1 = interval.ceil(date); return date - d0 < d1 - date ? d0 : d1; }; interval.offset = function(date, step) { return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; }; interval.range = function(start, stop, step) { var range = [], previous; start = interval.ceil(start); step = step == null ? 1 : Math.floor(step); if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date do range.push(previous = new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop); return range; }; interval.filter = function(test) { return newInterval(function(date) { if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); }, function(date, step) { if (date >= date) { if (step < 0) while (++step <= 0) { while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty } else while (--step >= 0) { while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty } } }); }; if (count) { interval.count = function(start, end) { t0.setTime(+start), t1.setTime(+end); floori(t0), floori(t1); return Math.floor(count(t0, t1)); }; interval.every = function(step) { step = Math.floor(step); return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function(d) { return field(d) % step === 0; } : function(d) { return interval.count(0, d) % step === 0; }); }; } return interval; } /***/ }), /***/ "GQZn": /*!***********************************************!*\ !*** ./node_modules/d3-shape/src/identity.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(d) { return d; }); /***/ }), /***/ "GRP9": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/raise.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function raise() { if (this.nextSibling) this.parentNode.appendChild(this); } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.each(raise); }); /***/ }), /***/ "GWx9": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/nice.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nice; }); /* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ticks.js */ "7ssf"); function nice(start, stop, count) { let prestep; while (true) { const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); if (step === prestep || step === 0 || !isFinite(step)) { return [start, stop]; } else if (step > 0) { start = Math.floor(start / step) * step; stop = Math.ceil(stop / step) * step; } else if (step < 0) { start = Math.ceil(start * step) / step; stop = Math.floor(stop * step) / step; } prestep = step; } } /***/ }), /***/ "Gi4w": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/every.js ***! \****************************************************************/ /*! exports provided: every */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function every(predicate, thisArg) { return (source) => source.lift(new EveryOperator(predicate, thisArg, source)); } class EveryOperator { constructor(predicate, thisArg, source) { this.predicate = predicate; this.thisArg = thisArg; this.source = source; } call(observer, source) { return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source)); } } class EverySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, thisArg, source) { super(destination); this.predicate = predicate; this.thisArg = thisArg; this.source = source; this.index = 0; this.thisArg = thisArg || this; } notifyComplete(everyValueMatch) { this.destination.next(everyValueMatch); this.destination.complete(); } _next(value) { let result = false; try { result = this.predicate.call(this.thisArg, value, this.index++, this.source); } catch (err) { this.destination.error(err); return; } if (!result) { this.notifyComplete(false); } } _complete() { this.notifyComplete(true); } } //# sourceMappingURL=every.js.map /***/ }), /***/ "GjHo": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/zip.js ***! \**************************************************************/ /*! exports provided: zip */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; }); /* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "1uah"); function zip(...observables) { return function zipOperatorFunction(source) { return source.lift.call(Object(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"])(source, ...observables)); }; } //# sourceMappingURL=zip.js.map /***/ }), /***/ "GjTP": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/offset/expand.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "0T5i"); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0)) return; for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; } Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), /***/ "Goif": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/link/index.js ***! \*************************************************/ /*! exports provided: linkHorizontal, linkVertical, linkRadial */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return linkHorizontal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return linkVertical; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return linkRadial; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "2K37"); /* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ "/aQN"); /* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ "EyRP"); function linkSource(d) { return d.source; } function linkTarget(d) { return d.target; } function link(curve) { var source = linkSource, target = linkTarget, x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], context = null; function link() { var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); if (buffer) return context = null, buffer + "" || null; } link.source = function(_) { return arguments.length ? (source = _, link) : source; }; link.target = function(_) { return arguments.length ? (target = _, link) : target; }; link.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : x; }; link.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : y; }; link.context = function(_) { return arguments.length ? ((context = _ == null ? null : _), link) : context; }; return link; } function curveHorizontal(context, x0, y0, x1, y1) { context.moveTo(x0, y0); context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); } function curveVertical(context, x0, y0, x1, y1) { context.moveTo(x0, y0); context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); } function curveRadial(context, x0, y0, x1, y1) { var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0), p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0 = (y0 + y1) / 2), p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y0), p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y1); context.moveTo(p0[0], p0[1]); context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); } function linkHorizontal() { return link(curveHorizontal); } function linkVertical() { return link(curveVertical); } function linkRadial() { var l = link(curveRadial); l.angle = l.x, delete l.x; l.radius = l.y, delete l.y; return l; } /***/ }), /***/ "GpRi": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/areaRadial.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "JnD7"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "44y/"); /* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ "TI0E"); /* harmony default export */ __webpack_exports__["default"] = (function() { var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"]), c = a.curve, x0 = a.lineX0, x1 = a.lineX1, y0 = a.lineY0, y1 = a.lineY1; a.angle = a.x, delete a.x; a.startAngle = a.x0, delete a.x0; a.endAngle = a.x1, delete a.x1; a.radius = a.y, delete a.y; a.innerRadius = a.y0, delete a.y0; a.outerRadius = a.y1, delete a.y1; a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x0()); }, delete a.lineX0; a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x1()); }, delete a.lineX1; a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y0()); }, delete a.lineY0; a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y1()); }, delete a.lineY1; a.curve = function(_) { return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; }; return a; }); /***/ }), /***/ "Gqsl": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js ***! \*********************************************************************/ /*! exports provided: repeatWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function repeatWhen(notifier) { return (source) => source.lift(new RepeatWhenOperator(notifier)); } class RepeatWhenOperator { constructor(notifier) { this.notifier = notifier; } call(subscriber, source) { return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source)); } } class RepeatWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination, notifier, source) { super(destination); this.notifier = notifier; this.source = source; this.sourceIsBeingSubscribedTo = true; } notifyNext() { this.sourceIsBeingSubscribedTo = true; this.source.subscribe(this); } notifyComplete() { if (this.sourceIsBeingSubscribedTo === false) { return super.complete(); } } complete() { this.sourceIsBeingSubscribedTo = false; if (!this.isStopped) { if (!this.retries) { this.subscribeToRetries(); } if (!this.retriesSubscription || this.retriesSubscription.closed) { return super.complete(); } this._unsubscribeAndRecycle(); this.notifications.next(undefined); } } _unsubscribe() { const { notifications, retriesSubscription } = this; if (notifications) { notifications.unsubscribe(); this.notifications = undefined; } if (retriesSubscription) { retriesSubscription.unsubscribe(); this.retriesSubscription = undefined; } this.retries = undefined; } _unsubscribeAndRecycle() { const { _unsubscribe } = this; this._unsubscribe = null; super._unsubscribeAndRecycle(); this._unsubscribe = _unsubscribe; return this; } subscribeToRetries() { this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); let retries; try { const { notifier } = this; retries = notifier(this.notifications); } catch (e) { return super.complete(); } this.retries = retries; this.retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this)); } } //# sourceMappingURL=repeatWhen.js.map /***/ }), /***/ "GvAG": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/circle.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "CYYh"); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"]); context.moveTo(r, 0); context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); } }); /***/ }), /***/ "Gvn4": /*!*****************************************************!*\ !*** ./node_modules/d3-interpolate/src/quantize.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(interpolator, n) { var samples = new Array(n); for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); return samples; }); /***/ }), /***/ "GyhO": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/concat.js ***! \******************************************************************/ /*! exports provided: concat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; }); /* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./of */ "LRne"); /* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../operators/concatAll */ "0EUg"); function concat(...observables) { return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(Object(_of__WEBPACK_IMPORTED_MODULE_0__["of"])(...observables)); } //# sourceMappingURL=concat.js.map /***/ }), /***/ "H39o": /*!*************************************************!*\ !*** ./node_modules/d3-polygon/src/centroid.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon) { var i = -1, n = polygon.length, x = 0, y = 0, a, b = polygon[n - 1], c, k = 0; while (++i < n) { a = b; b = polygon[i]; k += c = a[0] * b[1] - b[0] * a[1]; x += (a[0] + b[0]) * c; y += (a[1] + b[1]) * c; } return k *= 3, [x / k, y / k]; }); /***/ }), /***/ "H7P7": /*!************************************************!*\ !*** ./node_modules/d3-quadtree/src/extent.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(_) { return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; }); /***/ }), /***/ "HDdC": /*!***********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Observable.js ***! \***********************************************************/ /*! exports provided: Observable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; }); /* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/canReportError */ "8Qeq"); /* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/toSubscriber */ "WyKG"); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/observable */ "kJWO"); /* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/pipe */ "mCNh"); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "2fFW"); class Observable { constructor(subscribe) { this._isScalar = false; if (subscribe) { this._subscribe = subscribe; } } lift(operator) { const observable = new Observable(); observable.source = this; observable.operator = operator; return observable; } subscribe(observerOrNext, error, complete) { const { operator } = this; const sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete); if (operator) { sink.add(operator.call(sink, this.source)); } else { sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? this._subscribe(sink) : this._trySubscribe(sink)); } if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { if (sink.syncErrorThrowable) { sink.syncErrorThrowable = false; if (sink.syncErrorThrown) { throw sink.syncErrorValue; } } } return sink; } _trySubscribe(sink) { try { return this._subscribe(sink); } catch (err) { if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { sink.syncErrorThrown = true; sink.syncErrorValue = err; } if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) { sink.error(err); } else { console.warn(err); } } } forEach(next, promiseCtor) { promiseCtor = getPromiseCtor(promiseCtor); return new promiseCtor((resolve, reject) => { let subscription; subscription = this.subscribe((value) => { try { next(value); } catch (err) { reject(err); if (subscription) { subscription.unsubscribe(); } } }, reject, resolve); }); } _subscribe(subscriber) { const { source } = this; return source && source.subscribe(subscriber); } [_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]() { return this; } pipe(...operations) { if (operations.length === 0) { return this; } return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this); } toPromise(promiseCtor) { promiseCtor = getPromiseCtor(promiseCtor); return new promiseCtor((resolve, reject) => { let value; this.subscribe((x) => value = x, (err) => reject(err), () => resolve(value)); }); } } Observable.create = (subscribe) => { return new Observable(subscribe); }; function getPromiseCtor(promiseCtor) { if (!promiseCtor) { promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise; } if (!promiseCtor) { throw new Error('no Promise impl found'); } return promiseCtor; } //# sourceMappingURL=Observable.js.map /***/ }), /***/ "HFJB": /*!************************************************!*\ !*** ./node_modules/d3-selection/src/local.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return local; }); var nextId = 0; function local() { return new Local; } function Local() { this._ = "@" + (++nextId).toString(36); } Local.prototype = local.prototype = { constructor: Local, get: function(node) { var id = this._; while (!(id in node)) if (!(node = node.parentNode)) return; return node[id]; }, set: function(node, value) { return node[this._] = value; }, remove: function(node) { return this._ in node && delete node[this._]; }, toString: function() { return this._; } }; /***/ }), /***/ "HN8k": /*!********************************************!*\ !*** ./node_modules/d3-fetch/src/image.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return new Promise(function(resolve, reject) { var image = new Image; for (var key in init) image[key] = init[key]; image.onerror = reject; image.onload = function() { resolve(image); }; image.src = input; }); }); /***/ }), /***/ "HZff": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/find.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "p/7N"); /* harmony default export */ __webpack_exports__["default"] = (function(x, y, radius) { var data, x0 = this._x0, y0 = this._y0, x1, y1, x2, y2, x3 = this._x1, y3 = this._y1, quads = [], node = this._root, q, i; if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, x0, y0, x3, y3)); if (radius == null) radius = Infinity; else { x0 = x - radius, y0 = y - radius; x3 = x + radius, y3 = y + radius; radius *= radius; } while (q = quads.pop()) { // Stop searching if this quadrant can’t contain a closer node. if (!(node = q.node) || (x1 = q.x0) > x3 || (y1 = q.y0) > y3 || (x2 = q.x1) < x0 || (y2 = q.y1) < y0) continue; // Bisect the current quadrant. if (node.length) { var xm = (x1 + x2) / 2, ym = (y1 + y2) / 2; quads.push( new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[3], xm, ym, x2, y2), new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[2], x1, ym, xm, y2), new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[1], xm, y1, x2, ym), new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[0], x1, y1, xm, ym) ); // Visit the closest quadrant first. if (i = (y >= ym) << 1 | (x >= xm)) { q = quads[quads.length - 1]; quads[quads.length - 1] = quads[quads.length - 1 - i]; quads[quads.length - 1 - i] = q; } } // Visit this point. (Visiting coincident points isn’t necessary!) else { var dx = x - +this._x.call(null, node.data), dy = y - +this._y.call(null, node.data), d2 = dx * dx + dy * dy; if (d2 < radius) { var d = Math.sqrt(radius = d2); x0 = x - d, y0 = y - d; x3 = x + d, y3 = y + d; data = node.data; } } } return data; }); /***/ }), /***/ "Hd9g": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/contains.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains.js */ "7FHc"); /* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance.js */ "rgrl"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "R0y8"); var containsObjectType = { Feature: function(object, point) { return containsGeometry(object.geometry, point); }, FeatureCollection: function(object, point) { var features = object.features, i = -1, n = features.length; while (++i < n) if (containsGeometry(features[i].geometry, point)) return true; return false; } }; var containsGeometryType = { Sphere: function() { return true; }, Point: function(object, point) { return containsPoint(object.coordinates, point); }, MultiPoint: function(object, point) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) if (containsPoint(coordinates[i], point)) return true; return false; }, LineString: function(object, point) { return containsLine(object.coordinates, point); }, MultiLineString: function(object, point) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) if (containsLine(coordinates[i], point)) return true; return false; }, Polygon: function(object, point) { return containsPolygon(object.coordinates, point); }, MultiPolygon: function(object, point) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) if (containsPolygon(coordinates[i], point)) return true; return false; }, GeometryCollection: function(object, point) { var geometries = object.geometries, i = -1, n = geometries.length; while (++i < n) if (containsGeometry(geometries[i], point)) return true; return false; } }; function containsGeometry(geometry, point) { return geometry && containsGeometryType.hasOwnProperty(geometry.type) ? containsGeometryType[geometry.type](geometry, point) : false; } function containsPoint(coordinates, point) { return Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates, point) === 0; } function containsLine(coordinates, point) { var ao, bo, ab; for (var i = 0, n = coordinates.length; i < n; i++) { bo = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], point); if (bo === 0) return true; if (i > 0) { ab = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], coordinates[i - 1]); if ( ab > 0 && ao <= ab && bo <= ab && (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon2"] * ab ) return true; } ao = bo; } return false; } function containsPolygon(coordinates, point) { return !!Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_0__["default"])(coordinates.map(ringRadians), pointRadians(point)); } function ringRadians(ring) { return ring = ring.map(pointRadians), ring.pop(), ring; } function pointRadians(point) { return [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]]; } /* harmony default export */ __webpack_exports__["default"] = (function(object, point) { return (object && containsObjectType.hasOwnProperty(object.type) ? containsObjectType[object.type] : containsGeometry)(object, point); }); /***/ }), /***/ "Hh5Z": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js ***! \*************************************************************************/ /*! exports provided: QueueScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; }); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class QueueScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { } //# sourceMappingURL=QueueScheduler.js.map /***/ }), /***/ "Hkhx": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/onErrorResumeNext.js ***! \*****************************************************************************/ /*! exports provided: onErrorResumeNext */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./empty */ "EY2u"); function onErrorResumeNext(...sources) { if (sources.length === 0) { return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"]; } const [first, ...remainder] = sources; if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) { return onErrorResumeNext(...first); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const subNext = () => subscriber.add(onErrorResumeNext(...remainder).subscribe(subscriber)); return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({ next(value) { subscriber.next(value); }, error: subNext, complete: subNext, }); }); } //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), /***/ "HpDs": /*!***********************************************!*\ !*** ./node_modules/d3-chord/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "HrJb": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/count.js ***! \****************************************************************/ /*! exports provided: count */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function count(predicate) { return (source) => source.lift(new CountOperator(predicate, source)); } class CountOperator { constructor(predicate, source) { this.predicate = predicate; this.source = source; } call(subscriber, source) { return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source)); } } class CountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, source) { super(destination); this.predicate = predicate; this.source = source; this.count = 0; this.index = 0; } _next(value) { if (this.predicate) { this._tryPredicate(value); } else { this.count++; } } _tryPredicate(value) { let result; try { result = this.predicate(value, this.index++, this.source); } catch (err) { this.destination.error(err); return; } if (result) { this.count++; } } _complete() { this.destination.next(this.count); this.destination.complete(); } } //# sourceMappingURL=count.js.map /***/ }), /***/ "I3Nq": /*!*****************************************************!*\ !*** ./node_modules/d3-hierarchy/src/pack/index.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _siblings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings.js */ "W+J7"); /* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors.js */ "IeU1"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "CSvP"); function defaultRadius(d) { return Math.sqrt(d.value); } /* harmony default export */ __webpack_exports__["default"] = (function() { var radius = null, dx = 1, dy = 1, padding = _constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"]; function pack(root) { root.x = dx / 2, root.y = dy / 2; if (radius) { root.eachBefore(radiusLeaf(radius)) .eachAfter(packChildren(padding, 0.5)) .eachBefore(translateChild(1)); } else { root.eachBefore(radiusLeaf(defaultRadius)) .eachAfter(packChildren(_constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"], 1)) .eachAfter(packChildren(padding, root.r / Math.min(dx, dy))) .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r))); } return root; } pack.radius = function(x) { return arguments.length ? (radius = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_1__["optional"])(x), pack) : radius; }; pack.size = function(x) { return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy]; }; pack.padding = function(x) { return arguments.length ? (padding = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+x), pack) : padding; }; return pack; }); function radiusLeaf(radius) { return function(node) { if (!node.children) { node.r = Math.max(0, +radius(node) || 0); } }; } function packChildren(padding, k) { return function(node) { if (children = node.children) { var children, i, n = children.length, r = padding(node) * k || 0, e; if (r) for (i = 0; i < n; ++i) children[i].r += r; e = Object(_siblings_js__WEBPACK_IMPORTED_MODULE_0__["packEnclose"])(children); if (r) for (i = 0; i < n; ++i) children[i].r -= r; node.r = e + r; } }; } function translateChild(k) { return function(node) { var parent = node.parent; node.r *= k; if (parent) { node.x = parent.x + k * node.x; node.y = parent.y + k * node.y; } }; } /***/ }), /***/ "I4jL": /*!***********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/squarify.js ***! \***********************************************************/ /*! exports provided: phi, squarifyRatio, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "phi", function() { return phi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squarifyRatio", function() { return squarifyRatio; }); /* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "FPPI"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "7IPS"); var phi = (1 + Math.sqrt(5)) / 2; function squarifyRatio(ratio, parent, x0, y0, x1, y1) { var rows = [], nodes = parent.children, row, nodeValue, i0 = 0, i1 = 0, n = nodes.length, dx, dy, value = parent.value, sumValue, minValue, maxValue, newRatio, minRatio, alpha, beta; while (i0 < n) { dx = x1 - x0, dy = y1 - y0; // Find the next non-empty node. do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); minValue = maxValue = sumValue; alpha = Math.max(dy / dx, dx / dy) / (value * ratio); beta = sumValue * sumValue * alpha; minRatio = Math.max(maxValue / beta, beta / minValue); // Keep adding nodes while the aspect ratio maintains or improves. for (; i1 < n; ++i1) { sumValue += nodeValue = nodes[i1].value; if (nodeValue < minValue) minValue = nodeValue; if (nodeValue > maxValue) maxValue = nodeValue; beta = sumValue * sumValue * alpha; newRatio = Math.max(maxValue / beta, beta / minValue); if (newRatio > minRatio) { sumValue -= nodeValue; break; } minRatio = newRatio; } // Position and record the row orientation. rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)}); if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1); else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1); value -= sumValue, i0 = i1; } return rows; } /* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { function squarify(parent, x0, y0, x1, y1) { squarifyRatio(ratio, parent, x0, y0, x1, y1); } squarify.ratio = function(x) { return custom((x = +x) > 1 ? x : 1); }; return squarify; })(phi)); /***/ }), /***/ "I55L": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js ***! \*****************************************************************/ /*! exports provided: isArrayLike */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; }); const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function'); //# sourceMappingURL=isArrayLike.js.map /***/ }), /***/ "IAdc": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/toArray.js ***! \******************************************************************/ /*! exports provided: toArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); function toArrayReducer(arr, item, index) { if (index === 0) { return [item]; } arr.push(item); return arr; } function toArray() { return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []); } //# sourceMappingURL=toArray.js.map /***/ }), /***/ "INn1": /*!***********************************************!*\ !*** ./node_modules/d3-polygon/src/length.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon) { var i = -1, n = polygon.length, b = polygon[n - 1], xa, ya, xb = b[0], yb = b[1], perimeter = 0; while (++i < n) { xa = xb; ya = yb; b = polygon[i]; xb = b[0]; yb = b[1]; xa -= xb; ya -= yb; perimeter += Math.hypot(xa, ya); } return perimeter; }); /***/ }), /***/ "IYKK": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/identity.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => x); /***/ }), /***/ "IeU1": /*!****************************************************!*\ !*** ./node_modules/d3-hierarchy/src/accessors.js ***! \****************************************************/ /*! exports provided: optional, required */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "optional", function() { return optional; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "required", function() { return required; }); function optional(f) { return f == null ? null : required(f); } function required(f) { if (typeof f !== "function") throw new Error; return f; } /***/ }), /***/ "Ijfk": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/bernoulli.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBernoulli(source) { function randomBernoulli(p) { if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); return function() { return Math.floor(source() + p); }; } randomBernoulli.source = sourceRandomBernoulli; return randomBernoulli; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "IjjT": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js ***! \*************************************************************************/ /*! exports provided: AsyncScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; }); /* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Scheduler */ "Y/cZ"); class AsyncScheduler extends _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"] { constructor(SchedulerAction, now = _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"].now) { super(SchedulerAction, () => { if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { return AsyncScheduler.delegate.now(); } else { return now(); } }); this.actions = []; this.active = false; this.scheduled = undefined; } schedule(work, delay = 0, state) { if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { return AsyncScheduler.delegate.schedule(work, delay, state); } else { return super.schedule(work, delay, state); } } flush(action) { const { actions } = this; if (this.active) { actions.push(action); return; } let error; this.active = true; do { if (error = action.execute(action.state, action.delay)) { break; } } while (action = actions.shift()); this.active = false; if (error) { while (action = actions.shift()) { action.unsubscribe(); } throw error; } } } //# sourceMappingURL=AsyncScheduler.js.map /***/ }), /***/ "IzEk": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/take.js ***! \***************************************************************/ /*! exports provided: take */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); function take(count) { return (source) => { if (count === 0) { return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); } else { return source.lift(new TakeOperator(count)); } }; } class TakeOperator { constructor(total) { this.total = total; if (this.total < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; } } call(subscriber, source) { return source.subscribe(new TakeSubscriber(subscriber, this.total)); } } class TakeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, total) { super(destination); this.total = total; this.count = 0; } _next(value) { const total = this.total; const count = ++this.count; if (count <= total) { this.destination.next(value); if (count === total) { this.destination.complete(); this.unsubscribe(); } } } } //# sourceMappingURL=take.js.map /***/ }), /***/ "J0SQ": /*!******************************************!*\ !*** ./node_modules/d3-array/src/map.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return map; }); function map(values, mapper) { if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); return Array.from(values, (value, index) => mapper(value, index, values)); } /***/ }), /***/ "J27/": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/path.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(end) { var start = this, ancestor = leastCommonAncestor(start, end), nodes = [start]; while (start !== ancestor) { start = start.parent; nodes.push(start); } var k = nodes.length; while (end !== ancestor) { nodes.splice(k, 0, end); end = end.parent; } return nodes; }); function leastCommonAncestor(a, b) { if (a === b) return a; var aNodes = a.ancestors(), bNodes = b.ancestors(), c = null; a = aNodes.pop(); b = bNodes.pop(); while (a === b) { c = a; a = aNodes.pop(); b = bNodes.pop(); } return c; } /***/ }), /***/ "JIr8": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/catchError.js ***! \*********************************************************************/ /*! exports provided: catchError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function catchError(selector) { return function catchErrorOperatorFunction(source) { const operator = new CatchOperator(selector); const caught = source.lift(operator); return (operator.caught = caught); }; } class CatchOperator { constructor(selector) { this.selector = selector; } call(subscriber, source) { return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught)); } } class CatchSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, selector, caught) { super(destination); this.selector = selector; this.caught = caught; } error(err) { if (!this.isStopped) { let result; try { result = this.selector(err, this.caught); } catch (err2) { super.error(err2); return; } this._unsubscribeAndRecycle(); const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); this.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, innerSubscriber); if (innerSubscription !== innerSubscriber) { this.add(innerSubscription); } } } } //# sourceMappingURL=catchError.js.map /***/ }), /***/ "JMsZ": /*!******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")); /***/ }), /***/ "JQqb": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/minIndex.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return minIndex; }); function minIndex(values, valueof) { let min; let minIndex = -1; let index = -1; if (valueof === undefined) { for (const value of values) { ++index; if (value != null && (min > value || (min === undefined && value >= value))) { min = value, minIndex = index; } } } else { for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (min > value || (min === undefined && value >= value))) { min = value, minIndex = index; } } } return minIndex; } /***/ }), /***/ "JX91": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/startWith.js ***! \********************************************************************/ /*! exports provided: startWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; }); /* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function startWith(...array) { const scheduler = array[array.length - 1]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) { array.pop(); return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); } else { return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); } } //# sourceMappingURL=startWith.js.map /***/ }), /***/ "JYaH": /*!********************************************!*\ !*** ./node_modules/d3-array/src/every.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return every; }); function every(values, test) { if (typeof test !== "function") throw new TypeError("test is not a function"); let index = -1; for (const value of values) { if (!test(value, ++index, values)) { return false; } } return true; } /***/ }), /***/ "JZGO": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/remove.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function remove() { var parent = this.parentNode; if (parent) parent.removeChild(this); } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.each(remove); }); /***/ }), /***/ "JmF6": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/zipAll.js ***! \*****************************************************************/ /*! exports provided: zipAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; }); /* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "1uah"); function zipAll(project) { return (source) => source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); } //# sourceMappingURL=zipAll.js.map /***/ }), /***/ "JnD7": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/curve/radial.js ***! \***************************************************/ /*! exports provided: curveRadialLinear, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "curveRadialLinear", function() { return curveRadialLinear; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return curveRadial; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "SDD1"); var curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__["default"]); function Radial(curve) { this._curve = curve; } Radial.prototype = { areaStart: function() { this._curve.areaStart(); }, areaEnd: function() { this._curve.areaEnd(); }, lineStart: function() { this._curve.lineStart(); }, lineEnd: function() { this._curve.lineEnd(); }, point: function(a, r) { this._curve.point(r * Math.sin(a), r * -Math.cos(a)); } }; function curveRadial(curve) { function radial(context) { return new Radial(curve(context)); } radial._curve = curve; return radial; } /***/ }), /***/ "Jzny": /*!*********************************************!*\ !*** ./node_modules/d3-time/src/utcWeek.js ***! \*********************************************/ /*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return utcSunday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return utcMonday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return utcTuesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return utcWednesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return utcThursday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return utcFriday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return utcSaturday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return utcSundays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return utcMondays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return utcTuesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return utcWednesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return utcThursdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return utcFridays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return utcSaturdays; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); function utcWeekday(i) { return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCDate(date.getUTCDate() + step * 7); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; }); } var utcSunday = utcWeekday(0); var utcMonday = utcWeekday(1); var utcTuesday = utcWeekday(2); var utcWednesday = utcWeekday(3); var utcThursday = utcWeekday(4); var utcFriday = utcWeekday(5); var utcSaturday = utcWeekday(6); var utcSundays = utcSunday.range; var utcMondays = utcMonday.range; var utcTuesdays = utcTuesday.range; var utcWednesdays = utcWednesday.range; var utcThursdays = utcThursday.range; var utcFridays = utcFriday.range; var utcSaturdays = utcSaturday.range; /***/ }), /***/ "K7De": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/findIndex.js ***! \********************************************************************/ /*! exports provided: findIndex */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; }); /* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/find */ "cBqT"); function findIndex(predicate, thisArg) { return (source) => source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); } //# sourceMappingURL=findIndex.js.map /***/ }), /***/ "Kcim": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/curve/catmullRom.js ***! \*******************************************************/ /*! exports provided: point, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "CYYh"); /* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "d5JU"); function point(that, x, y) { var x1 = that._x1, y1 = that._y1, x2 = that._x2, y2 = that._y2; if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a); x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; } if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a); x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; } that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); } function CatmullRom(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRom.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: this.point(this._x2, this._y2); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; if (this._point) { var x23 = this._x2 - x, y23 = this._y2 - y; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; // proceed default: point(this, x, y); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a; this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { function catmullRom(context) { return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__["Cardinal"](context, 0); } catmullRom.alpha = function(alpha) { return custom(+alpha); }; return catmullRom; })(0.5)); /***/ }), /***/ "Ki0a": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/bisector.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony default export */ __webpack_exports__["default"] = (function(f) { let delta = f; let compare = f; if (f.length === 1) { delta = (d, x) => f(d) - x; compare = ascendingComparator(f); } function left(a, x, lo, hi) { if (lo == null) lo = 0; if (hi == null) hi = a.length; while (lo < hi) { const mid = (lo + hi) >>> 1; if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid; } return lo; } function right(a, x, lo, hi) { if (lo == null) lo = 0; if (hi == null) hi = a.length; while (lo < hi) { const mid = (lo + hi) >>> 1; if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1; } return lo; } function center(a, x, lo, hi) { if (lo == null) lo = 0; if (hi == null) hi = a.length; const i = left(a, x, lo, hi - 1); return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; } return {left, center, right}; }); function ascendingComparator(f) { return (d, x) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(f(d), x); } /***/ }), /***/ "Kj3r": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js ***! \***********************************************************************/ /*! exports provided: debounceTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); function debounceTime(dueTime, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { return (source) => source.lift(new DebounceTimeOperator(dueTime, scheduler)); } class DebounceTimeOperator { constructor(dueTime, scheduler) { this.dueTime = dueTime; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler)); } } class DebounceTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, dueTime, scheduler) { super(destination); this.dueTime = dueTime; this.scheduler = scheduler; this.debouncedSubscription = null; this.lastValue = null; this.hasValue = false; } _next(value) { this.clearDebounce(); this.lastValue = value; this.hasValue = true; this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this)); } _complete() { this.debouncedNext(); this.destination.complete(); } debouncedNext() { this.clearDebounce(); if (this.hasValue) { const { lastValue } = this; this.lastValue = null; this.hasValue = false; this.destination.next(lastValue); } } clearDebounce() { const debouncedSubscription = this.debouncedSubscription; if (debouncedSubscription !== null) { this.remove(debouncedSubscription); debouncedSubscription.unsubscribe(); this.debouncedSubscription = null; } } } function dispatchNext(subscriber) { subscriber.debouncedNext(); } //# sourceMappingURL=debounceTime.js.map /***/ }), /***/ "KpFn": /*!******************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/easeVarying.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function easeVarying(id, value) { return function() { var v = value.apply(this, arguments); if (typeof v !== "function") throw new Error; Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { if (typeof value !== "function") throw new Error; return this.each(easeVarying(this._id, value)); }); /***/ }), /***/ "Kqap": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/scan.js ***! \***************************************************************/ /*! exports provided: scan */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function scan(accumulator, seed) { let hasSeed = false; if (arguments.length >= 2) { hasSeed = true; } return function scanOperatorFunction(source) { return source.lift(new ScanOperator(accumulator, seed, hasSeed)); }; } class ScanOperator { constructor(accumulator, seed, hasSeed = false) { this.accumulator = accumulator; this.seed = seed; this.hasSeed = hasSeed; } call(subscriber, source) { return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed)); } } class ScanSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, accumulator, _seed, hasSeed) { super(destination); this.accumulator = accumulator; this._seed = _seed; this.hasSeed = hasSeed; this.index = 0; } get seed() { return this._seed; } set seed(value) { this.hasSeed = true; this._seed = value; } _next(value) { if (!this.hasSeed) { this.seed = value; this.destination.next(value); } else { return this._tryNext(value); } } _tryNext(value) { const index = this.index++; let result; try { result = this.accumulator(this.seed, value, index); } catch (err) { this.destination.error(err); } this.seed = result; this.destination.next(result); } } //# sourceMappingURL=scan.js.map /***/ }), /***/ "KqfI": /*!**********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/noop.js ***! \**********************************************************/ /*! exports provided: noop */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; }); function noop() { } //# sourceMappingURL=noop.js.map /***/ }), /***/ "L+rq": /*!*****************************************!*\ !*** ./node_modules/d3/dist/package.js ***! \*****************************************/ /*! exports provided: name, version, description, keywords, homepage, license, author, main, unpkg, jsdelivr, module, repository, files, scripts, devDependencies, dependencies */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "description", function() { return description; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keywords", function() { return keywords; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "homepage", function() { return homepage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "license", function() { return license; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "author", function() { return author; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "main", function() { return main; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unpkg", function() { return unpkg; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsdelivr", function() { return jsdelivr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "module", function() { return module; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repository", function() { return repository; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "files", function() { return files; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scripts", function() { return scripts; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "devDependencies", function() { return devDependencies; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dependencies", function() { return dependencies; }); var name = "d3"; var version = "6.6.2"; var description = "Data-Driven Documents"; var keywords = ["dom","visualization","svg","animation","canvas"]; var homepage = "https://d3js.org"; var license = "BSD-3-Clause"; var author = {"name":"Mike Bostock","url":"https://bost.ocks.org/mike"}; var main = "dist/d3.node.js"; var unpkg = "dist/d3.min.js"; var jsdelivr = "dist/d3.min.js"; var module = "index.js"; var repository = {"type":"git","url":"https://github.com/d3/d3.git"}; var files = ["dist/**/*.js","index.js"]; var scripts = {"pretest":"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test","postpublish":"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v${npm_package_version%%.*}.js && cp ../d3/dist/d3.min.js d3.v${npm_package_version%%.*}.min.js && git add d3.v${npm_package_version%%.*}.js d3.v${npm_package_version%%.*}.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"}; var devDependencies = {"json2module":"0.0","rimraf":"3","rollup":"2","rollup-plugin-ascii":"0.0","rollup-plugin-node-resolve":"5","rollup-plugin-terser":"7","tape":"4","tape-await":"0.1"}; var dependencies = {"d3-array":"2","d3-axis":"2","d3-brush":"2","d3-chord":"2","d3-color":"2","d3-contour":"2","d3-delaunay":"5","d3-dispatch":"2","d3-drag":"2","d3-dsv":"2","d3-ease":"2","d3-fetch":"2","d3-force":"2","d3-format":"2","d3-geo":"2","d3-hierarchy":"2","d3-interpolate":"2","d3-path":"2","d3-polygon":"2","d3-quadtree":"2","d3-random":"2","d3-scale":"3","d3-scale-chromatic":"2","d3-selection":"2","d3-shape":"2","d3-time":"2","d3-time-format":"3","d3-timer":"2","d3-transition":"2","d3-zoom":"2"}; /***/ }), /***/ "LDjW": /*!********************************************!*\ !*** ./node_modules/d3-time/src/minute.js ***! \********************************************/ /*! exports provided: default, minutes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minutes", function() { return minutes; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; }, function(date) { return date.getMinutes(); }); /* harmony default export */ __webpack_exports__["default"] = (minute); var minutes = minute.range; /***/ }), /***/ "LMxf": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/data.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var data = []; this.visit(function(node) { if (!node.length) do data.push(node.data); while (node = node.next) }); return data; }); /***/ }), /***/ "LOX7": /*!*****************************************!*\ !*** ./node_modules/d3-ease/src/exp.js ***! \*****************************************/ /*! exports provided: expIn, expOut, expInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expIn", function() { return expIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expOut", function() { return expOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expInOut", function() { return expInOut; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "6ZHU"); function expIn(t) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(1 - +t); } function expOut(t) { return 1 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t); } function expInOut(t) { return ((t *= 2) <= 1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(1 - t) : 2 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t - 1)) / 2; } /***/ }), /***/ "LP84": /*!************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/orthographic.js ***! \************************************************************/ /*! exports provided: orthographicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orthographicRaw", function() { return orthographicRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function orthographicRaw(x, y) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)]; } orthographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"]); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(orthographicRaw) .scale(249.5) .clipAngle(90 + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]); }); /***/ }), /***/ "LRne": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/of.js ***! \**************************************************************/ /*! exports provided: of */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; }); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "yCtX"); /* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduleArray */ "jZKg"); function of(...args) { let scheduler = args[args.length - 1]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) { args.pop(); return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler); } else { return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args); } } //# sourceMappingURL=of.js.map /***/ }), /***/ "LSUK": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ef8a62ffffff999999", "ca0020f4a582bababa404040", "ca0020f4a582ffffffbababa404040", "b2182bef8a62fddbc7e0e0e09999994d4d4d", "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "LXyZ": /*!**********************************************!*\ !*** ./node_modules/d3-array/src/reverse.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return reverse; }); function reverse(values) { if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); return Array.from(values).reverse(); } /***/ }), /***/ "LZ5Q": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/mercator.js ***! \********************************************************/ /*! exports provided: mercatorRaw, default, mercatorProjection */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorRaw", function() { return mercatorRaw; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorProjection", function() { return mercatorProjection; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation.js */ "cwsO"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function mercatorRaw(lambda, phi) { return [lambda, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2))]; } mercatorRaw.invert = function(x, y) { return [x, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(y)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { return mercatorProjection(mercatorRaw) .scale(961 / _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); }); function mercatorProjection(project) { var m = Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(project), center = m.center, scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, x0 = null, y0, x1, y1; // clip extent m.scale = function(_) { return arguments.length ? (scale(_), reclip()) : scale(); }; m.translate = function(_) { return arguments.length ? (translate(_), reclip()) : translate(); }; m.center = function(_) { return arguments.length ? (center(_), reclip()) : center(); }; m.clipExtent = function(_) { return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]]; }; function reclip() { var k = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * scale(), t = m(Object(_rotation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(m.rotate()).invert([0, 0])); return clipExtent(x0 == null ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]); } return reclip(); } /***/ }), /***/ "Lhse": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/symbol/iterator.js ***! \****************************************************************/ /*! exports provided: getSymbolIterator, iterator, $$iterator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; }); function getSymbolIterator() { if (typeof Symbol !== 'function' || !Symbol.iterator) { return '@@iterator'; } return Symbol.iterator; } const iterator = getSymbolIterator(); const $$iterator = iterator; //# sourceMappingURL=iterator.js.map /***/ }), /***/ "MBAA": /*!***************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleIterable.js ***! \***************************************************************************/ /*! exports provided: scheduleIterable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); function scheduleIterable(input, scheduler) { if (!input) { throw new Error('Iterable cannot be null'); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); let iterator; sub.add(() => { if (iterator && typeof iterator.return === 'function') { iterator.return(); } }); sub.add(scheduler.schedule(() => { iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]](); sub.add(scheduler.schedule(function () { if (subscriber.closed) { return; } let value; let done; try { const result = iterator.next(); value = result.value; done = result.done; } catch (err) { subscriber.error(err); return; } if (done) { subscriber.complete(); } else { subscriber.next(value); this.schedule(); } })); })); return sub; }); } //# sourceMappingURL=scheduleIterable.js.map /***/ }), /***/ "MHiR": /*!********************************************!*\ !*** ./node_modules/d3-ease/src/bounce.js ***! \********************************************/ /*! exports provided: bounceIn, bounceOut, bounceInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceIn", function() { return bounceIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceOut", function() { return bounceOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceInOut", function() { return bounceInOut; }); var b1 = 4 / 11, b2 = 6 / 11, b3 = 8 / 11, b4 = 3 / 4, b5 = 9 / 11, b6 = 10 / 11, b7 = 15 / 16, b8 = 21 / 22, b9 = 63 / 64, b0 = 1 / b1 / b1; function bounceIn(t) { return 1 - bounceOut(1 - t); } function bounceOut(t) { return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; } function bounceInOut(t) { return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; } /***/ }), /***/ "MLOY": /*!**********************************************!*\ !*** ./node_modules/d3-polygon/src/cross.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // Returns the 2D cross product of AB and AC vectors, i.e., the z-component of // the 3D cross product in a quadrant I Cartesian coordinate system (+x is // right, +y is up). Returns a positive value if ABC is counter-clockwise, // negative if clockwise, and zero if the points are collinear. /* harmony default export */ __webpack_exports__["default"] = (function(a, b, c) { return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); }); /***/ }), /***/ "MiBC": /*!**********************************************!*\ !*** ./node_modules/d3-array/src/permute.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(source, keys) { return Array.from(keys, key => source[key]); }); /***/ }), /***/ "Mlif": /*!****************************************************************!*\ !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***! \****************************************************************/ /*! exports provided: identity, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); var degrees = 180 / Math.PI; var identity = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 }; /* harmony default export */ __webpack_exports__["default"] = (function(a, b, c, d, e, f) { var scaleX, scaleY, skewX; if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; return { translateX: e, translateY: f, rotate: Math.atan2(b, a) * degrees, skewX: Math.atan(skewX) * degrees, scaleX: scaleX, scaleY: scaleY }; }); /***/ }), /***/ "MtjB": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/retryWhen.js ***! \********************************************************************/ /*! exports provided: retryWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function retryWhen(notifier) { return (source) => source.lift(new RetryWhenOperator(notifier, source)); } class RetryWhenOperator { constructor(notifier, source) { this.notifier = notifier; this.source = source; } call(subscriber, source) { return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source)); } } class RetryWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination, notifier, source) { super(destination); this.notifier = notifier; this.source = source; } error(err) { if (!this.isStopped) { let errors = this.errors; let retries = this.retries; let retriesSubscription = this.retriesSubscription; if (!retries) { errors = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); try { const { notifier } = this; retries = notifier(errors); } catch (e) { return super.error(e); } retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this)); } else { this.errors = undefined; this.retriesSubscription = undefined; } this._unsubscribeAndRecycle(); this.errors = errors; this.retries = retries; this.retriesSubscription = retriesSubscription; errors.next(err); } } _unsubscribe() { const { errors, retriesSubscription } = this; if (errors) { errors.unsubscribe(); this.errors = undefined; } if (retriesSubscription) { retriesSubscription.unsubscribe(); this.retriesSubscription = undefined; } this.retries = undefined; } notifyNext() { const { _unsubscribe } = this; this._unsubscribe = null; this._unsubscribeAndRecycle(); this._unsubscribe = _unsubscribe; this.source.subscribe(this); } } //# sourceMappingURL=retryWhen.js.map /***/ }), /***/ "NHP+": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/AsyncSubject.js ***! \*************************************************************/ /*! exports provided: AsyncSubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscription */ "quSY"); class AsyncSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor() { super(...arguments); this.value = null; this.hasNext = false; this.hasCompleted = false; } _subscribe(subscriber) { if (this.hasError) { subscriber.error(this.thrownError); return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY; } else if (this.hasCompleted && this.hasNext) { subscriber.next(this.value); subscriber.complete(); return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY; } return super._subscribe(subscriber); } next(value) { if (!this.hasCompleted) { this.value = value; this.hasNext = true; } } error(error) { if (!this.hasCompleted) { super.error(error); } } complete() { this.hasCompleted = true; if (this.hasNext) { super.next(this.value); } super.complete(); } } //# sourceMappingURL=AsyncSubject.js.map /***/ }), /***/ "NJ4a": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/hostReportError.js ***! \*********************************************************************/ /*! exports provided: hostReportError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; }); function hostReportError(err) { setTimeout(() => { throw err; }, 0); } //# sourceMappingURL=hostReportError.js.map /***/ }), /***/ "NJ9Y": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/last.js ***! \***************************************************************/ /*! exports provided: last */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ "BFxc"); /* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function last(predicate, defaultValue) { const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]())); } //# sourceMappingURL=last.js.map /***/ }), /***/ "NNCq": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/range.js ***! \*****************************************************************/ /*! exports provided: range, dispatch */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); function range(start = 0, count, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { if (count === undefined) { count = start; start = 0; } let index = 0; let current = start; if (scheduler) { return scheduler.schedule(dispatch, 0, { index, count, start, subscriber }); } else { do { if (index++ >= count) { subscriber.complete(); break; } subscriber.next(current++); if (subscriber.closed) { break; } } while (true); } return undefined; }); } function dispatch(state) { const { start, index, count, subscriber } = state; if (index >= count) { subscriber.complete(); return; } subscriber.next(start); if (subscriber.closed) { return; } state.index = index + 1; state.start = start + 1; this.schedule(state); } //# sourceMappingURL=range.js.map /***/ }), /***/ "NRL+": /*!****************************************!*\ !*** ./node_modules/d3-dsv/src/dsv.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var EOL = {}, EOF = {}, QUOTE = 34, NEWLINE = 10, RETURN = 13; function objectConverter(columns) { return new Function("d", "return {" + columns.map(function(name, i) { return JSON.stringify(name) + ": d[" + i + "] || \"\""; }).join(",") + "}"); } function customConverter(columns, f) { var object = objectConverter(columns); return function(row, i) { return f(object(row), i, columns); }; } // Compute unique columns in order of discovery. function inferColumns(rows) { var columnSet = Object.create(null), columns = []; rows.forEach(function(row) { for (var column in row) { if (!(column in columnSet)) { columns.push(columnSet[column] = column); } } }); return columns; } function pad(value, width) { var s = value + "", length = s.length; return length < width ? new Array(width - length + 1).join(0) + s : s; } function formatYear(year) { return year < 0 ? "-" + pad(-year, 6) : year > 9999 ? "+" + pad(year, 6) : pad(year, 4); } function formatDate(date) { var hours = date.getUTCHours(), minutes = date.getUTCMinutes(), seconds = date.getUTCSeconds(), milliseconds = date.getUTCMilliseconds(); return isNaN(date) ? "Invalid Date" : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" : ""); } /* harmony default export */ __webpack_exports__["default"] = (function(delimiter) { var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), DELIMITER = delimiter.charCodeAt(0); function parse(text, f) { var convert, columns, rows = parseRows(text, function(row, i) { if (convert) return convert(row, i - 1); columns = row, convert = f ? customConverter(row, f) : objectConverter(row); }); rows.columns = columns || []; return rows; } function parseRows(text, f) { var rows = [], // output rows N = text.length, I = 0, // current character index n = 0, // current line number t, // current token eof = N <= 0, // current token followed by EOF? eol = false; // current token followed by EOL? // Strip the trailing newline. if (text.charCodeAt(N - 1) === NEWLINE) --N; if (text.charCodeAt(N - 1) === RETURN) --N; function token() { if (eof) return EOF; if (eol) return eol = false, EOL; // Unescape quotes. var i, j = I, c; if (text.charCodeAt(j) === QUOTE) { while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); if ((i = I) >= N) eof = true; else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } return text.slice(j + 1, i - 1).replace(/""/g, "\""); } // Find next delimiter or newline. while (I < N) { if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } else if (c !== DELIMITER) continue; return text.slice(j, i); } // Return last token before EOF. return eof = true, text.slice(j, N); } while ((t = token()) !== EOF) { var row = []; while (t !== EOL && t !== EOF) row.push(t), t = token(); if (f && (row = f(row, n++)) == null) continue; rows.push(row); } return rows; } function preformatBody(rows, columns) { return rows.map(function(row) { return columns.map(function(column) { return formatValue(row[column]); }).join(delimiter); }); } function format(rows, columns) { if (columns == null) columns = inferColumns(rows); return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); } function formatBody(rows, columns) { if (columns == null) columns = inferColumns(rows); return preformatBody(rows, columns).join("\n"); } function formatRows(rows) { return rows.map(formatRow).join("\n"); } function formatRow(row) { return row.map(formatValue).join(delimiter); } function formatValue(value) { return value == null ? "" : value instanceof Date ? formatDate(value) : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" : value; } return { parse: parse, parseRows: parseRows, format: format, formatBody: formatBody, formatRows: formatRows, formatRow: formatRow, formatValue: formatValue }; }); /***/ }), /***/ "NScU": /*!***********************************************!*\ !*** ./node_modules/d3-random/src/uniform.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomUniform(source) { function randomUniform(min, max) { min = min == null ? 0 : +min; max = max == null ? 1 : +max; if (arguments.length === 1) max = min, min = 0; else max -= min; return function() { return source() * max + min; }; } randomUniform.source = sourceRandomUniform; return randomUniform; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "NU5n": /*!***************************************************!*\ !*** ./node_modules/d3-hierarchy/src/stratify.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors.js */ "IeU1"); /* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "a8tM"); var preroot = {depth: -1}, ambiguous = {}; function defaultId(d) { return d.id; } function defaultParentId(d) { return d.parentId; } /* harmony default export */ __webpack_exports__["default"] = (function() { var id = defaultId, parentId = defaultParentId; function stratify(data) { var nodes = Array.from(data), n = nodes.length, d, i, root, parent, node, nodeId, nodeKey, nodeByKey = new Map; for (i = 0; i < n; ++i) { d = nodes[i], node = nodes[i] = new _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["Node"](d); if ((nodeId = id(d, i, data)) != null && (nodeId += "")) { nodeKey = node.id = nodeId; nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node); } if ((nodeId = parentId(d, i, data)) != null && (nodeId += "")) { node.parent = nodeId; } } for (i = 0; i < n; ++i) { node = nodes[i]; if (nodeId = node.parent) { parent = nodeByKey.get(nodeId); if (!parent) throw new Error("missing: " + nodeId); if (parent === ambiguous) throw new Error("ambiguous: " + nodeId); if (parent.children) parent.children.push(node); else parent.children = [node]; node.parent = parent; } else { if (root) throw new Error("multiple roots"); root = node; } } if (!root) throw new Error("no root"); root.parent = preroot; root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["computeHeight"]); root.parent = null; if (n > 0) throw new Error("cycle"); return root; } stratify.id = function(x) { return arguments.length ? (id = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : id; }; stratify.parentId = function(x) { return arguments.length ? (parentId = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : parentId; }; return stratify; }); /***/ }), /***/ "NXyV": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/defer.js ***! \*****************************************************************/ /*! exports provided: defer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "EY2u"); function defer(observableFactory) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { let input; try { input = observableFactory(); } catch (err) { subscriber.error(err); return undefined; } const source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); return source.subscribe(subscriber); }); } //# sourceMappingURL=defer.js.map /***/ }), /***/ "Nehl": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/tween.js ***! \************************************************************/ /*! exports provided: default, tweenValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tweenValue", function() { return tweenValue; }); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function tweenRemove(id, name) { var tween0, tween1; return function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), tween = schedule.tween; // If this node shared tween with the previous node, // just assign the updated shared tween and we’re done! // Otherwise, copy-on-write. if (tween !== tween0) { tween1 = tween0 = tween; for (var i = 0, n = tween1.length; i < n; ++i) { if (tween1[i].name === name) { tween1 = tween1.slice(); tween1.splice(i, 1); break; } } } schedule.tween = tween1; }; } function tweenFunction(id, name, value) { var tween0, tween1; if (typeof value !== "function") throw new Error; return function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), tween = schedule.tween; // If this node shared tween with the previous node, // just assign the updated shared tween and we’re done! // Otherwise, copy-on-write. if (tween !== tween0) { tween1 = (tween0 = tween).slice(); for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { if (tween1[i].name === name) { tween1[i] = t; break; } } if (i === n) tween1.push(t); } schedule.tween = tween1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var id = this._id; name += ""; if (arguments.length < 2) { var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).tween; for (var i = 0, n = tween.length, t; i < n; ++i) { if ((t = tween[i]).name === name) { return t.value; } } return null; } return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); }); function tweenValue(transition, name, value) { var id = transition._id; transition.each(function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id); (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); }); return function(node) { return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(node, id).value[name]; }; } /***/ }), /***/ "NfdI": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publish.js ***! \******************************************************************/ /*! exports provided: publish */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publish(selector) { return selector ? Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(() => new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](), selector) : Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]()); } //# sourceMappingURL=publish.js.map /***/ }), /***/ "NgI0": /*!******************************************!*\ !*** ./node_modules/d3-force/src/lcg.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use const a = 1664525; const c = 1013904223; const m = 4294967296; // 2^32 /* harmony default export */ __webpack_exports__["default"] = (function() { let s = 1; return () => (s = (a * s + c) % m) / m; }); /***/ }), /***/ "Nkvg": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/style.js ***! \**********************************************************/ /*! exports provided: default, styleValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleValue", function() { return styleValue; }); /* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ "oxeV"); function styleRemove(name) { return function() { this.style.removeProperty(name); }; } function styleConstant(name, value, priority) { return function() { this.style.setProperty(name, value, priority); }; } function styleFunction(name, value, priority) { return function() { var v = value.apply(this, arguments); if (v == null) this.style.removeProperty(name); else this.style.setProperty(name, v, priority); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name); }); function styleValue(node, name) { return node.style.getPropertyValue(name) || Object(_window_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).getComputedStyle(node, null).getPropertyValue(name); } /***/ }), /***/ "Nl5w": /*!********************************************************!*\ !*** ./node_modules/d3-array/src/threshold/sturges.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "hiel"); /* harmony default export */ __webpack_exports__["default"] = (function(values) { return Math.ceil(Math.log(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values)) / Math.LN2) + 1; }); /***/ }), /***/ "NltA": /*!********************************************!*\ !*** ./node_modules/d3-array/src/range.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(start, stop, step) { start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; var i = -1, n = Math.max(0, Math.ceil((stop - start) / step)) | 0, range = new Array(n); while (++i < n) { range[i] = start + i * step; } return range; }); /***/ }), /***/ "NtxT": /*!********************************************************!*\ !*** ./node_modules/d3-shape/src/offset/silhouette.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "0T5i"); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0)) return; for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; s0[j][1] += s0[j][0] = -y / 2; } Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), /***/ "Nv8T": /*!*******************************************!*\ !*** ./node_modules/d3-quadtree/src/y.js ***! \*******************************************/ /*! exports provided: defaultY, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultY", function() { return defaultY; }); function defaultY(d) { return d[1]; } /* harmony default export */ __webpack_exports__["default"] = (function(_) { return arguments.length ? (this._y = _, this) : this._y; }); /***/ }), /***/ "Nv8m": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/race.js ***! \****************************************************************/ /*! exports provided: race, RaceOperator, RaceSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "yCtX"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function race(...observables) { if (observables.length === 1) { if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { observables = observables[0]; } else { return observables[0]; } } return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new RaceOperator()); } class RaceOperator { call(subscriber, source) { return source.subscribe(new RaceSubscriber(subscriber)); } } class RaceSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination) { super(destination); this.hasFirst = false; this.observables = []; this.subscriptions = []; } _next(observable) { this.observables.push(observable); } _complete() { const observables = this.observables; const len = observables.length; if (len === 0) { this.destination.complete(); } else { for (let i = 0; i < len && !this.hasFirst; i++) { const observable = observables[i]; const subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, observable, undefined, i); if (this.subscriptions) { this.subscriptions.push(subscription); } this.add(subscription); } this.observables = null; } } notifyNext(_outerValue, innerValue, outerIndex) { if (!this.hasFirst) { this.hasFirst = true; for (let i = 0; i < this.subscriptions.length; i++) { if (i !== outerIndex) { let subscription = this.subscriptions[i]; subscription.unsubscribe(); this.remove(subscription); } } this.subscriptions = null; } this.destination.next(innerValue); } } //# sourceMappingURL=race.js.map /***/ }), /***/ "O03L": /*!***********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/cardinalClosed.js ***! \***********************************************************/ /*! exports provided: CardinalClosed, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalClosed", function() { return CardinalClosed; }); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "0K5P"); /* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "d5JU"); function CardinalClosed(context, tension) { this._context = context; this._k = (1 - tension) / 6; } CardinalClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x3, this._y3); this._context.closePath(); break; } case 2: { this._context.lineTo(this._x3, this._y3); this._context.closePath(); break; } case 3: { this.point(this._x3, this._y3); this.point(this._x4, this._y4); this.point(this._x5, this._y5); break; } } }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._x3 = x, this._y3 = y; break; case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; case 2: this._point = 3; this._x5 = x, this._y5 = y; break; default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { function cardinal(context) { return new CardinalClosed(context, tension); } cardinal.tension = function(tension) { return custom(+tension); }; return cardinal; })(0)); /***/ }), /***/ "O0DV": /*!**********************************************!*\ !*** ./node_modules/d3-scale/src/utcTime.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return utcTime; }); /* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time.js */ "R0i0"); /* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ "cOGN"); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ "tgfz"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function utcTime() { return _init_js__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_time_js__WEBPACK_IMPORTED_MODULE_0__["calendar"])(d3_time__WEBPACK_IMPORTED_MODULE_2__["utcYear"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMonth"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcWeek"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcDay"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcHour"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMinute"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcSecond"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__["utcFormat"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); } /***/ }), /***/ "O4y0": /*!*********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/SubscribeOnObservable.js ***! \*********************************************************************************/ /*! exports provided: SubscribeOnObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/asap */ "7Hc7"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); class SubscribeOnObservable extends _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] { constructor(source, delayTime = 0, scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]) { super(); this.source = source; this.delayTime = delayTime; this.scheduler = scheduler; if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(delayTime) || delayTime < 0) { this.delayTime = 0; } if (!scheduler || typeof scheduler.schedule !== 'function') { this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]; } } static create(source, delay = 0, scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]) { return new SubscribeOnObservable(source, delay, scheduler); } static dispatch(arg) { const { source, subscriber } = arg; return this.add(source.subscribe(subscriber)); } _subscribe(subscriber) { const delay = this.delayTime; const source = this.source; const scheduler = this.scheduler; return scheduler.schedule(SubscribeOnObservable.dispatch, delay, { source, subscriber }); } } //# sourceMappingURL=SubscribeOnObservable.js.map /***/ }), /***/ "ODVu": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/buffer.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "mPOO"); /* harmony default export */ __webpack_exports__["default"] = (function() { var lines = [], line; return { point: function(x, y, m) { line.push([x, y, m]); }, lineStart: function() { lines.push(line = []); }, lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], rejoin: function() { if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); }, result: function() { var result = lines; lines = []; line = null; return result; } }; }); /***/ }), /***/ "OHKE": /*!******************************************************!*\ !*** ./node_modules/d3-interpolate/src/cubehelix.js ***! \******************************************************/ /*! exports provided: default, cubehelixLong */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubehelixLong", function() { return cubehelixLong; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function cubehelix(hue) { return (function cubehelixGamma(y) { y = +y; function cubehelix(start, end) { var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(end)).h), s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.h = h(t); start.s = s(t); start.l = l(Math.pow(t, y)); start.opacity = opacity(t); return start + ""; }; } cubehelix.gamma = cubehelixGamma; return cubehelix; })(1); } /* harmony default export */ __webpack_exports__["default"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); var cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "OP1V": /*!************************************************!*\ !*** ./node_modules/d3-scale/src/diverging.js ***! \************************************************/ /*! exports provided: default, divergingLog, divergingSymlog, divergingPow, divergingSqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return diverging; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingLog", function() { return divergingLog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSymlog", function() { return divergingSymlog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingPow", function() { return divergingPow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSqrt", function() { return divergingSqrt; }); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./log.js */ "n0hd"); /* harmony import */ var _sequential_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sequential.js */ "zmsm"); /* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symlog.js */ "wC0G"); /* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pow.js */ "eJvb"); function transformer() { var x0 = 0, x1 = 0.5, x2 = 1, s = 1, t0, t1, t2, k10, k21, interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], transform, clamp = false, unknown; function scale(x) { return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); } scale.domain = function(_) { return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2]; }; scale.clamp = function(_) { return arguments.length ? (clamp = !!_, scale) : clamp; }; scale.interpolator = function(_) { return arguments.length ? (interpolator = _, scale) : interpolator; }; function range(interpolate) { return function(_) { var r0, r1, r2; return arguments.length ? ([r0, r1, r2] = _, interpolator = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["piecewise"])(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)]; }; } scale.range = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolate"]); scale.rangeRound = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRound"]); scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; return function(t) { transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1; return scale; }; } function diverging() { var scale = Object(_linear_js__WEBPACK_IMPORTED_MODULE_3__["linearish"])(transformer()(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"])); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, diverging()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingLog() { var scale = Object(_log_js__WEBPACK_IMPORTED_MODULE_4__["loggish"])(transformer()).domain([0.1, 1, 10]); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, divergingLog()).base(scale.base()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingSymlog() { var scale = Object(_symlog_js__WEBPACK_IMPORTED_MODULE_6__["symlogish"])(transformer()); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, divergingSymlog()).constant(scale.constant()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingPow() { var scale = Object(_pow_js__WEBPACK_IMPORTED_MODULE_7__["powish"])(transformer()); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, divergingPow()).exponent(scale.exponent()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingSqrt() { return divergingPow.apply(null, arguments).exponent(0.5); } /***/ }), /***/ "OQgR": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/groupBy.js ***! \******************************************************************/ /*! exports provided: groupBy, GroupedObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subject */ "XNiG"); function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) { return (source) => source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector)); } class GroupByOperator { constructor(keySelector, elementSelector, durationSelector, subjectSelector) { this.keySelector = keySelector; this.elementSelector = elementSelector; this.durationSelector = durationSelector; this.subjectSelector = subjectSelector; } call(subscriber, source) { return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector)); } } class GroupBySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, keySelector, elementSelector, durationSelector, subjectSelector) { super(destination); this.keySelector = keySelector; this.elementSelector = elementSelector; this.durationSelector = durationSelector; this.subjectSelector = subjectSelector; this.groups = null; this.attemptedToUnsubscribe = false; this.count = 0; } _next(value) { let key; try { key = this.keySelector(value); } catch (err) { this.error(err); return; } this._group(value, key); } _group(value, key) { let groups = this.groups; if (!groups) { groups = this.groups = new Map(); } let group = groups.get(key); let element; if (this.elementSelector) { try { element = this.elementSelector(value); } catch (err) { this.error(err); } } else { element = value; } if (!group) { group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_3__["Subject"]()); groups.set(key, group); const groupedObservable = new GroupedObservable(key, group, this); this.destination.next(groupedObservable); if (this.durationSelector) { let duration; try { duration = this.durationSelector(new GroupedObservable(key, group)); } catch (err) { this.error(err); return; } this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this))); } } if (!group.closed) { group.next(element); } } _error(err) { const groups = this.groups; if (groups) { groups.forEach((group, key) => { group.error(err); }); groups.clear(); } this.destination.error(err); } _complete() { const groups = this.groups; if (groups) { groups.forEach((group, key) => { group.complete(); }); groups.clear(); } this.destination.complete(); } removeGroup(key) { this.groups.delete(key); } unsubscribe() { if (!this.closed) { this.attemptedToUnsubscribe = true; if (this.count === 0) { super.unsubscribe(); } } } } class GroupDurationSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(key, group, parent) { super(group); this.key = key; this.group = group; this.parent = parent; } _next(value) { this.complete(); } _unsubscribe() { const { parent, key } = this; this.key = this.parent = null; if (parent) { parent.removeGroup(key); } } } class GroupedObservable extends _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"] { constructor(key, groupSubject, refCountSubscription) { super(); this.key = key; this.groupSubject = groupSubject; this.refCountSubscription = refCountSubscription; } _subscribe(subscriber) { const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); const { refCountSubscription, groupSubject } = this; if (refCountSubscription && !refCountSubscription.closed) { subscription.add(new InnerRefCountSubscription(refCountSubscription)); } subscription.add(groupSubject.subscribe(subscriber)); return subscription; } } class InnerRefCountSubscription extends _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"] { constructor(parent) { super(); this.parent = parent; parent.count++; } unsubscribe() { const parent = this.parent; if (!parent.closed && !this.closed) { super.unsubscribe(); parent.count -= 1; if (parent.count === 0 && parent.attemptedToUnsubscribe) { parent.unsubscribe(); } } } } //# sourceMappingURL=groupBy.js.map /***/ }), /***/ "OSsQ": /*!*********************************************!*\ !*** ./node_modules/d3-zoom/src/noevent.js ***! \*********************************************/ /*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); function nopropagation(event) { event.stopImmediatePropagation(); } /* harmony default export */ __webpack_exports__["default"] = (function(event) { event.preventDefault(); event.stopImmediatePropagation(); }); /***/ }), /***/ "OWWo": /*!******************************************!*\ !*** ./node_modules/d3-array/src/sum.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sum; }); function sum(values, valueof) { let sum = 0; if (valueof === undefined) { for (let value of values) { if (value = +value) { sum += value; } } } else { let index = -1; for (let value of values) { if (value = +valueof(value, ++index, values)) { sum += value; } } } return sum; } /***/ }), /***/ "Ok6N": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/scan.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return scan; }); /* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leastIndex.js */ "/CzE"); function scan(values, compare) { const index = Object(_leastIndex_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, compare); return index < 0 ? undefined : index; } /***/ }), /***/ "Oo5A": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/order/insideOut.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ "T17Z"); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "WuDp"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var n = series.length, i, j, sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__["sum"]), order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series), top = 0, bottom = 0, tops = [], bottoms = []; for (i = 0; i < n; ++i) { j = order[i]; if (top < bottom) { top += sums[j]; tops.push(j); } else { bottom += sums[j]; bottoms.push(j); } } return bottoms.reverse().concat(tops); }); /***/ }), /***/ "OqQA": /*!**********************************************!*\ !*** ./node_modules/d3-drag/src/constant.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "OrLo": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/radial.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return radial; }); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ "4m7i"); function square(x) { return Math.sign(x) * x * x; } function unsquare(x) { return Math.sign(x) * Math.sqrt(Math.abs(x)); } function radial() { var squared = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), range = [0, 1], round = false, unknown; function scale(x) { var y = unsquare(squared(x)); return isNaN(y) ? unknown : round ? Math.round(y) : y; } scale.invert = function(y) { return squared.invert(square(y)); }; scale.domain = function(_) { return arguments.length ? (squared.domain(_), scale) : squared.domain(); }; scale.range = function(_) { return arguments.length ? (squared.range((range = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_3__["default"])).map(square)), scale) : range.slice(); }; scale.rangeRound = function(_) { return scale.range(_).round(true); }; scale.round = function(_) { return arguments.length ? (round = !!_, scale) : round; }; scale.clamp = function(_) { return arguments.length ? (squared.clamp(_), scale) : squared.clamp(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return radial(squared.domain(), range) .round(round) .clamp(squared.clamp()) .unknown(unknown); }; _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(scale, arguments); return Object(_linear_js__WEBPACK_IMPORTED_MODULE_2__["linearish"])(scale); } /***/ }), /***/ "OsX3": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferTime.js ***! \*********************************************************************/ /*! exports provided: bufferTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function bufferTime(bufferTimeSpan) { let length = arguments.length; let scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(arguments[arguments.length - 1])) { scheduler = arguments[arguments.length - 1]; length--; } let bufferCreationInterval = null; if (length >= 2) { bufferCreationInterval = arguments[1]; } let maxBufferSize = Number.POSITIVE_INFINITY; if (length >= 3) { maxBufferSize = arguments[2]; } return function bufferTimeOperatorFunction(source) { return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler)); }; } class BufferTimeOperator { constructor(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) { this.bufferTimeSpan = bufferTimeSpan; this.bufferCreationInterval = bufferCreationInterval; this.maxBufferSize = maxBufferSize; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler)); } } class Context { constructor() { this.buffer = []; } } class BufferTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { constructor(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) { super(destination); this.bufferTimeSpan = bufferTimeSpan; this.bufferCreationInterval = bufferCreationInterval; this.maxBufferSize = maxBufferSize; this.scheduler = scheduler; this.contexts = []; const context = this.openContext(); this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0; if (this.timespanOnly) { const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan }; this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState)); } else { const closeState = { subscriber: this, context }; const creationState = { bufferTimeSpan, bufferCreationInterval, subscriber: this, scheduler }; this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState)); this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState)); } } _next(value) { const contexts = this.contexts; const len = contexts.length; let filledBufferContext; for (let i = 0; i < len; i++) { const context = contexts[i]; const buffer = context.buffer; buffer.push(value); if (buffer.length == this.maxBufferSize) { filledBufferContext = context; } } if (filledBufferContext) { this.onBufferFull(filledBufferContext); } } _error(err) { this.contexts.length = 0; super._error(err); } _complete() { const { contexts, destination } = this; while (contexts.length > 0) { const context = contexts.shift(); destination.next(context.buffer); } super._complete(); } _unsubscribe() { this.contexts = null; } onBufferFull(context) { this.closeContext(context); const closeAction = context.closeAction; closeAction.unsubscribe(); this.remove(closeAction); if (!this.closed && this.timespanOnly) { context = this.openContext(); const bufferTimeSpan = this.bufferTimeSpan; const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan }; this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState)); } } openContext() { const context = new Context(); this.contexts.push(context); return context; } closeContext(context) { this.destination.next(context.buffer); const contexts = this.contexts; const spliceIndex = contexts ? contexts.indexOf(context) : -1; if (spliceIndex >= 0) { contexts.splice(contexts.indexOf(context), 1); } } } function dispatchBufferTimeSpanOnly(state) { const subscriber = state.subscriber; const prevContext = state.context; if (prevContext) { subscriber.closeContext(prevContext); } if (!subscriber.closed) { state.context = subscriber.openContext(); state.context.closeAction = this.schedule(state, state.bufferTimeSpan); } } function dispatchBufferCreation(state) { const { bufferCreationInterval, bufferTimeSpan, subscriber, scheduler } = state; const context = subscriber.openContext(); const action = this; if (!subscriber.closed) { subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber, context })); action.schedule(state, bufferCreationInterval); } } function dispatchBufferClose(arg) { const { subscriber, context } = arg; subscriber.closeContext(context); } //# sourceMappingURL=bufferTime.js.map /***/ }), /***/ "P3dq": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/join.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(onenter, onupdate, onexit) { var enter = this.enter(), update = this, exit = this.exit(); enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); if (onupdate != null) update = onupdate(update); if (onexit == null) exit.remove(); else onexit(exit); return enter && update ? enter.merge(update).order() : update; }); /***/ }), /***/ "P3jZ": /*!*****************************************************!*\ !*** ./node_modules/d3-format/src/formatRounded.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); /* harmony default export */ __webpack_exports__["default"] = (function(x, p) { var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(x, p); if (!d) return x + ""; var coefficient = d[0], exponent = d[1]; return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0"); }); /***/ }), /***/ "P6wR": /*!******************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***! \******************************************************************/ /*! exports provided: azimuthalEqualAreaRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEqualAreaRaw", function() { return azimuthalEqualAreaRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); var azimuthalEqualAreaRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(cxcy) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(2 / (1 + cxcy)); }); azimuthalEqualAreaRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / 2); }); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEqualAreaRaw) .scale(124.75) .clipAngle(180 - 1e-3); }); /***/ }), /***/ "PQSO": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/circle.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "YzSS"); /* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle.js */ "vNJl"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual.js */ "fnXD"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.js */ "pb3N"); /* harmony default export */ __webpack_exports__["default"] = (function(radius) { var cr = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), delta = 6 * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], smallRadius = cr > 0, notHemisphere = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(cr) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; // TODO optimise for this common case function interpolate(from, to, direction, stream) { Object(_circle_js__WEBPACK_IMPORTED_MODULE_1__["circleStream"])(stream, radius, delta, direction, from, to); } function visible(lambda, phi) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi) > cr; } // Takes a line and cuts into visible segments. Return values used for polygon // clipping: 0 - there were intersections or the line was empty; 1 - no // intersections 2 - there were intersections, and the first and last segments // should be rejoined. function clipLine(stream) { var point0, // previous point c0, // code for previous point v0, // visibility of previous point v00, // visibility of first point clean; // no intersections return { lineStart: function() { v00 = v0 = false; clean = 1; }, point: function(lambda, phi) { var point1 = [lambda, phi], point2, v = visible(lambda, phi), c = smallRadius ? v ? 0 : code(lambda, phi) : v ? code(lambda + (lambda < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]), phi) : 0; if (!point0 && (v00 = v0 = v)) stream.lineStart(); if (v !== v0) { point2 = intersect(point0, point1); if (!point2 || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point2) || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point1, point2)) point1[2] = 1; } if (v !== v0) { clean = 0; if (v) { // outside going in stream.lineStart(); point2 = intersect(point1, point0); stream.point(point2[0], point2[1]); } else { // inside going out point2 = intersect(point0, point1); stream.point(point2[0], point2[1], 2); stream.lineEnd(); } point0 = point2; } else if (notHemisphere && point0 && smallRadius ^ v) { var t; // If the codes for two points are different, or are both zero, // and there this segment intersects with the small circle. if (!(c & c0) && (t = intersect(point1, point0, true))) { clean = 0; if (smallRadius) { stream.lineStart(); stream.point(t[0][0], t[0][1]); stream.point(t[1][0], t[1][1]); stream.lineEnd(); } else { stream.point(t[1][0], t[1][1]); stream.lineEnd(); stream.lineStart(); stream.point(t[0][0], t[0][1], 3); } } } if (v && (!point0 || !Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point1))) { stream.point(point1[0], point1[1]); } point0 = point1, v0 = v, c0 = c; }, lineEnd: function() { if (v0) stream.lineEnd(); point0 = null; }, // Rejoin first and last segments if there were intersections and the first // and last points were visible. clean: function() { return clean | ((v00 && v0) << 1); } }; } // Intersects the great circle between a and b with the clip circle. function intersect(a, b, two) { var pa = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(a), pb = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(b); // We have two planes, n1.p = d1 and n2.p = d2. // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). var n1 = [1, 0, 0], // normal n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(pa, pb), n2n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(n2, n2), n1n2 = n2[0], // cartesianDot(n1, n2), determinant = n2n2 - n1n2 * n1n2; // Two polar points. if (!determinant) return !two && a; var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(n1, n2), A = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n1, c1), B = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n2, c2); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(A, B); // Solve |p(t)|^2 = 1. var u = n1xn2, w = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, u), uu = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(u, u), t2 = w * w - uu * (Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, A) - 1); if (t2 < 0) return; var t = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(t2), q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w - t) / uu); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q, A); q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q); if (!two) return q; // Two intersection points. var lambda0 = a[0], lambda1 = b[0], phi0 = a[1], phi1 = b[1], z; if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; var delta = lambda1 - lambda0, polar = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"], meridian = polar || delta < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; // Check that the first point is between a and b. if (meridian ? polar ? phi0 + phi1 > 0 ^ q[1] < (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(q[0] - lambda0) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] ? phi0 : phi1) : phi0 <= q[1] && q[1] <= phi1 : delta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) { var q1 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w + t) / uu); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q1, A); return [q, Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q1)]; } } // Generates a 4-bit vector representing the location of a point relative to // the small circle's bounding box. function code(lambda, phi) { var r = smallRadius ? radius : _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] - radius, code = 0; if (lambda < -r) code |= 1; // left else if (lambda > r) code |= 2; // right if (phi < -r) code |= 4; // below else if (phi > r) code |= 8; // above return code; } return Object(_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], radius - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]]); }); /***/ }), /***/ "PSPu": /*!*****************************************!*\ !*** ./node_modules/d3-geo/src/area.js ***! \*****************************************/ /*! exports provided: areaRingSum, areaStream, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaRingSum", function() { return areaRingSum; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaStream", function() { return areaStream; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "mPOO"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "tepu"); var areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); // hello? var areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), lambda00, phi00, lambda0, cosPhi0, sinPhi0; var areaStream = { point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonStart: function() { areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); areaStream.lineStart = areaRingStart; areaStream.lineEnd = areaRingEnd; }, polygonEnd: function() { var areaRing = +areaRingSum; areaSum.add(areaRing < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] + areaRing : areaRing); this.lineStart = this.lineEnd = this.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }, sphere: function() { areaSum.add(_math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]); } }; function areaRingStart() { areaStream.point = areaPointFirst; } function areaRingEnd() { areaPoint(lambda00, phi00); } function areaPointFirst(lambda, phi) { areaStream.point = areaPoint; lambda00 = lambda, phi00 = phi; lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; lambda0 = lambda, cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]), sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); } function areaPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]; // half the angular distance from south pole // Spherical excess E for a spherical triangle with vertices: south pole, // previous point, current point. Uses a formula derived from Cagnoli’s // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2). var dLambda = lambda - lambda0, sdLambda = dLambda >= 0 ? 1 : -1, adLambda = sdLambda * dLambda, cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), k = sinPhi0 * sinPhi, u = cosPhi0 * cosPhi + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(adLambda), v = k * sdLambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(adLambda); areaRingSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(v, u)); // Advance the previous points. lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi; } /* harmony default export */ __webpack_exports__["default"] = (function(object) { areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, areaStream); return areaSum * 2; }); /***/ }), /***/ "PYcf": /*!***************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { var node = this, nodes = [node], children, i, index = -1; while (node = nodes.pop()) { callback.call(that, node, ++index, this); if (children = node.children) { for (i = children.length - 1; i >= 0; --i) { nodes.push(children[i]); } } } return this; }); /***/ }), /***/ "PZkE": /*!**********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilKeyChanged.js ***! \**********************************************************************************/ /*! exports provided: distinctUntilKeyChanged */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; }); /* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./distinctUntilChanged */ "/uUt"); function distinctUntilKeyChanged(key, compare) { return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])((x, y) => compare ? compare(x[key], y[key]) : x[key] === y[key]); } //# sourceMappingURL=distinctUntilKeyChanged.js.map /***/ }), /***/ "PfrF": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferWhen.js ***! \*********************************************************************/ /*! exports provided: bufferWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function bufferWhen(closingSelector) { return function (source) { return source.lift(new BufferWhenOperator(closingSelector)); }; } class BufferWhenOperator { constructor(closingSelector) { this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector)); } } class BufferWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination, closingSelector) { super(destination); this.closingSelector = closingSelector; this.subscribing = false; this.openBuffer(); } _next(value) { this.buffer.push(value); } _complete() { const buffer = this.buffer; if (buffer) { this.destination.next(buffer); } super._complete(); } _unsubscribe() { this.buffer = undefined; this.subscribing = false; } notifyNext() { this.openBuffer(); } notifyComplete() { if (this.subscribing) { this.complete(); } else { this.openBuffer(); } } openBuffer() { let { closingSubscription } = this; if (closingSubscription) { this.remove(closingSubscription); closingSubscription.unsubscribe(); } const buffer = this.buffer; if (this.buffer) { this.destination.next(buffer); } this.buffer = []; let closingNotifier; try { const { closingSelector } = this; closingNotifier = closingSelector(); } catch (err) { return this.error(err); } closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"](); this.closingSubscription = closingSubscription; this.add(closingSubscription); this.subscribing = true; closingSubscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(closingNotifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this))); this.subscribing = false; } } //# sourceMappingURL=bufferWhen.js.map /***/ }), /***/ "Pgey": /*!**********************************************!*\ !*** ./node_modules/d3-timer/src/timeout.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "dPRQ"); /* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"]; delay = delay == null ? 0 : +delay; t.restart(elapsed => { t.stop(); callback(elapsed + delay); }, delay, time); return t; }); /***/ }), /***/ "PqYM": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/timer.js ***! \*****************************************************************/ /*! exports provided: timer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function timer(dueTime = 0, periodOrScheduler, scheduler) { let period = -1; if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) { period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler); } else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) { scheduler = periodOrScheduler; } if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime) ? dueTime : (+dueTime - scheduler.now()); return scheduler.schedule(dispatch, due, { index: 0, period, subscriber }); }); } function dispatch(state) { const { index, period, subscriber } = state; subscriber.next(index); if (subscriber.closed) { return; } else if (period === -1) { return subscriber.complete(); } state.index = index + 1; this.schedule(state, period); } //# sourceMappingURL=timer.js.map /***/ }), /***/ "PuQ0": /*!******************************************!*\ !*** ./node_modules/d3-array/src/bin.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "wMLG"); /* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect.js */ "h8nK"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "2bil"); /* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "wz8V"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity.js */ "i202"); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ "GWx9"); /* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks.js */ "7ssf"); /* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges.js */ "Nl5w"); /* harmony default export */ __webpack_exports__["default"] = (function() { var value = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], domain = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"], threshold = _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__["default"]; function histogram(data) { if (!Array.isArray(data)) data = Array.from(data); var i, n = data.length, x, values = new Array(n); for (i = 0; i < n; ++i) { values[i] = value(data[i], i, data); } var xz = domain(values), x0 = xz[0], x1 = xz[1], tz = threshold(values, x0, x1); // Convert number of thresholds into uniform thresholds, and nice the // default domain accordingly. if (!Array.isArray(tz)) { const max = x1, tn = +tz; if (domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]) [x0, x1] = Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__["default"])(x0, x1, tn); tz = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__["default"])(x0, x1, tn); // If the last threshold is coincident with the domain’s upper bound, the // last bin will be zero-width. If the default domain is used, and this // last threshold is coincident with the maximum input value, we can // extend the niced upper bound by one tick to ensure uniform bin widths; // otherwise, we simply remove the last threshold. Note that we don’t // coerce values or the domain to numbers, and thus must be careful to // compare order (>=) rather than strict equality (===)! if (tz[tz.length - 1] >= x1) { if (max >= x1 && domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]) { const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__["tickIncrement"])(x0, x1, tn); if (isFinite(step)) { if (step > 0) { x1 = (Math.floor(x1 / step) + 1) * step; } else if (step < 0) { x1 = (Math.ceil(x1 * -step) + 1) / -step; } } } else { tz.pop(); } } } // Remove any thresholds outside the domain. var m = tz.length; while (tz[0] <= x0) tz.shift(), --m; while (tz[m - 1] > x1) tz.pop(), --m; var bins = new Array(m + 1), bin; // Initialize bins. for (i = 0; i <= m; ++i) { bin = bins[i] = []; bin.x0 = i > 0 ? tz[i - 1] : x0; bin.x1 = i < m ? tz[i] : x1; } // Assign data to bins by value, ignoring any outside the domain. for (i = 0; i < n; ++i) { x = values[i]; if (x0 <= x && x <= x1) { bins[Object(_bisect_js__WEBPACK_IMPORTED_MODULE_1__["default"])(tz, x, 0, m)].push(data[i]); } } return bins; } histogram.value = function(_) { return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : value; }; histogram.domain = function(_) { return arguments.length ? (domain = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])([_[0], _[1]]), histogram) : domain; }; histogram.thresholds = function(_) { return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : threshold; }; return histogram; }); /***/ }), /***/ "Pz8W": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js ***! \*********************************************************************/ /*! exports provided: AsapAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; }); /* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/Immediate */ "c7jc"); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); class AsapAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } requestAsyncId(scheduler, id, delay = 0) { if (delay !== null && delay > 0) { return super.requestAsyncId(scheduler, id, delay); } scheduler.actions.push(this); return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null))); } recycleAsyncId(scheduler, id, delay = 0) { if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { return super.recycleAsyncId(scheduler, id, delay); } if (scheduler.actions.length === 0) { _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].clearImmediate(id); scheduler.scheduled = undefined; } return undefined; } } //# sourceMappingURL=AsapAction.js.map /***/ }), /***/ "Q43v": /*!***********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/catmullRomOpen.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ "sK06"); /* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ "Kcim"); function CatmullRomOpen(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRomOpen.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; if (this._point) { var x23 = this._x2 - x, y23 = this._y2 - y; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; case 3: this._point = 4; // proceed default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a; this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { function catmullRom(context) { return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__["CardinalOpen"](context, 0); } catmullRom.alpha = function(alpha) { return custom(+alpha); }; return catmullRom; })(0.5)); /***/ }), /***/ "QIAL": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js ***! \*************************************************************************/ /*! exports provided: isInteropObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; }); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); function isInteropObservable(input) { return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function'; } //# sourceMappingURL=isInteropObservable.js.map /***/ }), /***/ "QK7T": /*!**********************************************!*\ !*** ./node_modules/d3-array/src/shuffle.js ***! \**********************************************/ /*! exports provided: default, shuffler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return shuffler; }); /* harmony default export */ __webpack_exports__["default"] = (shuffler(Math.random)); function shuffler(random) { return function shuffle(array, i0 = 0, i1 = array.length) { let m = i1 - (i0 = +i0); while (m) { const i = random() * m-- | 0, t = array[m + i0]; array[m + i0] = array[i + i0]; array[i + i0] = t; } return array; }; } /***/ }), /***/ "QjDJ": /*!******************************************************!*\ !*** ./node_modules/d3-selection/src/selectorAll.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function empty() { return []; } /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return selector == null ? empty : function() { return this.querySelectorAll(selector); }; }); /***/ }), /***/ "Qn8I": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/using.js ***! \*****************************************************************/ /*! exports provided: using */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "EY2u"); function using(resourceFactory, observableFactory) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { let resource; try { resource = resourceFactory(); } catch (err) { subscriber.error(err); return undefined; } let result; try { result = observableFactory(resource); } catch (err) { subscriber.error(err); return undefined; } const source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; const subscription = source.subscribe(subscriber); return () => { subscription.unsubscribe(); if (resource) { resource.unsubscribe(); } }; }); } //# sourceMappingURL=using.js.map /***/ }), /***/ "QqCr": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/bindCallback.js ***! \************************************************************************/ /*! exports provided: bindCallback */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); /* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "8Qeq"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function bindCallback(callbackFunc, resultSelector, scheduler) { if (resultSelector) { if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) { scheduler = resultSelector; } else { return (...args) => bindCallback(callbackFunc, scheduler)(...args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])((args) => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } } return function (...args) { const context = this; let subject; const params = { context, subject, callbackFunc, scheduler, }; return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { if (!scheduler) { if (!subject) { subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); subject.complete(); }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) { subject.error(err); } else { console.warn(err); } } } return subject.subscribe(subscriber); } else { const state = { args, subscriber, params, }; return scheduler.schedule(dispatch, 0, state); } }); }; } function dispatch(state) { const self = this; const { args, subscriber, params } = state; const { callbackFunc, context, scheduler } = params; let { subject } = params; if (!subject) { subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; this.add(scheduler.schedule(dispatchNext, 0, { value, subject })); }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { subject.error(err); } } this.add(subject.subscribe(subscriber)); } function dispatchNext(state) { const { value, subject } = state; subject.next(value); subject.complete(); } function dispatchError(state) { const { err, subject } = state; subject.error(err); } //# sourceMappingURL=bindCallback.js.map /***/ }), /***/ "QupR": /*!*********************************************!*\ !*** ./node_modules/d3-force/src/jiggle.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(random) { return (random() - 0.5) * 1e-6; }); /***/ }), /***/ "R0i0": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/time.js ***! \*******************************************/ /*! exports provided: calendar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calendar", function() { return calendar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return time; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time */ "tgfz"); /* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time-format */ "cOGN"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ "bcaG"); var durationSecond = 1000, durationMinute = durationSecond * 60, durationHour = durationMinute * 60, durationDay = durationHour * 24, durationWeek = durationDay * 7, durationMonth = durationDay * 30, durationYear = durationDay * 365; function date(t) { return new Date(t); } function number(t) { return t instanceof Date ? +t : +new Date(+t); } function calendar(year, month, week, day, hour, minute, second, millisecond, format) { var scale = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["default"])(), invert = scale.invert, domain = scale.domain; var formatMillisecond = format(".%L"), formatSecond = format(":%S"), formatMinute = format("%I:%M"), formatHour = format("%I %p"), formatDay = format("%a %d"), formatWeek = format("%b %d"), formatMonth = format("%B"), formatYear = format("%Y"); var tickIntervals = [ [second, 1, durationSecond], [second, 5, 5 * durationSecond], [second, 15, 15 * durationSecond], [second, 30, 30 * durationSecond], [minute, 1, durationMinute], [minute, 5, 5 * durationMinute], [minute, 15, 15 * durationMinute], [minute, 30, 30 * durationMinute], [ hour, 1, durationHour ], [ hour, 3, 3 * durationHour ], [ hour, 6, 6 * durationHour ], [ hour, 12, 12 * durationHour ], [ day, 1, durationDay ], [ day, 2, 2 * durationDay ], [ week, 1, durationWeek ], [ month, 1, durationMonth ], [ month, 3, 3 * durationMonth ], [ year, 1, durationYear ] ]; function tickFormat(date) { return (second(date) < date ? formatMillisecond : minute(date) < date ? formatSecond : hour(date) < date ? formatMinute : day(date) < date ? formatHour : month(date) < date ? (week(date) < date ? formatDay : formatWeek) : year(date) < date ? formatMonth : formatYear)(date); } function tickInterval(interval, start, stop) { if (interval == null) interval = 10; // If a desired tick count is specified, pick a reasonable tick interval // based on the extent of the domain and a rough estimate of tick size. // Otherwise, assume interval is already a time interval and use it. if (typeof interval === "number") { var target = Math.abs(stop - start) / interval, i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisector"])(function(i) { return i[2]; }).right(tickIntervals, target), step; if (i === tickIntervals.length) { step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start / durationYear, stop / durationYear, interval); interval = year; } else if (i) { i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; step = i[1]; interval = i[0]; } else { step = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, interval), 1); interval = millisecond; } return interval.every(step); } return interval; } scale.invert = function(y) { return new Date(invert(y)); }; scale.domain = function(_) { return arguments.length ? domain(Array.from(_, number)) : domain().map(date); }; scale.ticks = function(interval) { var d = domain(), t0 = d[0], t1 = d[d.length - 1], r = t1 < t0, t; if (r) t = t0, t0 = t1, t1 = t; t = tickInterval(interval, t0, t1); t = t ? t.range(t0, t1 + 1) : []; // inclusive stop return r ? t.reverse() : t; }; scale.tickFormat = function(count, specifier) { return specifier == null ? tickFormat : format(specifier); }; scale.nice = function(interval) { var d = domain(); return (interval = tickInterval(interval, d[0], d[d.length - 1])) ? domain(Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__["default"])(d, interval)) : scale; }; scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["copy"])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); }; return scale; } function time() { return _init_js__WEBPACK_IMPORTED_MODULE_4__["initRange"].apply(calendar(d3_time__WEBPACK_IMPORTED_MODULE_1__["timeYear"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMonth"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeWeek"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeDay"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeHour"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMinute"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeSecond"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_2__["timeFormat"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); } /***/ }), /***/ "R0y8": /*!*****************************************!*\ !*** ./node_modules/d3-geo/src/math.js ***! \*****************************************/ /*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, hypot, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quarterPi", function() { return quarterPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return degrees; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return radians; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan", function() { return atan; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ceil", function() { return ceil; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exp", function() { return exp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "floor", function() { return floor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hypot", function() { return hypot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pow", function() { return pow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sign", function() { return sign; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tan", function() { return tan; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "haversin", function() { return haversin; }); var epsilon = 1e-6; var epsilon2 = 1e-12; var pi = Math.PI; var halfPi = pi / 2; var quarterPi = pi / 4; var tau = pi * 2; var degrees = 180 / pi; var radians = pi / 180; var abs = Math.abs; var atan = Math.atan; var atan2 = Math.atan2; var cos = Math.cos; var ceil = Math.ceil; var exp = Math.exp; var floor = Math.floor; var hypot = Math.hypot; var log = Math.log; var pow = Math.pow; var sin = Math.sin; var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; var sqrt = Math.sqrt; var tan = Math.tan; function acos(x) { return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); } function asin(x) { return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x); } function haversin(x) { return (x = sin(x / 2)) * x; } /***/ }), /***/ "R9CD": /*!********************************************!*\ !*** ./node_modules/d3-array/src/pairs.js ***! \********************************************/ /*! exports provided: default, pair */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pairs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pair", function() { return pair; }); function pairs(values, pairof = pair) { const pairs = []; let previous; let first = false; for (const value of values) { if (first) pairs.push(pairof(previous, value)); previous = value; first = true; } return pairs; } function pair(a, b) { return [a, b]; } /***/ }), /***/ "RBWq": /*!**************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***! \**************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "efedf5bcbddc756bb1", "f2f0f7cbc9e29e9ac86a51a3", "f2f0f7cbc9e29e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "RQVR": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/root.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return this._root; }); /***/ }), /***/ "RUbi": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js ***! \************************************************************************/ /*! exports provided: AsapScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; }); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class AsapScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { flush(action) { this.active = true; this.scheduled = undefined; const { actions } = this; let error; let index = -1; let count = actions.length; action = action || actions.shift(); do { if (error = action.execute(action.state, action.delay)) { break; } } while (++index < count && (action = actions.shift())); this.active = false; if (error) { while (++index < count && (action = actions.shift())) { action.unsubscribe(); } throw error; } } } //# sourceMappingURL=AsapScheduler.js.map /***/ }), /***/ "RhHs": /*!*******************************************!*\ !*** ./node_modules/d3-axis/src/index.js ***! \*******************************************/ /*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _axis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis.js */ "iBRH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisTop"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisBottom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisLeft"]; }); /***/ }), /***/ "Ri0D": /*!******************************************!*\ !*** ./node_modules/d3-dsv/src/index.js ***! \******************************************/ /*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "NRL+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ "Vibt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatValue"]; }); /* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ "wWUp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatValue"]; }); /* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ "6hg5"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /***/ }), /***/ "S/r+": /*!**************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var node = this, nodes = [node]; while (node = node.parent) { nodes.push(node); } return nodes; }); /***/ }), /***/ "S2Xb": /*!*********************************************!*\ !*** ./node_modules/d3-contour/src/noop.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() {}); /***/ }), /***/ "S3lI": /*!************************************************************!*\ !*** ./node_modules/d3-interpolate/src/transform/index.js ***! \************************************************************/ /*! exports provided: interpolateTransformCss, interpolateTransformSvg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; }); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ "4xfg"); /* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ "2nV0"); function interpolateTransform(parse, pxComma, pxParen, degParen) { function pop(s) { return s.length ? s.pop() + " " : ""; } function translate(xa, ya, xb, yb, s, q) { if (xa !== xb || ya !== yb) { var i = s.push("translate(", null, pxComma, null, pxParen); q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); } else if (xb || yb) { s.push("translate(" + xb + pxComma + yb + pxParen); } } function rotate(a, b, s, q) { if (a !== b) { if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); } else if (b) { s.push(pop(s) + "rotate(" + b + degParen); } } function skewX(a, b, s, q) { if (a !== b) { q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); } else if (b) { s.push(pop(s) + "skewX(" + b + degParen); } } function scale(xa, ya, xb, yb, s, q) { if (xa !== xb || ya !== yb) { var i = s.push(pop(s) + "scale(", null, ",", null, ")"); q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); } else if (xb !== 1 || yb !== 1) { s.push(pop(s) + "scale(" + xb + "," + yb + ")"); } } return function(a, b) { var s = [], // string constants and placeholders q = []; // number interpolators a = parse(a), b = parse(b); translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); rotate(a.rotate, b.rotate, s, q); skewX(a.skewX, b.skewX, s, q); scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); a = b = null; // gc return function(t) { var i = -1, n = q.length, o; while (++i < n) s[(o = q[i]).i] = o.x(t); return s.join(""); }; }; } var interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseCss"], "px, ", "px)", "deg)"); var interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseSvg"], ", ", ")", ")"); /***/ }), /***/ "S83q": /*!********************************************************!*\ !*** ./node_modules/d3-interpolate/src/basisClosed.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "yEp2"); /* harmony default export */ __webpack_exports__["default"] = (function(values) { var n = values.length; return function(t) { var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), v0 = values[(i + n - 1) % n], v1 = values[i % n], v2 = values[(i + 1) % n], v3 = values[(i + 2) % n]; return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["basis"])((t - i / n) * n, v0, v1, v2, v3); }; }); /***/ }), /***/ "SC+/": /*!********************************************!*\ !*** ./node_modules/d3-color/src/index.js ***! \********************************************/ /*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "FmoU"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["rgb"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["hsl"]; }); /* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ "YvDT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["hcl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["lch"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["gray"]; }); /* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ "Faen"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /***/ }), /***/ "SDD1": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/curve/linear.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function Linear(context) { this._context = context; } Linear.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; // proceed default: this._context.lineTo(x, y); break; } } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Linear(context); }); /***/ }), /***/ "SGTC": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/clip/line.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b, x0, y0, x1, y1) { var ax = a[0], ay = a[1], bx = b[0], by = b[1], t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r; r = x0 - ax; if (!dx && r > 0) return; r /= dx; if (dx < 0) { if (r < t0) return; if (r < t1) t1 = r; } else if (dx > 0) { if (r > t1) return; if (r > t0) t0 = r; } r = x1 - ax; if (!dx && r < 0) return; r /= dx; if (dx < 0) { if (r > t1) return; if (r > t0) t0 = r; } else if (dx > 0) { if (r < t0) return; if (r < t1) t1 = r; } r = y0 - ay; if (!dy && r > 0) return; r /= dy; if (dy < 0) { if (r < t0) return; if (r < t1) t1 = r; } else if (dy > 0) { if (r > t1) return; if (r > t0) t0 = r; } r = y1 - ay; if (!dy && r < 0) return; r /= dy; if (dy < 0) { if (r > t1) return; if (r > t0) t0 = r; } else if (dy > 0) { if (r < t0) return; if (r < t1) t1 = r; } if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; return true; }); /***/ }), /***/ "SKGk": /*!*********************************************!*\ !*** ./node_modules/d3-chord/src/ribbon.js ***! \*********************************************/ /*! exports provided: default, ribbonArrow */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ribbonArrow", function() { return ribbonArrow; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "8efb"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "HpDs"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "mJZf"); function defaultSource(d) { return d.source; } function defaultTarget(d) { return d.target; } function defaultRadius(d) { return d.radius; } function defaultStartAngle(d) { return d.startAngle; } function defaultEndAngle(d) { return d.endAngle; } function defaultPadAngle() { return 0; } function defaultArrowheadRadius() { return 10; } function ribbon(headRadius) { var source = defaultSource, target = defaultTarget, sourceRadius = defaultRadius, targetRadius = defaultRadius, startAngle = defaultStartAngle, endAngle = defaultEndAngle, padAngle = defaultPadAngle, context = null; function ribbon() { var buffer, s = source.apply(this, arguments), t = target.apply(this, arguments), ap = padAngle.apply(this, arguments) / 2, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), sr = +sourceRadius.apply(this, (argv[0] = s, argv)), sa0 = startAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"], sa1 = endAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"], tr = +targetRadius.apply(this, (argv[0] = t, argv)), ta0 = startAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"], ta1 = endAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"]; if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); if (ap > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) { if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(sa1 - sa0) > ap * 2 + _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap); else sa0 = sa1 = (sa0 + sa1) / 2; if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(ta1 - ta0) > ap * 2 + _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap); else ta0 = ta1 = (ta0 + ta1) / 2; } context.moveTo(sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(sa0), sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(sa0)); context.arc(0, 0, sr, sa0, sa1); if (sa0 !== ta0 || sa1 !== ta1) { if (headRadius) { var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2; context.quadraticCurveTo(0, 0, tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta0), tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta0)); context.lineTo(tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta2), tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta2)); context.lineTo(tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta1), tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta1)); } else { context.quadraticCurveTo(0, 0, tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta0), tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta0)); context.arc(0, 0, tr, ta0, ta1); } } context.quadraticCurveTo(0, 0, sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(sa0), sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(sa0)); context.closePath(); if (buffer) return context = null, buffer + "" || null; } if (headRadius) ribbon.headRadius = function(_) { return arguments.length ? (headRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : headRadius; }; ribbon.radius = function(_) { return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : sourceRadius; }; ribbon.sourceRadius = function(_) { return arguments.length ? (sourceRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : sourceRadius; }; ribbon.targetRadius = function(_) { return arguments.length ? (targetRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : targetRadius; }; ribbon.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : startAngle; }; ribbon.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : endAngle; }; ribbon.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : padAngle; }; ribbon.source = function(_) { return arguments.length ? (source = _, ribbon) : source; }; ribbon.target = function(_) { return arguments.length ? (target = _, ribbon) : target; }; ribbon.context = function(_) { return arguments.length ? ((context = _ == null ? null : _), ribbon) : context; }; return ribbon; } /* harmony default export */ __webpack_exports__["default"] = (function() { return ribbon(); }); function ribbonArrow() { return ribbon(defaultArrowheadRadius); } /***/ }), /***/ "SMTj": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/path/bounds.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "mPOO"); var x0 = Infinity, y0 = x0, x1 = -x0, y1 = x1; var boundsStream = { point: boundsPoint, lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], result: function() { var bounds = [[x0, y0], [x1, y1]]; x1 = y1 = -(y0 = x0 = Infinity); return bounds; } }; function boundsPoint(x, y) { if (x < x0) x0 = x; if (x > x1) x1 = x; if (y < y0) y0 = y; if (y > y1) y1 = y; } /* harmony default export */ __webpack_exports__["default"] = (boundsStream); /***/ }), /***/ "SSHS": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/some.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return some; }); function some(values, test) { if (typeof test !== "function") throw new TypeError("test is not a function"); let index = -1; for (const value of values) { if (test(value, ++index, values)) { return true; } } return false; } /***/ }), /***/ "SeVD": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js ***! \*****************************************************************/ /*! exports provided: subscribeTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; }); /* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribeToArray */ "ngJS"); /* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeToPromise */ "a7t3"); /* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subscribeToIterable */ "pLzU"); /* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribeToObservable */ "CRDf"); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isArrayLike */ "I55L"); /* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isPromise */ "c2HN"); /* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isObject */ "XoHu"); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); const subscribeTo = (result) => { if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') { return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result); } else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) { return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result); } else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) { return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result); } else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') { return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result); } else { const value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : `'${result}'`; const msg = `You provided ${value} where a stream was expected.` + ' You can provide an Observable, Promise, Array, or Iterable.'; throw new TypeError(msg); } }; //# sourceMappingURL=subscribeTo.js.map /***/ }), /***/ "Sf2A": /*!************************************************!*\ !*** ./node_modules/d3-contour/src/density.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "mcvr"); /* harmony import */ var _blur_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blur.js */ "VQEX"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant.js */ "DiG6"); /* harmony import */ var _contours_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contours.js */ "gy+j"); function defaultX(d) { return d[0]; } function defaultY(d) { return d[1]; } function defaultWeight() { return 1; } /* harmony default export */ __webpack_exports__["default"] = (function() { var x = defaultX, y = defaultY, weight = defaultWeight, dx = 960, dy = 500, r = 20, // blur radius k = 2, // log2(grid cell size) o = r * 3, // grid offset, to pad for blur n = (dx + o * 2) >> k, // grid width m = (dy + o * 2) >> k, // grid height threshold = Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(20); function density(data) { var values0 = new Float32Array(n * m), values1 = new Float32Array(n * m); data.forEach(function(d, i, data) { var xi = (+x(d, i, data) + o) >> k, yi = (+y(d, i, data) + o) >> k, wi = +weight(d, i, data); if (xi >= 0 && xi < n && yi >= 0 && yi < m) { values0[xi + yi * n] += wi; } }); // TODO Optimize. Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); var tz = threshold(values0); // Convert number of thresholds into uniform thresholds. if (!Array.isArray(tz)) { var stop = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["max"])(values0); tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(0, stop, tz); tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(0, Math.floor(stop / tz) * tz, tz); tz.shift(); } return Object(_contours_js__WEBPACK_IMPORTED_MODULE_4__["default"])() .thresholds(tz) .size([n, m]) (values0) .map(transform); } function transform(geometry) { geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel. geometry.coordinates.forEach(transformPolygon); return geometry; } function transformPolygon(coordinates) { coordinates.forEach(transformRing); } function transformRing(coordinates) { coordinates.forEach(transformPoint); } // TODO Optimize. function transformPoint(coordinates) { coordinates[0] = coordinates[0] * Math.pow(2, k) - o; coordinates[1] = coordinates[1] * Math.pow(2, k) - o; } function resize() { o = r * 3; n = (dx + o * 2) >> k; m = (dy + o * 2) >> k; return density; } density.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : x; }; density.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : y; }; density.weight = function(_) { return arguments.length ? (weight = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : weight; }; density.size = function(_) { if (!arguments.length) return [dx, dy]; var _0 = +_[0], _1 = +_[1]; if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); return dx = _0, dy = _1, resize(); }; density.cellSize = function(_) { if (!arguments.length) return 1 << k; if (!((_ = +_) >= 1)) throw new Error("invalid cell size"); return k = Math.floor(Math.log(_) / Math.LN2), resize(); }; density.thresholds = function(_) { return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_), density) : threshold; }; density.bandwidth = function(_) { if (!arguments.length) return Math.sqrt(r * (r + 1)); if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth"); return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize(); }; return density; }); /***/ }), /***/ "SgsU": /*!**********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/links.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var root = this, links = []; root.each(function(node) { if (node !== root) { // Don’t include the root’s parent, if any. links.push({source: node.parent, target: node}); } }); return links; }); /***/ }), /***/ "SpAZ": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/identity.js ***! \**************************************************************/ /*! exports provided: identity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); function identity(x) { return x; } //# sourceMappingURL=identity.js.map /***/ }), /***/ "Spa3": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***! \*************************************************************************/ /*! exports provided: default, magma, inferno, plasma */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "magma", function() { return magma; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inferno", function() { return inferno; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plasma", function() { return plasma; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); function ramp(range) { var n = range.length; return function(t) { return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; }; } /* harmony default export */ __webpack_exports__["default"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"))); var magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); var inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); var plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); /***/ }), /***/ "SxV6": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/first.js ***! \****************************************************************/ /*! exports provided: first */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ "IzEk"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function first(predicate, defaultValue) { const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]())); } //# sourceMappingURL=first.js.map /***/ }), /***/ "SxqP": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "d8b365f5f5f55ab4ac", "a6611adfc27d80cdc1018571", "a6611adfc27df5f5f580cdc1018571", "8c510ad8b365f6e8c3c7eae55ab4ac01665e", "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "T17Z": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/order/appearance.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "qqpY"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var peaks = series.map(peak); return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); }); function peak(series) { var i = -1, j = 0, n = series.length, vi, vj = -Infinity; while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; return j; } /***/ }), /***/ "T9TN": /*!******************************************************!*\ !*** ./node_modules/d3-selection/src/sourceEvent.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(event) { let sourceEvent; while (sourceEvent = event.sourceEvent) event = sourceEvent; return event; }); /***/ }), /***/ "TCOF": /*!**********************************************************!*\ !*** ./node_modules/d3-time-format/src/defaultLocale.js ***! \**********************************************************/ /*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return timeFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return timeParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return utcFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return utcParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "pZEX"); var locale; var timeFormat; var timeParse; var utcFormat; var utcParse; defaultLocale({ dateTime: "%x, %X", date: "%-m/%-d/%Y", time: "%-I:%M:%S %p", periods: ["AM", "PM"], days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] }); function defaultLocale(definition) { locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); timeFormat = locale.format; timeParse = locale.parse; utcFormat = locale.utcFormat; utcParse = locale.utcParse; return locale; } /***/ }), /***/ "TI0E": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/lineRadial.js ***! \*************************************************/ /*! exports provided: lineRadial, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return lineRadial; }); /* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "JnD7"); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ "+ugm"); function lineRadial(l) { var c = l.curve; l.angle = l.x, delete l.x; l.radius = l.y, delete l.y; l.curve = function(_) { return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; }; return l; } /* harmony default export */ __webpack_exports__["default"] = (function() { return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"])); }); /***/ }), /***/ "TKDR": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/resample.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "YzSS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "t9E6"); var maxDepth = 16, // maximum depth of subdivision cosMinDistance = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(30 * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); // cos(minimum angular distance) /* harmony default export */ __webpack_exports__["default"] = (function(project, delta2) { return +delta2 ? resample(project, delta2) : resampleNone(project); }); function resampleNone(project) { return Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ point: function(x, y) { x = project(x, y); this.stream.point(x[0], x[1]); } }); } function resample(project, delta2) { function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy; if (d2 > 4 * delta2 && depth--) { var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(a * a + b * b + c * c), phi2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(c /= m), lambda2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(c) - 1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - lambda1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? (lambda0 + lambda1) / 2 : Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(b, a), p = project(lambda2, phi2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2; if (dz * dz / d2 > delta2 // perpendicular projected distance || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); stream.point(x2, y2); resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); } } } return function(stream) { var lambda00, x00, y00, a00, b00, c00, // first point lambda0, x0, y0, a0, b0, c0; // previous point var resampleStream = { point: point, lineStart: lineStart, lineEnd: lineEnd, polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } }; function point(x, y) { x = project(x, y); stream.point(x[0], x[1]); } function lineStart() { x0 = NaN; resampleStream.point = linePoint; stream.lineStart(); } function linePoint(lambda, phi) { var c = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])([lambda, phi]), p = project(lambda, phi); resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); stream.point(x0, y0); } function lineEnd() { resampleStream.point = point; stream.lineEnd(); } function ringStart() { lineStart(); resampleStream.point = ringPoint; resampleStream.lineEnd = ringEnd; } function ringPoint(lambda, phi) { linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; resampleStream.point = linePoint; } function ringEnd() { resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); resampleStream.lineEnd = lineEnd; lineEnd(); } return resampleStream; }; } /***/ }), /***/ "TKo5": /*!*******************************************!*\ !*** ./node_modules/d3-drag/src/event.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DragEvent; }); function DragEvent(type, { sourceEvent, subject, target, identifier, active, x, y, dx, dy, dispatch }) { Object.defineProperties(this, { type: {value: type, enumerable: true, configurable: true}, sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, subject: {value: subject, enumerable: true, configurable: true}, target: {value: target, enumerable: true, configurable: true}, identifier: {value: identifier, enumerable: true, configurable: true}, active: {value: active, enumerable: true, configurable: true}, x: {value: x, enumerable: true, configurable: true}, y: {value: y, enumerable: true, configurable: true}, dx: {value: dx, enumerable: true, configurable: true}, dy: {value: dy, enumerable: true, configurable: true}, _: {value: dispatch} }); } DragEvent.prototype.on = function() { var value = this._.on.apply(this._, arguments); return value === this._ ? this : value; }; /***/ }), /***/ "TXIv": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/quad.js ***! \******************************************/ /*! exports provided: quadIn, quadOut, quadInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadIn", function() { return quadIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadOut", function() { return quadOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadInOut", function() { return quadInOut; }); function quadIn(t) { return t * t; } function quadOut(t) { return t * (2 - t); } function quadInOut(t) { return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; } /***/ }), /***/ "TfGn": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return constants; }); function constants(x) { return function() { return x; }; } /***/ }), /***/ "TisH": /*!*************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/dispatch.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ "oxeV"); function dispatchEvent(node, type, params) { var window = Object(_window_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node), event = window.CustomEvent; if (typeof event === "function") { event = new event(type, params); } else { event = window.document.createEvent("Event"); if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; else event.initEvent(type, false, false); } node.dispatchEvent(event); } function dispatchConstant(type, params) { return function() { return dispatchEvent(this, type, params); }; } function dispatchFunction(type, params) { return function() { return dispatchEvent(this, type, params.apply(this, arguments)); }; } /* harmony default export */ __webpack_exports__["default"] = (function(type, params) { return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params)); }); /***/ }), /***/ "U6M7": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/hue.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "sFV2"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__["hue"])(+a, +b); return function(t) { var x = i(t); return x - 360 * Math.floor(x / 360); }; }); /***/ }), /***/ "UFbn": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/order/reverse.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "qqpY"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); }); /***/ }), /***/ "UGGt": /*!*****************************************************!*\ !*** ./node_modules/d3-interpolate/src/discrete.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(range) { var n = range.length; return function(t) { return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; }; }); /***/ }), /***/ "UGaM": /*!**************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publishBehavior.js ***! \**************************************************************************/ /*! exports provided: publishBehavior */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; }); /* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BehaviorSubject */ "2Vo4"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publishBehavior(value) { return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); } //# sourceMappingURL=publishBehavior.js.map /***/ }), /***/ "UHDu": /*!***********************************************!*\ !*** ./node_modules/d3-hierarchy/src/tree.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index.js */ "a8tM"); function defaultSeparation(a, b) { return a.parent === b.parent ? 1 : 2; } // function radialSeparation(a, b) { // return (a.parent === b.parent ? 1 : 2) / a.depth; // } // This function is used to traverse the left contour of a subtree (or // subforest). It returns the successor of v on this contour. This successor is // either given by the leftmost child of v or by the thread of v. The function // returns null if and only if v is on the highest level of its subtree. function nextLeft(v) { var children = v.children; return children ? children[0] : v.t; } // This function works analogously to nextLeft. function nextRight(v) { var children = v.children; return children ? children[children.length - 1] : v.t; } // Shifts the current subtree rooted at w+. This is done by increasing // prelim(w+) and mod(w+) by shift. function moveSubtree(wm, wp, shift) { var change = shift / (wp.i - wm.i); wp.c -= change; wp.s += shift; wm.c += change; wp.z += shift; wp.m += shift; } // All other shifts, applied to the smaller subtrees between w- and w+, are // performed by this function. To prepare the shifts, we have to adjust // change(w+), shift(w+), and change(w-). function executeShifts(v) { var shift = 0, change = 0, children = v.children, i = children.length, w; while (--i >= 0) { w = children[i]; w.z += shift; w.m += shift; shift += w.s + (change += w.c); } } // If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, // returns the specified (default) ancestor. function nextAncestor(vim, v, ancestor) { return vim.a.parent === v.parent ? vim.a : ancestor; } function TreeNode(node, i) { this._ = node; this.parent = null; this.children = null; this.A = null; // default ancestor this.a = this; // ancestor this.z = 0; // prelim this.m = 0; // mod this.c = 0; // change this.s = 0; // shift this.t = null; // thread this.i = i; // number } TreeNode.prototype = Object.create(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__["Node"].prototype); function treeRoot(root) { var tree = new TreeNode(root, 0), node, nodes = [tree], child, children, i, n; while (node = nodes.pop()) { if (children = node._.children) { node.children = new Array(n = children.length); for (i = n - 1; i >= 0; --i) { nodes.push(child = node.children[i] = new TreeNode(children[i], i)); child.parent = node; } } } (tree.parent = new TreeNode(null, 0)).children = [tree]; return tree; } // Node-link tree diagram using the Reingold-Tilford "tidy" algorithm /* harmony default export */ __webpack_exports__["default"] = (function() { var separation = defaultSeparation, dx = 1, dy = 1, nodeSize = null; function tree(root) { var t = treeRoot(root); // Compute the layout using Buchheim et al.’s algorithm. t.eachAfter(firstWalk), t.parent.m = -t.z; t.eachBefore(secondWalk); // If a fixed node size is specified, scale x and y. if (nodeSize) root.eachBefore(sizeNode); // If a fixed tree size is specified, scale x and y based on the extent. // Compute the left-most, right-most, and depth-most nodes for extents. else { var left = root, right = root, bottom = root; root.eachBefore(function(node) { if (node.x < left.x) left = node; if (node.x > right.x) right = node; if (node.depth > bottom.depth) bottom = node; }); var s = left === right ? 1 : separation(left, right) / 2, tx = s - left.x, kx = dx / (right.x + s + tx), ky = dy / (bottom.depth || 1); root.eachBefore(function(node) { node.x = (node.x + tx) * kx; node.y = node.depth * ky; }); } return root; } // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is // applied recursively to the children of v, as well as the function // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the // node v is placed to the midpoint of its outermost children. function firstWalk(v) { var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null; if (children) { executeShifts(v); var midpoint = (children[0].z + children[children.length - 1].z) / 2; if (w) { v.z = w.z + separation(v._, w._); v.m = v.z - midpoint; } else { v.z = midpoint; } } else if (w) { v.z = w.z + separation(v._, w._); } v.parent.A = apportion(v, w, v.parent.A || siblings[0]); } // Computes all real x-coordinates by summing up the modifiers recursively. function secondWalk(v) { v._.x = v.z + v.parent.m; v.m += v.parent.m; } // The core of the algorithm. Here, a new subtree is combined with the // previous subtrees. Threads are used to traverse the inside and outside // contours of the left and right subtree up to the highest common level. The // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the // superscript o means outside and i means inside, the subscript - means left // subtree and + means right subtree. For summing up the modifiers along the // contour, we use respective variables si+, si-, so-, and so+. Whenever two // nodes of the inside contours conflict, we compute the left one of the // greatest uncommon ancestors using the function ANCESTOR and call MOVE // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees. // Finally, we add a new thread (if necessary). function apportion(v, w, ancestor) { if (w) { var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift; while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) { vom = nextLeft(vom); vop = nextRight(vop); vop.a = v; shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); if (shift > 0) { moveSubtree(nextAncestor(vim, v, ancestor), v, shift); sip += shift; sop += shift; } sim += vim.m; sip += vip.m; som += vom.m; sop += vop.m; } if (vim && !nextRight(vop)) { vop.t = vim; vop.m += sim - sop; } if (vip && !nextLeft(vom)) { vom.t = vip; vom.m += sip - som; ancestor = v; } } return ancestor; } function sizeNode(node) { node.x *= dx; node.y = node.depth * dy; } tree.separation = function(x) { return arguments.length ? (separation = x, tree) : separation; }; tree.size = function(x) { return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]); }; tree.nodeSize = function(x) { return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null); }; return tree; }); /***/ }), /***/ "UHp3": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowTime.js ***! \*********************************************************************/ /*! exports provided: windowTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function windowTime(windowTimeSpan) { let scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; let windowCreationInterval = null; let maxWindowSize = Number.POSITIVE_INFINITY; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[3])) { scheduler = arguments[3]; } if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[2])) { scheduler = arguments[2]; } else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[2])) { maxWindowSize = Number(arguments[2]); } if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[1])) { scheduler = arguments[1]; } else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[1])) { windowCreationInterval = Number(arguments[1]); } return function windowTimeOperatorFunction(source) { return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler)); }; } class WindowTimeOperator { constructor(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) { this.windowTimeSpan = windowTimeSpan; this.windowCreationInterval = windowCreationInterval; this.maxWindowSize = maxWindowSize; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler)); } } class CountedSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor() { super(...arguments); this._numberOfNextedValues = 0; } next(value) { this._numberOfNextedValues++; super.next(value); } get numberOfNextedValues() { return this._numberOfNextedValues; } } class WindowTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) { super(destination); this.destination = destination; this.windowTimeSpan = windowTimeSpan; this.windowCreationInterval = windowCreationInterval; this.maxWindowSize = maxWindowSize; this.scheduler = scheduler; this.windows = []; const window = this.openWindow(); if (windowCreationInterval !== null && windowCreationInterval >= 0) { const closeState = { subscriber: this, window, context: null }; const creationState = { windowTimeSpan, windowCreationInterval, subscriber: this, scheduler }; this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState)); this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState)); } else { const timeSpanOnlyState = { subscriber: this, window, windowTimeSpan }; this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState)); } } _next(value) { const windows = this.windows; const len = windows.length; for (let i = 0; i < len; i++) { const window = windows[i]; if (!window.closed) { window.next(value); if (window.numberOfNextedValues >= this.maxWindowSize) { this.closeWindow(window); } } } } _error(err) { const windows = this.windows; while (windows.length > 0) { windows.shift().error(err); } this.destination.error(err); } _complete() { const windows = this.windows; while (windows.length > 0) { const window = windows.shift(); if (!window.closed) { window.complete(); } } this.destination.complete(); } openWindow() { const window = new CountedSubject(); this.windows.push(window); const destination = this.destination; destination.next(window); return window; } closeWindow(window) { window.complete(); const windows = this.windows; windows.splice(windows.indexOf(window), 1); } } function dispatchWindowTimeSpanOnly(state) { const { subscriber, windowTimeSpan, window } = state; if (window) { subscriber.closeWindow(window); } state.window = subscriber.openWindow(); this.schedule(state, windowTimeSpan); } function dispatchWindowCreation(state) { const { windowTimeSpan, subscriber, scheduler, windowCreationInterval } = state; const window = subscriber.openWindow(); const action = this; let context = { action, subscription: null }; const timeSpanState = { subscriber, window, context }; context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState); action.add(context.subscription); action.schedule(state, windowCreationInterval); } function dispatchWindowClose(state) { const { subscriber, window, context } = state; if (context && context.action && context.subscription) { context.action.remove(context.subscription); } subscriber.closeWindow(window); } //# sourceMappingURL=windowTime.js.map /***/ }), /***/ "ULlS": /*!************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/classed.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function classArray(string) { return string.trim().split(/^|\s+/); } function classList(node) { return node.classList || new ClassList(node); } function ClassList(node) { this._node = node; this._names = classArray(node.getAttribute("class") || ""); } ClassList.prototype = { add: function(name) { var i = this._names.indexOf(name); if (i < 0) { this._names.push(name); this._node.setAttribute("class", this._names.join(" ")); } }, remove: function(name) { var i = this._names.indexOf(name); if (i >= 0) { this._names.splice(i, 1); this._node.setAttribute("class", this._names.join(" ")); } }, contains: function(name) { return this._names.indexOf(name) >= 0; } }; function classedAdd(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.add(names[i]); } function classedRemove(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.remove(names[i]); } function classedTrue(names) { return function() { classedAdd(this, names); }; } function classedFalse(names) { return function() { classedRemove(this, names); }; } function classedFunction(names, value) { return function() { (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var names = classArray(name + ""); if (arguments.length < 2) { var list = classList(this.node()), i = -1, n = names.length; while (++i < n) if (!list.contains(names[i])) return false; return true; } return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value)); }); /***/ }), /***/ "UPWK": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/cumsum.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cumsum; }); function cumsum(values, valueof) { var sum = 0, index = 0; return Float64Array.from(values, valueof === undefined ? v => (sum += +v || 0) : v => (sum += +valueof(v, index++, values) || 0)); } /***/ }), /***/ "UXbc": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMapTo.js ***! \*********************************************************************/ /*! exports provided: mergeMapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; }); /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); function mergeMapTo(innerObservable, resultSelector, concurrent = Number.POSITIVE_INFINITY) { if (typeof resultSelector === 'function') { return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(() => innerObservable, resultSelector, concurrent); } if (typeof resultSelector === 'number') { concurrent = resultSelector; } return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(() => innerObservable, concurrent); } //# sourceMappingURL=mergeMapTo.js.map /***/ }), /***/ "UXun": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js ***! \**********************************************************************/ /*! exports provided: shareReplay */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; }); /* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "jtHE"); function shareReplay(configOrBufferSize, windowTime, scheduler) { let config; if (configOrBufferSize && typeof configOrBufferSize === 'object') { config = configOrBufferSize; } else { config = { bufferSize: configOrBufferSize, windowTime, refCount: false, scheduler, }; } return (source) => source.lift(shareReplayOperator(config)); } function shareReplayOperator({ bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, refCount: useRefCount, scheduler, }) { let subject; let refCount = 0; let subscription; let hasError = false; let isComplete = false; return function shareReplayOperation(source) { refCount++; let innerSub; if (!subject || hasError) { hasError = false; subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler); innerSub = subject.subscribe(this); subscription = source.subscribe({ next(value) { subject.next(value); }, error(err) { hasError = true; subject.error(err); }, complete() { isComplete = true; subscription = undefined; subject.complete(); }, }); if (isComplete) { subscription = undefined; } } else { innerSub = subject.subscribe(this); } this.add(() => { refCount--; innerSub.unsubscribe(); innerSub = undefined; if (subscription && !isComplete && useRefCount && refCount === 0) { subscription.unsubscribe(); subscription = undefined; subject = undefined; } }); }; } //# sourceMappingURL=shareReplay.js.map /***/ }), /***/ "Ud7J": /*!********************************************************!*\ !*** ./node_modules/d3-interpolate/src/numberArray.js ***! \********************************************************/ /*! exports provided: default, isNumberArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberArray", function() { return isNumberArray; }); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { if (!b) b = []; var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i; return function(t) { for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; return c; }; }); function isNumberArray(x) { return ArrayBuffer.isView(x) && !(x instanceof DataView); } /***/ }), /***/ "UnGF": /*!*************************************************!*\ !*** ./node_modules/d3-contour/src/contains.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(ring, hole) { var i = -1, n = hole.length, c; while (++i < n) if (c = ringContains(ring, hole[i])) return c; return 0; }); function ringContains(ring, point) { var x = point[0], y = point[1], contains = -1; for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) { var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1]; if (segmentContains(pi, pj, point)) return 0; if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains; } return contains; } function segmentContains(a, b, c) { var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]); } function collinear(a, b, c) { return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]); } function within(p, q, r) { return p <= q && q <= r || r <= q && q <= p; } /***/ }), /***/ "Uwo/": /*!*******************************************!*\ !*** ./node_modules/d3-color/src/math.js ***! \*******************************************/ /*! exports provided: radians, degrees */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return radians; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return degrees; }); const radians = Math.PI / 180; const degrees = 180 / Math.PI; /***/ }), /***/ "V/Wt": /*!**************************************************!*\ !*** ./node_modules/d3-selection/src/creator.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace.js */ "bNSl"); /* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces.js */ "4xGt"); function creatorInherit(name) { return function() { var document = this.ownerDocument, uri = this.namespaceURI; return uri === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__["xhtml"] && document.documentElement.namespaceURI === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__["xhtml"] ? document.createElement(name) : document.createElementNS(uri, name); }; } function creatorFixed(fullname) { return function() { return this.ownerDocument.createElementNS(fullname.space, fullname.local); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name) { var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name); return (fullname.local ? creatorFixed : creatorInherit)(fullname); }); /***/ }), /***/ "V183": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/mean.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mean; }); function mean(values, valueof) { let count = 0; let sum = 0; if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { ++count, sum += value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { ++count, sum += value; } } } if (count) return sum / count; } /***/ }), /***/ "VIHS": /*!*************************************************!*\ !*** ./node_modules/d3-force/src/simulation.js ***! \*************************************************/ /*! exports provided: x, y, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "ta7q"); /* harmony import */ var _lcg_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lcg.js */ "NgI0"); function x(d) { return d.x; } function y(d) { return d.y; } var initialRadius = 10, initialAngle = Math.PI * (3 - Math.sqrt(5)); /* harmony default export */ __webpack_exports__["default"] = (function(nodes) { var simulation, alpha = 1, alphaMin = 0.001, alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), alphaTarget = 0, velocityDecay = 0.6, forces = new Map(), stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(step), event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("tick", "end"), random = Object(_lcg_js__WEBPACK_IMPORTED_MODULE_2__["default"])(); if (nodes == null) nodes = []; function step() { tick(); event.call("tick", simulation); if (alpha < alphaMin) { stepper.stop(); event.call("end", simulation); } } function tick(iterations) { var i, n = nodes.length, node; if (iterations === undefined) iterations = 1; for (var k = 0; k < iterations; ++k) { alpha += (alphaTarget - alpha) * alphaDecay; forces.forEach(function(force) { force(alpha); }); for (i = 0; i < n; ++i) { node = nodes[i]; if (node.fx == null) node.x += node.vx *= velocityDecay; else node.x = node.fx, node.vx = 0; if (node.fy == null) node.y += node.vy *= velocityDecay; else node.y = node.fy, node.vy = 0; } } return simulation; } function initializeNodes() { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.index = i; if (node.fx != null) node.x = node.fx; if (node.fy != null) node.y = node.fy; if (isNaN(node.x) || isNaN(node.y)) { var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle; node.x = radius * Math.cos(angle); node.y = radius * Math.sin(angle); } if (isNaN(node.vx) || isNaN(node.vy)) { node.vx = node.vy = 0; } } } function initializeForce(force) { if (force.initialize) force.initialize(nodes, random); return force; } initializeNodes(); return simulation = { tick: tick, restart: function() { return stepper.restart(step), simulation; }, stop: function() { return stepper.stop(), simulation; }, nodes: function(_) { return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes; }, alpha: function(_) { return arguments.length ? (alpha = +_, simulation) : alpha; }, alphaMin: function(_) { return arguments.length ? (alphaMin = +_, simulation) : alphaMin; }, alphaDecay: function(_) { return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; }, alphaTarget: function(_) { return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; }, velocityDecay: function(_) { return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; }, randomSource: function(_) { return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random; }, force: function(name, _) { return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); }, find: function(x, y, radius) { var i = 0, n = nodes.length, dx, dy, d2, node, closest; if (radius == null) radius = Infinity; else radius *= radius; for (i = 0; i < n; ++i) { node = nodes[i]; dx = x - node.x; dy = y - node.y; d2 = dx * dx + dy * dy; if (d2 < radius) closest = node, radius = d2; } return closest; }, on: function(name, _) { return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); } }; }); /***/ }), /***/ "VIqg": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/linear.js ***! \*********************************************/ /*! exports provided: linearish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearish", function() { return linearish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return linear; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat.js */ "ssni"); function linearish(scale) { var domain = scale.domain; scale.ticks = function(count) { var d = domain(); return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(d[0], d[d.length - 1], count == null ? 10 : count); }; scale.tickFormat = function(count, specifier) { var d = domain(); return Object(_tickFormat_js__WEBPACK_IMPORTED_MODULE_3__["default"])(d[0], d[d.length - 1], count == null ? 10 : count, specifier); }; scale.nice = function(count) { if (count == null) count = 10; var d = domain(); var i0 = 0; var i1 = d.length - 1; var start = d[i0]; var stop = d[i1]; var prestep; var step; var maxIter = 10; if (stop < start) { step = start, start = stop, stop = step; step = i0, i0 = i1, i1 = step; } while (maxIter-- > 0) { step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); if (step === prestep) { d[i0] = start d[i1] = stop return domain(d); } else if (step > 0) { start = Math.floor(start / step) * step; stop = Math.ceil(stop / step) * step; } else if (step < 0) { start = Math.ceil(start * step) / step; stop = Math.floor(stop * step) / step; } else { break; } prestep = step; } return scale; }; return scale; } function linear() { var scale = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["default"])(); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, linear()); }; _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); return linearish(scale); } /***/ }), /***/ "VMG8": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e9a3c9f7f7f7a1d76a", "d01c8bf1b6dab8e1864dac26", "d01c8bf1b6daf7f7f7b8e1864dac26", "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "VQEX": /*!*********************************************!*\ !*** ./node_modules/d3-contour/src/blur.js ***! \*********************************************/ /*! exports provided: blurX, blurY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurX", function() { return blurX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurY", function() { return blurY; }); // TODO Optimize edge cases. // TODO Optimize index calculation. // TODO Optimize arguments. function blurX(source, target, r) { var n = source.width, m = source.height, w = (r << 1) + 1; for (var j = 0; j < m; ++j) { for (var i = 0, sr = 0; i < n + r; ++i) { if (i < n) { sr += source.data[i + j * n]; } if (i >= r) { if (i >= w) { sr -= source.data[i - w + j * n]; } target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w); } } } } // TODO Optimize edge cases. // TODO Optimize index calculation. // TODO Optimize arguments. function blurY(source, target, r) { var n = source.width, m = source.height, w = (r << 1) + 1; for (var i = 0; i < n; ++i) { for (var j = 0, sr = 0; j < m + r; ++j) { if (j < m) { sr += source.data[i + j * n]; } if (j >= r) { if (j >= w) { sr -= source.data[i + (j - w) * n]; } target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w); } } } } /***/ }), /***/ "VRyK": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/merge.js ***! \*****************************************************************/ /*! exports provided: merge */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/mergeAll */ "bHdf"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fromArray */ "yCtX"); function merge(...observables) { let concurrent = Number.POSITIVE_INFINITY; let scheduler = null; let last = observables[observables.length - 1]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) { scheduler = observables.pop(); if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') { concurrent = observables.pop(); } } else if (typeof last === 'number') { concurrent = observables.pop(); } if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) { return observables[0]; } return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler)); } //# sourceMappingURL=merge.js.map /***/ }), /***/ "VXJj": /*!***************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/equirectangular.js ***! \***************************************************************/ /*! exports provided: equirectangularRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equirectangularRaw", function() { return equirectangularRaw; }); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "1ibS"); function equirectangularRaw(lambda, phi) { return [lambda, phi]; } equirectangularRaw.invert = equirectangularRaw; /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equirectangularRaw) .scale(152.63); }); /***/ }), /***/ "Vfhj": /*!**********************************************!*\ !*** ./node_modules/d3-time/src/utcMonth.js ***! \**********************************************/ /*! exports provided: default, utcMonths */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return utcMonths; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCDate(1); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCMonth(date.getUTCMonth() + step); }, function(start, end) { return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; }, function(date) { return date.getUTCMonth(); }); /* harmony default export */ __webpack_exports__["default"] = (utcMonth); var utcMonths = utcMonth.range; /***/ }), /***/ "Vibt": /*!****************************************!*\ !*** ./node_modules/d3-dsv/src/csv.js ***! \****************************************/ /*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return csvParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return csvParseRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return csvFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return csvFormatBody; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return csvFormatRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return csvFormatRow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return csvFormatValue; }); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "NRL+"); var csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])(","); var csvParse = csv.parse; var csvParseRows = csv.parseRows; var csvFormat = csv.format; var csvFormatBody = csv.formatBody; var csvFormatRows = csv.formatRows; var csvFormatRow = csv.formatRow; var csvFormatValue = csv.formatValue; /***/ }), /***/ "VkQ2": /*!*************************************************************!*\ !*** ./node_modules/d3-shape/src/curve/catmullRomClosed.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ "O03L"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "0K5P"); /* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ "Kcim"); function CatmullRomClosed(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRomClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x3, this._y3); this._context.closePath(); break; } case 2: { this._context.lineTo(this._x3, this._y3); this._context.closePath(); break; } case 3: { this.point(this._x3, this._y3); this.point(this._x4, this._y4); this.point(this._x5, this._y5); break; } } }, point: function(x, y) { x = +x, y = +y; if (this._point) { var x23 = this._x2 - x, y23 = this._y2 - y; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; this._x3 = x, this._y3 = y; break; case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; case 2: this._point = 3; this._x5 = x, this._y5 = y; break; default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__["point"])(this, x, y); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a; this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { function catmullRom(context) { return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__["CardinalClosed"](context, 0); } catmullRom.alpha = function(alpha) { return custom(+alpha); }; return catmullRom; })(0.5)); /***/ }), /***/ "VphZ": /*!**********************************!*\ !*** ./node_modules/d3/index.js ***! \**********************************/ /*! exports provided: version, bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, chordTranspose, chordDirected, ribbon, ribbonArrow, color, rgb, hsl, lab, hcl, lch, gray, cubehelix, contours, contourDensity, Delaunay, Voronoi, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, randomUniform, randomInt, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, randomPareto, randomBernoulli, randomGeometric, randomBinomial, randomGamma, randomBeta, randomWeibull, randomCauchy, randomLogistic, randomPoisson, randomLcg, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleRadial, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBumpX, curveBumpY, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, zoom, zoomTransform, zoomIdentity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dist_package_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dist/package.js */ "L+rq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "version", function() { return _dist_package_js__WEBPACK_IMPORTED_MODULE_0__["version"]; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisect"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectLeft"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectCenter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ascending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisector"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["count"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["cross"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cumsum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["cumsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["descending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["deviation"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["extent"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["Adder"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fsum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["fsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fcumsum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["fcumsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "group", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["group"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["groups"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "index", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["index"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["indexes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["rollup"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["rollups"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupSort", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["groupSort"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bin", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bin"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["histogram"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdFreedmanDiaconis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdScott"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdSturges"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["max"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["maxIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["mean"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["median"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["merge"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["min"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["minIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nice", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["nice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["pairs"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["permute"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quantile"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quantileSorted"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quickselect", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quickselect"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["range"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "least", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["least"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "leastIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["leastIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatest", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["greatest"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatestIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["greatestIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["scan"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["shuffle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["shuffler"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["sum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ticks"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickIncrement"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickStep"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["transpose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["variance"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["zip"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["every"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "some", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["some"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["filter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["map"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["reduce"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reverse", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["reverse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["sort"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["difference"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "disjoint", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["disjoint"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["intersection"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subset", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["subset"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "superset", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["superset"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["union"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternMap", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["InternMap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternSet", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["InternSet"]; }); /* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-axis */ "RhHs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisTop"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisBottom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisLeft"]; }); /* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-brush */ "X486"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brush"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushSelection"]; }); /* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-chord */ "+u7/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chord"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordTranspose", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chordTranspose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordDirected", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chordDirected"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["ribbon"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbonArrow", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["ribbonArrow"]; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["color"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["rgb"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["hsl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["lab"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["hcl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["lch"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["gray"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["cubehelix"]; }); /* harmony import */ var d3_contour__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-contour */ "zMfI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_6__["contours"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_6__["contourDensity"]; }); /* harmony import */ var d3_delaunay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-delaunay */ "z8qe"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Delaunay", function() { return d3_delaunay__WEBPACK_IMPORTED_MODULE_7__["Delaunay"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Voronoi", function() { return d3_delaunay__WEBPACK_IMPORTED_MODULE_7__["Voronoi"]; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_8__["dispatch"]; }); /* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-drag */ "q+nN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["drag"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragDisable"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragEnable"]; }); /* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-dsv */ "Ri0D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["dsvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatValue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatValue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["autoType"]; }); /* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-ease */ "+3eq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeLinear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuad"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePoly"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSin"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExp"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounce"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBack"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElastic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticInOut"]; }); /* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-fetch */ "sukG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["blob"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["buffer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["dsv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["csv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["tsv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["image"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["json"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["text"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["xml"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["html"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["svg"]; }); /* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-force */ "Ckr6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCenter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCollide"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceLink"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceManyBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceSimulation"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceY"]; }); /* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-format */ "rWgG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatDefaultLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["format"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatPrefix"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatSpecifier"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["FormatSpecifier"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionFixed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionPrefix"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionRound"]; }); /* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-geo */ "n8A4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoBounds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCentroid"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipAntimeridian"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipExtent"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipRectangle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoContains"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoDistance"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule10"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoInterpolate"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoLength"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoPath"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbers"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbersUsa"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualAreaRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistant"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistantRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformalRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualAreaRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistant"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistantRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarth"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarthRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangular"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangularRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonicRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoIdentity"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjection"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjectionMutator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercatorRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1Raw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographicRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographicRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercatorRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoRotation"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStream"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransform"]; }); /* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-hierarchy */ "yUfG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["cluster"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["hierarchy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["pack"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packSiblings"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packEnclose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["partition"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["stratify"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["tree"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapBinary"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapDice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSlice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSliceDice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSquarify"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapResquarify"]; }); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolate"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateArray"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasisClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDate"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDiscrete"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumber"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumberArray"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateObject"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRound"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateString"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformCss"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformSvg"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateZoom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgb"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasisClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHsl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHslLong"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateLab"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHcl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHclLong"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelix"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelixLong"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["piecewise"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["quantize"]; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return d3_path__WEBPACK_IMPORTED_MODULE_18__["path"]; }); /* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-polygon */ "tUiF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonCentroid"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonHull"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonContains"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonLength"]; }); /* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-quadtree */ "gO8D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_20__["quadtree"]; }); /* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-random */ "7MRl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomUniform"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomInt", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomInt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomNormal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLogNormal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBates"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomIrwinHall"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomExponential"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPareto", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomPareto"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBernoulli", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBernoulli"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGeometric", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomGeometric"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBinomial", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBinomial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGamma", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomGamma"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBeta", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBeta"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomWeibull", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomWeibull"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomCauchy", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomCauchy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogistic", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLogistic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPoisson", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomPoisson"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLcg", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLcg"]; }); /* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale */ "ziQ1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleBand"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePoint"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleIdentity"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLinear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSymlog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleOrdinal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleImplicit"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleRadial", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantile"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantize"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleThreshold"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleTime"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleUtc"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequential"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSymlog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialQuantile"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDiverging"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSymlog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["tickFormat"]; }); /* harmony import */ var d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-scale-chromatic */ "oetV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeCategory10"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeAccent"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeDark2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePaired"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel1"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet1"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet3"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeTableau10"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBrBG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBrBG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePRGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePRGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePiYG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePiYG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuOr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuOr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdGy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdGy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSpectral"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSpectral"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrBr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrBr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBlues"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBlues"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreens"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreens"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreys"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreys"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePurples"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePurples"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateReds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeReds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOranges"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOranges"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCividis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCubehelixDefault"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRainbow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateWarm"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCool"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSinebow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateTurbo"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateViridis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateMagma"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateInferno"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePlasma"]; }); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["create"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["creator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["local"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["matcher"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespace"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespaces"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointer", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["pointer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointers", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["pointers"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["select"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectAll"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selection"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selector"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectorAll"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["style"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["window"]; }); /* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-shape */ "8d86"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["arc"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["area"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["line"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pie"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["areaRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["lineRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialLine"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pointRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkHorizontal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkVertical"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbol"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbols"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCross"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolDiamond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolSquare"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolStar"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolTriangle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolWye"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisOpen"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpX", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBumpX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpY", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBumpY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBundle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalOpen"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomOpen"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinearClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveNatural"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStep"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepAfter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepBefore"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stack"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetExpand"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetDiverging"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetNone"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetSilhouette"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetWiggle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAppearance"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAscending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderDescending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderInsideOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderNone"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderReverse"]; }); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time */ "tgfz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeInterval"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMillisecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMilliseconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMillisecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMilliseconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSeconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSeconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinute"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinutes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHour"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHours"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDay"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeek"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeeks"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFriday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonth"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonths"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYears"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinute"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinutes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHour"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHours"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDay"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeek"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeeks"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFriday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonth"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonths"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYears"]; }); /* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-time-format */ "cOGN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatDefaultLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoParse"]; }); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-timer */ "ta7q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["now"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timerFlush"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timeout"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["interval"]; }); /* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-transition */ "sQjb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["transition"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["active"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["interrupt"]; }); /* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! d3-zoom */ "2TRZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__["zoom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__["zoomTransform"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__["zoomIdentity"]; }); /***/ }), /***/ "Vpsf": /*!*******************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js ***! \*******************************************************************************/ /*! exports provided: AnimationFrameAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); class AnimationFrameAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } requestAsyncId(scheduler, id, delay = 0) { if (delay !== null && delay > 0) { return super.requestAsyncId(scheduler, id, delay); } scheduler.actions.push(this); return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(() => scheduler.flush(null))); } recycleAsyncId(scheduler, id, delay = 0) { if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { return super.recycleAsyncId(scheduler, id, delay); } if (scheduler.actions.length === 0) { cancelAnimationFrame(id); scheduler.scheduled = undefined; } return undefined; } } //# sourceMappingURL=AnimationFrameAction.js.map /***/ }), /***/ "W+J7": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/pack/siblings.js ***! \********************************************************/ /*! exports provided: packEnclose, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return packEnclose; }); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ "j1BO"); /* harmony import */ var _enclose_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enclose.js */ "7Mu7"); function place(b, a, c) { var dx = b.x - a.x, x, a2, dy = b.y - a.y, y, b2, d2 = dx * dx + dy * dy; if (d2) { a2 = a.r + c.r, a2 *= a2; b2 = b.r + c.r, b2 *= b2; if (a2 > b2) { x = (d2 + b2 - a2) / (2 * d2); y = Math.sqrt(Math.max(0, b2 / d2 - x * x)); c.x = b.x - x * dx - y * dy; c.y = b.y - x * dy + y * dx; } else { x = (d2 + a2 - b2) / (2 * d2); y = Math.sqrt(Math.max(0, a2 / d2 - x * x)); c.x = a.x + x * dx - y * dy; c.y = a.y + x * dy + y * dx; } } else { c.x = a.x + c.r; c.y = a.y; } } function intersects(a, b) { var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y; return dr > 0 && dr * dr > dx * dx + dy * dy; } function score(node) { var a = node._, b = node.next._, ab = a.r + b.r, dx = (a.x * b.r + b.x * a.r) / ab, dy = (a.y * b.r + b.y * a.r) / ab; return dx * dx + dy * dy; } function Node(circle) { this._ = circle; this.next = null; this.previous = null; } function packEnclose(circles) { if (!(n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(circles)).length)) return 0; var a, b, c, n, aa, ca, i, j, k, sj, sk; // Place the first circle. a = circles[0], a.x = 0, a.y = 0; if (!(n > 1)) return a.r; // Place the second circle. b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0; if (!(n > 2)) return a.r + b.r; // Place the third circle. place(b, a, c = circles[2]); // Initialize the front-chain using the first three circles a, b and c. a = new Node(a), b = new Node(b), c = new Node(c); a.next = c.previous = b; b.next = a.previous = c; c.next = b.previous = a; // Attempt to place each remaining circle… pack: for (i = 3; i < n; ++i) { place(a._, b._, c = circles[i]), c = new Node(c); // Find the closest intersecting circle on the front-chain, if any. // “Closeness” is determined by linear distance along the front-chain. // “Ahead” or “behind” is likewise determined by linear distance. j = b.next, k = a.previous, sj = b._.r, sk = a._.r; do { if (sj <= sk) { if (intersects(j._, c._)) { b = j, a.next = b, b.previous = a, --i; continue pack; } sj += j._.r, j = j.next; } else { if (intersects(k._, c._)) { a = k, a.next = b, b.previous = a, --i; continue pack; } sk += k._.r, k = k.previous; } } while (j !== k.next); // Success! Insert the new circle c between a and b. c.previous = a, c.next = b, a.next = b.previous = b = c; // Compute the new closest circle pair to the centroid. aa = score(a); while ((c = c.next) !== b) { if ((ca = score(c)) < aa) { a = c, aa = ca; } } b = a.next; } // Compute the enclosing circle of the front chain. a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a); // Translate the circles to put the enclosing circle around the origin. for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y; return c.r; } /* harmony default export */ __webpack_exports__["default"] = (function(circles) { packEnclose(circles); return circles; }); /***/ }), /***/ "WDTS": /*!*************************************************!*\ !*** ./node_modules/d3-delaunay/src/polygon.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Polygon; }); class Polygon { constructor() { this._ = []; } moveTo(x, y) { this._.push([x, y]); } closePath() { this._.push(this._[0].slice()); } lineTo(x, y) { this._.push([x, y]); } value() { return this._.length ? this._ : null; } } /***/ }), /***/ "WFWS": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/ease.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function easeConstant(id, value) { if (typeof value !== "function") throw new Error; return function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = value; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var id = this._id; return arguments.length ? this.each(easeConstant(id, value)) : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).ease; }); /***/ }), /***/ "WFeF": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/round.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a = +a, b = +b, function(t) { return Math.round(a * (1 - t) + b * t); }; }); /***/ }), /***/ "WHjf": /*!**************************************************!*\ !*** ./node_modules/d3-array/src/quickselect.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quickselect; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); // Based on https://github.com/mourner/quickselect // ISC license, Copyright 2018 Vladimir Agafonkin. function quickselect(array, k, left = 0, right = array.length - 1, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { while (right > left) { if (right - left > 600) { const n = right - left + 1; const m = k - left + 1; const z = Math.log(n); const s = 0.5 * Math.exp(2 * z / 3); const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); quickselect(array, k, newLeft, newRight, compare); } const t = array[k]; let i = left; let j = right; swap(array, left, k); if (compare(array[right], t) > 0) swap(array, left, right); while (i < j) { swap(array, i, j), ++i, --j; while (compare(array[i], t) < 0) ++i; while (compare(array[j], t) > 0) --j; } if (compare(array[left], t) === 0) swap(array, left, j); else ++j, swap(array, j, right); if (j <= k) left = j + 1; if (k <= j) right = j - 1; } return array; } function swap(array, i, j) { const t = array[i]; array[i] = array[j]; array[j] = t; } /***/ }), /***/ "WMd4": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Notification.js ***! \*************************************************************/ /*! exports provided: NotificationKind, Notification */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; }); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./observable/empty */ "EY2u"); /* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./observable/of */ "LRne"); /* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./observable/throwError */ "z6cu"); var NotificationKind; (function (NotificationKind) { NotificationKind["NEXT"] = "N"; NotificationKind["ERROR"] = "E"; NotificationKind["COMPLETE"] = "C"; })(NotificationKind || (NotificationKind = {})); class Notification { constructor(kind, value, error) { this.kind = kind; this.value = value; this.error = error; this.hasValue = kind === 'N'; } observe(observer) { switch (this.kind) { case 'N': return observer.next && observer.next(this.value); case 'E': return observer.error && observer.error(this.error); case 'C': return observer.complete && observer.complete(); } } do(next, error, complete) { const kind = this.kind; switch (kind) { case 'N': return next && next(this.value); case 'E': return error && error(this.error); case 'C': return complete && complete(); } } accept(nextOrObserver, error, complete) { if (nextOrObserver && typeof nextOrObserver.next === 'function') { return this.observe(nextOrObserver); } else { return this.do(nextOrObserver, error, complete); } } toObservable() { const kind = this.kind; switch (kind) { case 'N': return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value); case 'E': return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error); case 'C': return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])(); } throw new Error('unexpected notification kind value'); } static createNext(value) { if (typeof value !== 'undefined') { return new Notification('N', value); } return Notification.undefinedValueNotification; } static createError(err) { return new Notification('E', undefined, err); } static createComplete() { return Notification.completeNotification; } } Notification.completeNotification = new Notification('C'); Notification.undefinedValueNotification = new Notification('N', undefined); //# sourceMappingURL=Notification.js.map /***/ }), /***/ "WPMC": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/generate.js ***! \********************************************************************/ /*! exports provided: generate */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) { let resultSelector; let initialState; if (arguments.length == 1) { const options = initialStateOrOptions; initialState = options.initialState; condition = options.condition; iterate = options.iterate; resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]; scheduler = options.scheduler; } else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) { initialState = initialStateOrOptions; resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]; scheduler = resultSelectorOrObservable; } else { initialState = initialStateOrOptions; resultSelector = resultSelectorOrObservable; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { let state = initialState; if (scheduler) { return scheduler.schedule(dispatch, 0, { subscriber, iterate, condition, resultSelector, state }); } do { if (condition) { let conditionResult; try { conditionResult = condition(state); } catch (err) { subscriber.error(err); return undefined; } if (!conditionResult) { subscriber.complete(); break; } } let value; try { value = resultSelector(state); } catch (err) { subscriber.error(err); return undefined; } subscriber.next(value); if (subscriber.closed) { break; } try { state = iterate(state); } catch (err) { subscriber.error(err); return undefined; } } while (true); return undefined; }); } function dispatch(state) { const { subscriber, condition } = state; if (subscriber.closed) { return undefined; } if (state.needIterate) { try { state.state = state.iterate(state.state); } catch (err) { subscriber.error(err); return undefined; } } else { state.needIterate = true; } if (condition) { let conditionResult; try { conditionResult = condition(state.state); } catch (err) { subscriber.error(err); return undefined; } if (!conditionResult) { subscriber.complete(); return undefined; } if (subscriber.closed) { return undefined; } } let value; try { value = state.resultSelector(state.state); } catch (err) { subscriber.error(err); return undefined; } if (subscriber.closed) { return undefined; } subscriber.next(value); if (subscriber.closed) { return undefined; } return this.schedule(state); } //# sourceMappingURL=generate.js.map /***/ }), /***/ "WmHh": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/insert.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ "V/Wt"); /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ "b9Oj"); function constantNull() { return null; } /* harmony default export */ __webpack_exports__["default"] = (function(name, before) { var create = typeof name === "function" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name), select = before == null ? constantNull : typeof before === "function" ? before : Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(before); return this.select(function() { return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); }); }); /***/ }), /***/ "Ws9M": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/hcl.js ***! \************************************************/ /*! exports provided: default, hclLong */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hclLong", function() { return hclLong; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function hcl(hue) { return function(start, end) { var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(end)).h), c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.c, end.c), l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.h = h(t); start.c = c(t); start.l = l(t); start.opacity = opacity(t); return start + ""; }; } } /* harmony default export */ __webpack_exports__["default"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); var hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "Wtxg": /*!*********************************************!*\ !*** ./node_modules/d3-force/src/radial.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony default export */ __webpack_exports__["default"] = (function(radius, x, y) { var nodes, strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), strengths, radiuses; if (typeof radius !== "function") radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+radius); if (x == null) x = 0; if (y == null) y = 0; function force(alpha) { for (var i = 0, n = nodes.length; i < n; ++i) { var node = nodes[i], dx = node.x - x || 1e-6, dy = node.y - y || 1e-6, r = Math.sqrt(dx * dx + dy * dy), k = (radiuses[i] - r) * strengths[i] * alpha / r; node.vx += dx * k; node.vy += dy * k; } } function initialize() { if (!nodes) return; var i, n = nodes.length; strengths = new Array(n); radiuses = new Array(n); for (i = 0; i < n; ++i) { radiuses[i] = +radius(nodes[i], i, nodes); strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); } } force.initialize = function(_) { nodes = _, initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; }; force.radius = function(_) { return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius; }; force.x = function(_) { return arguments.length ? (x = +_, force) : x; }; force.y = function(_) { return arguments.length ? (y = +_, force) : y; }; return force; }); /***/ }), /***/ "WuDp": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/order/ascending.js ***! \******************************************************/ /*! exports provided: default, sum */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; }); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "qqpY"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var sums = series.map(sum); return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return sums[a] - sums[b]; }); }); function sum(series) { var s = 0, i = -1, n = series.length, v; while (++i < n) if (v = +series[i][1]) s += v; return s; } /***/ }), /***/ "WyKG": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js ***! \******************************************************************/ /*! exports provided: toSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/rxSubscriber */ "2QA8"); /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observer */ "gRHU"); function toSubscriber(nextOrObserver, error, complete) { if (nextOrObserver) { if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) { return nextOrObserver; } if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) { return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]](); } } if (!nextOrObserver && !error && !complete) { return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]); } return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete); } //# sourceMappingURL=toSubscriber.js.map /***/ }), /***/ "X486": /*!********************************************!*\ !*** ./node_modules/d3-brush/src/index.js ***! \********************************************/ /*! exports provided: brush, brushX, brushY, brushSelection */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _brush_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush.js */ "hTZz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushSelection"]; }); /***/ }), /***/ "X7tT": /*!********************************************!*\ !*** ./node_modules/d3-brush/src/event.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return BrushEvent; }); function BrushEvent(type, { sourceEvent, target, selection, mode, dispatch }) { Object.defineProperties(this, { type: {value: type, enumerable: true, configurable: true}, sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, target: {value: target, enumerable: true, configurable: true}, selection: {value: selection, enumerable: true, configurable: true}, mode: {value: mode, enumerable: true, configurable: true}, _: {value: dispatch} }); } /***/ }), /***/ "X7xT": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***! \*************************************************************************/ /*! exports provided: warm, cool, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warm", function() { return warm; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cool", function() { return cool; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); var warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); var cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(); /* harmony default export */ __webpack_exports__["default"] = (function(t) { if (t < 0 || t > 1) t -= Math.floor(t); var ts = Math.abs(t - 0.5); c.h = 360 * t - 100; c.s = 1.5 - 1.5 * ts; c.l = 0.8 - 0.9 * ts; return c + ""; }); /***/ }), /***/ "XAaG": /*!***************************************************!*\ !*** ./node_modules/d3-geo/src/projection/fit.js ***! \***************************************************/ /*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitExtent", function() { return fitExtent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitSize", function() { return fitSize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitWidth", function() { return fitWidth; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitHeight", function() { return fitHeight; }); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream.js */ "tepu"); /* harmony import */ var _path_bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds.js */ "SMTj"); function fit(projection, fitBounds, object) { var clip = projection.clipExtent && projection.clipExtent(); projection.scale(150).translate([0, 0]); if (clip != null) projection.clipExtent(null); Object(_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object, projection.stream(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"])); fitBounds(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"].result()); if (clip != null) projection.clipExtent(clip); return projection; } function fitExtent(projection, extent, object) { return fit(projection, function(b) { var w = extent[1][0] - extent[0][0], h = extent[1][1] - extent[0][1], k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; projection.scale(150 * k).translate([x, y]); }, object); } function fitSize(projection, size, object) { return fitExtent(projection, [[0, 0], size], object); } function fitWidth(projection, width, object) { return fit(projection, function(b) { var w = +width, k = w / (b[1][0] - b[0][0]), x = (w - k * (b[1][0] + b[0][0])) / 2, y = -k * b[0][1]; projection.scale(150 * k).translate([x, y]); }, object); } function fitHeight(projection, height, object) { return fit(projection, function(b) { var h = +height, k = h / (b[1][1] - b[0][1]), x = -k * b[0][0], y = (h - k * (b[1][1] + b[0][1])) / 2; projection.scale(150 * k).translate([x, y]); }, object); } /***/ }), /***/ "XDbj": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js ***! \***********************************************************************/ /*! exports provided: throwIfEmpty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function throwIfEmpty(errorFactory = defaultErrorFactory) { return (source) => { return source.lift(new ThrowIfEmptyOperator(errorFactory)); }; } class ThrowIfEmptyOperator { constructor(errorFactory) { this.errorFactory = errorFactory; } call(subscriber, source) { return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory)); } } class ThrowIfEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { constructor(destination, errorFactory) { super(destination); this.errorFactory = errorFactory; this.hasValue = false; } _next(value) { this.hasValue = true; this.destination.next(value); } _complete() { if (!this.hasValue) { let err; try { err = this.errorFactory(); } catch (e) { err = e; } this.destination.error(err); } else { return this.destination.complete(); } } } function defaultErrorFactory() { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); } //# sourceMappingURL=throwIfEmpty.js.map /***/ }), /***/ "XJJ9": /*!*********************************************!*\ !*** ./node_modules/d3-random/src/bates.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _irwinHall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall.js */ "hSnb"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBates(source) { var I = _irwinHall_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomBates(n) { // use limiting distribution at n === 0 if ((n = +n) === 0) return source; var randomIrwinHall = I(n); return function() { return randomIrwinHall() / n; }; } randomBates.source = sourceRandomBates; return randomBates; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "XNiG": /*!********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Subject.js ***! \********************************************************/ /*! exports provided: SubjectSubscriber, Subject, AnonymousSubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Observable */ "HDdC"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); /* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); /* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SubjectSubscription */ "Ylt2"); /* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "2QA8"); class SubjectSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { constructor(destination) { super(destination); this.destination = destination; } } class Subject extends _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] { constructor() { super(); this.observers = []; this.closed = false; this.isStopped = false; this.hasError = false; this.thrownError = null; } [_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__["rxSubscriber"]]() { return new SubjectSubscriber(this); } lift(operator) { const subject = new AnonymousSubject(this, this); subject.operator = operator; return subject; } next(value) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } if (!this.isStopped) { const { observers } = this; const len = observers.length; const copy = observers.slice(); for (let i = 0; i < len; i++) { copy[i].next(value); } } } error(err) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } this.hasError = true; this.thrownError = err; this.isStopped = true; const { observers } = this; const len = observers.length; const copy = observers.slice(); for (let i = 0; i < len; i++) { copy[i].error(err); } this.observers.length = 0; } complete() { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } this.isStopped = true; const { observers } = this; const len = observers.length; const copy = observers.slice(); for (let i = 0; i < len; i++) { copy[i].complete(); } this.observers.length = 0; } unsubscribe() { this.isStopped = true; this.closed = true; this.observers = null; } _trySubscribe(subscriber) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } else { return super._trySubscribe(subscriber); } } _subscribe(subscriber) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } else if (this.hasError) { subscriber.error(this.thrownError); return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } else if (this.isStopped) { subscriber.complete(); return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } else { this.observers.push(subscriber); return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__["SubjectSubscription"](this, subscriber); } } asObservable() { const observable = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](); observable.source = this; return observable; } } Subject.create = (destination, source) => { return new AnonymousSubject(destination, source); }; class AnonymousSubject extends Subject { constructor(destination, source) { super(); this.destination = destination; this.source = source; } next(value) { const { destination } = this; if (destination && destination.next) { destination.next(value); } } error(err) { const { destination } = this; if (destination && destination.error) { this.destination.error(err); } } complete() { const { destination } = this; if (destination && destination.complete) { this.destination.complete(); } } _subscribe(subscriber) { const { source } = this; if (source) { return this.source.subscribe(subscriber); } else { return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } } } //# sourceMappingURL=Subject.js.map /***/ }), /***/ "XO33": /*!*********************************************!*\ !*** ./node_modules/d3-fetch/src/buffer.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseArrayBuffer(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); return response.arrayBuffer(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseArrayBuffer); }); /***/ }), /***/ "XTjh": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(t) { t = Math.max(0, Math.min(1, t)); return "rgb(" + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) + ")"; }); /***/ }), /***/ "XfOf": /*!***************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony default export */ __webpack_exports__["default"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-240, 0.5, 1.0))); /***/ }), /***/ "Xl5i": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/textTween.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function textInterpolate(i) { return function(t) { this.textContent = i.call(this, t); }; } function textTween(value) { var t0, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t0 = (i0 = i) && textInterpolate(i); return t0; } tween._value = value; return tween; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var key = "text"; if (arguments.length < 1) return (key = this.tween(key)) && key._value; if (value == null) return this.tween(key, null); if (typeof value !== "function") throw new Error; return this.tween(key, textTween(value)); }); /***/ }), /***/ "XoFe": /*!**************************************************!*\ !*** ./node_modules/d3-selection/src/pointer.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent.js */ "T9TN"); /* harmony default export */ __webpack_exports__["default"] = (function(event, node) { event = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(event); if (node === undefined) node = event.currentTarget; if (node) { var svg = node.ownerSVGElement || node; if (svg.createSVGPoint) { var point = svg.createSVGPoint(); point.x = event.clientX, point.y = event.clientY; point = point.matrixTransform(node.getScreenCTM().inverse()); return [point.x, point.y]; } if (node.getBoundingClientRect) { var rect = node.getBoundingClientRect(); return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; } } return [event.pageX, event.pageY]; }); /***/ }), /***/ "XoHu": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isObject.js ***! \**************************************************************/ /*! exports provided: isObject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); function isObject(x) { return x !== null && typeof x === 'object'; } //# sourceMappingURL=isObject.js.map /***/ }), /***/ "XqQ8": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js ***! \*********************************************************************/ /*! exports provided: exhaustMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function exhaustMap(project, resultSelector) { if (resultSelector) { return (source) => source.pipe(exhaustMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))))); } return (source) => source.lift(new ExhaustMapOperator(project)); } class ExhaustMapOperator { constructor(project) { this.project = project; } call(subscriber, source) { return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project)); } } class ExhaustMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, project) { super(destination); this.project = project; this.hasSubscription = false; this.hasCompleted = false; this.index = 0; } _next(value) { if (!this.hasSubscription) { this.tryNext(value); } } tryNext(value) { let result; const index = this.index++; try { result = this.project(value, index); } catch (err) { this.destination.error(err); return; } this.hasSubscription = true; this._innerSub(result); } _innerSub(result) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } _complete() { this.hasCompleted = true; if (!this.hasSubscription) { this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { this.destination.next(innerValue); } notifyError(err) { this.destination.error(err); } notifyComplete() { this.hasSubscription = false; if (this.hasCompleted) { this.destination.complete(); } } } //# sourceMappingURL=exhaustMap.js.map /***/ }), /***/ "Xt/6": /*!********************************************!*\ !*** ./node_modules/d3-time/src/second.js ***! \********************************************/ /*! exports provided: default, seconds */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "seconds", function() { return seconds; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(date - date.getMilliseconds()); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]; }, function(date) { return date.getUTCSeconds(); }); /* harmony default export */ __webpack_exports__["default"] = (second); var seconds = second.range; /***/ }), /***/ "Y/cZ": /*!**********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Scheduler.js ***! \**********************************************************/ /*! exports provided: Scheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; }); class Scheduler { constructor(SchedulerAction, now = Scheduler.now) { this.SchedulerAction = SchedulerAction; this.now = now; } schedule(work, delay = 0, state) { return new this.SchedulerAction(this, work).schedule(state, delay); } } Scheduler.now = () => Date.now(); //# sourceMappingURL=Scheduler.js.map /***/ }), /***/ "Y3EW": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e0ecf49ebcda8856a7", "edf8fbb3cde38c96c688419d", "edf8fbb3cde38c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "Y4Tn": /*!******************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/transverseMercator.js ***! \******************************************************************/ /*! exports provided: transverseMercatorRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transverseMercatorRaw", function() { return transverseMercatorRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator.js */ "LZ5Q"); function transverseMercatorRaw(lambda, phi) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2)), -lambda]; } transverseMercatorRaw.invert = function(x, y) { return [-y, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(x)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { var m = Object(_mercator_js__WEBPACK_IMPORTED_MODULE_1__["mercatorProjection"])(transverseMercatorRaw), center = m.center, rotate = m.rotate; m.center = function(_) { return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]); }; m.rotate = function(_) { return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]); }; return rotate([0, 0, 90]) .scale(159.155); }); /***/ }), /***/ "Y62N": /*!*********************************************!*\ !*** ./node_modules/d3-color/src/define.js ***! \*********************************************/ /*! exports provided: default, extend */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; }); /* harmony default export */ __webpack_exports__["default"] = (function(constructor, factory, prototype) { constructor.prototype = factory.prototype = prototype; prototype.constructor = constructor; }); function extend(parent, definition) { var prototype = Object.create(parent.prototype); for (var key in definition) prototype[key] = definition[key]; return prototype; } /***/ }), /***/ "Y6u4": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js ***! \******************************************************************/ /*! exports provided: TimeoutError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; }); const TimeoutErrorImpl = (() => { function TimeoutErrorImpl() { Error.call(this); this.message = 'Timeout has occurred'; this.name = 'TimeoutError'; return this; } TimeoutErrorImpl.prototype = Object.create(Error.prototype); return TimeoutErrorImpl; })(); const TimeoutError = TimeoutErrorImpl; //# sourceMappingURL=TimeoutError.js.map /***/ }), /***/ "Y6wi": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/switchAll.js ***! \********************************************************************/ /*! exports provided: switchAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; }); /* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "eIep"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function switchAll() { return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]); } //# sourceMappingURL=switchAll.js.map /***/ }), /***/ "Y7HM": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isNumeric.js ***! \***************************************************************/ /*! exports provided: isNumeric */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; }); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isArray */ "DH7j"); function isNumeric(val) { return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0; } //# sourceMappingURL=isNumeric.js.map /***/ }), /***/ "Y7ZM": /*!******************************************************!*\ !*** ./node_modules/d3-array/src/threshold/scott.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "hiel"); /* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../deviation.js */ "CcBx"); /* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { return Math.ceil((max - min) / (3.5 * Object(_deviation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values), -1 / 3))); }); /***/ }), /***/ "YbCY": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/text.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function textRemove() { this.textContent = ""; } function textConstant(value) { return function() { this.textContent = value; }; } function textFunction(value) { return function() { var v = value.apply(this, arguments); this.textContent = v == null ? "" : v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent; }); /***/ }), /***/ "Yij6": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fde0ddfa9fb5c51b8a", "feebe2fbb4b9f768a1ae017e", "feebe2fbb4b9f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "Ylt2": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js ***! \********************************************************************/ /*! exports provided: SubjectSubscription */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscription */ "quSY"); class SubjectSubscription extends _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"] { constructor(subject, subscriber) { super(); this.subject = subject; this.subscriber = subscriber; this.closed = false; } unsubscribe() { if (this.closed) { return; } this.closed = true; const subject = this.subject; const observers = subject.observers; this.subject = null; if (!observers || observers.length === 0 || subject.isStopped || subject.closed) { return; } const subscriberIndex = observers.indexOf(this.subscriber); if (subscriberIndex !== -1) { observers.splice(subscriberIndex, 1); } } } //# sourceMappingURL=SubjectSubscription.js.map /***/ }), /***/ "Yn3m": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ef8a62f7f7f767a9cf", "ca0020f4a58292c5de0571b0", "ca0020f4a582f7f7f792c5de0571b0", "b2182bef8a62fddbc7d1e5f067a9cf2166ac", "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "YrTO": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/selection/index.js ***! \***********************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ "0xxc"); /* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ "2/3s"); d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__["default"]; d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__["default"]; /***/ }), /***/ "YuR2": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js ***! \**********************************************************************/ /*! exports provided: QueueAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); class QueueAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } schedule(state, delay = 0) { if (delay > 0) { return super.schedule(state, delay); } this.delay = delay; this.state = state; this.scheduler.flush(this); return this; } execute(state, delay) { return (delay > 0 || this.closed) ? super.execute(state, delay) : this._execute(state, delay); } requestAsyncId(scheduler, id, delay = 0) { if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { return super.requestAsyncId(scheduler, id, delay); } return scheduler.flush(this); } } //# sourceMappingURL=QueueAction.js.map /***/ }), /***/ "YvDT": /*!******************************************!*\ !*** ./node_modules/d3-color/src/lab.js ***! \******************************************/ /*! exports provided: gray, default, Lab, lch, hcl, Hcl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return gray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lab", function() { return Lab; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return lch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hcl", function() { return Hcl; }); /* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "Y62N"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "FmoU"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "Uwo/"); // https://observablehq.com/@mbostock/lab-and-rgb const K = 18, Xn = 0.96422, Yn = 1, Zn = 0.82521, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1; function labConvert(o) { if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); if (o instanceof Hcl) return hcl2lab(o); if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); var r = rgb2lrgb(o.r), g = rgb2lrgb(o.g), b = rgb2lrgb(o.b), y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; if (r === g && g === b) x = z = y; else { x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); } return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); } function gray(l, opacity) { return new Lab(l, 0, 0, opacity == null ? 1 : opacity); } function lab(l, a, b, opacity) { return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); } function Lab(l, a, b, opacity) { this.l = +l; this.a = +a; this.b = +b; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { brighter: function(k) { return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); }, darker: function(k) { return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); }, rgb: function() { var y = (this.l + 16) / 116, x = isNaN(this.a) ? y : y + this.a / 500, z = isNaN(this.b) ? y : y - this.b / 200; x = Xn * lab2xyz(x); y = Yn * lab2xyz(y); z = Zn * lab2xyz(z); return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), this.opacity ); } })); function xyz2lab(t) { return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; } function lab2xyz(t) { return t > t1 ? t * t * t : t2 * (t - t0); } function lrgb2rgb(x) { return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); } function rgb2lrgb(x) { return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); } function hclConvert(o) { if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); if (!(o instanceof Lab)) o = labConvert(o); if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"]; return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); } function lch(l, c, h, opacity) { return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); } function hcl(h, c, l, opacity) { return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); } function Hcl(h, c, l, opacity) { this.h = +h; this.c = +c; this.l = +l; this.opacity = +opacity; } function hcl2lab(o) { if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]; return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { brighter: function(k) { return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); }, darker: function(k) { return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); }, rgb: function() { return hcl2lab(this).rgb(); } })); /***/ }), /***/ "YzSS": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/cartesian.js ***! \**********************************************/ /*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spherical", function() { return spherical; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesian", function() { return cartesian; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianDot", function() { return cartesianDot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianCross", function() { return cartesianCross; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianAddInPlace", function() { return cartesianAddInPlace; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianScale", function() { return cartesianScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianNormalizeInPlace", function() { return cartesianNormalizeInPlace; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "R0y8"); function spherical(cartesian) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(cartesian[1], cartesian[0]), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(cartesian[2])]; } function cartesian(spherical) { var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); return [cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi)]; } function cartesianDot(a, b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } function cartesianCross(a, b) { return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; } // TODO return a function cartesianAddInPlace(a, b) { a[0] += b[0], a[1] += b[1], a[2] += b[2]; } function cartesianScale(vector, k) { return [vector[0] * k, vector[1] * k, vector[2] * k]; } // TODO return d function cartesianNormalizeInPlace(d) { var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); d[0] /= l, d[1] /= l, d[2] /= l; } /***/ }), /***/ "Z5Ne": /*!***************************************************!*\ !*** ./node_modules/d3-array/src/intersection.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return intersection; }); /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.js */ "8XJe"); function intersection(values, ...others) { values = new Set(values); others = others.map(_set_js__WEBPACK_IMPORTED_MODULE_0__["default"]); out: for (const value of values) { for (const other of others) { if (!other.has(value)) { values.delete(value); continue out; } } } return values; } /***/ }), /***/ "Z9Ww": /*!***********************************************!*\ !*** ./node_modules/d3-force/src/manyBody.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-quadtree */ "gO8D"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jiggle.js */ "QupR"); /* harmony import */ var _simulation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation.js */ "VIHS"); /* harmony default export */ __webpack_exports__["default"] = (function() { var nodes, node, random, alpha, strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(-30), strengths, distanceMin2 = 1, distanceMax2 = Infinity, theta2 = 0.81; function force(_) { var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_0__["quadtree"])(nodes, _simulation_js__WEBPACK_IMPORTED_MODULE_3__["x"], _simulation_js__WEBPACK_IMPORTED_MODULE_3__["y"]).visitAfter(accumulate); for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); } function initialize() { if (!nodes) return; var i, n = nodes.length, node; strengths = new Array(n); for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); } function accumulate(quad) { var strength = 0, q, c, weight = 0, x, y, i; // For internal nodes, accumulate forces from child quadrants. if (quad.length) { for (x = y = i = 0; i < 4; ++i) { if ((q = quad[i]) && (c = Math.abs(q.value))) { strength += q.value, weight += c, x += c * q.x, y += c * q.y; } } quad.x = x / weight; quad.y = y / weight; } // For leaf nodes, accumulate forces from coincident quadrants. else { q = quad; q.x = q.data.x; q.y = q.data.y; do strength += strengths[q.data.index]; while (q = q.next); } quad.value = strength; } function apply(quad, x1, _, x2) { if (!quad.value) return true; var x = quad.x - node.x, y = quad.y - node.y, w = x2 - x1, l = x * x + y * y; // Apply the Barnes-Hut approximation if possible. // Limit forces for very close nodes; randomize direction if coincident. if (w * w / theta2 < l) { if (l < distanceMax2) { if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += x * x; if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += y * y; if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); node.vx += x * quad.value * alpha / l; node.vy += y * quad.value * alpha / l; } return true; } // Otherwise, process points directly. else if (quad.length || l >= distanceMax2) return; // Limit forces for very close nodes; randomize direction if coincident. if (quad.data !== node || quad.next) { if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += x * x; if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += y * y; if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); } do if (quad.data !== node) { w = strengths[quad.data.index] * alpha / l; node.vx += x * w; node.vy += y * w; } while (quad = quad.next); } force.initialize = function(_nodes, _random) { nodes = _nodes; random = _random; initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), initialize(), force) : strength; }; force.distanceMin = function(_) { return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); }; force.distanceMax = function(_) { return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); }; force.theta = function(_) { return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); }; return force; }); /***/ }), /***/ "ZQwz": /*!******************************************!*\ !*** ./node_modules/d3-shape/src/arc.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "CYYh"); function arcInnerRadius(d) { return d.innerRadius; } function arcOuterRadius(d) { return d.outerRadius; } function arcStartAngle(d) { return d.startAngle; } function arcEndAngle(d) { return d.endAngle; } function arcPadAngle(d) { return d && d.padAngle; // Note: optional! } function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10; if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return; t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; return [x0 + t * x10, y0 + t * y10]; } // Compute perpendicular offset line of length rc. // http://mathworld.wolfram.com/Circle-LineIntersection.html function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["max"])(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00; // Pick the closer of the two intersection points. // TODO Is there a faster way to determine which intersection to use? if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; return { cx: cx0, cy: cy0, x01: -ox, y01: -oy, x11: cx0 * (r1 / r - 1), y11: cy0 * (r1 / r - 1) }; } /* harmony default export */ __webpack_exports__["default"] = (function() { var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null; function arc() { var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(a1 - a0), cw = a1 > a0; if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); // Ensure that the outer radius is always larger than the inner radius. if (r1 < r0) r = r1, r1 = r0, r0 = r; // Is it a point? if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(0, 0); // Or is it a circle or annulus? else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a0)); context.arc(0, 0, r1, a0, a1, !cw); if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a1)); context.arc(0, 0, r0, a1, a0, cw); } } // Or is it a circular or annular sector? else { var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(r0 * r0 + r1 * r1)), rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1; // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)), p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)); if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; else da0 = 0, a00 = a10 = (a0 + a1) / 2; if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; else da1 = 0, a01 = a11 = (a0 + a1) / 2; } var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a01), y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a01), x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a10), y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a10); // Apply rounded corners? if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a11), y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a11), x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a00), y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a00), oc; // Restrict the corner radius according to the sector angle. if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(bx * bx + by * by))) / 2), lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(oc[0] * oc[0] + oc[1] * oc[1]); rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r0 - lc) / (kc - 1)); rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r1 - lc) / (kc + 1)); } } // Is the sector collapsed to a line? if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(x01, y01); // Does the sector’s outer ring have rounded corners? else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged? if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring. else { context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw); context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); } } // Or is the outer ring just a circular arc? else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); // Is there no inner ring, and it’s a circular sector? // Or perhaps it’s an annular sector collapsed due to padding? if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.lineTo(x10, y10); // Does the sector’s inner ring (or point) have rounded corners? else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged? if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring. else { context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), cw); context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); } } // Or is the inner ring just a circular arc? else context.arc(0, 0, r0, a10, a00, cw); } context.closePath(); if (buffer) return context = null, buffer + "" || null; } arc.centroid = function() { var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] / 2; return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a) * r]; }; arc.innerRadius = function(_) { return arguments.length ? (innerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : innerRadius; }; arc.outerRadius = function(_) { return arguments.length ? (outerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : outerRadius; }; arc.cornerRadius = function(_) { return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : cornerRadius; }; arc.padRadius = function(_) { return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padRadius; }; arc.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : startAngle; }; arc.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : endAngle; }; arc.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padAngle; }; arc.context = function(_) { return arguments.length ? ((context = _ == null ? null : _), arc) : context; }; return arc; }); /***/ }), /***/ "ZRP+": /*!********************************************!*\ !*** ./node_modules/d3-ease/src/linear.js ***! \********************************************/ /*! exports provided: linear */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; }); const linear = t => +t; /***/ }), /***/ "ZUHj": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js ***! \***********************************************************************/ /*! exports provided: subscribeToResult */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; }); /* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../InnerSubscriber */ "51Dv"); /* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeTo */ "SeVD"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "HDdC"); function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex)) { if (innerSubscriber.closed) { return undefined; } if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) { return result.subscribe(innerSubscriber); } return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(innerSubscriber); } //# sourceMappingURL=subscribeToResult.js.map /***/ }), /***/ "ZtE7": /*!*******************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/colors.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(specifier) { var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); return colors; }); /***/ }), /***/ "Zy1z": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/pairwise.js ***! \*******************************************************************/ /*! exports provided: pairwise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function pairwise() { return (source) => source.lift(new PairwiseOperator()); } class PairwiseOperator { call(subscriber, source) { return source.subscribe(new PairwiseSubscriber(subscriber)); } } class PairwiseSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); this.hasPrev = false; } _next(value) { let pair; if (this.hasPrev) { pair = [this.prev, value]; } else { this.hasPrev = true; } this.prev = value; if (pair) { this.destination.next(pair); } } } //# sourceMappingURL=pairwise.js.map /***/ }), /***/ "Zyez": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js ***! \************************************************************************/ /*! exports provided: sequenceEqual, SequenceEqualOperator, SequenceEqualSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function sequenceEqual(compareTo, comparator) { return (source) => source.lift(new SequenceEqualOperator(compareTo, comparator)); } class SequenceEqualOperator { constructor(compareTo, comparator) { this.compareTo = compareTo; this.comparator = comparator; } call(subscriber, source) { return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator)); } } class SequenceEqualSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, compareTo, comparator) { super(destination); this.compareTo = compareTo; this.comparator = comparator; this._a = []; this._b = []; this._oneComplete = false; this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, this))); } _next(value) { if (this._oneComplete && this._b.length === 0) { this.emit(false); } else { this._a.push(value); this.checkValues(); } } _complete() { if (this._oneComplete) { this.emit(this._a.length === 0 && this._b.length === 0); } else { this._oneComplete = true; } this.unsubscribe(); } checkValues() { const { _a, _b, comparator } = this; while (_a.length > 0 && _b.length > 0) { let a = _a.shift(); let b = _b.shift(); let areEqual = false; try { areEqual = comparator ? comparator(a, b) : a === b; } catch (e) { this.destination.error(e); } if (!areEqual) { this.emit(false); } } } emit(value) { const { destination } = this; destination.next(value); destination.complete(); } nextB(value) { if (this._oneComplete && this._a.length === 0) { this.emit(false); } else { this._b.push(value); this.checkValues(); } } completeB() { if (this._oneComplete) { this.emit(this._a.length === 0 && this._b.length === 0); } else { this._oneComplete = true; } } } class SequenceEqualCompareToSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, parent) { super(destination); this.parent = parent; } _next(value) { this.parent.nextB(value); } _error(err) { this.parent.error(err); this.unsubscribe(); } _complete() { this.parent.completeB(); this.unsubscribe(); } } //# sourceMappingURL=sequenceEqual.js.map /***/ }), /***/ "ZzDG": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/array.js ***! \**************************************************/ /*! exports provided: default, genericArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genericArray", function() { return genericArray; }); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ "Ud7J"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__["default"] : genericArray)(a, b); }); function genericArray(a, b) { var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i; for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[i], b[i]); for (; i < nb; ++i) c[i] = b[i]; return function(t) { for (i = 0; i < na; ++i) c[i] = x[i](t); return c; }; } /***/ }), /***/ "a7t3": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js ***! \************************************************************************/ /*! exports provided: subscribeToPromise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; }); /* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hostReportError */ "NJ4a"); const subscribeToPromise = (promise) => (subscriber) => { promise.then((value) => { if (!subscriber.closed) { subscriber.next(value); subscriber.complete(); } }, (err) => subscriber.error(err)) .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]); return subscriber; }; //# sourceMappingURL=subscribeToPromise.js.map /***/ }), /***/ "a8tM": /*!**********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/index.js ***! \**********************************************************/ /*! exports provided: default, computeHeight, Node */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hierarchy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeHeight", function() { return computeHeight; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; }); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.js */ "3pBD"); /* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each.js */ "6x6I"); /* harmony import */ var _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore.js */ "PYcf"); /* harmony import */ var _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter.js */ "njJa"); /* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ "mfBI"); /* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sum.js */ "bJAQ"); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sort.js */ "umZI"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./path.js */ "J27/"); /* harmony import */ var _ancestors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ancestors.js */ "S/r+"); /* harmony import */ var _descendants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./descendants.js */ "+Tjx"); /* harmony import */ var _leaves_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./leaves.js */ "v/rI"); /* harmony import */ var _links_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./links.js */ "SgsU"); /* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./iterator.js */ "yE6J"); function hierarchy(data, children) { if (data instanceof Map) { data = [undefined, data]; if (children === undefined) children = mapChildren; } else if (children === undefined) { children = objectChildren; } var root = new Node(data), node, nodes = [root], child, childs, i, n; while (node = nodes.pop()) { if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) { node.children = childs; for (i = n - 1; i >= 0; --i) { nodes.push(child = childs[i] = new Node(childs[i])); child.parent = node; child.depth = node.depth + 1; } } } return root.eachBefore(computeHeight); } function node_copy() { return hierarchy(this).eachBefore(copyData); } function objectChildren(d) { return d.children; } function mapChildren(d) { return Array.isArray(d) ? d[1] : null; } function copyData(node) { if (node.data.value !== undefined) node.value = node.data.value; node.data = node.data.data; } function computeHeight(node) { var height = 0; do node.height = height; while ((node = node.parent) && (node.height < ++height)); } function Node(data) { this.data = data; this.depth = this.height = 0; this.parent = null; } Node.prototype = hierarchy.prototype = { constructor: Node, count: _count_js__WEBPACK_IMPORTED_MODULE_0__["default"], each: _each_js__WEBPACK_IMPORTED_MODULE_1__["default"], eachAfter: _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__["default"], eachBefore: _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__["default"], find: _find_js__WEBPACK_IMPORTED_MODULE_4__["default"], sum: _sum_js__WEBPACK_IMPORTED_MODULE_5__["default"], sort: _sort_js__WEBPACK_IMPORTED_MODULE_6__["default"], path: _path_js__WEBPACK_IMPORTED_MODULE_7__["default"], ancestors: _ancestors_js__WEBPACK_IMPORTED_MODULE_8__["default"], descendants: _descendants_js__WEBPACK_IMPORTED_MODULE_9__["default"], leaves: _leaves_js__WEBPACK_IMPORTED_MODULE_10__["default"], links: _links_js__WEBPACK_IMPORTED_MODULE_11__["default"], copy: node_copy, [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_12__["default"] }; /***/ }), /***/ "aGrj": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMapTo.js ***! \**********************************************************************/ /*! exports provided: switchMapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; }); /* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "eIep"); function switchMapTo(innerObservable, resultSelector) { return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(() => innerObservable, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(() => innerObservable); } //# sourceMappingURL=switchMapTo.js.map /***/ }), /***/ "aNk7": /*!*********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/on.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function start(name) { return (name + "").trim().split(/^|\s+/).every(function(t) { var i = t.indexOf("."); if (i >= 0) t = t.slice(0, i); return !t || t === "start"; }); } function onFunction(id, name, listener) { var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"]; return function() { var schedule = sit(this, id), on = schedule.on; // If this node shared a dispatch with the previous node, // just assign the updated shared dispatch and we’re done! // Otherwise, copy-on-write. if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); schedule.on = on1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, listener) { var id = this._id; return arguments.length < 2 ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener)); }); /***/ }), /***/ "aR9J": /*!*************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/stereographic.js ***! \*************************************************************/ /*! exports provided: stereographicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stereographicRaw", function() { return stereographicRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function stereographicRaw(x, y) { var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = 1 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; } stereographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(z); }); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(stereographicRaw) .scale(250) .clipAngle(142); }); /***/ }), /***/ "aY1w": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/sparse.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(update) { return new Array(update.length); }); /***/ }), /***/ "aj5g": /*!*********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/albersUsa.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _albers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers.js */ "iQWy"); /* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea.js */ "nVu6"); /* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "XAaG"); // The projections must have mutually exclusive clip regions on the sphere, // as this will avoid emitting interleaving lines and polygons. function multiplex(streams) { var n = streams.length; return { point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); }, sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); }, lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); }, lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); }, polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); }, polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); } }; } // A composite projection for the United States, configured by default for // 960×500. The projection also works quite well at 960×600 if you change the // scale to 1285 and adjust the translate accordingly. The set of standard // parallels for each region comes from USGS, which is published here: // http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers /* harmony default export */ __webpack_exports__["default"] = (function() { var cache, cacheStream, lower48 = Object(_albers_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), lower48Point, alaska = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338 hawaii = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007 point, pointStream = {point: function(x, y) { point = [x, y]; }}; function albersUsa(coordinates) { var x = coordinates[0], y = coordinates[1]; return point = null, (lower48Point.point(x, y), point) || (alaskaPoint.point(x, y), point) || (hawaiiPoint.point(x, y), point); } albersUsa.invert = function(coordinates) { var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k; return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii : lower48).invert(coordinates); }; albersUsa.stream = function(stream) { return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]); }; albersUsa.precision = function(_) { if (!arguments.length) return lower48.precision(); lower48.precision(_), alaska.precision(_), hawaii.precision(_); return reset(); }; albersUsa.scale = function(_) { if (!arguments.length) return lower48.scale(); lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_); return albersUsa.translate(lower48.translate()); }; albersUsa.translate = function(_) { if (!arguments.length) return lower48.translate(); var k = lower48.scale(), x = +_[0], y = +_[1]; lower48Point = lower48 .translate(_) .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]) .stream(pointStream); alaskaPoint = alaska .translate([x - 0.307 * k, y + 0.201 * k]) .clipExtent([[x - 0.425 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.120 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.214 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) .stream(pointStream); hawaiiPoint = hawaii .translate([x - 0.205 * k, y + 0.212 * k]) .clipExtent([[x - 0.214 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.166 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.115 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) .stream(pointStream); return reset(); }; albersUsa.fitExtent = function(extent, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(albersUsa, extent, object); }; albersUsa.fitSize = function(size, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(albersUsa, size, object); }; albersUsa.fitWidth = function(width, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(albersUsa, width, object); }; albersUsa.fitHeight = function(height, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(albersUsa, height, object); }; function reset() { cache = cacheStream = null; return albersUsa; } return albersUsa.scale(1070); }); /***/ }), /***/ "aw+z": /*!************************************************!*\ !*** ./node_modules/d3-scale/src/threshold.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return threshold; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function threshold() { var domain = [0.5], range = [0, 1], unknown, n = 1; function scale(x) { return x != null && x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; } scale.domain = function(_) { return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); }; scale.invertExtent = function(y) { var i = range.indexOf(y); return [domain[i - 1], domain[i]]; }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return threshold() .domain(domain) .range(range) .unknown(unknown); }; return _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(scale, arguments); } /***/ }), /***/ "b54z": /*!*********************************************!*\ !*** ./node_modules/d3-random/src/gamma.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal.js */ "ptze"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomGamma(source) { var randomNormal = _normal_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source)(); function randomGamma(k, theta) { if ((k = +k) < 0) throw new RangeError("invalid k"); // degenerate distribution if k === 0 if (k === 0) return () => 0; theta = theta == null ? 1 : +theta; // exponential distribution if k === 1 if (k === 1) return () => -Math.log1p(-source()) * theta; var d = (k < 1 ? k + 1 : k) - 1 / 3, c = 1 / (3 * Math.sqrt(d)), multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1; return function() { do { do { var x = randomNormal(), v = 1 + c * x; } while (v <= 0); v *= v * v; var u = 1 - source(); } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v))); return d * v * multiplier() * theta; }; } randomGamma.source = sourceRandomGamma; return randomGamma; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "b9Oj": /*!***************************************************!*\ !*** ./node_modules/d3-selection/src/selector.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function none() {} /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return selector == null ? none : function() { return this.querySelector(selector); }; }); /***/ }), /***/ "bBIG": /*!*******************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/selectChildren.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ "Cnj1"); var filter = Array.prototype.filter; function children() { return this.children; } function childrenFilter(match) { return function() { return filter.call(this.children, match); }; } /* harmony default export */ __webpack_exports__["default"] = (function(match) { return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__["childMatcher"])(match))); }); /***/ }), /***/ "bHdf": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js ***! \*******************************************************************/ /*! exports provided: mergeAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; }); /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function mergeAll(concurrent = Number.POSITIVE_INFINITY) { return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent); } //# sourceMappingURL=mergeAll.js.map /***/ }), /***/ "bJAQ": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/sum.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(value) { return this.eachAfter(function(node) { var sum = +value(node.data) || 0, children = node.children, i = children && children.length; while (--i >= 0) sum += children[i].value; node.value = sum; }); }); /***/ }), /***/ "bN2o": /*!*****************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conic.js ***! \*****************************************************/ /*! exports provided: conicProjection */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicProjection", function() { return conicProjection; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "1ibS"); function conicProjection(projectAt) { var phi0 = 0, phi1 = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 3, m = Object(_index_js__WEBPACK_IMPORTED_MODULE_1__["projectionMutator"])(projectAt), p = m(phi0, phi1); p.parallels = function(_) { return arguments.length ? m(phi0 = _[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi1 = _[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]) : [phi0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], phi1 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; }; return p; } /***/ }), /***/ "bNSl": /*!****************************************************!*\ !*** ./node_modules/d3-selection/src/namespace.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces.js */ "4xGt"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { var prefix = name += "", i = prefix.indexOf(":"); if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); return _namespaces_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProperty(prefix) ? {space: _namespaces_js__WEBPACK_IMPORTED_MODULE_0__["default"][prefix], local: name} : name; // eslint-disable-line no-prototype-builtins }); /***/ }), /***/ "bOdf": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMap.js ***! \********************************************************************/ /*! exports provided: concatMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; }); /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); function concatMap(project, resultSelector) { return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1); } //# sourceMappingURL=concatMap.js.map /***/ }), /***/ "bUA0": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/identity.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle.js */ "F2eR"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity.js */ "IYKK"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "t9E6"); /* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "XAaG"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (function() { var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect alpha = 0, ca, sa, // angle x0 = null, y0, x1, y1, // clip extent kx = 1, ky = 1, transform = Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ point: function(x, y) { var p = projection([x, y]) this.stream.point(p[0], p[1]); } }), postclip = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], cache, cacheStream; function reset() { kx = k * sx; ky = k * sy; cache = cacheStream = null; return projection; } function projection (p) { var x = p[0] * kx, y = p[1] * ky; if (alpha) { var t = y * ca - x * sa; x = x * ca + y * sa; y = t; } return [x + tx, y + ty]; } projection.invert = function(p) { var x = p[0] - tx, y = p[1] - ty; if (alpha) { var t = y * ca + x * sa; x = x * ca - y * sa; y = t; } return [x / kx, y / ky]; }; projection.stream = function(stream) { return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream)); }; projection.postclip = function(_) { return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; }; projection.clipExtent = function(_) { return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; }; projection.scale = function(_) { return arguments.length ? (k = +_, reset()) : k; }; projection.translate = function(_) { return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty]; } projection.angle = function(_) { return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_4__["radians"], sa = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__["sin"])(alpha), ca = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__["cos"])(alpha), reset()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_4__["degrees"]; }; projection.reflectX = function(_) { return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0; }; projection.reflectY = function(_) { return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0; }; projection.fitExtent = function(extent, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(projection, extent, object); }; projection.fitSize = function(size, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(projection, size, object); }; projection.fitWidth = function(width, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(projection, width, object); }; projection.fitHeight = function(height, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(projection, height, object); }; return projection; }); /***/ }), /***/ "bcaG": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/nice.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nice; }); function nice(domain, interval) { domain = domain.slice(); var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], t; if (x1 < x0) { t = i0, i0 = i1, i1 = t; t = x0, x0 = x1, x1 = t; } domain[i0] = interval.floor(x0); domain[i1] = interval.ceil(x1); return domain; } /***/ }), /***/ "brLB": /*!********************************************!*\ !*** ./node_modules/d3-time/src/utcDay.js ***! \********************************************/ /*! exports provided: default, utcDays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return utcDays; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCDate(date.getUTCDate() + step); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"]; }, function(date) { return date.getUTCDate() - 1; }); /* harmony default export */ __webpack_exports__["default"] = (utcDay); var utcDays = utcDay.range; /***/ }), /***/ "c2HN": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isPromise.js ***! \***************************************************************/ /*! exports provided: isPromise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; }); function isPromise(value) { return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; } //# sourceMappingURL=isPromise.js.map /***/ }), /***/ "c6ID": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/sample.js ***! \*****************************************************************/ /*! exports provided: sample */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function sample(notifier) { return (source) => source.lift(new SampleOperator(notifier)); } class SampleOperator { constructor(notifier) { this.notifier = notifier; } call(subscriber, source) { const sampleSubscriber = new SampleSubscriber(subscriber); const subscription = source.subscribe(sampleSubscriber); subscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](sampleSubscriber))); return subscription; } } class SampleSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor() { super(...arguments); this.hasValue = false; } _next(value) { this.value = value; this.hasValue = true; } notifyNext() { this.emitValue(); } notifyComplete() { this.emitValue(); } emitValue() { if (this.hasValue) { this.hasValue = false; this.destination.next(this.value); } } } //# sourceMappingURL=sample.js.map /***/ }), /***/ "c7jc": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/Immediate.js ***! \***************************************************************/ /*! exports provided: Immediate, TestTools */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestTools", function() { return TestTools; }); let nextHandle = 1; const RESOLVED = (() => Promise.resolve())(); const activeHandles = {}; function findAndClearHandle(handle) { if (handle in activeHandles) { delete activeHandles[handle]; return true; } return false; } const Immediate = { setImmediate(cb) { const handle = nextHandle++; activeHandles[handle] = true; RESOLVED.then(() => findAndClearHandle(handle) && cb()); return handle; }, clearImmediate(handle) { findAndClearHandle(handle); }, }; const TestTools = { pending() { return Object.keys(activeHandles).length; } }; //# sourceMappingURL=Immediate.js.map /***/ }), /***/ "cBqT": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/find.js ***! \***************************************************************/ /*! exports provided: find, FindValueOperator, FindValueSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function find(predicate, thisArg) { if (typeof predicate !== 'function') { throw new TypeError('predicate is not a function'); } return (source) => source.lift(new FindValueOperator(predicate, source, false, thisArg)); } class FindValueOperator { constructor(predicate, source, yieldIndex, thisArg) { this.predicate = predicate; this.source = source; this.yieldIndex = yieldIndex; this.thisArg = thisArg; } call(observer, source) { return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg)); } } class FindValueSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, source, yieldIndex, thisArg) { super(destination); this.predicate = predicate; this.source = source; this.yieldIndex = yieldIndex; this.thisArg = thisArg; this.index = 0; } notifyComplete(value) { const destination = this.destination; destination.next(value); destination.complete(); this.unsubscribe(); } _next(value) { const { predicate, thisArg } = this; const index = this.index++; try { const result = predicate.call(thisArg || this, value, index, this.source); if (result) { this.notifyComplete(this.yieldIndex ? index : value); } } catch (err) { this.destination.error(err); } } _complete() { this.notifyComplete(this.yieldIndex ? -1 : undefined); } } //# sourceMappingURL=find.js.map /***/ }), /***/ "cKk/": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/selection.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); var Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.constructor; /* harmony default export */ __webpack_exports__["default"] = (function() { return new Selection(this._groups, this._parents); }); /***/ }), /***/ "cNgm": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/hsl.js ***! \************************************************/ /*! exports provided: default, hslLong */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslLong", function() { return hslLong; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function hsl(hue) { return function(start, end) { var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(end)).h), s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.h = h(t); start.s = s(t); start.l = l(t); start.opacity = opacity(t); return start + ""; }; } } /* harmony default export */ __webpack_exports__["default"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); var hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "cOGN": /*!**************************************************!*\ !*** ./node_modules/d3-time-format/src/index.js ***! \**************************************************/ /*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "TCOF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcParse"]; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "pZEX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ "v7Le"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ "oMw+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /***/ }), /***/ "cb2h": /*!***************************************************!*\ !*** ./node_modules/d3-interpolate/src/object.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var i = {}, c = {}, k; if (a === null || typeof a !== "object") a = {}; if (b === null || typeof b !== "object") b = {}; for (k in b) { if (k in a) { i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[k], b[k]); } else { c[k] = b[k]; } } return function(t) { for (k in i) c[k] = i[k](t); return c; }; }); /***/ }), /***/ "cdIC": /*!*********************************************!*\ !*** ./node_modules/d3-drag/src/noevent.js ***! \*********************************************/ /*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); function nopropagation(event) { event.stopImmediatePropagation(); } /* harmony default export */ __webpack_exports__["default"] = (function(event) { event.preventDefault(); event.stopImmediatePropagation(); }); /***/ }), /***/ "cmp4": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/quantile.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function quantile() { var domain = [], range = [], thresholds = [], unknown; function rescale() { var i = 0, n = Math.max(1, range.length); thresholds = new Array(n - 1); while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["quantileSorted"])(domain, i / n); return scale; } function scale(x) { return x == null || isNaN(x = +x) ? unknown : range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(thresholds, x)]; } scale.invertExtent = function(y) { var i = range.indexOf(y); return i < 0 ? [NaN, NaN] : [ i > 0 ? thresholds[i - 1] : domain[0], i < thresholds.length ? thresholds[i] : domain[domain.length - 1] ]; }; scale.domain = function(_) { if (!arguments.length) return domain.slice(); domain = []; for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); return rescale(); }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.quantiles = function() { return thresholds.slice(); }; scale.copy = function() { return quantile() .domain(domain) .range(range) .unknown(unknown); }; return _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(scale, arguments); } /***/ }), /***/ "cnUW": /*!****************************************!*\ !*** ./node_modules/d3-force/src/x.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony default export */ __webpack_exports__["default"] = (function(x) { var strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), nodes, strengths, xz; if (typeof x !== "function") x = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x == null ? 0 : +x); function force(alpha) { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; } } function initialize() { if (!nodes) return; var i, n = nodes.length; strengths = new Array(n); xz = new Array(n); for (i = 0; i < n; ++i) { strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); } } force.initialize = function(_) { nodes = _; initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; }; force.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : x; }; return force; }); /***/ }), /***/ "coGc": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/delayWhen.js ***! \********************************************************************/ /*! exports provided: delayWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function delayWhen(delayDurationSelector, subscriptionDelay) { if (subscriptionDelay) { return (source) => new SubscriptionDelayObservable(source, subscriptionDelay) .lift(new DelayWhenOperator(delayDurationSelector)); } return (source) => source.lift(new DelayWhenOperator(delayDurationSelector)); } class DelayWhenOperator { constructor(delayDurationSelector) { this.delayDurationSelector = delayDurationSelector; } call(subscriber, source) { return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector)); } } class DelayWhenSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, delayDurationSelector) { super(destination); this.delayDurationSelector = delayDurationSelector; this.completed = false; this.delayNotifierSubscriptions = []; this.index = 0; } notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) { this.destination.next(outerValue); this.removeSubscription(innerSub); this.tryComplete(); } notifyError(error, innerSub) { this._error(error); } notifyComplete(innerSub) { const value = this.removeSubscription(innerSub); if (value) { this.destination.next(value); } this.tryComplete(); } _next(value) { const index = this.index++; try { const delayNotifier = this.delayDurationSelector(value, index); if (delayNotifier) { this.tryDelay(delayNotifier, value); } } catch (err) { this.destination.error(err); } } _complete() { this.completed = true; this.tryComplete(); this.unsubscribe(); } removeSubscription(subscription) { subscription.unsubscribe(); const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription); if (subscriptionIdx !== -1) { this.delayNotifierSubscriptions.splice(subscriptionIdx, 1); } return subscription.outerValue; } tryDelay(delayNotifier, value) { const notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, delayNotifier, value); if (notifierSubscription && !notifierSubscription.closed) { const destination = this.destination; destination.add(notifierSubscription); this.delayNotifierSubscriptions.push(notifierSubscription); } } tryComplete() { if (this.completed && this.delayNotifierSubscriptions.length === 0) { this.destination.complete(); } } } class SubscriptionDelayObservable extends _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"] { constructor(source, subscriptionDelay) { super(); this.source = source; this.subscriptionDelay = subscriptionDelay; } _subscribe(subscriber) { this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source)); } } class SubscriptionDelaySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent, source) { super(); this.parent = parent; this.source = source; this.sourceSubscribed = false; } _next(unused) { this.subscribeToSource(); } _error(err) { this.unsubscribe(); this.parent.error(err); } _complete() { this.unsubscribe(); this.subscribeToSource(); } subscribeToSource() { if (!this.sourceSubscribed) { this.sourceSubscribed = true; this.unsubscribe(); this.source.subscribe(this.parent); } } } //# sourceMappingURL=delayWhen.js.map /***/ }), /***/ "cp0P": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js ***! \********************************************************************/ /*! exports provided: forkJoin */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); /* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isObject */ "XoHu"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./from */ "Cfvw"); function forkJoin(...sources) { if (sources.length === 1) { const first = sources[0]; if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first)) { return forkJoinInternal(first, null); } if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first) && Object.getPrototypeOf(first) === Object.prototype) { const keys = Object.keys(first); return forkJoinInternal(keys.map(key => first[key]), keys); } } if (typeof sources[sources.length - 1] === 'function') { const resultSelector = sources.pop(); sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources; return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])((args) => resultSelector(...args))); } return forkJoinInternal(sources, null); } function forkJoinInternal(sources, keys) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const len = sources.length; if (len === 0) { subscriber.complete(); return; } const values = new Array(len); let completed = 0; let emitted = 0; for (let i = 0; i < len; i++) { const source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]); let hasValue = false; subscriber.add(source.subscribe({ next: value => { if (!hasValue) { hasValue = true; emitted++; } values[i] = value; }, error: err => subscriber.error(err), complete: () => { completed++; if (completed === len || !hasValue) { if (emitted === len) { subscriber.next(keys ? keys.reduce((result, key, i) => (result[key] = values[i], result), {}) : values); } subscriber.complete(); } } })); } }); } //# sourceMappingURL=forkJoin.js.map /***/ }), /***/ "cvkC": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/maxIndex.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return maxIndex; }); function maxIndex(values, valueof) { let max; let maxIndex = -1; let index = -1; if (valueof === undefined) { for (const value of values) { ++index; if (value != null && (max < value || (max === undefined && value >= value))) { max = value, maxIndex = index; } } } else { for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (max < value || (max === undefined && value >= value))) { max = value, maxIndex = index; } } } return maxIndex; } /***/ }), /***/ "cwsO": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/rotation.js ***! \*********************************************/ /*! exports provided: rotateRadians, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateRadians", function() { return rotateRadians; }); /* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ "pbho"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); function rotationIdentity(lambda, phi) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda) > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + Math.round(-lambda / _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) * _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; } rotationIdentity.invert = rotationIdentity; function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { return (deltaLambda %= _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) ? (deltaPhi || deltaGamma ? Object(_compose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) : rotationLambda(deltaLambda)) : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) : rotationIdentity); } function forwardRotationLambda(deltaLambda) { return function(lambda, phi) { return lambda += deltaLambda, [lambda > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda - _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda < -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; }; } function rotationLambda(deltaLambda) { var rotation = forwardRotationLambda(deltaLambda); rotation.invert = forwardRotationLambda(-deltaLambda); return rotation; } function rotationPhiGamma(deltaPhi, deltaGamma) { var cosDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaPhi), sinDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaPhi), cosDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaGamma), sinDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaGamma); function rotation(lambda, phi) { var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), k = z * cosDeltaPhi + x * sinDeltaPhi; return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaGamma + y * sinDeltaGamma) ]; } rotation.invert = function(lambda, phi) { var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), k = z * cosDeltaGamma - y * sinDeltaGamma; return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaPhi - x * sinDeltaPhi) ]; }; return rotation; } /* harmony default export */ __webpack_exports__["default"] = (function(rotate) { rotate = rotateRadians(rotate[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate.length > 2 ? rotate[2] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"] : 0); function forward(coordinates) { coordinates = rotate(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; } forward.invert = function(coordinates) { coordinates = rotate.invert(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; }; return forward; }); /***/ }), /***/ "cx9U": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/single.js ***! \*****************************************************************/ /*! exports provided: single */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); function single(predicate) { return (source) => source.lift(new SingleOperator(predicate, source)); } class SingleOperator { constructor(predicate, source) { this.predicate = predicate; this.source = source; } call(subscriber, source) { return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source)); } } class SingleSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, source) { super(destination); this.predicate = predicate; this.source = source; this.seenValue = false; this.index = 0; } applySingleValue(value) { if (this.seenValue) { this.destination.error('Sequence contains more than one element'); } else { this.seenValue = true; this.singleValue = value; } } _next(value) { const index = this.index++; if (this.predicate) { this.tryNext(value, index); } else { this.applySingleValue(value); } } tryNext(value, index) { try { if (this.predicate(value, index, this.source)) { this.applySingleValue(value); } } catch (err) { this.destination.error(err); } } _complete() { const destination = this.destination; if (this.index > 0) { destination.next(this.seenValue ? this.singleValue : undefined); destination.complete(); } else { destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]); } } } //# sourceMappingURL=single.js.map /***/ }), /***/ "cyYV": /*!************************************************!*\ !*** ./node_modules/d3-array/src/transpose.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min.js */ "mrVq"); /* harmony default export */ __webpack_exports__["default"] = (function(matrix) { if (!(n = matrix.length)) return []; for (var i = -1, m = Object(_min_js__WEBPACK_IMPORTED_MODULE_0__["default"])(matrix, length), transpose = new Array(m); ++i < m;) { for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { row[j] = matrix[j][i]; } } return transpose; }); function length(d) { return d.length; } /***/ }), /***/ "d4SJ": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/curve/bundle.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "jICm"); function Bundle(context, beta) { this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context); this._beta = beta; } Bundle.prototype = { lineStart: function() { this._x = []; this._y = []; this._basis.lineStart(); }, lineEnd: function() { var x = this._x, y = this._y, j = x.length - 1; if (j > 0) { var x0 = x[0], y0 = y[0], dx = x[j] - x0, dy = y[j] - y0, i = -1, t; while (++i <= j) { t = i / j; this._basis.point( this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) ); } } this._x = this._y = null; this._basis.lineEnd(); }, point: function(x, y) { this._x.push(+x); this._y.push(+y); } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(beta) { function bundle(context) { return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context) : new Bundle(context, beta); } bundle.beta = function(beta) { return custom(+beta); }; return bundle; })(0.85)); /***/ }), /***/ "d5JU": /*!*****************************************************!*\ !*** ./node_modules/d3-shape/src/curve/cardinal.js ***! \*****************************************************/ /*! exports provided: point, Cardinal, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cardinal", function() { return Cardinal; }); function point(that, x, y) { that._context.bezierCurveTo( that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2 ); } function Cardinal(context, tension) { this._context = context; this._k = (1 - tension) / 6; } Cardinal.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: point(this, this._x1, this._y1); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; this._x1 = x, this._y1 = y; break; case 2: this._point = 3; // proceed default: point(this, x, y); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { function cardinal(context) { return new Cardinal(context, tension); } cardinal.tension = function(tension) { return custom(+tension); }; return cardinal; })(0)); /***/ }), /***/ "d65L": /*!*********************************************!*\ !*** ./node_modules/d3-time/src/utcYear.js ***! \*********************************************/ /*! exports provided: default, utcYears */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return utcYears; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCMonth(0, 1); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCFullYear(date.getUTCFullYear() + step); }, function(start, end) { return end.getUTCFullYear() - start.getUTCFullYear(); }, function(date) { return date.getUTCFullYear(); }); // An optimized implementation for this simple case. utcYear.every = function(k) { return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); date.setUTCMonth(0, 1); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCFullYear(date.getUTCFullYear() + step * k); }); }; /* harmony default export */ __webpack_exports__["default"] = (utcYear); var utcYears = utcYear.range; /***/ }), /***/ "dCyY": /*!*****************************************!*\ !*** ./node_modules/d3-time/src/day.js ***! \*****************************************/ /*! exports provided: default, days */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "days", function() { return days; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])( date => date.setHours(0, 0, 0, 0), (date, step) => date.setDate(date.getDate() + step), (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"], date => date.getDate() - 1 ); /* harmony default export */ __webpack_exports__["default"] = (day); var days = day.range; /***/ }), /***/ "dPRQ": /*!********************************************!*\ !*** ./node_modules/d3-timer/src/timer.js ***! \********************************************/ /*! exports provided: now, Timer, timer, timerFlush */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return now; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return timerFlush; }); var frame = 0, // is an animation frame pending? timeout = 0, // is a timeout pending? interval = 0, // are any timers active? pokeDelay = 1000, // how frequently we check for clock skew taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance === "object" && performance.now ? performance : Date, setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; function now() { return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); } function clearNow() { clockNow = 0; } function Timer() { this._call = this._time = this._next = null; } Timer.prototype = timer.prototype = { constructor: Timer, restart: function(callback, delay, time) { if (typeof callback !== "function") throw new TypeError("callback is not a function"); time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); if (!this._next && taskTail !== this) { if (taskTail) taskTail._next = this; else taskHead = this; taskTail = this; } this._call = callback; this._time = time; sleep(); }, stop: function() { if (this._call) { this._call = null; this._time = Infinity; sleep(); } } }; function timer(callback, delay, time) { var t = new Timer; t.restart(callback, delay, time); return t; } function timerFlush() { now(); // Get the current time, if not already set. ++frame; // Pretend we’ve set an alarm, if we haven’t already. var t = taskHead, e; while (t) { if ((e = clockNow - t._time) >= 0) t._call.call(null, e); t = t._next; } --frame; } function wake() { clockNow = (clockLast = clock.now()) + clockSkew; frame = timeout = 0; try { timerFlush(); } finally { frame = 0; nap(); clockNow = 0; } } function poke() { var now = clock.now(), delay = now - clockLast; if (delay > pokeDelay) clockSkew -= delay, clockLast = now; } function nap() { var t0, t1 = taskHead, t2, time = Infinity; while (t1) { if (t1._call) { if (time > t1._time) time = t1._time; t0 = t1, t1 = t1._next; } else { t2 = t1._next, t1._next = null; t1 = t0 ? t0._next = t2 : taskHead = t2; } } taskTail = t0; sleep(time); } function sleep(time) { if (frame) return; // Soonest alarm already set, or will be. if (timeout) timeout = clearTimeout(timeout); var delay = time - clockNow; // Strictly less than if we recomputed clockNow. if (delay > 24) { if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); if (interval) interval = clearInterval(interval); } else { if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); frame = 1, setFrame(wake); } } /***/ }), /***/ "dW/k": /*!*****************************************************!*\ !*** ./node_modules/d3-transition/src/interrupt.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function(node, name) { var schedules = node.__transition, schedule, active, empty = true, i; if (!schedules) return; name = name == null ? null : name + ""; for (i in schedules) { if ((schedule = schedules[i]).name !== name) { empty = false; continue; } active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["STARTING"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDING"]; schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDED"]; schedule.timer.stop(); schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group); delete schedules[i]; } if (empty) delete node.__transition; }); /***/ }), /***/ "dg0l": /*!*********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/azimuthal.js ***! \*********************************************************/ /*! exports provided: azimuthalRaw, azimuthalInvert */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalRaw", function() { return azimuthalRaw; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalInvert", function() { return azimuthalInvert; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); function azimuthalRaw(scale) { return function(x, y) { var cx = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x), cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = scale(cx * cy); if (k === Infinity) return [2, 0]; return [ k * cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), k * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) ]; } } function azimuthalInvert(angle) { return function(x, y) { var z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y), c = angle(z), sc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c), cc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(c); return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x * sc, z * cc), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z && y * sc / z) ]; } } /***/ }), /***/ "dkDA": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/materialize.js ***! \**********************************************************************/ /*! exports provided: materialize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Notification */ "WMd4"); function materialize() { return function materializeOperatorFunction(source) { return source.lift(new MaterializeOperator()); }; } class MaterializeOperator { call(subscriber, source) { return source.subscribe(new MaterializeSubscriber(subscriber)); } } class MaterializeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); } _next(value) { this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createNext(value)); } _error(err) { const destination = this.destination; destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createError(err)); destination.complete(); } _complete() { const destination = this.destination; destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createComplete()); destination.complete(); } } //# sourceMappingURL=materialize.js.map /***/ }), /***/ "e94d": /*!***********************************************!*\ !*** ./node_modules/d3-random/src/weibull.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomWeibull(source) { function randomWeibull(k, a, b) { var outerFunc; if ((k = +k) === 0) { outerFunc = x => -Math.log(x); } else { k = 1 / k; outerFunc = x => Math.pow(x, k); } a = a == null ? 0 : +a; b = b == null ? 1 : +b; return function() { return a + b * outerFunc(-Math.log1p(-source())); }; } randomWeibull.source = sourceRandomWeibull; return randomWeibull; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "e9ab": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/curve/step.js ***! \*************************************************/ /*! exports provided: default, stepBefore, stepAfter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepBefore", function() { return stepBefore; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepAfter", function() { return stepAfter; }); function Step(context, t) { this._context = context; this._t = t; } Step.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = this._y = NaN; this._point = 0; }, lineEnd: function() { if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; // proceed default: { if (this._t <= 0) { this._context.lineTo(this._x, y); this._context.lineTo(x, y); } else { var x1 = this._x * (1 - this._t) + x * this._t; this._context.lineTo(x1, this._y); this._context.lineTo(x1, y); } break; } } this._x = x, this._y = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Step(context, 0.5); }); function stepBefore(context) { return new Step(context, 0); } function stepAfter(context) { return new Step(context, 1); } /***/ }), /***/ "eIep": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMap.js ***! \********************************************************************/ /*! exports provided: switchMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function switchMap(project, resultSelector) { if (typeof resultSelector === 'function') { return (source) => source.pipe(switchMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))))); } return (source) => source.lift(new SwitchMapOperator(project)); } class SwitchMapOperator { constructor(project) { this.project = project; } call(subscriber, source) { return source.subscribe(new SwitchMapSubscriber(subscriber, this.project)); } } class SwitchMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, project) { super(destination); this.project = project; this.index = 0; } _next(value) { let result; const index = this.index++; try { result = this.project(value, index); } catch (error) { this.destination.error(error); return; } this._innerSub(result); } _innerSub(result) { const innerSubscription = this.innerSubscription; if (innerSubscription) { innerSubscription.unsubscribe(); } const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); this.innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber); if (this.innerSubscription !== innerSubscriber) { destination.add(this.innerSubscription); } } _complete() { const { innerSubscription } = this; if (!innerSubscription || innerSubscription.closed) { super._complete(); } this.unsubscribe(); } _unsubscribe() { this.innerSubscription = undefined; } notifyComplete() { this.innerSubscription = undefined; if (this.isStopped) { super._complete(); } } notifyNext(innerValue) { this.destination.next(innerValue); } } //# sourceMappingURL=switchMap.js.map /***/ }), /***/ "eJvb": /*!******************************************!*\ !*** ./node_modules/d3-scale/src/pow.js ***! \******************************************/ /*! exports provided: powish, default, sqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "powish", function() { return powish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function transformPow(exponent) { return function(x) { return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); }; } function transformSqrt(x) { return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); } function transformSquare(x) { return x < 0 ? -x * x : x * x; } function powish(transform) { var scale = transform(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"]), exponent = 1; function rescale() { return exponent === 1 ? transform(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"]) : exponent === 0.5 ? transform(transformSqrt, transformSquare) : transform(transformPow(exponent), transformPow(1 / exponent)); } scale.exponent = function(_) { return arguments.length ? (exponent = +_, rescale()) : exponent; }; return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); } function pow() { var scale = powish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, pow()).exponent(scale.exponent()); }; _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); return scale; } function sqrt() { return pow.apply(null, arguments).exponent(0.5); } /***/ }), /***/ "eNwd": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js ***! \*************************************************************************/ /*! exports provided: animationFrameScheduler, animationFrame */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return animationFrameScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; }); /* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AnimationFrameAction */ "Vpsf"); /* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnimationFrameScheduler */ "znLP"); const animationFrameScheduler = new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]); const animationFrame = animationFrameScheduler; //# sourceMappingURL=animationFrame.js.map /***/ }), /***/ "eTLM": /*!***************************************************!*\ !*** ./node_modules/d3-random/src/exponential.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomExponential(source) { function randomExponential(lambda) { return function() { return -Math.log1p(-source()) / lambda; }; } randomExponential.source = sourceRandomExponential; return randomExponential; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "eW2m": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e7e1efc994c7dd1c77", "f1eef6d7b5d8df65b0ce1256", "f1eef6d7b5d8df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "ezys": /*!*********************************************!*\ !*** ./node_modules/d3-polygon/src/hull.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross.js */ "MLOY"); function lexicographicOrder(a, b) { return a[0] - b[0] || a[1] - b[1]; } // Computes the upper convex hull per the monotone chain algorithm. // Assumes points.length >= 3, is sorted by x, unique in y. // Returns an array of indices into points in left-to-right order. function computeUpperHullIndexes(points) { const n = points.length, indexes = [0, 1]; let size = 2, i; for (i = 2; i < n; ++i) { while (size > 1 && Object(_cross_js__WEBPACK_IMPORTED_MODULE_0__["default"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size; indexes[size++] = i; } return indexes.slice(0, size); // remove popped points } /* harmony default export */ __webpack_exports__["default"] = (function(points) { if ((n = points.length) < 3) return null; var i, n, sortedPoints = new Array(n), flippedPoints = new Array(n); for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i]; sortedPoints.sort(lexicographicOrder); for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]]; var upperIndexes = computeUpperHullIndexes(sortedPoints), lowerIndexes = computeUpperHullIndexes(flippedPoints); // Construct the hull polygon, removing possible duplicate endpoints. var skipLeft = lowerIndexes[0] === upperIndexes[0], skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1], hull = []; // Add upper hull in right-to-l order. // Then add lower hull in left-to-right order. for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]); for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]); return hull; }); /***/ }), /***/ "f29J": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concat.js ***! \*****************************************************************/ /*! exports provided: concat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; }); /* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); function concat(...observables) { return (source) => source.lift.call(Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, ...observables)); } //# sourceMappingURL=concat.js.map /***/ }), /***/ "f4CH": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/quantize.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantize; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function quantize() { var x0 = 0, x1 = 1, n = 1, domain = [0.5], range = [0, 1], unknown; function scale(x) { return x != null && x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; } function rescale() { var i = -1; domain = new Array(n); while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); return scale; } scale.domain = function(_) { return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1]; }; scale.range = function(_) { return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice(); }; scale.invertExtent = function(y) { var i = range.indexOf(y); return i < 0 ? [NaN, NaN] : i < 1 ? [x0, domain[0]] : i >= n ? [domain[n - 1], x1] : [domain[i - 1], domain[i]]; }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : scale; }; scale.thresholds = function() { return domain.slice(); }; scale.copy = function() { return quantize() .domain([x0, x1]) .range(range) .unknown(unknown); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(Object(_linear_js__WEBPACK_IMPORTED_MODULE_1__["linearish"])(scale), arguments); } /***/ }), /***/ "fAVw": /*!********************************************!*\ !*** ./node_modules/d3-array/src/union.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return union; }); function union(...others) { const set = new Set(); for (const other of others) { for (const o of other) { set.add(o); } } return set; } /***/ }), /***/ "fFD9": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/combineLatest.js ***! \************************************************************************/ /*! exports provided: combineLatest */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/combineLatest */ "itXk"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); const none = {}; function combineLatest(...observables) { let project = null; if (typeof observables[observables.length - 1] === 'function') { project = observables.pop(); } if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { observables = observables[0].slice(); } return (source) => source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source, ...observables]), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); } //# sourceMappingURL=combineLatest.js.map /***/ }), /***/ "fXoL": /*!******************************************************************!*\ !*** ./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js ***! \******************************************************************/ /*! exports provided: ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0, ɵALLOW_MULTIPLE_PLATFORMS, ɵAPP_ID_RANDOM_PROVIDER, ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__, ɵChangeDetectorStatus, ɵCodegenComponentFactoryResolver, ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, ɵCompiler_compileModuleAsync__POST_R3__, ɵCompiler_compileModuleSync__POST_R3__, ɵComponentFactory, ɵConsole, ɵDEFAULT_LOCALE_ID, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵINJECTOR_IMPL__POST_R3__, ɵINJECTOR_SCOPE, ɵLifecycleHooksFeature, ɵLocaleDataIndex, ɵNG_COMP_DEF, ɵNG_DIR_DEF, ɵNG_ELEMENT_ID, ɵNG_INJ_DEF, ɵNG_MOD_DEF, ɵNG_PIPE_DEF, ɵNG_PROV_DEF, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ɵNO_CHANGE, ɵNgModuleFactory, ɵNoopNgZone, ɵReflectionCapabilities, ɵRender3ComponentFactory, ɵRender3ComponentRef, ɵRender3NgModuleRef, ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, ɵSWITCH_COMPILE_COMPONENT__POST_R3__, ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, ɵSWITCH_COMPILE_NGMODULE__POST_R3__, ɵSWITCH_COMPILE_PIPE__POST_R3__, ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, ɵSWITCH_IVY_ENABLED__POST_R3__, ɵSWITCH_RENDERER2_FACTORY__POST_R3__, ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, ɵ_sanitizeHtml, ɵ_sanitizeUrl, ɵallowSanitizationBypassAndThrow, ɵand, ɵangular_packages_core_core_a, ɵangular_packages_core_core_b, ɵangular_packages_core_core_ba, ɵangular_packages_core_core_bb, ɵangular_packages_core_core_bc, ɵangular_packages_core_core_bd, ɵangular_packages_core_core_be, ɵangular_packages_core_core_bf, ɵangular_packages_core_core_bg, ɵangular_packages_core_core_bh, ɵangular_packages_core_core_bi, ɵangular_packages_core_core_bj, ɵangular_packages_core_core_bl, ɵangular_packages_core_core_bm, ɵangular_packages_core_core_bn, ɵangular_packages_core_core_bo, ɵangular_packages_core_core_bp, ɵangular_packages_core_core_bq, ɵangular_packages_core_core_br, ɵangular_packages_core_core_bs, ɵangular_packages_core_core_bv, ɵangular_packages_core_core_bw, ɵangular_packages_core_core_bx, ɵangular_packages_core_core_bz, ɵangular_packages_core_core_c, ɵangular_packages_core_core_cb, ɵangular_packages_core_core_cc, ɵangular_packages_core_core_d, ɵangular_packages_core_core_e, ɵangular_packages_core_core_f, ɵangular_packages_core_core_g, ɵangular_packages_core_core_h, ɵangular_packages_core_core_i, ɵangular_packages_core_core_j, ɵangular_packages_core_core_k, ɵangular_packages_core_core_l, ɵangular_packages_core_core_m, ɵangular_packages_core_core_n, ɵangular_packages_core_core_o, ɵangular_packages_core_core_p, ɵangular_packages_core_core_q, ɵangular_packages_core_core_r, ɵangular_packages_core_core_s, ɵangular_packages_core_core_t, ɵangular_packages_core_core_u, ɵangular_packages_core_core_v, ɵangular_packages_core_core_w, ɵangular_packages_core_core_x, ɵangular_packages_core_core_y, ɵangular_packages_core_core_z, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustResourceUrl, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustUrl, ɵccf, ɵclearOverrides, ɵclearResolutionOfComponentResourcesQueue, ɵcmf, ɵcompileComponent, ɵcompileDirective, ɵcompileNgModule, ɵcompileNgModuleDefs, ɵcompileNgModuleFactory__POST_R3__, ɵcompilePipe, ɵcreateInjector, ɵcrt, ɵdefaultIterableDiffers, ɵdefaultKeyValueDiffers, ɵdetectChanges, ɵdevModeEqual, ɵdid, ɵeld, ɵfindLocaleData, ɵflushModuleScopingQueueAsMuchAsPossible, ɵgetComponentViewDefinitionFactory, ɵgetDebugNodeR2, ɵgetDebugNode__POST_R3__, ɵgetDirectives, ɵgetHostElement, ɵgetInjectableDef, ɵgetLContext, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, ɵgetModuleFactory__POST_R3__, ɵgetSanitizationBypassType, ɵglobal, ɵinitServicesIfNeeded, ɵinlineInterpolate, ɵinterpolate, ɵisBoundToModule__POST_R3__, ɵisDefaultChangeDetectionStrategy, ɵisListLikeIterable, ɵisObservable, ɵisPromise, ɵisSubscribable, ɵivyEnabled, ɵmakeDecorator, ɵmarkDirty, ɵmod, ɵmpd, ɵncd, ɵnoSideEffects, ɵnov, ɵoverrideComponentView, ɵoverrideProvider, ɵpad, ɵpatchComponentDefWithScope, ɵpid, ɵpod, ɵppd, ɵprd, ɵpublishDefaultGlobalUtils, ɵpublishGlobalUtil, ɵqud, ɵregisterLocaleData, ɵregisterModuleFactory, ɵregisterNgModuleType, ɵrenderComponent, ɵresetCompiledComponents, ɵresetJitOptions, ɵresolveComponentResources, ɵsetClassMetadata, ɵsetCurrentInjector, ɵsetDocument, ɵsetLocaleId, ɵstore, ɵstringify, ɵted, ɵtransitiveScopesFor, ɵunregisterLocaleData, ɵunv, ɵunwrapSafeValue, ɵvid, ɵwhenRendered, ɵɵCopyDefinitionFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinjectPipeChangeDetectorRef, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ANALYZE_FOR_ENTRY_COMPONENTS", function() { return ANALYZE_FOR_ENTRY_COMPONENTS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_BOOTSTRAP_LISTENER", function() { return APP_BOOTSTRAP_LISTENER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_ID", function() { return APP_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_INITIALIZER", function() { return APP_INITIALIZER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationInitStatus", function() { return ApplicationInitStatus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationModule", function() { return ApplicationModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationRef", function() { return ApplicationRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Attribute", function() { return Attribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COMPILER_OPTIONS", function() { return COMPILER_OPTIONS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CUSTOM_ELEMENTS_SCHEMA", function() { return CUSTOM_ELEMENTS_SCHEMA; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectionStrategy", function() { return ChangeDetectionStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectorRef", function() { return ChangeDetectorRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Compiler", function() { return Compiler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompilerFactory", function() { return CompilerFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactory", function() { return ComponentFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactoryResolver", function() { return ComponentFactoryResolver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentRef", function() { return ComponentRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChild", function() { return ContentChild; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChildren", function() { return ContentChildren; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_CURRENCY_CODE", function() { return DEFAULT_CURRENCY_CODE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugElement", function() { return DebugElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugEventListener", function() { return DebugEventListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugNode", function() { return DebugNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultIterableDiffer", function() { return DefaultIterableDiffer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Directive", function() { return Directive; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementRef", function() { return ElementRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmbeddedViewRef", function() { return EmbeddedViewRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorHandler", function() { return ErrorHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventEmitter", function() { return EventEmitter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Host", function() { return Host; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostBinding", function() { return HostBinding; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostListener", function() { return HostListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INJECTOR", function() { return INJECTOR$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Inject", function() { return Inject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectFlags", function() { return InjectFlags; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injectable", function() { return Injectable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectionToken", function() { return InjectionToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injector", function() { return Injector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return Input; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IterableDiffers", function() { return IterableDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyValueDiffers", function() { return KeyValueDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOCALE_ID", function() { return LOCALE_ID$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MissingTranslationStrategy", function() { return MissingTranslationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleWithComponentFactories", function() { return ModuleWithComponentFactories; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_ERRORS_SCHEMA", function() { return NO_ERRORS_SCHEMA; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModule", function() { return NgModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactory", function() { return NgModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactoryLoader", function() { return NgModuleFactoryLoader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleRef", function() { return NgModuleRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgProbeToken", function() { return NgProbeToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgZone", function() { return NgZone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return Optional; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Output", function() { return Output; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PACKAGE_ROOT_URL", function() { return PACKAGE_ROOT_URL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_ID", function() { return PLATFORM_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_INITIALIZER", function() { return PLATFORM_INITIALIZER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pipe", function() { return Pipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformRef", function() { return PlatformRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Query", function() { return Query; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryList", function() { return QueryList; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveInjector", function() { return ReflectiveInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveKey", function() { return ReflectiveKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Renderer2", function() { return Renderer2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererFactory2", function() { return RendererFactory2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererStyleFlags2", function() { return RendererStyleFlags2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedReflectiveFactory", function() { return ResolvedReflectiveFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sanitizer", function() { return Sanitizer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SecurityContext", function() { return SecurityContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Self", function() { return Self; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleChange", function() { return SimpleChange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkipSelf", function() { return SkipSelf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoader", function() { return SystemJsNgModuleLoader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoaderConfig", function() { return SystemJsNgModuleLoaderConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS", function() { return TRANSLATIONS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS_FORMAT", function() { return TRANSLATIONS_FORMAT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateRef", function() { return TemplateRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Testability", function() { return Testability; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestabilityRegistry", function() { return TestabilityRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return Type; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return Version; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChild", function() { return ViewChild; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChildren", function() { return ViewChildren; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewContainerRef", function() { return ViewContainerRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewEncapsulation", function() { return ViewEncapsulation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewRef", function() { return ViewRef$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WrappedValue", function() { return WrappedValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asNativeElements", function() { return asNativeElements; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertPlatform", function() { return assertPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatform", function() { return createPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatformFactory", function() { return createPlatformFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineInjectable", function() { return defineInjectable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroyPlatform", function() { return destroyPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableProdMode", function() { return enableProdMode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forwardRef", function() { return forwardRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDebugNode", function() { return getDebugNode$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleFactory", function() { return getModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlatform", function() { return getPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return inject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDevMode", function() { return isDevMode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformCore", function() { return platformCore; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveForwardRef", function() { return resolveForwardRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTestabilityGetter", function() { return setTestabilityGetter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ0", function() { return ɵ0$3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵALLOW_MULTIPLE_PLATFORMS", function() { return ALLOW_MULTIPLE_PLATFORMS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAPP_ID_RANDOM_PROVIDER", function() { return APP_ID_RANDOM_PROVIDER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__", function() { return CREATE_ATTRIBUTE_DECORATOR__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵChangeDetectorStatus", function() { return ChangeDetectorStatus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCodegenComponentFactoryResolver", function() { return CodegenComponentFactoryResolver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__", function() { return Compiler_compileModuleAndAllComponentsAsync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__", function() { return Compiler_compileModuleAndAllComponentsSync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAsync__POST_R3__", function() { return Compiler_compileModuleAsync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleSync__POST_R3__", function() { return Compiler_compileModuleSync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵComponentFactory", function() { return ComponentFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵConsole", function() { return Console; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDEFAULT_LOCALE_ID", function() { return DEFAULT_LOCALE_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_ARRAY", function() { return EMPTY_ARRAY$4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_MAP", function() { return EMPTY_MAP; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_IMPL__POST_R3__", function() { return INJECTOR_IMPL__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_SCOPE", function() { return INJECTOR_SCOPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵLifecycleHooksFeature", function() { return LifecycleHooksFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵLocaleDataIndex", function() { return LocaleDataIndex; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_COMP_DEF", function() { return NG_COMP_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_DIR_DEF", function() { return NG_DIR_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_ELEMENT_ID", function() { return NG_ELEMENT_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_INJ_DEF", function() { return NG_INJ_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_MOD_DEF", function() { return NG_MOD_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_PIPE_DEF", function() { return NG_PIPE_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_PROV_DEF", function() { return NG_PROV_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR", function() { return NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNO_CHANGE", function() { return NO_CHANGE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNgModuleFactory", function() { return NgModuleFactory$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNoopNgZone", function() { return NoopNgZone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵReflectionCapabilities", function() { return ReflectionCapabilities; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentFactory", function() { return ComponentFactory$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentRef", function() { return ComponentRef$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3NgModuleRef", function() { return NgModuleRef$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__", function() { return SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_COMPONENT__POST_R3__", function() { return SWITCH_COMPILE_COMPONENT__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__", function() { return SWITCH_COMPILE_DIRECTIVE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_INJECTABLE__POST_R3__", function() { return SWITCH_COMPILE_INJECTABLE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_NGMODULE__POST_R3__", function() { return SWITCH_COMPILE_NGMODULE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_PIPE__POST_R3__", function() { return SWITCH_COMPILE_PIPE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__", function() { return SWITCH_ELEMENT_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_IVY_ENABLED__POST_R3__", function() { return SWITCH_IVY_ENABLED__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_RENDERER2_FACTORY__POST_R3__", function() { return SWITCH_RENDERER2_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__", function() { return SWITCH_TEMPLATE_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__", function() { return SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeHtml", function() { return _sanitizeHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeUrl", function() { return _sanitizeUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵallowSanitizationBypassAndThrow", function() { return allowSanitizationBypassAndThrow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵand", function() { return anchorDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_a", function() { return isForwardRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_b", function() { return injectInjectorOnly; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_ba", function() { return zoneSchedulerFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bb", function() { return USD_CURRENCY_CODE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bc", function() { return _def; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bd", function() { return DebugContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_be", function() { return NgOnChangesFeatureImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bf", function() { return SCHEDULER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bg", function() { return injectAttributeImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bh", function() { return getLView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bi", function() { return getBindingRoot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bj", function() { return nextContextImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bl", function() { return pureFunction1Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bm", function() { return pureFunction2Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bn", function() { return pureFunction3Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bo", function() { return pureFunction4Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bp", function() { return pureFunctionVInternal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bq", function() { return getUrlSanitizer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_br", function() { return makePropDecorator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bs", function() { return makeParamDecorator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bv", function() { return getClosureSafeProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bw", function() { return NullInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bx", function() { return getInjectImplementation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bz", function() { return getNativeByTNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_c", function() { return attachInjectFlag; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_cb", function() { return getRootContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_cc", function() { return i18nPostprocess; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_d", function() { return ReflectiveInjector_; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_e", function() { return ReflectiveDependency; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_f", function() { return resolveReflectiveProviders; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_g", function() { return _appIdRandomProviderFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_h", function() { return injectRenderer2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_i", function() { return injectElementRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_j", function() { return createElementRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_k", function() { return getModuleFactory__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_l", function() { return injectTemplateRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_m", function() { return createTemplateRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_n", function() { return injectViewContainerRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_o", function() { return DebugNode__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_p", function() { return DebugElement__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_q", function() { return getDebugNodeR2__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_r", function() { return injectChangeDetectorRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_s", function() { return DefaultIterableDifferFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_t", function() { return DefaultKeyValueDifferFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_u", function() { return defaultIterableDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_v", function() { return defaultKeyValueDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_w", function() { return _iterableDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_x", function() { return _keyValueDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_y", function() { return _localeFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_z", function() { return APPLICATION_MODULE_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustHtml", function() { return bypassSanitizationTrustHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustResourceUrl", function() { return bypassSanitizationTrustResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustScript", function() { return bypassSanitizationTrustScript; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustStyle", function() { return bypassSanitizationTrustStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustUrl", function() { return bypassSanitizationTrustUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵccf", function() { return createComponentFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵclearOverrides", function() { return clearOverrides; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵclearResolutionOfComponentResourcesQueue", function() { return clearResolutionOfComponentResourcesQueue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcmf", function() { return createNgModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileComponent", function() { return compileComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileDirective", function() { return compileDirective; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModule", function() { return compileNgModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleDefs", function() { return compileNgModuleDefs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleFactory__POST_R3__", function() { return compileNgModuleFactory__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompilePipe", function() { return compilePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcreateInjector", function() { return createInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcrt", function() { return createRendererType2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefaultIterableDiffers", function() { return defaultIterableDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefaultKeyValueDiffers", function() { return defaultKeyValueDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdetectChanges", function() { return detectChanges; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdevModeEqual", function() { return devModeEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdid", function() { return directiveDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵeld", function() { return elementDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵfindLocaleData", function() { return findLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflushModuleScopingQueueAsMuchAsPossible", function() { return flushModuleScopingQueueAsMuchAsPossible; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetComponentViewDefinitionFactory", function() { return getComponentViewDefinitionFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDebugNodeR2", function() { return getDebugNodeR2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDebugNode__POST_R3__", function() { return getDebugNode__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDirectives", function() { return getDirectives; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetHostElement", function() { return getHostElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetInjectableDef", function() { return getInjectableDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLContext", function() { return getLContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLocaleCurrencyCode", function() { return getLocaleCurrencyCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLocalePluralCase", function() { return getLocalePluralCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetModuleFactory__POST_R3__", function() { return getModuleFactory__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetSanitizationBypassType", function() { return getSanitizationBypassType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵglobal", function() { return _global; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinitServicesIfNeeded", function() { return initServicesIfNeeded; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinlineInterpolate", function() { return inlineInterpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolate", function() { return interpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisBoundToModule__POST_R3__", function() { return isBoundToModule__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisDefaultChangeDetectionStrategy", function() { return isDefaultChangeDetectionStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisListLikeIterable", function() { return isListLikeIterable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisObservable", function() { return isObservable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisPromise", function() { return isPromise; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisSubscribable", function() { return isSubscribable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵivyEnabled", function() { return ivyEnabled; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmakeDecorator", function() { return makeDecorator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmarkDirty", function() { return markDirty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmod", function() { return moduleDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmpd", function() { return moduleProvideDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵncd", function() { return ngContentDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵnoSideEffects", function() { return noSideEffects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵnov", function() { return nodeValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideComponentView", function() { return overrideComponentView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideProvider", function() { return overrideProvider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpad", function() { return pureArrayDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpatchComponentDefWithScope", function() { return patchComponentDefWithScope; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpid", function() { return pipeDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpod", function() { return pureObjectDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵppd", function() { return purePipeDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵprd", function() { return providerDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpublishDefaultGlobalUtils", function() { return publishDefaultGlobalUtils; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpublishGlobalUtil", function() { return publishGlobalUtil; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵqud", function() { return queryDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterLocaleData", function() { return registerLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterModuleFactory", function() { return registerModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterNgModuleType", function() { return registerNgModuleType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵrenderComponent", function() { return renderComponent$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresetCompiledComponents", function() { return resetCompiledComponents; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresetJitOptions", function() { return resetJitOptions; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresolveComponentResources", function() { return resolveComponentResources; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetClassMetadata", function() { return setClassMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetCurrentInjector", function() { return setCurrentInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetDocument", function() { return setDocument; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetLocaleId", function() { return setLocaleId; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵstore", function() { return store; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵstringify", function() { return stringify; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵted", function() { return textDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵtransitiveScopesFor", function() { return transitiveScopesFor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunregisterLocaleData", function() { return unregisterAllLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunv", function() { return unwrapValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunwrapSafeValue", function() { return unwrapSafeValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵvid", function() { return viewDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵwhenRendered", function() { return whenRendered; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵCopyDefinitionFeature", function() { return ɵɵCopyDefinitionFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵInheritDefinitionFeature", function() { return ɵɵInheritDefinitionFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵNgOnChangesFeature", function() { return ɵɵNgOnChangesFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵProvidersFeature", function() { return ɵɵProvidersFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵadvance", function() { return ɵɵadvance; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattribute", function() { return ɵɵattribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate1", function() { return ɵɵattributeInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate2", function() { return ɵɵattributeInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate3", function() { return ɵɵattributeInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate4", function() { return ɵɵattributeInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate5", function() { return ɵɵattributeInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate6", function() { return ɵɵattributeInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate7", function() { return ɵɵattributeInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate8", function() { return ɵɵattributeInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolateV", function() { return ɵɵattributeInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMap", function() { return ɵɵclassMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate1", function() { return ɵɵclassMapInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate2", function() { return ɵɵclassMapInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate3", function() { return ɵɵclassMapInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate4", function() { return ɵɵclassMapInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate5", function() { return ɵɵclassMapInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate6", function() { return ɵɵclassMapInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate7", function() { return ɵɵclassMapInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate8", function() { return ɵɵclassMapInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolateV", function() { return ɵɵclassMapInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassProp", function() { return ɵɵclassProp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵcontentQuery", function() { return ɵɵcontentQuery; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineComponent", function() { return ɵɵdefineComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineDirective", function() { return ɵɵdefineDirective; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjectable", function() { return ɵɵdefineInjectable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjector", function() { return ɵɵdefineInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineNgModule", function() { return ɵɵdefineNgModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefinePipe", function() { return ɵɵdefinePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdirectiveInject", function() { return ɵɵdirectiveInject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdisableBindings", function() { return ɵɵdisableBindings; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelement", function() { return ɵɵelement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainer", function() { return ɵɵelementContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerEnd", function() { return ɵɵelementContainerEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerStart", function() { return ɵɵelementContainerStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementEnd", function() { return ɵɵelementEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementStart", function() { return ɵɵelementStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵenableBindings", function() { return ɵɵenableBindings; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵgetCurrentView", function() { return ɵɵgetCurrentView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵgetInheritedFactory", function() { return ɵɵgetInheritedFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵhostProperty", function() { return ɵɵhostProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18n", function() { return ɵɵi18n; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nApply", function() { return ɵɵi18nApply; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nAttributes", function() { return ɵɵi18nAttributes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nEnd", function() { return ɵɵi18nEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nExp", function() { return ɵɵi18nExp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nPostprocess", function() { return ɵɵi18nPostprocess; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nStart", function() { return ɵɵi18nStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinject", function() { return ɵɵinject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinjectAttribute", function() { return ɵɵinjectAttribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinjectPipeChangeDetectorRef", function() { return ɵɵinjectPipeChangeDetectorRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactory", function() { return ɵɵinvalidFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactoryDep", function() { return ɵɵinvalidFactoryDep; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵlistener", function() { return ɵɵlistener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵloadQuery", function() { return ɵɵloadQuery; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceHTML", function() { return ɵɵnamespaceHTML; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceMathML", function() { return ɵɵnamespaceMathML; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceSVG", function() { return ɵɵnamespaceSVG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnextContext", function() { return ɵɵnextContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclareComponent", function() { return ɵɵngDeclareComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclareDirective", function() { return ɵɵngDeclareDirective; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclarePipe", function() { return ɵɵngDeclarePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipe", function() { return ɵɵpipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind1", function() { return ɵɵpipeBind1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind2", function() { return ɵɵpipeBind2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind3", function() { return ɵɵpipeBind3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind4", function() { return ɵɵpipeBind4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBindV", function() { return ɵɵpipeBindV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵprojection", function() { return ɵɵprojection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵprojectionDef", function() { return ɵɵprojectionDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵproperty", function() { return ɵɵproperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate", function() { return ɵɵpropertyInterpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate1", function() { return ɵɵpropertyInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate2", function() { return ɵɵpropertyInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate3", function() { return ɵɵpropertyInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate4", function() { return ɵɵpropertyInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate5", function() { return ɵɵpropertyInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate6", function() { return ɵɵpropertyInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate7", function() { return ɵɵpropertyInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate8", function() { return ɵɵpropertyInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolateV", function() { return ɵɵpropertyInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction0", function() { return ɵɵpureFunction0; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction1", function() { return ɵɵpureFunction1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction2", function() { return ɵɵpureFunction2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction3", function() { return ɵɵpureFunction3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction4", function() { return ɵɵpureFunction4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction5", function() { return ɵɵpureFunction5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction6", function() { return ɵɵpureFunction6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction7", function() { return ɵɵpureFunction7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction8", function() { return ɵɵpureFunction8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunctionV", function() { return ɵɵpureFunctionV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵqueryRefresh", function() { return ɵɵqueryRefresh; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵreference", function() { return ɵɵreference; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveBody", function() { return ɵɵresolveBody; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveDocument", function() { return ɵɵresolveDocument; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveWindow", function() { return ɵɵresolveWindow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵrestoreView", function() { return ɵɵrestoreView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeHtml", function() { return ɵɵsanitizeHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeResourceUrl", function() { return ɵɵsanitizeResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeScript", function() { return ɵɵsanitizeScript; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeStyle", function() { return ɵɵsanitizeStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrl", function() { return ɵɵsanitizeUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrlOrResourceUrl", function() { return ɵɵsanitizeUrlOrResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsetComponentScope", function() { return ɵɵsetComponentScope; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsetNgModuleScope", function() { return ɵɵsetNgModuleScope; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMap", function() { return ɵɵstyleMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate1", function() { return ɵɵstyleMapInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate2", function() { return ɵɵstyleMapInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate3", function() { return ɵɵstyleMapInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate4", function() { return ɵɵstyleMapInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate5", function() { return ɵɵstyleMapInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate6", function() { return ɵɵstyleMapInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate7", function() { return ɵɵstyleMapInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate8", function() { return ɵɵstyleMapInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolateV", function() { return ɵɵstyleMapInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleProp", function() { return ɵɵstyleProp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate1", function() { return ɵɵstylePropInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate2", function() { return ɵɵstylePropInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate3", function() { return ɵɵstylePropInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate4", function() { return ɵɵstylePropInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate5", function() { return ɵɵstylePropInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate6", function() { return ɵɵstylePropInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate7", function() { return ɵɵstylePropInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate8", function() { return ɵɵstylePropInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolateV", function() { return ɵɵstylePropInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostListener", function() { return ɵɵsyntheticHostListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostProperty", function() { return ɵɵsyntheticHostProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtemplate", function() { return ɵɵtemplate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtemplateRefExtractor", function() { return ɵɵtemplateRefExtractor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtext", function() { return ɵɵtext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate", function() { return ɵɵtextInterpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate1", function() { return ɵɵtextInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate2", function() { return ɵɵtextInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate3", function() { return ɵɵtextInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate4", function() { return ɵɵtextInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate5", function() { return ɵɵtextInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate6", function() { return ɵɵtextInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate7", function() { return ɵɵtextInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate8", function() { return ɵɵtextInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolateV", function() { return ɵɵtextInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantHtml", function() { return ɵɵtrustConstantHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantResourceUrl", function() { return ɵɵtrustConstantResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵviewQuery", function() { return ɵɵviewQuery; }); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/operators */ "kU1M"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getClosureSafeProperty(objWithPropertyToExtract) { for (let key in objWithPropertyToExtract) { if (objWithPropertyToExtract[key] === getClosureSafeProperty) { return key; } } throw Error('Could not find renamed property on target object.'); } /** * Sets properties on a target object from a source object, but only if * the property doesn't already exist on the target object. * @param target The target to set properties on * @param source The source of the property keys and values to set */ function fillProperties(target, source) { for (const key in source) { if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) { target[key] = source[key]; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function stringify(token) { if (typeof token === 'string') { return token; } if (Array.isArray(token)) { return '[' + token.map(stringify).join(', ') + ']'; } if (token == null) { return '' + token; } if (token.overriddenName) { return `${token.overriddenName}`; } if (token.name) { return `${token.name}`; } const res = token.toString(); if (res == null) { return '' + res; } const newLineIndex = res.indexOf('\n'); return newLineIndex === -1 ? res : res.substring(0, newLineIndex); } /** * Concatenates two strings with separator, allocating new strings only when necessary. * * @param before before string. * @param separator separator string. * @param after after string. * @returns concatenated string. */ function concatStringsWithSpace(before, after) { return (before == null || before === '') ? (after === null ? '' : after) : ((after == null || after === '') ? before : before + ' ' + after); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty }); /** * Allows to refer to references which are not yet defined. * * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of * DI is declared, but not yet defined. It is also used when the `token` which we use when creating * a query is not yet defined. * * @usageNotes * ### Example * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'} * @publicApi */ function forwardRef(forwardRefFn) { forwardRefFn.__forward_ref__ = forwardRef; forwardRefFn.toString = function () { return stringify(this()); }; return forwardRefFn; } /** * Lazily retrieves the reference value from a forwardRef. * * Acts as the identity function when given a non-forward-ref value. * * @usageNotes * ### Example * * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'} * * @see `forwardRef` * @publicApi */ function resolveForwardRef(type) { return isForwardRef(type) ? type() : type; } /** Checks whether a function is wrapped by a `forwardRef`. */ function isForwardRef(fn) { return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Base URL for the error details page. // Keep this value in sync with a similar const in // `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`. const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors'; class RuntimeError extends Error { constructor(code, message) { super(formatRuntimeError(code, message)); this.code = code; } } // Contains a set of error messages that have details guides at angular.io. // Full list of available error guides can be found at https://angular.io/errors /* tslint:disable:no-toplevel-property-access */ const RUNTIME_ERRORS_WITH_GUIDES = new Set([ "100" /* EXPRESSION_CHANGED_AFTER_CHECKED */, "200" /* CYCLIC_DI_DEPENDENCY */, "201" /* PROVIDER_NOT_FOUND */, "300" /* MULTIPLE_COMPONENTS_MATCH */, "301" /* EXPORT_NOT_FOUND */, "302" /* PIPE_NOT_FOUND */, ]); /* tslint:enable:no-toplevel-property-access */ /** Called to format a runtime error */ function formatRuntimeError(code, message) { const fullCode = code ? `NG0${code}: ` : ''; let errorMessage = `${fullCode}${message}`; // Some runtime errors are still thrown without `ngDevMode` (for example // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles. // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check // from this code). if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) { errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`; } return errorMessage; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Used for stringify render output in Ivy. * Important! This function is very performance-sensitive and we should * be extra careful not to introduce megamorphic reads in it. * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations. */ function renderStringify(value) { if (typeof value === 'string') return value; if (value == null) return ''; // Use `String` so that it invokes the `toString` method of the value. Note that this // appears to be faster than calling `value.toString` (see `render_stringify` benchmark). return String(value); } /** * Used to stringify a value so that it can be displayed in an error message. * Important! This function contains a megamorphic read and should only be * used for error messages. */ function stringifyForError(value) { if (typeof value === 'function') return value.name || value.toString(); if (typeof value === 'object' && value != null && typeof value.type === 'function') { return value.type.name || value.type.toString(); } return renderStringify(value); } /** Called when directives inject each other (creating a circular dependency) */ function throwCyclicDependencyError(token, path) { const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : ''; throw new RuntimeError("200" /* CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`); } function throwMixedMultiProviderError() { throw new Error(`Cannot mix multi providers and regular providers`); } function throwInvalidProviderError(ngModuleType, providers, provider) { let ngModuleDetail = ''; if (ngModuleType && providers) { const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...'); ngModuleDetail = ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`; } throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail); } /** Throws an error when a token is not found in DI. */ function throwProviderNotFoundError(token, injectorName) { const injectorDetails = injectorName ? ` in ${injectorName}` : ''; throw new RuntimeError("201" /* PROVIDER_NOT_FOUND */, `No provider for ${stringifyForError(token)} found${injectorDetails}`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function assertNumber(actual, msg) { if (!(typeof actual === 'number')) { throwError(msg, typeof actual, 'number', '==='); } } function assertNumberInRange(actual, minInclusive, maxInclusive) { assertNumber(actual, 'Expected a number'); assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to'); assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to'); } function assertString(actual, msg) { if (!(typeof actual === 'string')) { throwError(msg, actual === null ? 'null' : typeof actual, 'string', '==='); } } function assertFunction(actual, msg) { if (!(typeof actual === 'function')) { throwError(msg, actual === null ? 'null' : typeof actual, 'function', '==='); } } function assertEqual(actual, expected, msg) { if (!(actual == expected)) { throwError(msg, actual, expected, '=='); } } function assertNotEqual(actual, expected, msg) { if (!(actual != expected)) { throwError(msg, actual, expected, '!='); } } function assertSame(actual, expected, msg) { if (!(actual === expected)) { throwError(msg, actual, expected, '==='); } } function assertNotSame(actual, expected, msg) { if (!(actual !== expected)) { throwError(msg, actual, expected, '!=='); } } function assertLessThan(actual, expected, msg) { if (!(actual < expected)) { throwError(msg, actual, expected, '<'); } } function assertLessThanOrEqual(actual, expected, msg) { if (!(actual <= expected)) { throwError(msg, actual, expected, '<='); } } function assertGreaterThan(actual, expected, msg) { if (!(actual > expected)) { throwError(msg, actual, expected, '>'); } } function assertGreaterThanOrEqual(actual, expected, msg) { if (!(actual >= expected)) { throwError(msg, actual, expected, '>='); } } function assertNotDefined(actual, msg) { if (actual != null) { throwError(msg, actual, null, '=='); } } function assertDefined(actual, msg) { if (actual == null) { throwError(msg, actual, null, '!='); } } function throwError(msg, actual, expected, comparison) { throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`)); } function assertDomNode(node) { // If we're in a worker, `Node` will not be defined. if (!(typeof Node !== 'undefined' && node instanceof Node) && !(typeof node === 'object' && node != null && node.constructor.name === 'WebWorkerRenderNode')) { throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`); } } function assertIndexInRange(arr, index) { assertDefined(arr, 'Array must be defined.'); const maxLen = arr.length; if (index < 0 || index >= maxLen) { throwError(`Index expected to be less than ${maxLen} but got ${index}`); } } function assertOneOf(value, ...validValues) { if (validValues.indexOf(value) !== -1) return true; throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and * in which injectors (if any) it will be available. * * This should be assigned to a static `ɵprov` field on a type, which will then be an * `InjectableType`. * * Options: * * `providedIn` determines which injectors will include the injectable, by either associating it * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be * provided in the `'root'` injector, which will be the application-level injector in most apps. * * `factory` gives the zero argument function which will create an instance of the injectable. * The factory can call `inject` to access the `Injector` and request injection of dependencies. * * @codeGenApi * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm. */ function ɵɵdefineInjectable(opts) { return { token: opts.token, providedIn: opts.providedIn || null, factory: opts.factory, value: undefined, }; } /** * @deprecated in v8, delete after v10. This API should be used only by generated code, and that * code should now use ɵɵdefineInjectable instead. * @publicApi */ const defineInjectable = ɵɵdefineInjectable; /** * Construct an `InjectorDef` which configures an injector. * * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an * `InjectorType`. * * Options: * * * `providers`: an optional array of providers to add to the injector. Each provider must * either have a factory or point to a type which has a `ɵprov` static property (the * type must be an `InjectableType`). * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s * whose providers will also be added to the injector. Locally provided types will override * providers from imports. * * @codeGenApi */ function ɵɵdefineInjector(options) { return { providers: options.providers || [], imports: options.imports || [] }; } /** * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading * inherited value. * * @param type A type which may have its own (non-inherited) `ɵprov`. */ function getInjectableDef(type) { return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF); } /** * Return definition only if it is defined directly on `type` and is not inherited from a base * class of `type`. */ function getOwnDefinition(type, field) { return type.hasOwnProperty(field) ? type[field] : null; } /** * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors. * * @param type A type which may have `ɵprov`, via inheritance. * * @deprecated Will be removed in a future version of Angular, where an error will occur in the * scenario if we find the `ɵprov` on an ancestor only. */ function getInheritedInjectableDef(type) { const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]); if (def) { const typeName = getTypeName(type); // TODO(FW-1307): Re-add ngDevMode when closure can handle it // ngDevMode && console.warn(`DEPRECATED: DI is instantiating a token "${typeName}" that inherits its @Injectable decorator but does not provide one itself.\n` + `This will become an error in a future version of Angular. Please add @Injectable() to the "${typeName}" class.`); return def; } else { return null; } } /** Gets the name of a type, accounting for some cross-browser differences. */ function getTypeName(type) { // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers // it'll always return the name of the function itself, no matter how many other functions it // inherits from. On IE the function doesn't have its own `name` property, but it takes it from // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around // the issue by converting the function to a string and parsing its name out that way via a regex. if (type.hasOwnProperty('name')) { return type.name; } const match = ('' + type).match(/^function\s*([^\s(]+)/); return match === null ? '' : match[1]; } /** * Read the injector def type in a way which is immune to accidentally reading inherited value. * * @param type type which may have an injector def (`ɵinj`) */ function getInjectorDef(type) { return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null; } const NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty }); const NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty }); // We need to keep these around so we can read off old defs if new defs are unavailable const NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty }); const NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Injection flags for DI. * * @publicApi */ var InjectFlags; (function (InjectFlags) { // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer // writes exports of it into ngfactory files. /** Check self and check parent injector if needed */ InjectFlags[InjectFlags["Default"] = 0] = "Default"; /** * Specifies that an injector should retrieve a dependency from any injector until reaching the * host element of the current component. (Only used with Element Injector) */ InjectFlags[InjectFlags["Host"] = 1] = "Host"; /** Don't ascend to ancestors of the node requesting injection. */ InjectFlags[InjectFlags["Self"] = 2] = "Self"; /** Skip the node that is requesting injection. */ InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf"; /** Inject `defaultValue` instead if token not found. */ InjectFlags[InjectFlags["Optional"] = 8] = "Optional"; })(InjectFlags || (InjectFlags = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Current implementation of inject. * * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this * way for two reasons: * 1. `Injector` should not depend on ivy logic. * 2. To maintain tree shake-ability we don't want to bring in unnecessary code. */ let _injectImplementation; function getInjectImplementation() { return _injectImplementation; } /** * Sets the current inject implementation. */ function setInjectImplementation(impl) { const previous = _injectImplementation; _injectImplementation = impl; return previous; } /** * Injects `root` tokens in limp mode. * * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to * `"root"`. This is known as the limp mode injection. In such case the value is stored in the * `InjectableDef`. */ function injectRootLimpMode(token, notFoundValue, flags) { const injectableDef = getInjectableDef(token); if (injectableDef && injectableDef.providedIn == 'root') { return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value; } if (flags & InjectFlags.Optional) return null; if (notFoundValue !== undefined) return notFoundValue; throwProviderNotFoundError(stringify(token), 'Injector'); } /** * Assert that `_injectImplementation` is not `fn`. * * This is useful, to prevent infinite recursion. * * @param fn Function which it should not equal to */ function assertInjectImplementationNotEqual(fn) { ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Convince closure compiler that the wrapped function has no side-effects. * * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to * allow us to execute a function but have closure compiler mark the call as no-side-effects. * It is important that the return value for the `noSideEffects` function be assigned * to something which is retained otherwise the call to `noSideEffects` will be removed by closure * compiler. */ function noSideEffects(fn) { return { toString: fn }.toString(); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The strategy that the default change detector uses to detect changes. * When set, takes effect the next time change detection is triggered. * * @see {@link ChangeDetectorRef#usage-notes Change detection usage} * * @publicApi */ var ChangeDetectionStrategy; (function (ChangeDetectionStrategy) { /** * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated * until reactivated by setting the strategy to `Default` (`CheckAlways`). * Change detection can still be explicitly invoked. * This strategy applies to all child directives and cannot be overridden. */ ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; /** * Use the default `CheckAlways` strategy, in which change detection is automatic until * explicitly deactivated. */ ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); /** * Defines the possible states of the default change detector. * @see `ChangeDetectorRef` */ var ChangeDetectorStatus; (function (ChangeDetectorStatus) { /** * A state in which, after calling `detectChanges()`, the change detector * state becomes `Checked`, and must be explicitly invoked or reactivated. */ ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce"; /** * A state in which change detection is skipped until the change detector mode * becomes `CheckOnce`. */ ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked"; /** * A state in which change detection continues automatically until explicitly * deactivated. */ ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways"; /** * A state in which a change detector sub tree is not a part of the main tree and * should be skipped. */ ChangeDetectorStatus[ChangeDetectorStatus["Detached"] = 3] = "Detached"; /** * Indicates that the change detector encountered an error checking a binding * or calling a directive lifecycle method and is now in an inconsistent state. Change * detectors in this state do not detect changes. */ ChangeDetectorStatus[ChangeDetectorStatus["Errored"] = 4] = "Errored"; /** * Indicates that the change detector has been destroyed. */ ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed"; })(ChangeDetectorStatus || (ChangeDetectorStatus = {})); /** * Reports whether a given strategy is currently the default for change detection. * @param changeDetectionStrategy The strategy to check. * @returns True if the given strategy is the current default, false otherwise. * @see `ChangeDetectorStatus` * @see `ChangeDetectorRef` */ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) { return changeDetectionStrategy == null || changeDetectionStrategy === ChangeDetectionStrategy.Default; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines template and style encapsulation options available for Component's {@link Component}. * * See {@link Component#encapsulation encapsulation}. * * @usageNotes * ### Example * * {@example core/ts/metadata/encapsulation.ts region='longform'} * * @publicApi */ var ViewEncapsulation; (function (ViewEncapsulation) { /** * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host * Element and pre-processing the style rules provided via {@link Component#styles styles} or * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all * selectors. * * This is the default option. */ ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11. /** * Don't provide any template or style encapsulation. */ ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; /** * Use Shadow DOM to encapsulate styles. * * For the DOM this means using modern [Shadow * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and * creating a ShadowRoot for Component's Host Element. */ ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; })(ViewEncapsulation || (ViewEncapsulation = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const __globalThis = typeof globalThis !== 'undefined' && globalThis; const __window = typeof window !== 'undefined' && window; const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self; const __global = typeof global !== 'undefined' && global; // Always use __globalThis if available, which is the spec-defined global variable across all // environments, then fallback to __global first, because in Node tests both __global and // __window may be defined and _global should be __global in that case. const _global = __globalThis || __global || __window || __self; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function ngDevModeResetPerfCounters() { const locationString = typeof location !== 'undefined' ? location.toString() : ''; const newCounters = { namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1, firstCreatePass: 0, tNode: 0, tView: 0, rendererCreateTextNode: 0, rendererSetText: 0, rendererCreateElement: 0, rendererAddEventListener: 0, rendererSetAttribute: 0, rendererRemoveAttribute: 0, rendererSetProperty: 0, rendererSetClassName: 0, rendererAddClass: 0, rendererRemoveClass: 0, rendererSetStyle: 0, rendererRemoveStyle: 0, rendererDestroy: 0, rendererDestroyNode: 0, rendererMoveNode: 0, rendererRemoveNode: 0, rendererAppendChild: 0, rendererInsertBefore: 0, rendererCreateComment: 0, }; // Make sure to refer to ngDevMode as ['ngDevMode'] for closure. const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1; _global['ngDevMode'] = allowNgDevModeTrue && newCounters; return newCounters; } /** * This function checks to see if the `ngDevMode` has been set. If yes, * then we honor it, otherwise we default to dev mode with additional checks. * * The idea is that unless we are doing production build where we explicitly * set `ngDevMode == false` we should be helping the developer by providing * as much early warning and errors as possible. * * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode * is defined for the entire instruction set. * * When checking `ngDevMode` on toplevel, always init it before referencing it * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595. * * Details on possible values for `ngDevMode` can be found on its docstring. * * NOTE: * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`. */ function initNgDevMode() { // The below checks are to ensure that calling `initNgDevMode` multiple times does not // reset the counters. // If the `ngDevMode` is not an object, then it means we have not created the perf counters // yet. if (typeof ngDevMode === 'undefined' || ngDevMode) { if (typeof ngDevMode !== 'object') { ngDevModeResetPerfCounters(); } return typeof ngDevMode !== 'undefined' && !!ngDevMode; } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file contains reuseable "empty" symbols that can be used as default return values * in different parts of the rendering code. Because the same symbols are returned, this * allows for identity checks against these values to be consistently used by the framework * code. */ const EMPTY_OBJ = {}; const EMPTY_ARRAY = []; // freezing the values prevents any code from accidentally inserting new values in if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) { // These property accesses can be ignored because ngDevMode will be set to false // when optimizing code and the whole if statement will be dropped. // tslint:disable-next-line:no-toplevel-property-access Object.freeze(EMPTY_OBJ); // tslint:disable-next-line:no-toplevel-property-access Object.freeze(EMPTY_ARRAY); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file contains reuseable "empty" symbols that can be used as default return values * in different parts of the rendering code. Because the same symbols are returned, this * allows for identity checks against these values to be consistently used by the framework * code. */ const EMPTY_ARRAY$1 = []; // freezing the values prevents any code from accidentally inserting new values in if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) { // These property accesses can be ignored because ngDevMode will be set to false // when optimizing code and the whole if statement will be dropped. // tslint:disable-next-line:no-toplevel-property-access Object.freeze(EMPTY_ARRAY$1); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty }); const NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty }); const NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty }); const NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty }); const NG_LOC_ID_DEF = getClosureSafeProperty({ ɵloc: getClosureSafeProperty }); const NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: getClosureSafeProperty }); /** * If a directive is diPublic, bloomAdd sets a property on the type with this constant as * the key and the directive's unique ID as the value. This allows us to map directives to their * bloom filter bit for DI. */ // TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified. const NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _renderCompCount = 0; /** * Create a component definition object. * * * # Example * ``` * class MyDirective { * // Generated by Angular Template Compiler * // [Symbol] syntax will not be supported by TypeScript until v2.7 * static ɵcmp = defineComponent({ * ... * }); * } * ``` * @codeGenApi */ function ɵɵdefineComponent(componentDefinition) { return noSideEffects(() => { // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent. // See the `initNgDevMode` docstring for more information. (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode(); const type = componentDefinition.type; const declaredInputs = {}; const def = { type: type, providersResolver: null, decls: componentDefinition.decls, vars: componentDefinition.vars, factory: null, template: componentDefinition.template || null, consts: componentDefinition.consts || null, ngContentSelectors: componentDefinition.ngContentSelectors, hostBindings: componentDefinition.hostBindings || null, hostVars: componentDefinition.hostVars || 0, hostAttrs: componentDefinition.hostAttrs || null, contentQueries: componentDefinition.contentQueries || null, declaredInputs: declaredInputs, inputs: null, outputs: null, exportAs: componentDefinition.exportAs || null, onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush, directiveDefs: null, pipeDefs: null, selectors: componentDefinition.selectors || EMPTY_ARRAY$1, viewQuery: componentDefinition.viewQuery || null, features: componentDefinition.features || null, data: componentDefinition.data || {}, // TODO(misko): convert ViewEncapsulation into const enum so that it can be used // directly in the next line. Also `None` should be 0 not 2. encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated, id: 'c', styles: componentDefinition.styles || EMPTY_ARRAY$1, _: null, setInput: null, schemas: componentDefinition.schemas || null, tView: null, }; const directiveTypes = componentDefinition.directives; const feature = componentDefinition.features; const pipeTypes = componentDefinition.pipes; def.id += _renderCompCount++; def.inputs = invertObject(componentDefinition.inputs, declaredInputs), def.outputs = invertObject(componentDefinition.outputs), feature && feature.forEach((fn) => fn(def)); def.directiveDefs = directiveTypes ? () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes) .map(extractDirectiveDef) : null; def.pipeDefs = pipeTypes ? () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) : null; return def; }); } /** * Generated next to NgModules to monkey-patch directive and pipe references onto a component's * definition, when generating a direct reference in the component file would otherwise create an * import cycle. * * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details. * * @codeGenApi */ function ɵɵsetComponentScope(type, directives, pipes) { const def = type.ɵcmp; def.directiveDefs = () => directives.map(extractDirectiveDef); def.pipeDefs = () => pipes.map(extractPipeDef); } function extractDirectiveDef(type) { const def = getComponentDef(type) || getDirectiveDef(type); if (ngDevMode && !def) { throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`); } return def; } function extractPipeDef(type) { const def = getPipeDef(type); if (ngDevMode && !def) { throw new Error(`'${type.name}' is not a 'PipeType'.`); } return def; } const autoRegisterModuleById = {}; /** * @codeGenApi */ function ɵɵdefineNgModule(def) { const res = { type: def.type, bootstrap: def.bootstrap || EMPTY_ARRAY$1, declarations: def.declarations || EMPTY_ARRAY$1, imports: def.imports || EMPTY_ARRAY$1, exports: def.exports || EMPTY_ARRAY$1, transitiveCompileScopes: null, schemas: def.schemas || null, id: def.id || null, }; if (def.id != null) { noSideEffects(() => { autoRegisterModuleById[def.id] = def.type; }); } return res; } /** * Adds the module metadata that is necessary to compute the module's transitive scope to an * existing module definition. * * Scope metadata of modules is not used in production builds, so calls to this function can be * marked pure to tree-shake it from the bundle, allowing for all referenced declarations * to become eligible for tree-shaking as well. * * @codeGenApi */ function ɵɵsetNgModuleScope(type, scope) { return noSideEffects(() => { const ngModuleDef = getNgModuleDef(type, true); ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY$1; ngModuleDef.imports = scope.imports || EMPTY_ARRAY$1; ngModuleDef.exports = scope.exports || EMPTY_ARRAY$1; }); } /** * Inverts an inputs or outputs lookup such that the keys, which were the * minified keys, are part of the values, and the values are parsed so that * the publicName of the property is the new key * * e.g. for * * ``` * class Comp { * @Input() * propName1: string; * * @Input('publicName2') * declaredPropName2: number; * } * ``` * * will be serialized as * * ``` * { * propName1: 'propName1', * declaredPropName2: ['publicName2', 'declaredPropName2'], * } * ``` * * which is than translated by the minifier as: * * ``` * { * minifiedPropName1: 'propName1', * minifiedPropName2: ['publicName2', 'declaredPropName2'], * } * ``` * * becomes: (public name => minifiedName) * * ``` * { * 'propName1': 'minifiedPropName1', * 'publicName2': 'minifiedPropName2', * } * ``` * * Optionally the function can take `secondary` which will result in: (public name => declared name) * * ``` * { * 'propName1': 'propName1', * 'publicName2': 'declaredPropName2', * } * ``` * */ function invertObject(obj, secondary) { if (obj == null) return EMPTY_OBJ; const newLookup = {}; for (const minifiedKey in obj) { if (obj.hasOwnProperty(minifiedKey)) { let publicName = obj[minifiedKey]; let declaredName = publicName; if (Array.isArray(publicName)) { declaredName = publicName[1]; publicName = publicName[0]; } newLookup[publicName] = minifiedKey; if (secondary) { (secondary[publicName] = declaredName); } } } return newLookup; } /** * Create a directive definition object. * * # Example * ```ts * class MyDirective { * // Generated by Angular Template Compiler * // [Symbol] syntax will not be supported by TypeScript until v2.7 * static ɵdir = ɵɵdefineDirective({ * ... * }); * } * ``` * * @codeGenApi */ const ɵɵdefineDirective = ɵɵdefineComponent; /** * Create a pipe definition object. * * # Example * ``` * class MyPipe implements PipeTransform { * // Generated by Angular Template Compiler * static ɵpipe = definePipe({ * ... * }); * } * ``` * @param pipeDef Pipe definition generated by the compiler * * @codeGenApi */ function ɵɵdefinePipe(pipeDef) { return { type: pipeDef.type, name: pipeDef.name, factory: null, pure: pipeDef.pure !== false, onDestroy: pipeDef.type.prototype.ngOnDestroy || null }; } /** * The following getter methods retrieve the definition from the type. Currently the retrieval * honors inheritance, but in the future we may change the rule to require that definitions are * explicit. This would require some sort of migration strategy. */ function getComponentDef(type) { return type[NG_COMP_DEF] || null; } function getDirectiveDef(type) { return type[NG_DIR_DEF] || null; } function getPipeDef(type) { return type[NG_PIPE_DEF] || null; } function getNgModuleDef(type, throwNotFound) { const ngModuleDef = type[NG_MOD_DEF] || null; if (!ngModuleDef && throwNotFound === true) { throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`); } return ngModuleDef; } function getNgLocaleIdDef(type) { return type[NG_LOC_ID_DEF] || null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Below are constants for LView indices to help us look up LView members // without having to remember the specific indices. // Uglify will inline these when minifying so there shouldn't be a cost. const HOST = 0; const TVIEW = 1; const FLAGS = 2; const PARENT = 3; const NEXT = 4; const TRANSPLANTED_VIEWS_TO_REFRESH = 5; const T_HOST = 6; const CLEANUP = 7; const CONTEXT = 8; const INJECTOR = 9; const RENDERER_FACTORY = 10; const RENDERER = 11; const SANITIZER = 12; const CHILD_HEAD = 13; const CHILD_TAIL = 14; // FIXME(misko): Investigate if the three declarations aren't all same thing. const DECLARATION_VIEW = 15; const DECLARATION_COMPONENT_VIEW = 16; const DECLARATION_LCONTAINER = 17; const PREORDER_HOOK_FLAGS = 18; const QUERIES = 19; /** * Size of LView's header. Necessary to adjust for it when setting slots. * * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate * instruction index into `LView` index. All other indexes should be in the `LView` index space and * there should be no need to refer to `HEADER_OFFSET` anywhere else. */ const HEADER_OFFSET = 20; /** * Converts `TViewType` into human readable text. * Make sure this matches with `TViewType` */ const TViewTypeAsString = [ 'Root', 'Component', 'Embedded', ]; // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Special location which allows easy identification of type. If we have an array which was * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is * `LContainer`. */ const TYPE = 1; /** * Below are constants for LContainer indices to help us look up LContainer members * without having to remember the specific indices. * Uglify will inline these when minifying so there shouldn't be a cost. */ /** * Flag to signify that this `LContainer` may have transplanted views which need to be change * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`. * * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify * that the `MOVED_VIEWS` are transplanted and on-push. */ const HAS_TRANSPLANTED_VIEWS = 2; // PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5 // As we already have these constants in LView, we don't need to re-create them. // T_HOST is index 6 // We already have this constants in LView, we don't need to re-create it. const NATIVE = 7; const VIEW_REFS = 8; const MOVED_VIEWS = 9; /** * Size of LContainer's header. Represents the index after which all views in the * container will be inserted. We need to keep a record of current views so we know * which views are already in the DOM (and don't need to be re-added) and so we can * remove views from the DOM when they are no longer required. */ const CONTAINER_HEADER_OFFSET = 10; // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$1 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * True if `value` is `LView`. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function isLView(value) { return Array.isArray(value) && typeof value[TYPE] === 'object'; } /** * True if `value` is `LContainer`. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function isLContainer(value) { return Array.isArray(value) && value[TYPE] === true; } function isContentQueryHost(tNode) { return (tNode.flags & 8 /* hasContentQuery */) !== 0; } function isComponentHost(tNode) { return (tNode.flags & 2 /* isComponentHost */) === 2 /* isComponentHost */; } function isDirectiveHost(tNode) { return (tNode.flags & 1 /* isDirectiveHost */) === 1 /* isDirectiveHost */; } function isComponentDef(def) { return def.template !== null; } function isRootView(target) { return (target[FLAGS] & 512 /* IsRoot */) !== 0; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // [Assert functions do not constraint type when they are guarded by a truthy // expression.](https://github.com/microsoft/TypeScript/issues/37295) function assertTNodeForLView(tNode, lView) { assertTNodeForTView(tNode, lView[TVIEW]); } function assertTNodeForTView(tNode, tView) { assertTNode(tNode); tNode.hasOwnProperty('tView_') && assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.'); } function assertTNode(tNode) { assertDefined(tNode, 'TNode must be defined'); if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) { throwError('Not of type TNode, got: ' + tNode); } } function assertTIcu(tIcu) { assertDefined(tIcu, 'Expected TIcu to be defined'); if (!(typeof tIcu.currentCaseLViewIndex === 'number')) { throwError('Object is not of TIcu type.'); } } function assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \'ɵcmp\' property.') { if (!getComponentDef(actual)) { throwError(msg); } } function assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \'ɵmod\' property.') { if (!getNgModuleDef(actual)) { throwError(msg); } } function assertCurrentTNodeIsParent(isParent) { assertEqual(isParent, true, 'currentTNode should be a parent'); } function assertHasParent(tNode) { assertDefined(tNode, 'currentTNode should exist!'); assertDefined(tNode.parent, 'currentTNode should have a parent'); } function assertDataNext(lView, index, arr) { if (arr == null) arr = lView; assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`); } function assertLContainer(value) { assertDefined(value, 'LContainer must be defined'); assertEqual(isLContainer(value), true, 'Expecting LContainer'); } function assertLViewOrUndefined(value) { value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null'); } function assertLView(value) { assertDefined(value, 'LView must be defined'); assertEqual(isLView(value), true, 'Expecting LView'); } function assertFirstCreatePass(tView, errMessage) { assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.'); } function assertFirstUpdatePass(tView, errMessage) { assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.'); } /** * This is a basic sanity check that an object is probably a directive def. DirectiveDef is * an interface, so we can't do a direct instanceof check. */ function assertDirectiveDef(obj) { if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) { throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`); } } function assertIndexInDeclRange(lView, index) { const tView = lView[1]; assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index); } function assertIndexInVarsRange(lView, index) { const tView = lView[1]; assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index); } function assertIndexInExpandoRange(lView, index) { const tView = lView[1]; assertBetween(tView.expandoStartIndex, lView.length, index); } function assertBetween(lower, upper, index) { if (!(lower <= index && index < upper)) { throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`); } } function assertProjectionSlots(lView, errMessage) { assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.'); assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage || 'Components with projection nodes (<ng-content>) must have projection slots defined.'); } function assertParentView(lView, errMessage) { assertDefined(lView, errMessage || 'Component views should always have a parent view (component\'s host view)'); } /** * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a * NodeInjector data structure. * * @param lView `LView` which should be checked. * @param injectorIndex index into the `LView` where the `NodeInjector` is expected. */ function assertNodeInjector(lView, injectorIndex) { assertIndexInExpandoRange(lView, injectorIndex); assertIndexInExpandoRange(lView, injectorIndex + 8 /* PARENT */); assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getFactoryDef(type, throwNotFound) { const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF); if (!hasFactoryDef && throwNotFound === true && ngDevMode) { throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`); } return hasFactoryDef ? type[NG_FACTORY_DEF] : null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents a basic change from a previous to a new value for a single * property on a directive instance. Passed as a value in a * {@link SimpleChanges} object to the `ngOnChanges` hook. * * @see `OnChanges` * * @publicApi */ class SimpleChange { constructor(previousValue, currentValue, firstChange) { this.previousValue = previousValue; this.currentValue = currentValue; this.firstChange = firstChange; } /** * Check whether the new value is the first value assigned. */ isFirstChange() { return this.firstChange; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The NgOnChangesFeature decorates a component with support for the ngOnChanges * lifecycle hook, so it should be included in any component that implements * that hook. * * If the component or directive uses inheritance, the NgOnChangesFeature MUST * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise * inherited properties will not be propagated to the ngOnChanges lifecycle * hook. * * Example usage: * * ``` * static ɵcmp = defineComponent({ * ... * inputs: {name: 'publicName'}, * features: [NgOnChangesFeature] * }); * ``` * * @codeGenApi */ function ɵɵNgOnChangesFeature() { return NgOnChangesFeatureImpl; } function NgOnChangesFeatureImpl(definition) { if (definition.type.prototype.ngOnChanges) { definition.setInput = ngOnChangesSetInput; } return rememberChangeHistoryAndInvokeOnChangesHook; } // This option ensures that the ngOnChanges lifecycle hook will be inherited // from superclasses (in InheritDefinitionFeature). /** @nocollapse */ // tslint:disable-next-line:no-toplevel-property-access ɵɵNgOnChangesFeature.ngInherit = true; /** * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate * `ngOnChanges`. * * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are * found it invokes `ngOnChanges` on the component instance. * * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`, * it is guaranteed to be called with component instance. */ function rememberChangeHistoryAndInvokeOnChangesHook() { const simpleChangesStore = getSimpleChangesStore(this); const current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current; if (current) { const previous = simpleChangesStore.previous; if (previous === EMPTY_OBJ) { simpleChangesStore.previous = current; } else { // New changes are copied to the previous store, so that we don't lose history for inputs // which were not changed this time for (let key in current) { previous[key] = current[key]; } } simpleChangesStore.current = null; this.ngOnChanges(current); } } function ngOnChangesSetInput(instance, value, publicName, privateName) { const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null }); const current = simpleChangesStore.current || (simpleChangesStore.current = {}); const previous = simpleChangesStore.previous; const declaredName = this.declaredInputs[publicName]; const previousChange = previous[declaredName]; current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ); instance[privateName] = value; } const SIMPLE_CHANGES_STORE = '__ngSimpleChanges__'; function getSimpleChangesStore(instance) { return instance[SIMPLE_CHANGES_STORE] || null; } function setSimpleChangesStore(instance, store) { return instance[SIMPLE_CHANGES_STORE] = store; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let profilerCallback = null; /** * Sets the callback function which will be invoked before and after performing certain actions at * runtime (for example, before and after running change detection). * * Warning: this function is *INTERNAL* and should not be relied upon in application's code. * The contract of the function might be changed in any release and/or the function can be removed * completely. * * @param profiler function provided by the caller or null value to disable profiling. */ const setProfiler = (profiler) => { profilerCallback = profiler; }; /** * Profiler function which wraps user code executed by the runtime. * * @param event ProfilerEvent corresponding to the execution context * @param instance component instance * @param hookOrListener lifecycle hook function or output listener. The value depends on the * execution context * @returns */ const profiler = function (event, instance, hookOrListener) { if (profilerCallback != null /* both `null` and `undefined` */) { profilerCallback(event, instance, hookOrListener); } }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; const MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/'; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This property will be monkey-patched on elements, components and directives */ const MONKEY_PATCH_KEY_NAME = '__ngContext__'; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Most of the use of `document` in Angular is from within the DI system so it is possible to simply * inject the `DOCUMENT` token and are done. * * Ivy is special because it does not rely upon the DI and must get hold of the document some other * way. * * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy. * Wherever ivy needs the global document, it calls `getDocument()` instead. * * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to * tell ivy what the global `document` is. * * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`) * by calling `setDocument()` when providing the `DOCUMENT` token. */ let DOCUMENT = undefined; /** * Tell ivy what the `document` is for this platform. * * It is only necessary to call this if the current platform is not a browser. * * @param document The object representing the global `document` in this environment. */ function setDocument(document) { DOCUMENT = document; } /** * Access the object that represents the `document` for this platform. * * Ivy calls this whenever it needs to access the `document` object. * For example to create the renderer or to do sanitization. */ function getDocument() { if (DOCUMENT !== undefined) { return DOCUMENT; } else if (typeof document !== 'undefined') { return document; } // No "document" can be found. This should only happen if we are running ivy outside Angular and // the current platform is not a browser. Since this is not a supported scenario at the moment // this should not happen in Angular apps. // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a // public API. Meanwhile we just return `undefined` and let the application fail. return undefined; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // TODO: cleanup once the code is merged in angular/angular var RendererStyleFlags3; (function (RendererStyleFlags3) { RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important"; RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase"; })(RendererStyleFlags3 || (RendererStyleFlags3 = {})); /** Returns whether the `renderer` is a `ProceduralRenderer3` */ function isProceduralRenderer(renderer) { return !!(renderer.listen); } const ɵ0 = (hostElement, rendererType) => { return getDocument(); }; const domRendererFactory3 = { createRenderer: ɵ0 }; // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$2 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`) * in same location in `LView`. This is because we don't want to pre-allocate space for it * because the storage is sparse. This file contains utilities for dealing with such data types. * * How do we know what is stored at a given location in `LView`. * - `Array.isArray(value) === false` => `RNode` (The normal storage value) * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value. * - `typeof value[TYPE] === 'object'` => `LView` * - This happens when we have a component at a given location * - `typeof value[TYPE] === true` => `LContainer` * - This happens when we have `LContainer` binding at a given location. * * * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient. */ /** * Returns `RNode`. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function unwrapRNode(value) { while (Array.isArray(value)) { value = value[HOST]; } return value; } /** * Returns `LView` or `null` if not found. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function unwrapLView(value) { while (Array.isArray(value)) { // This check is same as `isLView()` but we don't call at as we don't want to call // `Array.isArray()` twice and give JITer more work for inlining. if (typeof value[TYPE] === 'object') return value; value = value[HOST]; } return null; } /** * Returns `LContainer` or `null` if not found. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function unwrapLContainer(value) { while (Array.isArray(value)) { // This check is same as `isLContainer()` but we don't call at as we don't want to call // `Array.isArray()` twice and give JITer more work for inlining. if (value[TYPE] === true) return value; value = value[HOST]; } return null; } /** * Retrieves an element value from the provided `viewData`, by unwrapping * from any containers, component views, or style contexts. */ function getNativeByIndex(index, lView) { ngDevMode && assertIndexInRange(lView, index); ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET'); return unwrapRNode(lView[index]); } /** * Retrieve an `RNode` for a given `TNode` and `LView`. * * This function guarantees in dev mode to retrieve a non-null `RNode`. * * @param tNode * @param lView */ function getNativeByTNode(tNode, lView) { ngDevMode && assertTNodeForLView(tNode, lView); ngDevMode && assertIndexInRange(lView, tNode.index); const node = unwrapRNode(lView[tNode.index]); ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node); return node; } /** * Retrieve an `RNode` or `null` for a given `TNode` and `LView`. * * Some `TNode`s don't have associated `RNode`s. For example `Projection` * * @param tNode * @param lView */ function getNativeByTNodeOrNull(tNode, lView) { const index = tNode === null ? -1 : tNode.index; if (index !== -1) { ngDevMode && assertTNodeForLView(tNode, lView); const node = unwrapRNode(lView[index]); ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node); return node; } return null; } // fixme(misko): The return Type should be `TNode|null` function getTNode(tView, index) { ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode'); ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode'); const tNode = tView.data[index]; ngDevMode && tNode !== null && assertTNode(tNode); return tNode; } /** Retrieves a value from any `LView` or `TData`. */ function load(view, index) { ngDevMode && assertIndexInRange(view, index); return view[index]; } function getComponentLViewByIndex(nodeIndex, hostView) { // Could be an LView or an LContainer. If LContainer, unwrap to find LView. ngDevMode && assertIndexInRange(hostView, nodeIndex); const slotValue = hostView[nodeIndex]; const lView = isLView(slotValue) ? slotValue : slotValue[HOST]; return lView; } /** * Returns the monkey-patch value data present on the target (which could be * a component, directive or a DOM node). */ function readPatchedData(target) { ngDevMode && assertDefined(target, 'Target expected'); return target[MONKEY_PATCH_KEY_NAME] || null; } function readPatchedLView(target) { const value = readPatchedData(target); if (value) { return Array.isArray(value) ? value : value.lView; } return null; } /** Checks whether a given view is in creation mode */ function isCreationMode(view) { return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */; } /** * Returns a boolean for whether the view is attached to the change detection tree. * * Note: This determines whether a view should be checked, not whether it's inserted * into a container. For that, you'll want `viewAttachedToContainer` below. */ function viewAttachedToChangeDetector(view) { return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */; } /** Returns a boolean for whether the view is attached to a container. */ function viewAttachedToContainer(view) { return isLContainer(view[PARENT]); } function getConstant(consts, index) { if (index === null || index === undefined) return null; ngDevMode && assertIndexInRange(consts, index); return consts[index]; } /** * Resets the pre-order hook flags of the view. * @param lView the LView on which the flags are reset */ function resetPreOrderHookFlags(lView) { lView[PREORDER_HOOK_FLAGS] = 0; } /** * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents * whose * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh * or * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh */ function updateTransplantedViewCount(lContainer, amount) { lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount; let viewOrContainer = lContainer; let parent = lContainer[PARENT]; while (parent !== null && ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) || (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) { parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount; viewOrContainer = parent; parent = parent[PARENT]; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const instructionState = { lFrame: createLFrame(null), bindingsEnabled: true, isInCheckNoChangesMode: false, }; /** * Returns true if the instruction state stack is empty. * * Intended to be called from tests only (tree shaken otherwise). */ function specOnlyIsInstructionStateEmpty() { return instructionState.lFrame.parent === null; } function getElementDepthCount() { return instructionState.lFrame.elementDepthCount; } function increaseElementDepthCount() { instructionState.lFrame.elementDepthCount++; } function decreaseElementDepthCount() { instructionState.lFrame.elementDepthCount--; } function getBindingsEnabled() { return instructionState.bindingsEnabled; } /** * Enables directive matching on elements. * * * Example: * ``` * <my-comp my-directive> * Should match component / directive. * </my-comp> * <div ngNonBindable> * <!-- ɵɵdisableBindings() --> * <my-comp my-directive> * Should not match component / directive because we are in ngNonBindable. * </my-comp> * <!-- ɵɵenableBindings() --> * </div> * ``` * * @codeGenApi */ function ɵɵenableBindings() { instructionState.bindingsEnabled = true; } /** * Disables directive matching on element. * * * Example: * ``` * <my-comp my-directive> * Should match component / directive. * </my-comp> * <div ngNonBindable> * <!-- ɵɵdisableBindings() --> * <my-comp my-directive> * Should not match component / directive because we are in ngNonBindable. * </my-comp> * <!-- ɵɵenableBindings() --> * </div> * ``` * * @codeGenApi */ function ɵɵdisableBindings() { instructionState.bindingsEnabled = false; } /** * Return the current `LView`. */ function getLView() { return instructionState.lFrame.lView; } /** * Return the current `TView`. */ function getTView() { return instructionState.lFrame.tView; } /** * Restores `contextViewData` to the given OpaqueViewState instance. * * Used in conjunction with the getCurrentView() instruction to save a snapshot * of the current view and restore it when listeners are invoked. This allows * walking the declaration view tree in listeners to get vars from parent views. * * @param viewToRestore The OpaqueViewState instance to restore. * * @codeGenApi */ function ɵɵrestoreView(viewToRestore) { instructionState.lFrame.contextLView = viewToRestore; } function getCurrentTNode() { let currentTNode = getCurrentTNodePlaceholderOk(); while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) { currentTNode = currentTNode.parent; } return currentTNode; } function getCurrentTNodePlaceholderOk() { return instructionState.lFrame.currentTNode; } function getCurrentParentTNode() { const lFrame = instructionState.lFrame; const currentTNode = lFrame.currentTNode; return lFrame.isParent ? currentTNode : currentTNode.parent; } function setCurrentTNode(tNode, isParent) { ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView); const lFrame = instructionState.lFrame; lFrame.currentTNode = tNode; lFrame.isParent = isParent; } function isCurrentTNodeParent() { return instructionState.lFrame.isParent; } function setCurrentTNodeAsNotParent() { instructionState.lFrame.isParent = false; } function setCurrentTNodeAsParent() { instructionState.lFrame.isParent = true; } function getContextLView() { return instructionState.lFrame.contextLView; } function isInCheckNoChangesMode() { // TODO(misko): remove this from the LView since it is ngDevMode=true mode only. return instructionState.isInCheckNoChangesMode; } function setIsInCheckNoChangesMode(mode) { instructionState.isInCheckNoChangesMode = mode; } // top level variables should not be exported for performance reasons (PERF_NOTES.md) function getBindingRoot() { const lFrame = instructionState.lFrame; let index = lFrame.bindingRootIndex; if (index === -1) { index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex; } return index; } function getBindingIndex() { return instructionState.lFrame.bindingIndex; } function setBindingIndex(value) { return instructionState.lFrame.bindingIndex = value; } function nextBindingIndex() { return instructionState.lFrame.bindingIndex++; } function incrementBindingIndex(count) { const lFrame = instructionState.lFrame; const index = lFrame.bindingIndex; lFrame.bindingIndex = lFrame.bindingIndex + count; return index; } function isInI18nBlock() { return instructionState.lFrame.inI18n; } function setInI18nBlock(isInI18nBlock) { instructionState.lFrame.inI18n = isInI18nBlock; } /** * Set a new binding root index so that host template functions can execute. * * Bindings inside the host template are 0 index. But because we don't know ahead of time * how many host bindings we have we can't pre-compute them. For this reason they are all * 0 index and we just shift the root so that they match next available location in the LView. * * @param bindingRootIndex Root index for `hostBindings` * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive * whose `hostBindings` are being processed. */ function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) { const lFrame = instructionState.lFrame; lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex; setCurrentDirectiveIndex(currentDirectiveIndex); } /** * When host binding is executing this points to the directive index. * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef` * `LView[getCurrentDirectiveIndex()]` is directive instance. */ function getCurrentDirectiveIndex() { return instructionState.lFrame.currentDirectiveIndex; } /** * Sets an index of a directive whose `hostBindings` are being processed. * * @param currentDirectiveIndex `TData` index where current directive instance can be found. */ function setCurrentDirectiveIndex(currentDirectiveIndex) { instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex; } /** * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being * executed. * * @param tData Current `TData` where the `DirectiveDef` will be looked up at. */ function getCurrentDirectiveDef(tData) { const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex; return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex]; } function getCurrentQueryIndex() { return instructionState.lFrame.currentQueryIndex; } function setCurrentQueryIndex(value) { instructionState.lFrame.currentQueryIndex = value; } /** * Returns a `TNode` of the location where the current `LView` is declared at. * * @param lView an `LView` that we want to find parent `TNode` for. */ function getDeclarationTNode(lView) { const tView = lView[TVIEW]; // Return the declaration parent for embedded views if (tView.type === 2 /* Embedded */) { ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.'); return tView.declTNode; } // Components don't have `TView.declTNode` because each instance of component could be // inserted in different location, hence `TView.declTNode` is meaningless. // Falling back to `T_HOST` in case we cross component boundary. if (tView.type === 1 /* Component */) { return lView[T_HOST]; } // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode. return null; } /** * This is a light weight version of the `enterView` which is needed by the DI system. * * @param lView `LView` location of the DI context. * @param tNode `TNode` for DI context * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration * tree from `tNode` until we find parent declared `TElementNode`. * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated * `NodeInjector` can be found and we should instead use `ModuleInjector`. * - If `true` than this call must be fallowed by `leaveDI` * - If `false` than this call failed and we should NOT call `leaveDI` */ function enterDI(lView, tNode, flags) { ngDevMode && assertLViewOrUndefined(lView); if (flags & InjectFlags.SkipSelf) { ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]); let parentTNode = tNode; let parentLView = lView; while (true) { ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined'); parentTNode = parentTNode.parent; if (parentTNode === null && !(flags & InjectFlags.Host)) { parentTNode = getDeclarationTNode(parentLView); if (parentTNode === null) break; // In this case, a parent exists and is definitely an element. So it will definitely // have an existing lView as the declaration view, which is why we can assume it's defined. ngDevMode && assertDefined(parentLView, 'Parent LView should be defined'); parentLView = parentLView[DECLARATION_VIEW]; // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives // We want to skip those and look only at Elements and ElementContainers to ensure // we're looking at true parent nodes, and not content or other types. if (parentTNode.type & (2 /* Element */ | 8 /* ElementContainer */)) { break; } } else { break; } } if (parentTNode === null) { // If we failed to find a parent TNode this means that we should use module injector. return false; } else { tNode = parentTNode; lView = parentLView; } } ngDevMode && assertTNodeForLView(tNode, lView); const lFrame = instructionState.lFrame = allocLFrame(); lFrame.currentTNode = tNode; lFrame.lView = lView; return true; } /** * Swap the current lView with a new lView. * * For performance reasons we store the lView in the top level of the module. * This way we minimize the number of properties to read. Whenever a new view * is entered we have to store the lView for later, and when the view is * exited the state has to be restored * * @param newView New lView to become active * @returns the previously active lView; */ function enterView(newView) { ngDevMode && assertNotEqual(newView[0], newView[1], '????'); ngDevMode && assertLViewOrUndefined(newView); const newLFrame = allocLFrame(); if (ngDevMode) { assertEqual(newLFrame.isParent, true, 'Expected clean LFrame'); assertEqual(newLFrame.lView, null, 'Expected clean LFrame'); assertEqual(newLFrame.tView, null, 'Expected clean LFrame'); assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame'); assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame'); assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame'); assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame'); assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame'); assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame'); } const tView = newView[TVIEW]; instructionState.lFrame = newLFrame; ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView); newLFrame.currentTNode = tView.firstChild; newLFrame.lView = newView; newLFrame.tView = tView; newLFrame.contextLView = newView; newLFrame.bindingIndex = tView.bindingStartIndex; newLFrame.inI18n = false; } /** * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure. */ function allocLFrame() { const currentLFrame = instructionState.lFrame; const childLFrame = currentLFrame === null ? null : currentLFrame.child; const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame; return newLFrame; } function createLFrame(parent) { const lFrame = { currentTNode: null, isParent: true, lView: null, tView: null, selectedIndex: -1, contextLView: null, elementDepthCount: 0, currentNamespace: null, currentDirectiveIndex: -1, bindingRootIndex: -1, bindingIndex: -1, currentQueryIndex: 0, parent: parent, child: null, inI18n: false, }; parent !== null && (parent.child = lFrame); // link the new LFrame for reuse. return lFrame; } /** * A lightweight version of leave which is used with DI. * * This function only resets `currentTNode` and `LView` as those are the only properties * used with DI (`enterDI()`). * * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`. */ function leaveViewLight() { const oldLFrame = instructionState.lFrame; instructionState.lFrame = oldLFrame.parent; oldLFrame.currentTNode = null; oldLFrame.lView = null; return oldLFrame; } /** * This is a lightweight version of the `leaveView` which is needed by the DI system. * * NOTE: this function is an alias so that we can change the type of the function to have `void` * return type. */ const leaveDI = leaveViewLight; /** * Leave the current `LView` * * This pops the `LFrame` with the associated `LView` from the stack. * * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is * because for performance reasons we don't release `LFrame` but rather keep it for next use. */ function leaveView() { const oldLFrame = leaveViewLight(); oldLFrame.isParent = true; oldLFrame.tView = null; oldLFrame.selectedIndex = -1; oldLFrame.contextLView = null; oldLFrame.elementDepthCount = 0; oldLFrame.currentDirectiveIndex = -1; oldLFrame.currentNamespace = null; oldLFrame.bindingRootIndex = -1; oldLFrame.bindingIndex = -1; oldLFrame.currentQueryIndex = 0; } function nextContextImpl(level) { const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView); return contextLView[CONTEXT]; } function walkUpViews(nestingLevel, currentView) { while (nestingLevel > 0) { ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.'); currentView = currentView[DECLARATION_VIEW]; nestingLevel--; } return currentView; } /** * Gets the currently selected element index. * * Used with {@link property} instruction (and more in the future) to identify the index in the * current `LView` to act on. */ function getSelectedIndex() { return instructionState.lFrame.selectedIndex; } /** * Sets the most recent index passed to {@link select} * * Used with {@link property} instruction (and more in the future) to identify the index in the * current `LView` to act on. * * (Note that if an "exit function" was set earlier (via `setElementExitFn()`) then that will be * run if and when the provided `index` value is different from the current selected index value.) */ function setSelectedIndex(index) { ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).'); ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, 'Can\'t set index passed end of LView'); instructionState.lFrame.selectedIndex = index; } /** * Gets the `tNode` that represents currently selected element. */ function getSelectedTNode() { const lFrame = instructionState.lFrame; return getTNode(lFrame.tView, lFrame.selectedIndex); } /** * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state. * * @codeGenApi */ function ɵɵnamespaceSVG() { instructionState.lFrame.currentNamespace = SVG_NAMESPACE; } /** * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state. * * @codeGenApi */ function ɵɵnamespaceMathML() { instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE; } /** * Sets the namespace used to create elements to `null`, which forces element creation to use * `createElement` rather than `createElementNS`. * * @codeGenApi */ function ɵɵnamespaceHTML() { namespaceHTMLInternal(); } /** * Sets the namespace used to create elements to `null`, which forces element creation to use * `createElement` rather than `createElementNS`. */ function namespaceHTMLInternal() { instructionState.lFrame.currentNamespace = null; } function getNamespace() { return instructionState.lFrame.currentNamespace; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`. * * Must be run *only* on the first template pass. * * Sets up the pre-order hooks on the provided `tView`, * see {@link HookData} for details about the data structure. * * @param directiveIndex The index of the directive in LView * @param directiveDef The definition containing the hooks to setup in tView * @param tView The current TView */ function registerPreOrderHooks(directiveIndex, directiveDef, tView) { ngDevMode && assertFirstCreatePass(tView); const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype; if (ngOnChanges) { const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef); (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges); (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])) .push(directiveIndex, wrappedOnChanges); } if (ngOnInit) { (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit); } if (ngDoCheck) { (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck); (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck); } } /** * * Loops through the directives on the provided `tNode` and queues hooks to be * run that are not initialization hooks. * * Should be executed during `elementEnd()` and similar to * preserve hook execution order. Content, view, and destroy hooks for projected * components and directives must be called *before* their hosts. * * Sets up the content, view, and destroy hooks on the provided `tView`, * see {@link HookData} for details about the data structure. * * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up * separately at `elementStart`. * * @param tView The current TView * @param tNode The TNode whose directives are to be searched for hooks to queue */ function registerPostOrderHooks(tView, tNode) { ngDevMode && assertFirstCreatePass(tView); // It's necessary to loop through the directives at elementEnd() (rather than processing in // directiveCreate) so we can preserve the current hook order. Content, view, and destroy // hooks for projected components and directives must be called *before* their hosts. for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) { const directiveDef = tView.data[i]; ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef'); const lifecycleHooks = directiveDef.type.prototype; const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks; if (ngAfterContentInit) { (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit); } if (ngAfterContentChecked) { (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked); (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked); } if (ngAfterViewInit) { (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit); } if (ngAfterViewChecked) { (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked); (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked); } if (ngOnDestroy != null) { (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy); } } } /** * Executing hooks requires complex logic as we need to deal with 2 constraints. * * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only * once, across many change detection cycles. This must be true even if some hooks throw, or if * some recursively trigger a change detection cycle. * To solve that, it is required to track the state of the execution of these init hooks. * This is done by storing and maintaining flags in the view: the {@link InitPhaseState}, * and the index within that phase. They can be seen as a cursor in the following structure: * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]] * They are are stored as flags in LView[FLAGS]. * * 2. Pre-order hooks can be executed in batches, because of the select instruction. * To be able to pause and resume their execution, we also need some state about the hook's array * that is being processed: * - the index of the next hook to be executed * - the number of init hooks already found in the processed part of the array * They are are stored as flags in LView[PREORDER_HOOK_FLAGS]. */ /** * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read * / write of the init-hooks related flags. * @param lView The LView where hooks are defined * @param hooks Hooks to be run * @param nodeIndex 3 cases depending on the value: * - undefined: all hooks from the array should be executed (post-order case) * - null: execute hooks only from the saved index until the end of the array (pre-order case, when * flushing the remaining hooks) * - number: execute hooks only from the saved index until that node index exclusive (pre-order * case, when executing select(number)) */ function executeCheckHooks(lView, hooks, nodeIndex) { callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex); } /** * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked, * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed. * @param lView The LView where hooks are defined * @param hooks Hooks to be run * @param initPhase A phase for which hooks should be run * @param nodeIndex 3 cases depending on the value: * - undefined: all hooks from the array should be executed (post-order case) * - null: execute hooks only from the saved index until the end of the array (pre-order case, when * flushing the remaining hooks) * - number: execute hooks only from the saved index until that node index exclusive (pre-order * case, when executing select(number)) */ function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) { ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once'); if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { callHooks(lView, hooks, initPhase, nodeIndex); } } function incrementInitPhaseFlags(lView, initPhase) { ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.'); let flags = lView[FLAGS]; if ((flags & 3 /* InitPhaseStateMask */) === initPhase) { flags &= 2047 /* IndexWithinInitPhaseReset */; flags += 1 /* InitPhaseStateIncrementer */; lView[FLAGS] = flags; } } /** * Calls lifecycle hooks with their contexts, skipping init hooks if it's not * the first LView pass * * @param currentView The current view * @param arr The array in which the hooks are found * @param initPhaseState the current state of the init phase * @param currentNodeIndex 3 cases depending on the value: * - undefined: all hooks from the array should be executed (post-order case) * - null: execute hooks only from the saved index until the end of the array (pre-order case, when * flushing the remaining hooks) * - number: execute hooks only from the saved index until that node index exclusive (pre-order * case, when executing select(number)) */ function callHooks(currentView, arr, initPhase, currentNodeIndex) { ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.'); const startIndex = currentNodeIndex !== undefined ? (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) : 0; const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1; const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1 let lastNodeIndexFound = 0; for (let i = startIndex; i < max; i++) { const hook = arr[i + 1]; if (typeof hook === 'number') { lastNodeIndexFound = arr[i]; if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) { break; } } else { const isInitHook = arr[i] < 0; if (isInitHook) currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */; if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) { callHook(currentView, initPhase, arr, i); currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i + 2; } i++; } } } /** * Execute one hook against the current `LView`. * * @param currentView The current view * @param initPhaseState the current state of the init phase * @param arr The array in which the hooks are found * @param i The current index within the hook data array */ function callHook(currentView, initPhase, arr, i) { const isInitHook = arr[i] < 0; const hook = arr[i + 1]; const directiveIndex = isInitHook ? -arr[i] : arr[i]; const directive = currentView[directiveIndex]; if (isInitHook) { const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */; // The init phase state must be always checked here as it may have been recursively updated. if (indexWithintInitPhase < (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) && (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */; profiler(4 /* LifecycleHookStart */, directive, hook); try { hook.call(directive); } finally { profiler(5 /* LifecycleHookEnd */, directive, hook); } } } else { profiler(4 /* LifecycleHookStart */, directive, hook); try { hook.call(directive); } finally { profiler(5 /* LifecycleHookEnd */, directive, hook); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NO_PARENT_INJECTOR = -1; /** * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in * `TView.data`. This allows us to store information about the current node's tokens (which * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be * shared, so they live in `LView`). * * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter * determines whether a directive is available on the associated node or not. This prevents us * from searching the directives array at this level unless it's probable the directive is in it. * * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters. * * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed * using interfaces as they were previously. The start index of each `LInjector` and `TInjector` * will differ based on where it is flattened into the main array, so it's not possible to know * the indices ahead of time and save their types here. The interfaces are still included here * for documentation purposes. * * export interface LInjector extends Array<any> { * * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) * [0]: number; * * // Cumulative bloom for directive IDs 32-63 * [1]: number; * * // Cumulative bloom for directive IDs 64-95 * [2]: number; * * // Cumulative bloom for directive IDs 96-127 * [3]: number; * * // Cumulative bloom for directive IDs 128-159 * [4]: number; * * // Cumulative bloom for directive IDs 160 - 191 * [5]: number; * * // Cumulative bloom for directive IDs 192 - 223 * [6]: number; * * // Cumulative bloom for directive IDs 224 - 255 * [7]: number; * * // We need to store a reference to the injector's parent so DI can keep looking up * // the injector tree until it finds the dependency it's looking for. * [PARENT_INJECTOR]: number; * } * * export interface TInjector extends Array<any> { * * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) * [0]: number; * * // Shared node bloom for directive IDs 32-63 * [1]: number; * * // Shared node bloom for directive IDs 64-95 * [2]: number; * * // Shared node bloom for directive IDs 96-127 * [3]: number; * * // Shared node bloom for directive IDs 128-159 * [4]: number; * * // Shared node bloom for directive IDs 160 - 191 * [5]: number; * * // Shared node bloom for directive IDs 192 - 223 * [6]: number; * * // Shared node bloom for directive IDs 224 - 255 * [7]: number; * * // Necessary to find directive indices for a particular node. * [TNODE]: TElementNode|TElementContainerNode|TContainerNode; * } */ /** * Factory for creating instances of injectors in the NodeInjector. * * This factory is complicated by the fact that it can resolve `multi` factories as well. * * NOTE: Some of the fields are optional which means that this class has two hidden classes. * - One without `multi` support (most common) * - One with `multi` values, (rare). * * Since VMs can cache up to 4 inline hidden classes this is OK. * * - Single factory: Only `resolving` and `factory` is defined. * - `providers` factory: `componentProviders` is a number and `index = -1`. * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`. */ class NodeInjectorFactory { constructor( /** * Factory to invoke in order to create a new instance. */ factory, /** * Set to `true` if the token is declared in `viewProviders` (or if it is component). */ isViewProvider, injectImplementation) { this.factory = factory; /** * Marker set to true during factory invocation to see if we get into recursive loop. * Recursive loop causes an error to be displayed. */ this.resolving = false; ngDevMode && assertDefined(factory, 'Factory not specified'); ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.'); this.canSeeViewProviders = isViewProvider; this.injectImpl = injectImplementation; } } function isFactory(obj) { return obj instanceof NodeInjectorFactory; } // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$3 = 1; /** * Converts `TNodeType` into human readable text. * Make sure this matches with `TNodeType` */ function toTNodeTypeAsString(tNodeType) { let text = ''; (tNodeType & 1 /* Text */) && (text += '|Text'); (tNodeType & 2 /* Element */) && (text += '|Element'); (tNodeType & 4 /* Container */) && (text += '|Container'); (tNodeType & 8 /* ElementContainer */) && (text += '|ElementContainer'); (tNodeType & 16 /* Projection */) && (text += '|Projection'); (tNodeType & 32 /* Icu */) && (text += '|IcuContainer'); (tNodeType & 64 /* Placeholder */) && (text += '|Placeholder'); return text.length > 0 ? text.substring(1) : text; } // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$4 = 1; /** * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding. * * ``` * <div my-dir [class]="exp"></div> * ``` * and * ``` * @Directive({ * }) * class MyDirective { * @Input() * class: string; * } * ``` * * In the above case it is necessary to write the reconciled styling information into the * directive's input. * * @param tNode */ function hasClassInput(tNode) { return (tNode.flags & 16 /* hasClassInput */) !== 0; } /** * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding. * * ``` * <div my-dir [style]="exp"></div> * ``` * and * ``` * @Directive({ * }) * class MyDirective { * @Input() * class: string; * } * ``` * * In the above case it is necessary to write the reconciled styling information into the * directive's input. * * @param tNode */ function hasStyleInput(tNode) { return (tNode.flags & 32 /* hasStyleInput */) !== 0; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function assertTNodeType(tNode, expectedTypes, message) { assertDefined(tNode, 'should be called with a TNode'); if ((tNode.type & expectedTypes) === 0) { throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`); } } function assertPureTNodeType(type) { if (!(type === 2 /* Element */ || // type === 1 /* Text */ || // type === 4 /* Container */ || // type === 8 /* ElementContainer */ || // type === 32 /* Icu */ || // type === 16 /* Projection */ || // type === 64 /* Placeholder */)) { throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`); } } /** * Assigns all attribute values to the provided element via the inferred renderer. * * This function accepts two forms of attribute entries: * * default: (key, value): * attrs = [key1, value1, key2, value2] * * namespaced: (NAMESPACE_MARKER, uri, name, value) * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value] * * The `attrs` array can contain a mix of both the default and namespaced entries. * The "default" values are set without a marker, but if the function comes across * a marker value then it will attempt to set a namespaced value. If the marker is * not of a namespaced value then the function will quit and return the index value * where it stopped during the iteration of the attrs array. * * See [AttributeMarker] to understand what the namespace marker value is. * * Note that this instruction does not support assigning style and class values to * an element. See `elementStart` and `elementHostAttrs` to learn how styling values * are applied to an element. * @param renderer The renderer to be used * @param native The element that the attributes will be assigned to * @param attrs The attribute array of values that will be assigned to the element * @returns the index value that was last accessed in the attributes array */ function setUpAttributes(renderer, native, attrs) { const isProc = isProceduralRenderer(renderer); let i = 0; while (i < attrs.length) { const value = attrs[i]; if (typeof value === 'number') { // only namespaces are supported. Other value types (such as style/class // entries) are not supported in this function. if (value !== 0 /* NamespaceURI */) { break; } // we just landed on the marker value ... therefore // we should skip to the next entry i++; const namespaceURI = attrs[i++]; const attrName = attrs[i++]; const attrVal = attrs[i++]; ngDevMode && ngDevMode.rendererSetAttribute++; isProc ? renderer.setAttribute(native, attrName, attrVal, namespaceURI) : native.setAttributeNS(namespaceURI, attrName, attrVal); } else { // attrName is string; const attrName = value; const attrVal = attrs[++i]; // Standard attributes ngDevMode && ngDevMode.rendererSetAttribute++; if (isAnimationProp(attrName)) { if (isProc) { renderer.setProperty(native, attrName, attrVal); } } else { isProc ? renderer.setAttribute(native, attrName, attrVal) : native.setAttribute(attrName, attrVal); } i++; } } // another piece of code may iterate over the same attributes array. Therefore // it may be helpful to return the exact spot where the attributes array exited // whether by running into an unsupported marker or if all the static values were // iterated over. return i; } /** * Test whether the given value is a marker that indicates that the following * attribute values in a `TAttributes` array are only the names of attributes, * and not name-value pairs. * @param marker The attribute marker to test. * @returns true if the marker is a "name-only" marker (e.g. `Bindings`, `Template` or `I18n`). */ function isNameOnlyAttributeMarker(marker) { return marker === 3 /* Bindings */ || marker === 4 /* Template */ || marker === 6 /* I18n */; } function isAnimationProp(name) { // Perf note: accessing charCodeAt to check for the first character of a string is faster as // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that // charCodeAt doesn't allocate memory to return a substring. return name.charCodeAt(0) === 64 /* AT_SIGN */; } /** * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process. * * This merge function keeps the order of attrs same. * * @param dst Location of where the merged `TAttributes` should end up. * @param src `TAttributes` which should be appended to `dst` */ function mergeHostAttrs(dst, src) { if (src === null || src.length === 0) { // do nothing } else if (dst === null || dst.length === 0) { // We have source, but dst is empty, just make a copy. dst = src.slice(); } else { let srcMarker = -1 /* ImplicitAttributes */; for (let i = 0; i < src.length; i++) { const item = src[i]; if (typeof item === 'number') { srcMarker = item; } else { if (srcMarker === 0 /* NamespaceURI */) { // Case where we need to consume `key1`, `key2`, `value` items. } else if (srcMarker === -1 /* ImplicitAttributes */ || srcMarker === 2 /* Styles */) { // Case where we have to consume `key1` and `value` only. mergeHostAttribute(dst, srcMarker, item, null, src[++i]); } else { // Case where we have to consume `key1` only. mergeHostAttribute(dst, srcMarker, item, null, null); } } } } return dst; } /** * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account. * * @param dst `TAttributes` to append to. * @param marker Region where the `key`/`value` should be added. * @param key1 Key to add to `TAttributes` * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`) * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class. */ function mergeHostAttribute(dst, marker, key1, key2, value) { let i = 0; // Assume that new markers will be inserted at the end. let markerInsertPosition = dst.length; // scan until correct type. if (marker === -1 /* ImplicitAttributes */) { markerInsertPosition = -1; } else { while (i < dst.length) { const dstValue = dst[i++]; if (typeof dstValue === 'number') { if (dstValue === marker) { markerInsertPosition = -1; break; } else if (dstValue > marker) { // We need to save this as we want the markers to be inserted in specific order. markerInsertPosition = i - 1; break; } } } } // search until you find place of insertion while (i < dst.length) { const item = dst[i]; if (typeof item === 'number') { // since `i` started as the index after the marker, we did not find it if we are at the next // marker break; } else if (item === key1) { // We already have same token if (key2 === null) { if (value !== null) { dst[i + 1] = value; } return; } else if (key2 === dst[i + 1]) { dst[i + 2] = value; return; } } // Increment counter. i++; if (key2 !== null) i++; if (value !== null) i++; } // insert at location. if (markerInsertPosition !== -1) { dst.splice(markerInsertPosition, 0, marker); i = markerInsertPosition + 1; } dst.splice(i++, 0, key1); if (key2 !== null) { dst.splice(i++, 0, key2); } if (value !== null) { dst.splice(i++, 0, value); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /// Parent Injector Utils /////////////////////////////////////////////////////////////// function hasParentInjector(parentLocation) { return parentLocation !== NO_PARENT_INJECTOR; } function getParentInjectorIndex(parentLocation) { ngDevMode && assertNumber(parentLocation, 'Number expected'); ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.'); const parentInjectorIndex = parentLocation & 32767 /* InjectorIndexMask */; ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.'); return parentLocation & 32767 /* InjectorIndexMask */; } function getParentInjectorViewOffset(parentLocation) { return parentLocation >> 16 /* ViewOffsetShift */; } /** * Unwraps a parent injector location number to find the view offset from the current injector, * then walks up the declaration view tree until the view is found that contains the parent * injector. * * @param location The location of the parent injector, which contains the view offset * @param startView The LView instance from which to start walking up the view tree * @returns The LView instance that contains the parent injector */ function getParentInjectorView(location, startView) { let viewOffset = getParentInjectorViewOffset(location); let parentView = startView; // For most cases, the parent injector can be found on the host node (e.g. for component // or container), but we must keep the loop here to support the rarer case of deeply nested // <ng-template> tags or inline views, where the parent injector might live many views // above the child injector. while (viewOffset > 0) { parentView = parentView[DECLARATION_VIEW]; viewOffset--; } return parentView; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines if the call to `inject` should include `viewProviders` in its resolution. * * This is set to true when we try to instantiate a component. This value is reset in * `getNodeInjectable` to a value which matches the declaration location of the token about to be * instantiated. This is done so that if we are injecting a token which was declared outside of * `viewProviders` we don't accidentally pull `viewProviders` in. * * Example: * * ``` * @Injectable() * class MyService { * constructor(public value: String) {} * } * * @Component({ * providers: [ * MyService, * {provide: String, value: 'providers' } * ] * viewProviders: [ * {provide: String, value: 'viewProviders'} * ] * }) * class MyComponent { * constructor(myService: MyService, value: String) { * // We expect that Component can see into `viewProviders`. * expect(value).toEqual('viewProviders'); * // `MyService` was not declared in `viewProviders` hence it can't see it. * expect(myService.value).toEqual('providers'); * } * } * * ``` */ let includeViewProviders = true; function setIncludeViewProviders(v) { const oldValue = includeViewProviders; includeViewProviders = v; return oldValue; } /** * The number of slots in each bloom filter (used by DI). The larger this number, the fewer * directives that will share slots, and thus, the fewer false positives when checking for * the existence of a directive. */ const BLOOM_SIZE = 256; const BLOOM_MASK = BLOOM_SIZE - 1; /** * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits, * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash * number. */ const BLOOM_BUCKET_BITS = 5; /** Counter used to generate unique IDs for directives. */ let nextNgElementId = 0; /** * Registers this directive as present in its node's injector by flipping the directive's * corresponding bit in the injector's bloom filter. * * @param injectorIndex The index of the node injector where this token should be registered * @param tView The TView for the injector's bloom filters * @param type The directive token to register */ function bloomAdd(injectorIndex, tView, type) { ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true'); let id; if (typeof type === 'string') { id = type.charCodeAt(0) || 0; } else if (type.hasOwnProperty(NG_ELEMENT_ID)) { id = type[NG_ELEMENT_ID]; } // Set a unique ID on the directive type, so if something tries to inject the directive, // we can easily retrieve the ID and hash it into the bloom bit that should be checked. if (id == null) { id = type[NG_ELEMENT_ID] = nextNgElementId++; } // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each), // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter. const bloomHash = id & BLOOM_MASK; // Create a mask that targets the specific bit associated with the directive. // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding // to bit positions 0 - 31 in a 32 bit integer. const mask = 1 << bloomHash; // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`. // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask // should be written to. tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask; } /** * Creates (or gets an existing) injector for a given element or container. * * @param tNode for which an injector should be retrieved / created. * @param lView View where the node is stored * @returns Node injector */ function getOrCreateNodeInjectorForNode(tNode, lView) { const existingInjectorIndex = getInjectorIndex(tNode, lView); if (existingInjectorIndex !== -1) { return existingInjectorIndex; } const tView = lView[TVIEW]; if (tView.firstCreatePass) { tNode.injectorIndex = lView.length; insertBloom(tView.data, tNode); // foundation for node bloom insertBloom(lView, null); // foundation for cumulative bloom insertBloom(tView.blueprint, null); } const parentLoc = getParentInjectorLocation(tNode, lView); const injectorIndex = tNode.injectorIndex; // If a parent injector can't be found, its location is set to -1. // In that case, we don't need to set up a cumulative bloom if (hasParentInjector(parentLoc)) { const parentIndex = getParentInjectorIndex(parentLoc); const parentLView = getParentInjectorView(parentLoc, lView); const parentData = parentLView[TVIEW].data; // Creates a cumulative bloom filter that merges the parent's bloom filter // and its own cumulative bloom (which contains tokens for all ancestors) for (let i = 0; i < 8 /* BLOOM_SIZE */; i++) { lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i]; } } lView[injectorIndex + 8 /* PARENT */] = parentLoc; return injectorIndex; } function insertBloom(arr, footer) { arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer); } function getInjectorIndex(tNode, lView) { if (tNode.injectorIndex === -1 || // If the injector index is the same as its parent's injector index, then the index has been // copied down from the parent node. No injector has been created yet on this node. (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) || // After the first template pass, the injector index might exist but the parent values // might not have been calculated yet for this instance lView[tNode.injectorIndex + 8 /* PARENT */] === null) { return -1; } else { ngDevMode && assertIndexInRange(lView, tNode.injectorIndex); return tNode.injectorIndex; } } /** * Finds the index of the parent injector, with a view offset if applicable. Used to set the * parent injector initially. * * @returns Returns a number that is the combination of the number of LViews that we have to go up * to find the LView containing the parent inject AND the index of the injector within that LView. */ function getParentInjectorLocation(tNode, lView) { if (tNode.parent && tNode.parent.injectorIndex !== -1) { // If we have a parent `TNode` and there is an injector associated with it we are done, because // the parent injector is within the current `LView`. return tNode.parent.injectorIndex; // ViewOffset is 0 } // When parent injector location is computed it may be outside of the current view. (ie it could // be pointing to a declared parent location). This variable stores number of declaration parents // we need to walk up in order to find the parent injector location. let declarationViewOffset = 0; let parentTNode = null; let lViewCursor = lView; // The parent injector is not in the current `LView`. We will have to walk the declared parent // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent // `NodeInjector`. while (lViewCursor !== null) { // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`. const tView = lViewCursor[TVIEW]; const tViewType = tView.type; if (tViewType === 2 /* Embedded */) { ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.'); parentTNode = tView.declTNode; } else if (tViewType === 1 /* Component */) { // Components don't have `TView.declTNode` because each instance of component could be // inserted in different location, hence `TView.declTNode` is meaningless. parentTNode = lViewCursor[T_HOST]; } else { ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected'); parentTNode = null; } if (parentTNode === null) { // If we have no parent, than we are done. return NO_PARENT_INJECTOR; } ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]); // Every iteration of the loop requires that we go to the declared parent. declarationViewOffset++; lViewCursor = lViewCursor[DECLARATION_VIEW]; if (parentTNode.injectorIndex !== -1) { // We found a NodeInjector which points to something. return (parentTNode.injectorIndex | (declarationViewOffset << 16 /* ViewOffsetShift */)); } } return NO_PARENT_INJECTOR; } /** * Makes a type or an injection token public to the DI system by adding it to an * injector's bloom filter. * * @param di The node injector in which a directive will be added * @param token The type or the injection token to be made public */ function diPublicInInjector(injectorIndex, tView, token) { bloomAdd(injectorIndex, tView, token); } /** * Inject static attribute value into directive constructor. * * This method is used with `factory` functions which are generated as part of * `defineDirective` or `defineComponent`. The method retrieves the static value * of an attribute. (Dynamic attributes are not supported since they are not resolved * at the time of injection and can change over time.) * * # Example * Given: * ``` * @Component(...) * class MyComponent { * constructor(@Attribute('title') title: string) { ... } * } * ``` * When instantiated with * ``` * <my-component title="Hello"></my-component> * ``` * * Then factory method generated is: * ``` * MyComponent.ɵcmp = defineComponent({ * factory: () => new MyComponent(injectAttribute('title')) * ... * }) * ``` * * @publicApi */ function injectAttributeImpl(tNode, attrNameToInject) { ngDevMode && assertTNodeType(tNode, 12 /* AnyContainer */ | 3 /* AnyRNode */); ngDevMode && assertDefined(tNode, 'expecting tNode'); if (attrNameToInject === 'class') { return tNode.classes; } if (attrNameToInject === 'style') { return tNode.styles; } const attrs = tNode.attrs; if (attrs) { const attrsLength = attrs.length; let i = 0; while (i < attrsLength) { const value = attrs[i]; // If we hit a `Bindings` or `Template` marker then we are done. if (isNameOnlyAttributeMarker(value)) break; // Skip namespaced attributes if (value === 0 /* NamespaceURI */) { // we skip the next two values // as namespaced attributes looks like // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist', // 'existValue', ...] i = i + 2; } else if (typeof value === 'number') { // Skip to the first value of the marked attribute. i++; while (i < attrsLength && typeof attrs[i] === 'string') { i++; } } else if (value === attrNameToInject) { return attrs[i + 1]; } else { i = i + 2; } } } return null; } function notFoundValueOrThrow(notFoundValue, token, flags) { if (flags & InjectFlags.Optional) { return notFoundValue; } else { throwProviderNotFoundError(token, 'NodeInjector'); } } /** * Returns the value associated to the given token from the ModuleInjector or throws exception * * @param lView The `LView` that contains the `tNode` * @param token The token to look for * @param flags Injection flags * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional` * @returns the value from the injector or throws an exception */ function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) { if (flags & InjectFlags.Optional && notFoundValue === undefined) { // This must be set or the NullInjector will throw for optional deps notFoundValue = null; } if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) { const moduleInjector = lView[INJECTOR]; // switch to `injectInjectorOnly` implementation for module injector, since module injector // should not have access to Component/Directive DI scope (that may happen through // `directiveInject` implementation) const previousInjectImplementation = setInjectImplementation(undefined); try { if (moduleInjector) { return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional); } else { return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional); } } finally { setInjectImplementation(previousInjectImplementation); } } return notFoundValueOrThrow(notFoundValue, token, flags); } /** * Returns the value associated to the given token from the NodeInjectors => ModuleInjector. * * Look for the injector providing the token by walking up the node injector tree and then * the module injector tree. * * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`) * * @param tNode The Node where the search for the injector should start * @param lView The `LView` that contains the `tNode` * @param token The token to look for * @param flags Injection flags * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional` * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided */ function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) { if (tNode !== null) { const bloomHash = bloomHashBitOrFactory(token); // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef // so just call the factory function to create it. if (typeof bloomHash === 'function') { if (!enterDI(lView, tNode, flags)) { // Failed to enter DI, try module injector instead. If a token is injected with the @Host // flag, the module injector is not searched for that token in Ivy. return (flags & InjectFlags.Host) ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); } try { const value = bloomHash(); if (value == null && !(flags & InjectFlags.Optional)) { throwProviderNotFoundError(token); } else { return value; } } finally { leaveDI(); } } else if (typeof bloomHash === 'number') { // A reference to the previous injector TView that was found while climbing the element // injector tree. This is used to know if viewProviders can be accessed on the current // injector. let previousTView = null; let injectorIndex = getInjectorIndex(tNode, lView); let parentLocation = NO_PARENT_INJECTOR; let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null; // If we should skip this injector, or if there is no injector on this node, start by // searching the parent injector. if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) { parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8 /* PARENT */]; if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) { injectorIndex = -1; } else { previousTView = lView[TVIEW]; injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } } // Traverse up the injector tree until we find a potential match or until we know there // *isn't* a match. while (injectorIndex !== -1) { ngDevMode && assertNodeInjector(lView, injectorIndex); // Check the current injector. If it matches, see if it contains token. const tView = lView[TVIEW]; ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView); if (bloomHasToken(bloomHash, injectorIndex, tView.data)) { // At this point, we have an injector which *may* contain the token, so we step through // the providers and directives associated with the injector's corresponding node to get // the instance. const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode); if (instance !== NOT_FOUND) { return instance; } } parentLocation = lView[injectorIndex + 8 /* PARENT */]; if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) { // The def wasn't found anywhere on this node, so it was a false positive. // Traverse up the tree and continue searching. previousTView = tView; injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } else { // If we should not search parent OR If the ancestor bloom filter value does not have the // bit corresponding to the directive we can give up on traversing up to find the specific // injector. injectorIndex = -1; } } } } return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); } const NOT_FOUND = {}; function createNodeInjector() { return new NodeInjector(getCurrentTNode(), getLView()); } function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) { const currentTView = lView[TVIEW]; const tNode = currentTView.data[injectorIndex + 8 /* TNODE */]; // First, we need to determine if view providers can be accessed by the starting element. // There are two possibilities const canAccessViewProviders = previousTView == null ? // 1) This is the first invocation `previousTView == null` which means that we are at the // `TNode` of where injector is starting to look. In such a case the only time we are allowed // to look into the ViewProviders is if: // - we are on a component // - AND the injector set `includeViewProviders` to true (implying that the token can see // ViewProviders because it is the Component or a Service which itself was declared in // ViewProviders) (isComponentHost(tNode) && includeViewProviders) : // 2) `previousTView != null` which means that we are now walking across the parent nodes. // In such a case we are only allowed to look into the ViewProviders if: // - We just crossed from child View to Parent View `previousTView != currentTView` // - AND the parent TNode is an Element. // This means that we just came from the Component's View and therefore are allowed to see // into the ViewProviders. (previousTView != currentTView && ((tNode.type & 3 /* AnyRNode */) !== 0)); // This special case happens when there is a @host on the inject and when we are searching // on the host element node. const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode; const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase); if (injectableIdx !== null) { return getNodeInjectable(lView, currentTView, injectableIdx, tNode); } else { return NOT_FOUND; } } /** * Searches for the given token among the node's directives and providers. * * @param tNode TNode on which directives are present. * @param tView The tView we are currently processing * @param token Provider token or type of a directive to look for. * @param canAccessViewProviders Whether view providers should be considered. * @param isHostSpecialCase Whether the host special case applies. * @returns Index of a found directive or provider, or null when none found. */ function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) { const nodeProviderIndexes = tNode.providerIndexes; const tInjectables = tView.data; const injectablesStart = nodeProviderIndexes & 1048575 /* ProvidersStartIndexMask */; const directivesStart = tNode.directiveStart; const directiveEnd = tNode.directiveEnd; const cptViewProvidersCount = nodeProviderIndexes >> 20 /* CptViewProvidersCountShift */; const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; // When the host special case applies, only the viewProviders and the component are visible const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd; for (let i = startingIndex; i < endIndex; i++) { const providerTokenOrDef = tInjectables[i]; if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) { return i; } } if (isHostSpecialCase) { const dirDef = tInjectables[directivesStart]; if (dirDef && isComponentDef(dirDef) && dirDef.type === token) { return directivesStart; } } return null; } /** * Retrieve or instantiate the injectable from the `LView` at particular `index`. * * This function checks to see if the value has already been instantiated and if so returns the * cached `injectable`. Otherwise if it detects that the value is still a factory it * instantiates the `injectable` and caches the value. */ function getNodeInjectable(lView, tView, index, tNode) { let value = lView[index]; const tData = tView.data; if (isFactory(value)) { const factory = value; if (factory.resolving) { throwCyclicDependencyError(stringifyForError(tData[index])); } const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders); factory.resolving = true; const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null; const success = enterDI(lView, tNode, InjectFlags.Default); ngDevMode && assertEqual(success, true, 'Because flags do not contain \`SkipSelf\' we expect this to always succeed.'); try { value = lView[index] = factory.factory(undefined, tData, lView, tNode); // This code path is hit for both directives and providers. // For perf reasons, we want to avoid searching for hooks on providers. // It does no harm to try (the hooks just won't exist), but the extra // checks are unnecessary and this is a hot path. So we check to see // if the index of the dependency is in the directive range for this // tNode. If it's not, we know it's a provider and skip hook registration. if (tView.firstCreatePass && index >= tNode.directiveStart) { ngDevMode && assertDirectiveDef(tData[index]); registerPreOrderHooks(index, tData[index], tView); } } finally { previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation); setIncludeViewProviders(previousIncludeViewProviders); factory.resolving = false; leaveDI(); } } return value; } /** * Returns the bit in an injector's bloom filter that should be used to determine whether or not * the directive might be provided by the injector. * * When a directive is public, it is added to the bloom filter and given a unique ID that can be * retrieved on the Type. When the directive isn't public or the token is not a directive `null` * is returned as the node injector can not possibly provide that token. * * @param token the injection token * @returns the matching bit to check in the bloom filter or `null` if the token is not known. * When the returned value is negative then it represents special values such as `Injector`. */ function bloomHashBitOrFactory(token) { ngDevMode && assertDefined(token, 'token must be defined'); if (typeof token === 'string') { return token.charCodeAt(0) || 0; } const tokenId = // First check with `hasOwnProperty` so we don't get an inherited ID. token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined; // Negative token IDs are used for special objects such as `Injector` if (typeof tokenId === 'number') { if (tokenId >= 0) { return tokenId & BLOOM_MASK; } else { ngDevMode && assertEqual(tokenId, -1 /* Injector */, 'Expecting to get Special Injector Id'); return createNodeInjector; } } else { return tokenId; } } function bloomHasToken(bloomHash, injectorIndex, injectorView) { // Create a mask that targets the specific bit associated with the directive we're looking for. // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding // to bit positions 0 - 31 in a 32 bit integer. const mask = 1 << bloomHash; // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset // that should be used. const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)]; // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on, // this injector is a potential match. return !!(value & mask); } /** Returns true if flags prevent parent injector from being searched for tokens */ function shouldSearchParent(flags, isFirstHostTNode) { return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode); } class NodeInjector { constructor(_tNode, _lView) { this._tNode = _tNode; this._lView = _lView; } get(token, notFoundValue) { return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue); } } /** * @codeGenApi */ function ɵɵgetInheritedFactory(type) { return noSideEffects(() => { const ownConstructor = type.prototype.constructor; const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor); const objectPrototype = Object.prototype; let parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`. while (parent && parent !== objectPrototype) { const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent); // If we hit something that has a factory and the factory isn't the same as the type, // we've found the inherited factory. Note the check that the factory isn't the type's // own factory is redundant in most cases, but if the user has custom decorators on the // class, this lookup will start one level down in the prototype chain, causing us to // find the own factory first and potentially triggering an infinite loop downstream. if (factory && factory !== ownFactory) { return factory; } parent = Object.getPrototypeOf(parent); } // There is no factory defined. Either this was improper usage of inheritance // (no Angular decorator on the superclass) or there is no constructor at all // in the inheritance chain. Since the two cases cannot be distinguished, the // latter has to be assumed. return t => new t(); }); } function getFactoryOf(type) { if (isForwardRef(type)) { return () => { const factory = getFactoryOf(resolveForwardRef(type)); return factory && factory(); }; } return getFactoryDef(type); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Facade for the attribute injection from DI. * * @codeGenApi */ function ɵɵinjectAttribute(attrNameToInject) { return injectAttributeImpl(getCurrentTNode(), attrNameToInject); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ANNOTATIONS = '__annotations__'; const PARAMETERS = '__parameters__'; const PROP_METADATA = '__prop__metadata__'; /** * @suppress {globalThis} */ function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function DecoratorFactory(...args) { if (this instanceof DecoratorFactory) { metaCtor.call(this, ...args); return this; } const annotationInstance = new DecoratorFactory(...args); return function TypeDecorator(cls) { if (typeFn) typeFn(cls, ...args); // Use of Object.defineProperty is important since it creates non-enumerable property which // prevents the property is copied during subclassing. const annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS]; annotations.push(annotationInstance); if (additionalProcessing) additionalProcessing(cls); return cls; }; } if (parentClass) { DecoratorFactory.prototype = Object.create(parentClass.prototype); } DecoratorFactory.prototype.ngMetadataName = name; DecoratorFactory.annotationCls = DecoratorFactory; return DecoratorFactory; }); } function makeMetadataCtor(props) { return function ctor(...args) { if (props) { const values = props(...args); for (const propName in values) { this[propName] = values[propName]; } } }; } function makeParamDecorator(name, props, parentClass) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function ParamDecoratorFactory(...args) { if (this instanceof ParamDecoratorFactory) { metaCtor.apply(this, args); return this; } const annotationInstance = new ParamDecoratorFactory(...args); ParamDecorator.annotation = annotationInstance; return ParamDecorator; function ParamDecorator(cls, unusedKey, index) { // Use of Object.defineProperty is important since it creates non-enumerable property which // prevents the property is copied during subclassing. const parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS]; // there might be gaps if some in between parameters do not have annotations. // we pad with nulls. while (parameters.length <= index) { parameters.push(null); } (parameters[index] = parameters[index] || []).push(annotationInstance); return cls; } } if (parentClass) { ParamDecoratorFactory.prototype = Object.create(parentClass.prototype); } ParamDecoratorFactory.prototype.ngMetadataName = name; ParamDecoratorFactory.annotationCls = ParamDecoratorFactory; return ParamDecoratorFactory; }); } function makePropDecorator(name, props, parentClass, additionalProcessing) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function PropDecoratorFactory(...args) { if (this instanceof PropDecoratorFactory) { metaCtor.apply(this, args); return this; } const decoratorInstance = new PropDecoratorFactory(...args); function PropDecorator(target, name) { const constructor = target.constructor; // Use of Object.defineProperty is important because it creates a non-enumerable property // which prevents the property from being copied during subclassing. const meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA]; meta[name] = meta.hasOwnProperty(name) && meta[name] || []; meta[name].unshift(decoratorInstance); if (additionalProcessing) additionalProcessing(target, name, ...args); } return PropDecorator; } if (parentClass) { PropDecoratorFactory.prototype = Object.create(parentClass.prototype); } PropDecoratorFactory.prototype.ngMetadataName = name; PropDecoratorFactory.annotationCls = PropDecoratorFactory; return PropDecoratorFactory; }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() { return makeParamDecorator('Attribute', (attributeName) => ({ attributeName })); } function CREATE_ATTRIBUTE_DECORATOR__POST_R3__() { return makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) })); } const CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__POST_R3__; /** * Attribute decorator and metadata. * * @Annotation * @publicApi */ const Attribute = CREATE_ATTRIBUTE_DECORATOR_IMPL(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Creates a token that can be used in a DI Provider. * * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a * runtime representation) such as when injecting an interface, callable type, array or * parameterized type. * * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by * the `Injector`. This provides additional level of type safety. * * ``` * interface MyInterface {...} * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken')); * // myInterface is inferred to be MyInterface. * ``` * * When creating an `InjectionToken`, you can optionally specify a factory function which returns * (possibly by creating) a default value of the parameterized type `T`. This sets up the * `InjectionToken` using this factory as a provider as if it was defined explicitly in the * application's root injector. If the factory function, which takes zero arguments, needs to inject * dependencies, it can do so using the `inject` function. See below for an example. * * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As * mentioned above, `'root'` is the default value for `providedIn`. * * @usageNotes * ### Basic Example * * ### Plain InjectionToken * * {@example core/di/ts/injector_spec.ts region='InjectionToken'} * * ### Tree-shakable InjectionToken * * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'} * * * @publicApi */ class InjectionToken { constructor(_desc, options) { this._desc = _desc; /** @internal */ this.ngMetadataName = 'InjectionToken'; this.ɵprov = undefined; if (typeof options == 'number') { (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here'); // This is a special hack to assign __NG_ELEMENT_ID__ to this instance. // See `InjectorMarkers` this.__NG_ELEMENT_ID__ = options; } else if (options !== undefined) { this.ɵprov = ɵɵdefineInjectable({ token: this, providedIn: options.providedIn || 'root', factory: options.factory, }); } } toString() { return `InjectionToken ${this._desc}`; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A DI token that you can use to create a virtual [provider](guide/glossary#provider) * that will populate the `entryComponents` field of components and NgModules * based on its `useValue` property value. * All components that are referenced in the `useValue` value (either directly * or in a nested array or map) are added to the `entryComponents` property. * * @usageNotes * * The following example shows how the router can populate the `entryComponents` * field of an NgModule based on a router configuration that refers * to components. * * ```typescript * // helper function inside the router * function provideRoutes(routes) { * return [ * {provide: ROUTES, useValue: routes}, * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true} * ]; * } * * // user code * let routes = [ * {path: '/root', component: RootComp}, * {path: '/teams', component: TeamsComp} * ]; * * @NgModule({ * providers: [provideRoutes(routes)] * }) * class ModuleWithRoutes {} * ``` * * @publicApi * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary. */ const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents'); // Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not // explicitly set. This value will be changed to `true` in v12. // TODO(misko): switch the default in v12 to `true`. See: packages/compiler/src/core.ts const emitDistinctChangesOnlyDefaultValue = false; /** * Base class for query metadata. * * @see `ContentChildren`. * @see `ContentChild`. * @see `ViewChildren`. * @see `ViewChild`. * * @publicApi */ class Query { } const ɵ0$1 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: false, descendants: false, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data)); /** * ContentChildren decorator and metadata. * * * @Annotation * @publicApi */ const ContentChildren = makePropDecorator('ContentChildren', ɵ0$1, Query); const ɵ1 = (selector, data = {}) => (Object.assign({ selector, first: true, isViewQuery: false, descendants: true }, data)); /** * ContentChild decorator and metadata. * * * @Annotation * * @publicApi */ const ContentChild = makePropDecorator('ContentChild', ɵ1, Query); const ɵ2 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: true, descendants: true, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data)); /** * ViewChildren decorator and metadata. * * @Annotation * @publicApi */ const ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query); const ɵ3 = (selector, data) => (Object.assign({ selector, first: true, isViewQuery: true, descendants: true }, data)); /** * ViewChild decorator and metadata. * * @Annotation * @publicApi */ const ViewChild = makePropDecorator('ViewChild', ɵ3, Query); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var R3ResolvedDependencyType; (function (R3ResolvedDependencyType) { R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token"; R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute"; R3ResolvedDependencyType[R3ResolvedDependencyType["ChangeDetectorRef"] = 2] = "ChangeDetectorRef"; R3ResolvedDependencyType[R3ResolvedDependencyType["Invalid"] = 3] = "Invalid"; })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {})); var R3FactoryTarget; (function (R3FactoryTarget) { R3FactoryTarget[R3FactoryTarget["Directive"] = 0] = "Directive"; R3FactoryTarget[R3FactoryTarget["Component"] = 1] = "Component"; R3FactoryTarget[R3FactoryTarget["Injectable"] = 2] = "Injectable"; R3FactoryTarget[R3FactoryTarget["Pipe"] = 3] = "Pipe"; R3FactoryTarget[R3FactoryTarget["NgModule"] = 4] = "NgModule"; })(R3FactoryTarget || (R3FactoryTarget = {})); var ViewEncapsulation$1; (function (ViewEncapsulation) { ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11. ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; })(ViewEncapsulation$1 || (ViewEncapsulation$1 = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getCompilerFacade() { const globalNg = _global['ng']; if (!globalNg || !globalNg.ɵcompilerFacade) { throw new Error(`Angular JIT compilation failed: '@angular/compiler' not loaded!\n` + ` - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n` + ` - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n` + ` - Alternatively provide the compiler with 'import "@angular/compiler";' before bootstrapping.`); } return globalNg.ɵcompilerFacade; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Represents a type that a Component or other object is instances of. * * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by * the `MyCustomComponent` constructor function. * * @publicApi */ const Type = Function; function isType(v) { return typeof v === 'function'; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Equivalent to ES6 spread, add each item to an array. * * @param items The items to add * @param arr The array to which you want to add the items */ function addAllToArray(items, arr) { for (let i = 0; i < items.length; i++) { arr.push(items[i]); } } /** * Determines if the contents of two arrays is identical * * @param a first array * @param b second array * @param identityAccessor Optional function for extracting stable object identity from a value in * the array. */ function arrayEquals(a, b, identityAccessor) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; i++) { let valueA = a[i]; let valueB = b[i]; if (identityAccessor) { valueA = identityAccessor(valueA); valueB = identityAccessor(valueB); } if (valueB !== valueA) { return false; } } return true; } /** * Flattens an array. */ function flatten(list, dst) { if (dst === undefined) dst = list; for (let i = 0; i < list.length; i++) { let item = list[i]; if (Array.isArray(item)) { // we need to inline it. if (dst === list) { // Our assumption that the list was already flat was wrong and // we need to clone flat since we need to write to it. dst = list.slice(0, i); } flatten(item, dst); } else if (dst !== list) { dst.push(item); } } return dst; } function deepForEach(input, fn) { input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value)); } function addToArray(arr, index, value) { // perf: array.push is faster than array.splice! if (index >= arr.length) { arr.push(value); } else { arr.splice(index, 0, value); } } function removeFromArray(arr, index) { // perf: array.pop is faster than array.splice! if (index >= arr.length - 1) { return arr.pop(); } else { return arr.splice(index, 1)[0]; } } function newArray(size, value) { const list = []; for (let i = 0; i < size; i++) { list.push(value); } return list; } /** * Remove item from array (Same as `Array.splice()` but faster.) * * `Array.splice()` is not as fast because it has to allocate an array for the elements which were * removed. This causes memory pressure and slows down code when most of the time we don't * care about the deleted items array. * * https://jsperf.com/fast-array-splice (About 20x faster) * * @param array Array to splice * @param index Index of element in array to remove. * @param count Number of items to remove. */ function arraySplice(array, index, count) { const length = array.length - count; while (index < length) { array[index] = array[index + count]; index++; } while (count--) { array.pop(); // shrink the array } } /** * Same as `Array.splice(index, 0, value)` but faster. * * `Array.splice()` is not fast because it has to allocate an array for the elements which were * removed. This causes memory pressure and slows down code when most of the time we don't * care about the deleted items array. * * @param array Array to splice. * @param index Index in array where the `value` should be added. * @param value Value to add to array. */ function arrayInsert(array, index, value) { ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.'); let end = array.length; while (end > index) { const previousEnd = end - 1; array[end] = array[previousEnd]; end = previousEnd; } array[index] = value; } /** * Same as `Array.splice2(index, 0, value1, value2)` but faster. * * `Array.splice()` is not fast because it has to allocate an array for the elements which were * removed. This causes memory pressure and slows down code when most of the time we don't * care about the deleted items array. * * @param array Array to splice. * @param index Index in array where the `value` should be added. * @param value1 Value to add to array. * @param value2 Value to add to array. */ function arrayInsert2(array, index, value1, value2) { ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.'); let end = array.length; if (end == index) { // inserting at the end. array.push(value1, value2); } else if (end === 1) { // corner case when we have less items in array than we have items to insert. array.push(value2, array[0]); array[0] = value1; } else { end--; array.push(array[end - 1], array[end]); while (end > index) { const previousEnd = end - 2; array[end] = array[previousEnd]; end--; } array[index] = value1; array[index + 1] = value2; } } /** * Insert a `value` into an `array` so that the array remains sorted. * * NOTE: * - Duplicates are not allowed, and are ignored. * - This uses binary search algorithm for fast inserts. * * @param array A sorted array to insert into. * @param value The value to insert. * @returns index of the inserted value. */ function arrayInsertSorted(array, value) { let index = arrayIndexOfSorted(array, value); if (index < 0) { // if we did not find it insert it. index = ~index; arrayInsert(array, index, value); } return index; } /** * Remove `value` from a sorted `array`. * * NOTE: * - This uses binary search algorithm for fast removals. * * @param array A sorted array to remove from. * @param value The value to remove. * @returns index of the removed value. * - positive index if value found and removed. * - negative index if value not found. (`~index` to get the value where it should have been * inserted) */ function arrayRemoveSorted(array, value) { const index = arrayIndexOfSorted(array, value); if (index >= 0) { arraySplice(array, index, 1); } return index; } /** * Get an index of an `value` in a sorted `array`. * * NOTE: * - This uses binary search algorithm for fast removals. * * @param array A sorted array to binary search. * @param value The value to look for. * @returns index of the value. * - positive index if value found. * - negative index if value not found. (`~index` to get the value where it should have been * located) */ function arrayIndexOfSorted(array, value) { return _arrayIndexOfSorted(array, value, 0); } /** * Set a `value` for a `key`. * * @param keyValueArray to modify. * @param key The key to locate or create. * @param value The value to set for a `key`. * @returns index (always even) of where the value vas set. */ function keyValueArraySet(keyValueArray, key, value) { let index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { // if we found it set it. keyValueArray[index | 1] = value; } else { index = ~index; arrayInsert2(keyValueArray, index, key, value); } return index; } /** * Retrieve a `value` for a `key` (on `undefined` if not found.) * * @param keyValueArray to search. * @param key The key to locate. * @return The `value` stored at the `key` location or `undefined if not found. */ function keyValueArrayGet(keyValueArray, key) { const index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { // if we found it retrieve it. return keyValueArray[index | 1]; } return undefined; } /** * Retrieve a `key` index value in the array or `-1` if not found. * * @param keyValueArray to search. * @param key The key to locate. * @returns index of where the key is (or should have been.) * - positive (even) index if key found. * - negative index if key not found. (`~index` (even) to get the index where it should have * been inserted.) */ function keyValueArrayIndexOf(keyValueArray, key) { return _arrayIndexOfSorted(keyValueArray, key, 1); } /** * Delete a `key` (and `value`) from the `KeyValueArray`. * * @param keyValueArray to modify. * @param key The key to locate or delete (if exist). * @returns index of where the key was (or should have been.) * - positive (even) index if key found and deleted. * - negative index if key not found. (`~index` (even) to get the index where it should have * been.) */ function keyValueArrayDelete(keyValueArray, key) { const index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { // if we found it remove it. arraySplice(keyValueArray, index, 2); } return index; } /** * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`. * * NOTE: * - This uses binary search algorithm for fast removals. * * @param array A sorted array to binary search. * @param value The value to look for. * @param shift grouping shift. * - `0` means look at every location * - `1` means only look at every other (even) location (the odd locations are to be ignored as * they are values.) * @returns index of the value. * - positive index if value found. * - negative index if value not found. (`~index` to get the value where it should have been * inserted) */ function _arrayIndexOfSorted(array, value, shift) { ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array'); let start = 0; let end = array.length >> shift; while (end !== start) { const middle = start + ((end - start) >> 1); // find the middle. const current = array[middle << shift]; if (value === current) { return (middle << shift); } else if (current > value) { end = middle; } else { start = middle + 1; // We already searched middle so make it non-inclusive by adding 1 } } return ~(end << shift); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /* * ######################### * Attention: These Regular expressions have to hold even if the code is minified! * ########################## */ /** * Regular expression that detects pass-through constructors for ES5 output. This Regex * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also * it intends to capture the pattern where existing constructors have been downleveled from * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g. * * ``` * function MyClass() { * var _this = _super.apply(this, arguments) || this; * ``` * * ``` * function MyClass() { * var _this = _super.apply(this, __spread(arguments)) || this; * ``` * * More details can be found in: https://github.com/angular/angular/issues/38453. */ const ES5_DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|[^()]+\(arguments\))\)/; /** Regular expression that detects ES2015 classes which extend from other classes. */ const ES2015_INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/; /** * Regular expression that detects ES2015 classes which extend from other classes and * have an explicit constructor defined. */ const ES2015_INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/; /** * Regular expression that detects ES2015 classes which extend from other classes * and inherit a constructor. */ const ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/; /** * Determine whether a stringified type is a class which delegates its constructor * to its parent. * * This is not trivial since compiled code can actually contain a constructor function * even if the original source code did not. For instance, when the child class contains * an initialized instance property. */ function isDelegateCtor(typeStr) { return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr)); } class ReflectionCapabilities { constructor(reflect) { this._reflect = reflect || _global['Reflect']; } isReflectionEnabled() { return true; } factory(t) { return (...args) => new t(...args); } /** @internal */ _zipTypesAndAnnotations(paramTypes, paramAnnotations) { let result; if (typeof paramTypes === 'undefined') { result = newArray(paramAnnotations.length); } else { result = newArray(paramTypes.length); } for (let i = 0; i < result.length; i++) { // TS outputs Object for parameters without types, while Traceur omits // the annotations. For now we preserve the Traceur behavior to aid // migration, but this can be revisited. if (typeof paramTypes === 'undefined') { result[i] = []; } else if (paramTypes[i] && paramTypes[i] != Object) { result[i] = [paramTypes[i]]; } else { result[i] = []; } if (paramAnnotations && paramAnnotations[i] != null) { result[i] = result[i].concat(paramAnnotations[i]); } } return result; } _ownParameters(type, parentCtor) { const typeStr = type.toString(); // If we have no decorators, we only have function.length as metadata. // In that case, to detect whether a child class declared an own constructor or not, // we need to look inside of that constructor to check whether it is // just calling the parent. // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439 // that sets 'design:paramtypes' to [] // if a class inherits from another class but has no ctor declared itself. if (isDelegateCtor(typeStr)) { return null; } // Prefer the direct API. if (type.parameters && type.parameters !== parentCtor.parameters) { return type.parameters; } // API of tsickle for lowering decorators to properties on the class. const tsickleCtorParams = type.ctorParameters; if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) { // Newer tsickle uses a function closure // Retain the non-function case for compatibility with older tsickle const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams; const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type); const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators)); return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); } // API for metadata created by invoking the decorators. const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS]; const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type); if (paramTypes || paramAnnotations) { return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); } // If a class has no decorators, at least create metadata // based on function.length. // Note: We know that this is a real constructor as we checked // the content of the constructor above. return newArray(type.length); } parameters(type) { // Note: only report metadata if we have at least one class decorator // to stay in sync with the static reflector. if (!isType(type)) { return []; } const parentCtor = getParentCtor(type); let parameters = this._ownParameters(type, parentCtor); if (!parameters && parentCtor !== Object) { parameters = this.parameters(parentCtor); } return parameters || []; } _ownAnnotations(typeOrFunc, parentCtor) { // Prefer the direct API. if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) { let annotations = typeOrFunc.annotations; if (typeof annotations === 'function' && annotations.annotations) { annotations = annotations.annotations; } return annotations; } // API of tsickle for lowering decorators to properties on the class. if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) { return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators); } // API for metadata created by invoking the decorators. if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) { return typeOrFunc[ANNOTATIONS]; } return null; } annotations(typeOrFunc) { if (!isType(typeOrFunc)) { return []; } const parentCtor = getParentCtor(typeOrFunc); const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || []; const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : []; return parentAnnotations.concat(ownAnnotations); } _ownPropMetadata(typeOrFunc, parentCtor) { // Prefer the direct API. if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) { let propMetadata = typeOrFunc.propMetadata; if (typeof propMetadata === 'function' && propMetadata.propMetadata) { propMetadata = propMetadata.propMetadata; } return propMetadata; } // API of tsickle for lowering decorators to properties on the class. if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) { const propDecorators = typeOrFunc.propDecorators; const propMetadata = {}; Object.keys(propDecorators).forEach(prop => { propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]); }); return propMetadata; } // API for metadata created by invoking the decorators. if (typeOrFunc.hasOwnProperty(PROP_METADATA)) { return typeOrFunc[PROP_METADATA]; } return null; } propMetadata(typeOrFunc) { if (!isType(typeOrFunc)) { return {}; } const parentCtor = getParentCtor(typeOrFunc); const propMetadata = {}; if (parentCtor !== Object) { const parentPropMetadata = this.propMetadata(parentCtor); Object.keys(parentPropMetadata).forEach((propName) => { propMetadata[propName] = parentPropMetadata[propName]; }); } const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor); if (ownPropMetadata) { Object.keys(ownPropMetadata).forEach((propName) => { const decorators = []; if (propMetadata.hasOwnProperty(propName)) { decorators.push(...propMetadata[propName]); } decorators.push(...ownPropMetadata[propName]); propMetadata[propName] = decorators; }); } return propMetadata; } ownPropMetadata(typeOrFunc) { if (!isType(typeOrFunc)) { return {}; } return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {}; } hasLifecycleHook(type, lcProperty) { return type instanceof Type && lcProperty in type.prototype; } guards(type) { return {}; } getter(name) { return new Function('o', 'return o.' + name + ';'); } setter(name) { return new Function('o', 'v', 'return o.' + name + ' = v;'); } method(name) { const functionBody = `if (!o.${name}) throw new Error('"${name}" is undefined'); return o.${name}.apply(o, args);`; return new Function('o', 'args', functionBody); } // There is not a concept of import uri in Js, but this is useful in developing Dart applications. importUri(type) { // StaticSymbol if (typeof type === 'object' && type['filePath']) { return type['filePath']; } // Runtime type return `./${stringify(type)}`; } resourceUri(type) { return `./${stringify(type)}`; } resolveIdentifier(name, moduleUrl, members, runtime) { return runtime; } resolveEnum(enumIdentifier, name) { return enumIdentifier[name]; } } function convertTsickleDecoratorIntoMetadata(decoratorInvocations) { if (!decoratorInvocations) { return []; } return decoratorInvocations.map(decoratorInvocation => { const decoratorType = decoratorInvocation.type; const annotationCls = decoratorType.annotationCls; const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : []; return new annotationCls(...annotationArgs); }); } function getParentCtor(ctor) { const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null; const parentCtor = parentProto ? parentProto.constructor : null; // Note: We always use `Object` as the null value // to simplify checking later on. return parentCtor || Object; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _THROW_IF_NOT_FOUND = {}; const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; /* * Name of a property (that we patch onto DI decorator), which is used as an annotation of which * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators * in the code, thus making them tree-shakable. */ const DI_DECORATOR_FLAG = '__NG_DI_FLAG__'; const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath'; const NG_TOKEN_PATH = 'ngTokenPath'; const NEW_LINE = /\n/gm; const NO_NEW_LINE = 'ɵ'; const SOURCE = '__source'; const ɵ0$2 = getClosureSafeProperty; const USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0$2 }); /** * Current injector value used by `inject`. * - `undefined`: it is an error to call `inject` * - `null`: `inject` can be called but there is no injector (limp-mode). * - Injector instance: Use the injector for resolution. */ let _currentInjector = undefined; function setCurrentInjector(injector) { const former = _currentInjector; _currentInjector = injector; return former; } function injectInjectorOnly(token, flags = InjectFlags.Default) { if (_currentInjector === undefined) { throw new Error(`inject() must be called from an injection context`); } else if (_currentInjector === null) { return injectRootLimpMode(token, undefined, flags); } else { return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags); } } function ɵɵinject(token, flags = InjectFlags.Default) { return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags); } /** * Throws an error indicating that a factory function could not be generated by the compiler for a * particular class. * * This instruction allows the actual error message to be optimized away when ngDevMode is turned * off, saving bytes of generated code while still providing a good experience in dev mode. * * The name of the class is not mentioned here, but will be in the generated factory function name * and thus in the stack trace. * * @codeGenApi */ function ɵɵinvalidFactoryDep(index) { const msg = ngDevMode ? `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid. This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator. Please check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.` : 'invalid'; throw new Error(msg); } /** * Injects a token from the currently active injector. * * Must be used in the context of a factory function such as one defined for an * `InjectionToken`. Throws an error if not called from such a context. * * Within such a factory function, using this function to request injection of a dependency * is faster and more type-safe than providing an additional array of dependencies * (as has been common with `useFactory` providers). * * @param token The injection token for the dependency to be injected. * @param flags Optional flags that control how injection is executed. * The flags correspond to injection strategies that can be specified with * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`. * @returns the injected value if injection is successful, `null` otherwise. * * @usageNotes * * ### Example * * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'} * * @publicApi */ const inject = ɵɵinject; function injectArgs(types) { const args = []; for (let i = 0; i < types.length; i++) { const arg = resolveForwardRef(types[i]); if (Array.isArray(arg)) { if (arg.length === 0) { throw new Error('Arguments array must have arguments.'); } let type = undefined; let flags = InjectFlags.Default; for (let j = 0; j < arg.length; j++) { const meta = arg[j]; const flag = getInjectFlag(meta); if (typeof flag === 'number') { // Special case when we handle @Inject decorator. if (flag === -1 /* Inject */) { type = meta.token; } else { flags |= flag; } } else { type = meta; } } args.push(ɵɵinject(type, flags)); } else { args.push(ɵɵinject(arg)); } } return args; } /** * Attaches a given InjectFlag to a given decorator using monkey-patching. * Since DI decorators can be used in providers `deps` array (when provider is configured using * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we * attach the flag to make it available both as a static property and as a field on decorator * instance. * * @param decorator Provided DI decorator. * @param flag InjectFlag that should be applied. */ function attachInjectFlag(decorator, flag) { decorator[DI_DECORATOR_FLAG] = flag; decorator.prototype[DI_DECORATOR_FLAG] = flag; return decorator; } /** * Reads monkey-patched property that contains InjectFlag attached to a decorator. * * @param token Token that may contain monkey-patched DI flags property. */ function getInjectFlag(token) { return token[DI_DECORATOR_FLAG]; } function catchInjectorError(e, token, injectorErrorName, source) { const tokenPath = e[NG_TEMP_TOKEN_PATH]; if (token[SOURCE]) { tokenPath.unshift(token[SOURCE]); } e.message = formatError('\n' + e.message, tokenPath, injectorErrorName, source); e[NG_TOKEN_PATH] = tokenPath; e[NG_TEMP_TOKEN_PATH] = null; throw e; } function formatError(text, obj, injectorErrorName, source = null) { text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text; let context = stringify(obj); if (Array.isArray(obj)) { context = obj.map(stringify).join(' -> '); } else if (typeof obj === 'object') { let parts = []; for (let key in obj) { if (obj.hasOwnProperty(key)) { let value = obj[key]; parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value))); } } context = `{${parts.join(', ')}}`; } return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\n ')}`; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$3 = (token) => ({ token }); /** * Inject decorator and metadata. * * @Annotation * @publicApi */ const Inject = attachInjectFlag( // Disable tslint because `DecoratorFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access makeParamDecorator('Inject', ɵ0$3), -1 /* Inject */); /** * Optional decorator and metadata. * * @Annotation * @publicApi */ const Optional = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('Optional'), 8 /* Optional */); /** * Self decorator and metadata. * * @Annotation * @publicApi */ const Self = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('Self'), 2 /* Self */); /** * `SkipSelf` decorator and metadata. * * @Annotation * @publicApi */ const SkipSelf = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* SkipSelf */); /** * Host decorator and metadata. * * @Annotation * @publicApi */ const Host = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('Host'), 1 /* Host */); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _reflect = null; function getReflect() { return (_reflect = _reflect || new ReflectionCapabilities()); } function reflectDependencies(type) { return convertDependencies(getReflect().parameters(type)); } function convertDependencies(deps) { const compiler = getCompilerFacade(); return deps.map(dep => reflectDependency(compiler, dep)); } function reflectDependency(compiler, dep) { const meta = { token: null, host: false, optional: false, resolved: compiler.R3ResolvedDependencyType.Token, self: false, skipSelf: false, }; function setTokenAndResolvedType(token) { meta.resolved = compiler.R3ResolvedDependencyType.Token; meta.token = token; } if (Array.isArray(dep) && dep.length > 0) { for (let j = 0; j < dep.length; j++) { const param = dep[j]; if (param === undefined) { // param may be undefined if type of dep is not set by ngtsc continue; } const proto = Object.getPrototypeOf(param); if (param instanceof Optional || proto.ngMetadataName === 'Optional') { meta.optional = true; } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') { meta.skipSelf = true; } else if (param instanceof Self || proto.ngMetadataName === 'Self') { meta.self = true; } else if (param instanceof Host || proto.ngMetadataName === 'Host') { meta.host = true; } else if (param instanceof Inject) { meta.token = param.token; } else if (param instanceof Attribute) { if (param.attributeName === undefined) { throw new Error(`Attribute name must be defined.`); } meta.token = param.attributeName; meta.resolved = compiler.R3ResolvedDependencyType.Attribute; } else if (param.__ChangeDetectorRef__ === true) { meta.token = param; meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef; } else { setTokenAndResolvedType(param); } } } else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) { meta.token = undefined; meta.resolved = R3ResolvedDependencyType.Invalid; } else { setTokenAndResolvedType(dep); } return meta; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Used to resolve resource URLs on `@Component` when used with JIT compilation. * * Example: * ``` * @Component({ * selector: 'my-comp', * templateUrl: 'my-comp.html', // This requires asynchronous resolution * }) * class MyComponent{ * } * * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously. * * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner. * * // Use browser's `fetch()` function as the default resource resolution strategy. * resolveComponentResources(fetch).then(() => { * // After resolution all URLs have been converted into `template` strings. * renderComponent(MyComponent); * }); * * ``` * * NOTE: In AOT the resolution happens during compilation, and so there should be no need * to call this method outside JIT mode. * * @param resourceResolver a function which is responsible for returning a `Promise` to the * contents of the resolved URL. Browser's `fetch()` method is a good default implementation. */ function resolveComponentResources(resourceResolver) { // Store all promises which are fetching the resources. const componentResolved = []; // Cache so that we don't fetch the same resource more than once. const urlMap = new Map(); function cachedResourceResolve(url) { let promise = urlMap.get(url); if (!promise) { const resp = resourceResolver(url); urlMap.set(url, promise = resp.then(unwrapResponse)); } return promise; } componentResourceResolutionQueue.forEach((component, type) => { const promises = []; if (component.templateUrl) { promises.push(cachedResourceResolve(component.templateUrl).then((template) => { component.template = template; })); } const styleUrls = component.styleUrls; const styles = component.styles || (component.styles = []); const styleOffset = component.styles.length; styleUrls && styleUrls.forEach((styleUrl, index) => { styles.push(''); // pre-allocate array. promises.push(cachedResourceResolve(styleUrl).then((style) => { styles[styleOffset + index] = style; styleUrls.splice(styleUrls.indexOf(styleUrl), 1); if (styleUrls.length == 0) { component.styleUrls = undefined; } })); }); const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type)); componentResolved.push(fullyResolved); }); clearResolutionOfComponentResourcesQueue(); return Promise.all(componentResolved).then(() => undefined); } let componentResourceResolutionQueue = new Map(); // Track when existing ɵcmp for a Type is waiting on resources. const componentDefPendingResolution = new Set(); function maybeQueueResolutionOfComponentResources(type, metadata) { if (componentNeedsResolution(metadata)) { componentResourceResolutionQueue.set(type, metadata); componentDefPendingResolution.add(type); } } function isComponentDefPendingResolution(type) { return componentDefPendingResolution.has(type); } function componentNeedsResolution(component) { return !!((component.templateUrl && !component.hasOwnProperty('template')) || component.styleUrls && component.styleUrls.length); } function clearResolutionOfComponentResourcesQueue() { const old = componentResourceResolutionQueue; componentResourceResolutionQueue = new Map(); return old; } function restoreComponentResolutionQueue(queue) { componentDefPendingResolution.clear(); queue.forEach((_, type) => componentDefPendingResolution.add(type)); componentResourceResolutionQueue = queue; } function isComponentResourceResolutionQueueEmpty() { return componentResourceResolutionQueue.size === 0; } function unwrapResponse(response) { return typeof response == 'string' ? response : response.text(); } function componentDefResolved(type) { componentDefPendingResolution.delete(type); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The Trusted Types policy, or null if Trusted Types are not * enabled/supported, or undefined if the policy has not been created yet. */ let policy; /** * Returns the Trusted Types policy, or null if Trusted Types are not * enabled/supported. The first call to this function will create the policy. */ function getPolicy() { if (policy === undefined) { policy = null; if (_global.trustedTypes) { try { policy = _global.trustedTypes.createPolicy('angular', { createHTML: (s) => s, createScript: (s) => s, createScriptURL: (s) => s, }); } catch (_a) { // trustedTypes.createPolicy throws if called with a name that is // already registered, even in report-only mode. Until the API changes, // catch the error not to break the applications functionally. In such // cases, the code will fall back to using strings. } } } return policy; } /** * Unsafely promote a string to a TrustedHTML, falling back to strings when * Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that the * provided string will never cause an XSS vulnerability if used in a context * that will be interpreted as HTML by a browser, e.g. when assigning to * element.innerHTML. */ function trustedHTMLFromString(html) { var _a; return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html; } /** * Unsafely promote a string to a TrustedScript, falling back to strings when * Trusted Types are not available. * @security In particular, it must be assured that the provided string will * never cause an XSS vulnerability if used in a context that will be * interpreted and executed as a script by a browser, e.g. when calling eval. */ function trustedScriptFromString(script) { var _a; return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script; } /** * Unsafely promote a string to a TrustedScriptURL, falling back to strings * when Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that the * provided string will never cause an XSS vulnerability if used in a context * that will cause a browser to load and execute a resource, e.g. when * assigning to script.src. */ function trustedScriptURLFromString(url) { var _a; return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url; } /** * Unsafely call the Function constructor with the given string arguments. It * is only available in development mode, and should be stripped out of * production code. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only called from development code, as use in production code can lead to * XSS vulnerabilities. */ function newTrustedFunctionForDev(...args) { if (typeof ngDevMode === 'undefined') { throw new Error('newTrustedFunctionForDev should never be called in production'); } if (!_global.trustedTypes) { // In environments that don't support Trusted Types, fall back to the most // straightforward implementation: return new Function(...args); } // Chrome currently does not support passing TrustedScript to the Function // constructor. The following implements the workaround proposed on the page // below, where the Chromium bug is also referenced: // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor const fnArgs = args.slice(0, -1).join(','); const fnBody = args[args.length - 1]; const body = `(function anonymous(${fnArgs} ) { ${fnBody} })`; // Using eval directly confuses the compiler and prevents this module from // being stripped out of JS binaries even if not used. The global['eval'] // indirection fixes that. const fn = _global['eval'](trustedScriptFromString(body)); if (fn.bind === undefined) { // Workaround for a browser bug that only exists in Chrome 83, where passing // a TrustedScript to eval just returns the TrustedScript back without // evaluating it. In that case, fall back to the most straightforward // implementation: return new Function(...args); } // To completely mimic the behavior of calling "new Function", two more // things need to happen: // 1. Stringifying the resulting function should return its source code fn.toString = () => body; // 2. When calling the resulting function, `this` should refer to `global` return fn.bind(_global); // When Trusted Types support in Function constructors is widely available, // the implementation of this function can be simplified to: // return new Function(...args.map(a => trustedScriptFromString(a))); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The Trusted Types policy, or null if Trusted Types are not * enabled/supported, or undefined if the policy has not been created yet. */ let policy$1; /** * Returns the Trusted Types policy, or null if Trusted Types are not * enabled/supported. The first call to this function will create the policy. */ function getPolicy$1() { if (policy$1 === undefined) { policy$1 = null; if (_global.trustedTypes) { try { policy$1 = _global.trustedTypes .createPolicy('angular#unsafe-bypass', { createHTML: (s) => s, createScript: (s) => s, createScriptURL: (s) => s, }); } catch (_a) { // trustedTypes.createPolicy throws if called with a name that is // already registered, even in report-only mode. Until the API changes, // catch the error not to break the applications functionally. In such // cases, the code will fall back to using strings. } } } return policy$1; } /** * Unsafely promote a string to a TrustedHTML, falling back to strings when * Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only passed strings that come directly from custom sanitizers or the * bypassSecurityTrust* functions. */ function trustedHTMLFromStringBypass(html) { var _a; return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html; } /** * Unsafely promote a string to a TrustedScript, falling back to strings when * Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only passed strings that come directly from custom sanitizers or the * bypassSecurityTrust* functions. */ function trustedScriptFromStringBypass(script) { var _a; return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script; } /** * Unsafely promote a string to a TrustedScriptURL, falling back to strings * when Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only passed strings that come directly from custom sanitizers or the * bypassSecurityTrust* functions. */ function trustedScriptURLFromStringBypass(url) { var _a; return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SafeValueImpl { constructor(changingThisBreaksApplicationSecurity) { this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity; } toString() { return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` + ` (see https://g.co/ng/security#xss)`; } } class SafeHtmlImpl extends SafeValueImpl { getTypeName() { return "HTML" /* Html */; } } class SafeStyleImpl extends SafeValueImpl { getTypeName() { return "Style" /* Style */; } } class SafeScriptImpl extends SafeValueImpl { getTypeName() { return "Script" /* Script */; } } class SafeUrlImpl extends SafeValueImpl { getTypeName() { return "URL" /* Url */; } } class SafeResourceUrlImpl extends SafeValueImpl { getTypeName() { return "ResourceURL" /* ResourceUrl */; } } function unwrapSafeValue(value) { return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value; } function allowSanitizationBypassAndThrow(value, type) { const actualType = getSanitizationBypassType(value); if (actualType != null && actualType !== type) { // Allow ResourceURLs in URL contexts, they are strictly more trusted. if (actualType === "ResourceURL" /* ResourceUrl */ && type === "URL" /* Url */) return true; throw new Error(`Required a safe ${type}, got a ${actualType} (see https://g.co/ng/security#xss)`); } return actualType === type; } function getSanitizationBypassType(value) { return value instanceof SafeValueImpl && value.getTypeName() || null; } /** * Mark `html` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link htmlSanitizer} to be trusted implicitly. * * @param trustedHtml `html` string which needs to be implicitly trusted. * @returns a `html` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustHtml(trustedHtml) { return new SafeHtmlImpl(trustedHtml); } /** * Mark `style` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link styleSanitizer} to be trusted implicitly. * * @param trustedStyle `style` string which needs to be implicitly trusted. * @returns a `style` hich has been branded to be implicitly trusted. */ function bypassSanitizationTrustStyle(trustedStyle) { return new SafeStyleImpl(trustedStyle); } /** * Mark `script` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link scriptSanitizer} to be trusted implicitly. * * @param trustedScript `script` string which needs to be implicitly trusted. * @returns a `script` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustScript(trustedScript) { return new SafeScriptImpl(trustedScript); } /** * Mark `url` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link urlSanitizer} to be trusted implicitly. * * @param trustedUrl `url` string which needs to be implicitly trusted. * @returns a `url` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustUrl(trustedUrl) { return new SafeUrlImpl(trustedUrl); } /** * Mark `url` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly. * * @param trustedResourceUrl `url` string which needs to be implicitly trusted. * @returns a `url` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustResourceUrl(trustedResourceUrl) { return new SafeResourceUrlImpl(trustedResourceUrl); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML * that needs sanitizing. * Depending upon browser support we use one of two strategies for doing this. * Default: DOMParser strategy * Fallback: InertDocument strategy */ function getInertBodyHelper(defaultDoc) { const inertDocumentHelper = new InertDocumentHelper(defaultDoc); return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper; } /** * Uses DOMParser to create and fill an inert body element. * This is the default strategy used in browsers that support it. */ class DOMParserHelper { constructor(inertDocumentHelper) { this.inertDocumentHelper = inertDocumentHelper; } getInertBodyElement(html) { // We add these extra elements to ensure that the rest of the content is parsed as expected // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags // in `html` from consuming the otherwise explicit `</body>` tag. html = '<body><remove></remove>' + html; try { const body = new window.DOMParser() .parseFromString(trustedHTMLFromString(html), 'text/html') .body; if (body === null) { // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only // becomes available in the following tick of the JS engine. In that case we fall back to // the `inertDocumentHelper` instead. return this.inertDocumentHelper.getInertBodyElement(html); } body.removeChild(body.firstChild); return body; } catch (_a) { return null; } } } /** * Use an HTML5 `template` element, if supported, or an inert body element created via * `createHtmlDocument` to create and fill an inert DOM element. * This is the fallback strategy if the browser does not support DOMParser. */ class InertDocumentHelper { constructor(defaultDoc) { this.defaultDoc = defaultDoc; this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert'); if (this.inertDocument.body == null) { // usually there should be only one body element in the document, but IE doesn't have any, so // we need to create one. const inertHtml = this.inertDocument.createElement('html'); this.inertDocument.appendChild(inertHtml); const inertBodyElement = this.inertDocument.createElement('body'); inertHtml.appendChild(inertBodyElement); } } getInertBodyElement(html) { // Prefer using <template> element if supported. const templateEl = this.inertDocument.createElement('template'); if ('content' in templateEl) { templateEl.innerHTML = trustedHTMLFromString(html); return templateEl; } // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html` // and we returned the inert `body` node. This was changed, because IE seems to treat setting // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted // yet. In particular, IE appears to split some of the text into multiple text nodes rather // than keeping them in a single one which ends up messing with Ivy's i18n parsing further // down the line. This has been worked around by creating a new inert `body` and using it as // the root node in which we insert the HTML. const inertBody = this.inertDocument.createElement('body'); inertBody.innerHTML = trustedHTMLFromString(html); // Support: IE 11 only // strip custom-namespaced attributes on IE<=11 if (this.defaultDoc.documentMode) { this.stripCustomNsAttrs(inertBody); } return inertBody; } /** * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1' * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g. * 'ns1:xlink:foo'). * * This is undesirable since we don't want to allow any of these custom attributes. This method * strips them all. */ stripCustomNsAttrs(el) { const elAttrs = el.attributes; // loop backwards so that we can support removals. for (let i = elAttrs.length - 1; 0 < i; i--) { const attrib = elAttrs.item(i); const attrName = attrib.name; if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) { el.removeAttribute(attrName); } } let childNode = el.firstChild; while (childNode) { if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode); childNode = childNode.nextSibling; } } } /** * We need to determine whether the DOMParser exists in the global context and * supports parsing HTML; HTML parsing support is not as wide as other formats, see * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility. * * @suppress {uselessCode} */ function isDOMParserAvailable() { try { return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html'); } catch (_a) { return false; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A pattern that recognizes a commonly useful subset of URLs that are safe. * * This regular expression matches a subset of URLs that will not cause script * execution if used in URL context within a HTML document. Specifically, this * regular expression matches if (comment from here on and regex copied from * Soy's EscapingConventions): * (1) Either an allowed protocol (http, https, mailto or ftp). * (2) or no protocol. A protocol must be followed by a colon. The below * allows that by allowing colons only after one of the characters [/?#]. * A colon after a hash (#) must be in the fragment. * Otherwise, a colon after a (?) must be in a query. * Otherwise, a colon after a single solidus (/) must be in a path. * Otherwise, a colon after a double solidus (//) must be in the authority * (before port). * * The pattern disallows &, used in HTML entity declarations before * one of the characters in [/?#]. This disallows HTML entities used in the * protocol name, which should never happen, e.g. "http" for "http". * It also disallows HTML entities in the first path part of a relative path, * e.g. "foo<bar/baz". Our existing escaping functions should not produce * that. More importantly, it disallows masking of a colon, * e.g. "javascript:...". * * This regular expression was taken from the Closure sanitization library. */ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi; /* A pattern that matches safe srcset values */ const SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi; /** A pattern that matches safe data URLs. Only matches image, video and audio types. */ const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i; function _sanitizeUrl(url) { url = String(url); if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url; if (typeof ngDevMode === 'undefined' || ngDevMode) { console.warn(`WARNING: sanitizing unsafe URL value ${url} (see https://g.co/ng/security#xss)`); } return 'unsafe:' + url; } function sanitizeSrcset(srcset) { srcset = String(srcset); return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', '); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function tagSet(tags) { const res = {}; for (const t of tags.split(',')) res[t] = true; return res; } function merge(...sets) { const res = {}; for (const s of sets) { for (const v in s) { if (s.hasOwnProperty(v)) res[v] = true; } } return res; } // Good source of info about elements and attributes // https://html.spec.whatwg.org/#semantics // https://simon.html5.org/html-elements // Safe Void Elements - HTML5 // https://html.spec.whatwg.org/#void-elements const VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr'); // Elements that you can, intentionally, leave open (and which close themselves) // https://html.spec.whatwg.org/#optional-tags const OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr'); const OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt'); const OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS); // Safe Block Elements - HTML5 const BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' + 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' + 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul')); // Inline Elements - HTML5 const INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' + 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' + 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video')); const VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS); // Attributes that have href and hence need to be sanitized const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href'); // Attributes that have special href set hence need to be sanitized const SRCSET_ATTRS = tagSet('srcset'); const HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' + 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' + 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' + 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' + 'valign,value,vspace,width'); // Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018) const ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' + 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' + 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' + 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' + 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' + 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' + 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext'); // NB: This currently consciously doesn't support SVG. SVG sanitization has had several security // issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via // innerHTML is required, SVG attributes should be added here. // NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those // can be sanitized, but they increase security surface area without a legitimate use case, so they // are left out here. const VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS); // Elements whose content should not be traversed/preserved, if the elements themselves are invalid. // // Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve) // `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we // don't want to preserve the content, if the elements themselves are going to be removed. const SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template'); /** * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe * attributes. */ class SanitizingHtmlSerializer { constructor() { // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just // because characters were re-encoded. this.sanitizedSomething = false; this.buf = []; } sanitizeChildren(el) { // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters. // However this code never accesses properties off of `document` before deleting its contents // again, so it shouldn't be vulnerable to DOM clobbering. let current = el.firstChild; let traverseContent = true; while (current) { if (current.nodeType === Node.ELEMENT_NODE) { traverseContent = this.startElement(current); } else if (current.nodeType === Node.TEXT_NODE) { this.chars(current.nodeValue); } else { // Strip non-element, non-text nodes. this.sanitizedSomething = true; } if (traverseContent && current.firstChild) { current = current.firstChild; continue; } while (current) { // Leaving the element. Walk up and to the right, closing tags as we go. if (current.nodeType === Node.ELEMENT_NODE) { this.endElement(current); } let next = this.checkClobberedElement(current, current.nextSibling); if (next) { current = next; break; } current = this.checkClobberedElement(current, current.parentNode); } } return this.buf.join(''); } /** * Sanitizes an opening element tag (if valid) and returns whether the element's contents should * be traversed. Element content must always be traversed (even if the element itself is not * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`. * * @param element The element to sanitize. * @return True if the element's contents should be traversed. */ startElement(element) { const tagName = element.nodeName.toLowerCase(); if (!VALID_ELEMENTS.hasOwnProperty(tagName)) { this.sanitizedSomething = true; return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName); } this.buf.push('<'); this.buf.push(tagName); const elAttrs = element.attributes; for (let i = 0; i < elAttrs.length; i++) { const elAttr = elAttrs.item(i); const attrName = elAttr.name; const lower = attrName.toLowerCase(); if (!VALID_ATTRS.hasOwnProperty(lower)) { this.sanitizedSomething = true; continue; } let value = elAttr.value; // TODO(martinprobst): Special case image URIs for data:image/... if (URI_ATTRS[lower]) value = _sanitizeUrl(value); if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value); this.buf.push(' ', attrName, '="', encodeEntities(value), '"'); } this.buf.push('>'); return true; } endElement(current) { const tagName = current.nodeName.toLowerCase(); if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) { this.buf.push('</'); this.buf.push(tagName); this.buf.push('>'); } } chars(chars) { this.buf.push(encodeEntities(chars)); } checkClobberedElement(node, nextNode) { if (nextNode && (node.compareDocumentPosition(nextNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) { throw new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`); } return nextNode; } } // Regular Expressions for parsing tags and attributes const SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; // ! to ~ is the ASCII range. const NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g; /** * Escapes all potentially dangerous characters, so that the * resulting string can be safely inserted into attribute or * element text. * @param value */ function encodeEntities(value) { return value.replace(/&/g, '&') .replace(SURROGATE_PAIR_REGEXP, function (match) { const hi = match.charCodeAt(0); const low = match.charCodeAt(1); return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; }) .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; }) .replace(/</g, '<') .replace(/>/g, '>'); } let inertBodyHelper; /** * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to * the DOM in a browser environment. */ function _sanitizeHtml(defaultDoc, unsafeHtmlInput) { let inertBodyElement = null; try { inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc); // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime). let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : ''; inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous. let mXSSAttempts = 5; let parsedHtml = unsafeHtml; do { if (mXSSAttempts === 0) { throw new Error('Failed to sanitize html because the input is unstable'); } mXSSAttempts--; unsafeHtml = parsedHtml; parsedHtml = inertBodyElement.innerHTML; inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); } while (unsafeHtml !== parsedHtml); const sanitizer = new SanitizingHtmlSerializer(); const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement); if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) { console.warn('WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss'); } return trustedHTMLFromString(safeHtml); } finally { // In case anything goes wrong, clear out inertElement to reset the entire DOM structure. if (inertBodyElement) { const parent = getTemplateContent(inertBodyElement) || inertBodyElement; while (parent.firstChild) { parent.removeChild(parent.firstChild); } } } } function getTemplateContent(el) { return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ? el.content : null; } function isTemplateElement(el) { return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE'; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly * handled. * * See DomSanitizer for more details on security in Angular applications. * * @publicApi */ var SecurityContext; (function (SecurityContext) { SecurityContext[SecurityContext["NONE"] = 0] = "NONE"; SecurityContext[SecurityContext["HTML"] = 1] = "HTML"; SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE"; SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT"; SecurityContext[SecurityContext["URL"] = 4] = "URL"; SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL"; })(SecurityContext || (SecurityContext = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing * dangerous content. * * This method parses the `html` and locates potentially dangerous content (such as urls and * javascript) and removes it. * * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}. * * @param unsafeHtml untrusted `html`, typically from the user. * @returns `html` string which is safe to display to user, because all of the dangerous javascript * and urls have been removed. * * @codeGenApi */ function ɵɵsanitizeHtml(unsafeHtml) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || ''); } if (allowSanitizationBypassAndThrow(unsafeHtml, "HTML" /* Html */)) { return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml)); } return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml)); } /** * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing * dangerous content. * * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}. * * @param unsafeStyle untrusted `style`, typically from the user. * @returns `style` string which is safe to bind to the `style` properties. * * @codeGenApi */ function ɵɵsanitizeStyle(unsafeStyle) { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || ''; } if (allowSanitizationBypassAndThrow(unsafeStyle, "Style" /* Style */)) { return unwrapSafeValue(unsafeStyle); } return renderStringify(unsafeStyle); } /** * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing * dangerous * content. * * This method parses the `url` and locates potentially dangerous content (such as javascript) and * removes it. * * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}. * * @param unsafeUrl untrusted `url`, typically from the user. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because * all of the dangerous javascript has been removed. * * @codeGenApi */ function ɵɵsanitizeUrl(unsafeUrl) { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || ''; } if (allowSanitizationBypassAndThrow(unsafeUrl, "URL" /* Url */)) { return unwrapSafeValue(unsafeUrl); } return _sanitizeUrl(renderStringify(unsafeUrl)); } /** * A `url` sanitizer which only lets trusted `url`s through. * * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}. * * @param unsafeResourceUrl untrusted `url`, typically from the user. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because * only trusted `url`s have been allowed to pass. * * @codeGenApi */ function ɵɵsanitizeResourceUrl(unsafeResourceUrl) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || ''); } if (allowSanitizationBypassAndThrow(unsafeResourceUrl, "ResourceURL" /* ResourceUrl */)) { return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl)); } throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)'); } /** * A `script` sanitizer which only lets trusted javascript through. * * This passes only `script`s marked trusted by calling {@link * bypassSanitizationTrustScript}. * * @param unsafeScript untrusted `script`, typically from the user. * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`, * because only trusted `scripts` have been allowed to pass. * * @codeGenApi */ function ɵɵsanitizeScript(unsafeScript) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || ''); } if (allowSanitizationBypassAndThrow(unsafeScript, "Script" /* Script */)) { return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript)); } throw new Error('unsafe value used in a script context'); } /** * A template tag function for promoting the associated constant literal to a * TrustedHTML. Interpolation is explicitly not allowed. * * @param html constant template literal containing trusted HTML. * @returns TrustedHTML wrapping `html`. * * @security This is a security-sensitive function and should only be used to * convert constant values of attributes and properties found in * application-provided Angular templates to TrustedHTML. * * @codeGenApi */ function ɵɵtrustConstantHtml(html) { // The following runtime check ensures that the function was called as a // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray // is an array with a `raw` property that is also an array. The associated // template literal has no interpolation if and only if the length of the // TemplateStringsArray is 1. if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) { throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`); } return trustedHTMLFromString(html[0]); } /** * A template tag function for promoting the associated constant literal to a * TrustedScriptURL. Interpolation is explicitly not allowed. * * @param url constant template literal containing a trusted script URL. * @returns TrustedScriptURL wrapping `url`. * * @security This is a security-sensitive function and should only be used to * convert constant values of attributes and properties found in * application-provided Angular templates to TrustedScriptURL. * * @codeGenApi */ function ɵɵtrustConstantResourceUrl(url) { // The following runtime check ensures that the function was called as a // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A // TemplateStringsArray is an array with a `raw` property that is also an // array. The associated template literal has no interpolation if and only if // the length of the TemplateStringsArray is 1. if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) { throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`); } return trustedScriptURLFromString(url[0]); } /** * Detects which sanitizer to use for URL property, based on tag name and prop name. * * The rules are based on the RESOURCE_URL context config from * `packages/compiler/src/schema/dom_security_schema.ts`. * If tag and prop names don't match Resource URL schema, use URL sanitizer. */ function getUrlSanitizer(tag, prop) { if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' || tag === 'script')) || (prop === 'href' && (tag === 'base' || tag === 'link'))) { return ɵɵsanitizeResourceUrl; } return ɵɵsanitizeUrl; } /** * Sanitizes URL, selecting sanitizer function based on tag and property names. * * This function is used in case we can't define security context at compile time, when only prop * name is available. This happens when we generate host bindings for Directives/Components. The * host element is unknown at compile time, so we defer calculation of specific sanitizer to * runtime. * * @param unsafeUrl untrusted `url`, typically from the user. * @param tag target element tag name. * @param prop name of the property that contains the value. * @returns `url` string which is safe to bind. * * @codeGenApi */ function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) { return getUrlSanitizer(tag, prop)(unsafeUrl); } function validateAgainstEventProperties(name) { if (name.toLowerCase().startsWith('on')) { const msg = `Binding to event property '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...` + `\nIf '${name}' is a directive input, make sure the directive is imported by the` + ` current module.`; throw new Error(msg); } } function validateAgainstEventAttributes(name) { if (name.toLowerCase().startsWith('on')) { const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...`; throw new Error(msg); } } function getSanitizer() { const lView = getLView(); return lView && lView[SANITIZER]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ERROR_TYPE = 'ngType'; const ERROR_DEBUG_CONTEXT = 'ngDebugContext'; const ERROR_ORIGINAL_ERROR = 'ngOriginalError'; const ERROR_LOGGER = 'ngErrorLogger'; function wrappedError(message, originalError) { const msg = `${message} caused by: ${originalError instanceof Error ? originalError.message : originalError}`; const error = Error(msg); error[ERROR_ORIGINAL_ERROR] = originalError; return error; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getType(error) { return error[ERROR_TYPE]; } function getDebugContext(error) { return error[ERROR_DEBUG_CONTEXT]; } function getOriginalError(error) { return error[ERROR_ORIGINAL_ERROR]; } function getErrorLogger(error) { return error[ERROR_LOGGER] || defaultErrorLogger; } function defaultErrorLogger(console, ...values) { console.error(...values); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides a hook for centralized exception handling. * * The default implementation of `ErrorHandler` prints error messages to the `console`. To * intercept error handling, write a custom exception handler that replaces this default as * appropriate for your app. * * @usageNotes * ### Example * * ``` * class MyErrorHandler implements ErrorHandler { * handleError(error) { * // do something with the exception * } * } * * @NgModule({ * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}] * }) * class MyModule {} * ``` * * @publicApi */ class ErrorHandler { constructor() { /** * @internal */ this._console = console; } handleError(error) { const originalError = this._findOriginalError(error); const context = this._findContext(error); // Note: Browser consoles show the place from where console.error was called. // We can use this to give users additional information about the error. const errorLogger = getErrorLogger(error); errorLogger(this._console, `ERROR`, error); if (originalError) { errorLogger(this._console, `ORIGINAL ERROR`, originalError); } if (context) { errorLogger(this._console, 'ERROR CONTEXT', context); } } /** @internal */ _findContext(error) { if (error) { return getDebugContext(error) ? getDebugContext(error) : this._findContext(getOriginalError(error)); } return null; } /** @internal */ _findOriginalError(error) { let e = getOriginalError(error); while (e && getOriginalError(e)) { e = getOriginalError(e); } return e; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines a schema that allows an NgModule to contain the following: * - Non-Angular elements named with dash case (`-`). * - Element properties named with dash case (`-`). * Dash case is the naming convention for custom elements. * * @publicApi */ const CUSTOM_ELEMENTS_SCHEMA = { name: 'custom-elements' }; /** * Defines a schema that allows any property on any element. * * @publicApi */ const NO_ERRORS_SCHEMA = { name: 'no-errors-schema' }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Disallowed strings in the comment. * * see: https://html.spec.whatwg.org/multipage/syntax.html#comments */ const COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g; /** * Delimiter in the disallowed strings which needs to be wrapped with zero with character. */ const COMMENT_DELIMITER = /(<|>)/; const COMMENT_DELIMITER_ESCAPED = '\u200B$1\u200B'; /** * Escape the content of comment strings so that it can be safely inserted into a comment node. * * The issue is that HTML does not specify any way to escape comment end text inside the comment. * Consider: `<!-- The way you close a comment is with ">", and "->" at the beginning or by "-->" or * "--!>" at the end. -->`. Above the `"-->"` is meant to be text not an end to the comment. This * can be created programmatically through DOM APIs. (`<!--` are also disallowed.) * * see: https://html.spec.whatwg.org/multipage/syntax.html#comments * * ``` * div.innerHTML = div.innerHTML * ``` * * One would expect that the above code would be safe to do, but it turns out that because comment * text is not escaped, the comment may contain text which will prematurely close the comment * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which * may contain such text and expect them to be safe.) * * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and * surrounding them with `_>_` where the `_` is a zero width space `\u200B`. The result is that if a * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the * text it will render normally but it will not cause the HTML parser to close/open the comment. * * @param value text to make safe for comment node by escaping the comment open/close character * sequence. */ function escapeCommentText(value) { return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!! */ /** * Creates an `Array` construction with a given name. This is useful when * looking for memory consumption to see what time of array it is. * * * @param name Name to give to the constructor * @returns A subclass of `Array` if possible. This can only be done in * environments which support `class` construct. */ function createNamedArrayType(name) { // This should never be called in prod mode, so let's verify that is the case. if (ngDevMode) { try { // If this function were compromised the following could lead to arbitrary // script execution. We bless it with Trusted Types anyway since this // function is stripped out of production binaries. return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array); } catch (e) { // If it does not work just give up and fall back to regular Array. return Array; } } else { throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code'); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function normalizeDebugBindingName(name) { // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers name = camelCaseToDashCase(name.replace(/[$@]/g, '_')); return `ng-reflect-${name}`; } const CAMEL_CASE_REGEXP = /([A-Z])/g; function camelCaseToDashCase(input) { return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase()); } function normalizeDebugBindingValue(value) { try { // Limit the size of the value as otherwise the DOM just gets polluted. return value != null ? value.toString().slice(0, 30) : value; } catch (e) { return '[ERROR] Exception while trying to serialize the value'; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Returns the matching `LContext` data for a given DOM node, directive or component instance. * * This function will examine the provided DOM element, component, or directive instance\'s * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched * value will be that of the newly created `LContext`. * * If the monkey-patched value is the `LView` instance then the context value for that * target will be created and the monkey-patch reference will be updated. Therefore when this * function is called it may mutate the provided element\'s, component\'s or any of the associated * directive\'s monkey-patch values. * * If the monkey-patch value is not detected then the code will walk up the DOM until an element * is found which contains a monkey-patch reference. When that occurs then the provided element * will be updated with a new context (which is then returned). If the monkey-patch value is not * detected for a component/directive instance then it will throw an error (all components and * directives should be automatically monkey-patched by ivy). * * @param target Component, Directive or DOM Node. */ function getLContext(target) { let mpValue = readPatchedData(target); if (mpValue) { // only when it's an array is it considered an LView instance // ... otherwise it's an already constructed LContext instance if (Array.isArray(mpValue)) { const lView = mpValue; let nodeIndex; let component = undefined; let directives = undefined; if (isComponentInstance(target)) { nodeIndex = findViaComponent(lView, target); if (nodeIndex == -1) { throw new Error('The provided component was not found in the application'); } component = target; } else if (isDirectiveInstance(target)) { nodeIndex = findViaDirective(lView, target); if (nodeIndex == -1) { throw new Error('The provided directive was not found in the application'); } directives = getDirectivesAtNodeIndex(nodeIndex, lView, false); } else { nodeIndex = findViaNativeElement(lView, target); if (nodeIndex == -1) { return null; } } // the goal is not to fill the entire context full of data because the lookups // are expensive. Instead, only the target data (the element, component, container, ICU // expression or directive details) are filled into the context. If called multiple times // with different target values then the missing target data will be filled in. const native = unwrapRNode(lView[nodeIndex]); const existingCtx = readPatchedData(native); const context = (existingCtx && !Array.isArray(existingCtx)) ? existingCtx : createLContext(lView, nodeIndex, native); // only when the component has been discovered then update the monkey-patch if (component && context.component === undefined) { context.component = component; attachPatchData(context.component, context); } // only when the directives have been discovered then update the monkey-patch if (directives && context.directives === undefined) { context.directives = directives; for (let i = 0; i < directives.length; i++) { attachPatchData(directives[i], context); } } attachPatchData(context.native, context); mpValue = context; } } else { const rElement = target; ngDevMode && assertDomNode(rElement); // if the context is not found then we need to traverse upwards up the DOM // to find the nearest element that has already been monkey patched with data let parent = rElement; while (parent = parent.parentNode) { const parentContext = readPatchedData(parent); if (parentContext) { let lView; if (Array.isArray(parentContext)) { lView = parentContext; } else { lView = parentContext.lView; } // the edge of the app was also reached here through another means // (maybe because the DOM was changed manually). if (!lView) { return null; } const index = findViaNativeElement(lView, rElement); if (index >= 0) { const native = unwrapRNode(lView[index]); const context = createLContext(lView, index, native); attachPatchData(native, context); mpValue = context; break; } } } } return mpValue || null; } /** * Creates an empty instance of a `LContext` context */ function createLContext(lView, nodeIndex, native) { return { lView, nodeIndex, native, component: undefined, directives: undefined, localRefs: undefined, }; } /** * Takes a component instance and returns the view for that component. * * @param componentInstance * @returns The component's view */ function getComponentViewByInstance(componentInstance) { let lView = readPatchedData(componentInstance); let view; if (Array.isArray(lView)) { const nodeIndex = findViaComponent(lView, componentInstance); view = getComponentLViewByIndex(nodeIndex, lView); const context = createLContext(lView, nodeIndex, view[HOST]); context.component = componentInstance; attachPatchData(componentInstance, context); attachPatchData(context.native, context); } else { const context = lView; view = getComponentLViewByIndex(context.nodeIndex, context.lView); } return view; } /** * Assigns the given data to the given target (which could be a component, * directive or DOM node instance) using monkey-patching. */ function attachPatchData(target, data) { target[MONKEY_PATCH_KEY_NAME] = data; } function isComponentInstance(instance) { return instance && instance.constructor && instance.constructor.ɵcmp; } function isDirectiveInstance(instance) { return instance && instance.constructor && instance.constructor.ɵdir; } /** * Locates the element within the given LView and returns the matching index */ function findViaNativeElement(lView, target) { const tView = lView[TVIEW]; for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) { if (unwrapRNode(lView[i]) === target) { return i; } } return -1; } /** * Locates the next tNode (child, sibling or parent). */ function traverseNextElement(tNode) { if (tNode.child) { return tNode.child; } else if (tNode.next) { return tNode.next; } else { // Let's take the following template: <div><span>text</span></div><component/> // After checking the text node, we need to find the next parent that has a "next" TNode, // in this case the parent `div`, so that we can find the component. while (tNode.parent && !tNode.parent.next) { tNode = tNode.parent; } return tNode.parent && tNode.parent.next; } } /** * Locates the component within the given LView and returns the matching index */ function findViaComponent(lView, componentInstance) { const componentIndices = lView[TVIEW].components; if (componentIndices) { for (let i = 0; i < componentIndices.length; i++) { const elementComponentIndex = componentIndices[i]; const componentView = getComponentLViewByIndex(elementComponentIndex, lView); if (componentView[CONTEXT] === componentInstance) { return elementComponentIndex; } } } else { const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView); const rootComponent = rootComponentView[CONTEXT]; if (rootComponent === componentInstance) { // we are dealing with the root element here therefore we know that the // element is the very first element after the HEADER data in the lView return HEADER_OFFSET; } } return -1; } /** * Locates the directive within the given LView and returns the matching index */ function findViaDirective(lView, directiveInstance) { // if a directive is monkey patched then it will (by default) // have a reference to the LView of the current view. The // element bound to the directive being search lives somewhere // in the view data. We loop through the nodes and check their // list of directives for the instance. let tNode = lView[TVIEW].firstChild; while (tNode) { const directiveIndexStart = tNode.directiveStart; const directiveIndexEnd = tNode.directiveEnd; for (let i = directiveIndexStart; i < directiveIndexEnd; i++) { if (lView[i] === directiveInstance) { return tNode.index; } } tNode = traverseNextElement(tNode); } return -1; } /** * Returns a list of directives extracted from the given view based on the * provided list of directive index values. * * @param nodeIndex The node index * @param lView The target view data * @param includeComponents Whether or not to include components in returned directives */ function getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) { const tNode = lView[TVIEW].data[nodeIndex]; let directiveStartIndex = tNode.directiveStart; if (directiveStartIndex == 0) return EMPTY_ARRAY$1; const directiveEndIndex = tNode.directiveEnd; if (!includeComponents && tNode.flags & 2 /* isComponentHost */) directiveStartIndex++; return lView.slice(directiveStartIndex, directiveEndIndex); } function getComponentAtNodeIndex(nodeIndex, lView) { const tNode = lView[TVIEW].data[nodeIndex]; let directiveStartIndex = tNode.directiveStart; return tNode.flags & 2 /* isComponentHost */ ? lView[directiveStartIndex] : null; } /** * Returns a map of local references (local reference name => element or directive instance) that * exist on a given element. */ function discoverLocalRefs(lView, nodeIndex) { const tNode = lView[TVIEW].data[nodeIndex]; if (tNode && tNode.localNames) { const result = {}; let localIndex = tNode.index + 1; for (let i = 0; i < tNode.localNames.length; i += 2) { result[tNode.localNames[i]] = lView[localIndex]; localIndex++; } return result; } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$4 = () => (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only setTimeout // everything else ) .bind(_global); const defaultScheduler = (ɵ0$4)(); /** * * @codeGenApi */ function ɵɵresolveWindow(element) { return { name: 'window', target: element.ownerDocument.defaultView }; } /** * * @codeGenApi */ function ɵɵresolveDocument(element) { return { name: 'document', target: element.ownerDocument }; } /** * * @codeGenApi */ function ɵɵresolveBody(element) { return { name: 'body', target: element.ownerDocument.body }; } /** * The special delimiter we use to separate property names, prefixes, and suffixes * in property binding metadata. See storeBindingMetadata(). * * We intentionally use the Unicode "REPLACEMENT CHARACTER" (U+FFFD) as a delimiter * because it is a very uncommon character that is unlikely to be part of a user's * property names or interpolation strings. If it is in fact used in a property * binding, DebugElement.properties will not return the correct value for that * binding. However, there should be no runtime effect for real applications. * * This character is typically rendered as a question mark inside of a diamond. * See https://en.wikipedia.org/wiki/Specials_(Unicode_block) * */ const INTERPOLATION_DELIMITER = `�`; /** * Unwrap a value which might be behind a closure (for forward declaration reasons). */ function maybeUnwrapFn(value) { if (value instanceof Function) { return value(); } else { return value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** Called when there are multiple component selectors that match a given node */ function throwMultipleComponentError(tNode) { throw new RuntimeError("300" /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}`); } /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */ function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) { const field = propName ? ` for '${propName}'` : ''; let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`; if (creationMode) { msg += ` It seems like the view has been created after its parent and its children have been dirty checked.` + ` Has it been created in a change detection hook?`; } // TODO: include debug context, see `viewDebugError` function in // `packages/core/src/view/errors.ts` for reference. throw new RuntimeError("100" /* EXPRESSION_CHANGED_AFTER_CHECKED */, msg); } function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) { const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER); let oldValue = prefix, newValue = prefix; for (let i = 0; i < chunks.length; i++) { const slotIdx = rootIndex + i; oldValue += `${lView[slotIdx]}${chunks[i]}`; newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`; } return { propName, oldValue, newValue }; } /** * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError: * - property name (for property bindings or interpolations) * - old and new values, enriched using information from metadata * * More information on the metadata storage format can be found in `storePropertyBindingMetadata` * function description. */ function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) { const tData = lView[TVIEW].data; const metadata = tData[bindingIndex]; if (typeof metadata === 'string') { // metadata for property interpolation if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) { return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue); } // metadata for property binding return { propName: metadata, oldValue, newValue }; } // metadata is not available for this expression, check if this expression is a part of the // property interpolation by going from the current binding index left and look for a string that // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this: // [..., 'id�Prefix � and � suffix', null, null, null, ...] if (metadata === null) { let idx = bindingIndex - 1; while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) { idx--; } const meta = tData[idx]; if (typeof meta === 'string') { const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g')); // first interpolation delimiter separates property name from interpolation parts (in case of // property interpolations), so we subtract one from total number of found delimiters if (matches && (matches.length - 1) > bindingIndex - idx) { return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue); } } } return { propName: undefined, oldValue, newValue }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Flags for renderer-specific style modifiers. * @publicApi */ var RendererStyleFlags2; (function (RendererStyleFlags2) { // TODO(misko): This needs to be refactored into a separate file so that it can be imported from // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now. /** * Marks a style as important. */ RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important"; /** * Marks a style as using dash case naming (this-is-dash-case). */ RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase"; })(RendererStyleFlags2 || (RendererStyleFlags2 = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _icuContainerIterate; /** * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s. */ function icuContainerIterate(tIcuContainerNode, lView) { return _icuContainerIterate(tIcuContainerNode, lView); } /** * Ensures that `IcuContainerVisitor`'s implementation is present. * * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the * bundler to tree shake ICU logic and only load it if ICU instruction is executed. */ function ensureIcuContainerVisitorLoaded(loader) { if (_icuContainerIterate === undefined) { // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it // can be inlined into call-site. _icuContainerIterate = loader(); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$5 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of * that LContainer, which is an LView * @param lView the lView whose parent to get */ function getLViewParent(lView) { ngDevMode && assertLView(lView); const parent = lView[PARENT]; return isLContainer(parent) ? parent[PARENT] : parent; } /** * Retrieve the root view from any component or `LView` by walking the parent `LView` until * reaching the root `LView`. * * @param componentOrLView any component or `LView` */ function getRootView(componentOrLView) { ngDevMode && assertDefined(componentOrLView, 'component'); let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView); while (lView && !(lView[FLAGS] & 512 /* IsRoot */)) { lView = getLViewParent(lView); } ngDevMode && assertLView(lView); return lView; } /** * Returns the `RootContext` instance that is associated with * the application where the target is situated. It does this by walking the parent views until it * gets to the root view, then getting the context off of that. * * @param viewOrComponent the `LView` or component to get the root context for. */ function getRootContext(viewOrComponent) { const rootView = getRootView(viewOrComponent); ngDevMode && assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?'); return rootView[CONTEXT]; } /** * Gets the first `LContainer` in the LView or `null` if none exists. */ function getFirstLContainer(lView) { return getNearestLContainer(lView[CHILD_HEAD]); } /** * Gets the next `LContainer` that is a sibling of the given container. */ function getNextLContainer(container) { return getNearestLContainer(container[NEXT]); } function getNearestLContainer(viewOrContainer) { while (viewOrContainer !== null && !isLContainer(viewOrContainer)) { viewOrContainer = viewOrContainer[NEXT]; } return viewOrContainer; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd; /** * NOTE: for performance reasons, the possible actions are inlined within the function instead of * being passed as an argument. */ function applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) { // If this slot was allocated for a text node dynamically created by i18n, the text node itself // won't be created until i18nApply() in the update block, so this node should be skipped. // For more info, see "ICU expressions should work inside an ngTemplateOutlet inside an ngFor" // in `i18n_spec.ts`. if (lNodeToHandle != null) { let lContainer; let isComponent = false; // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if // it has LContainer so that we can process all of those cases appropriately. if (isLContainer(lNodeToHandle)) { lContainer = lNodeToHandle; } else if (isLView(lNodeToHandle)) { isComponent = true; ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView'); lNodeToHandle = lNodeToHandle[HOST]; } const rNode = unwrapRNode(lNodeToHandle); ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode); if (action === 0 /* Create */ && parent !== null) { if (beforeNode == null) { nativeAppendChild(renderer, parent, rNode); } else { nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true); } } else if (action === 1 /* Insert */ && parent !== null) { nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true); } else if (action === 2 /* Detach */) { nativeRemoveNode(renderer, rNode, isComponent); } else if (action === 3 /* Destroy */) { ngDevMode && ngDevMode.rendererDestroyNode++; renderer.destroyNode(rNode); } if (lContainer != null) { applyContainer(renderer, action, lContainer, parent, beforeNode); } } } function createTextNode(renderer, value) { ngDevMode && ngDevMode.rendererCreateTextNode++; ngDevMode && ngDevMode.rendererSetText++; return isProceduralRenderer(renderer) ? renderer.createText(value) : renderer.createTextNode(value); } function updateTextNode(renderer, rNode, value) { ngDevMode && ngDevMode.rendererSetText++; isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value; } function createCommentNode(renderer, value) { ngDevMode && ngDevMode.rendererCreateComment++; // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same // method name. return renderer.createComment(escapeCommentText(value)); } /** * Creates a native element from a tag name, using a renderer. * @param renderer A renderer to use * @param name the tag name * @param namespace Optional namespace for element. * @returns the element created */ function createElementNode(renderer, name, namespace) { ngDevMode && ngDevMode.rendererCreateElement++; if (isProceduralRenderer(renderer)) { return renderer.createElement(name, namespace); } else { return namespace === null ? renderer.createElement(name) : renderer.createElementNS(namespace, name); } } /** * Removes all DOM elements associated with a view. * * Because some root nodes of the view may be containers, we sometimes need * to propagate deeply into the nested containers to remove all elements in the * views beneath it. * * @param tView The `TView' of the `LView` from which elements should be added or removed * @param lView The view from which elements should be added or removed */ function removeViewFromContainer(tView, lView) { const renderer = lView[RENDERER]; applyView(tView, lView, renderer, 2 /* Detach */, null, null); lView[HOST] = null; lView[T_HOST] = null; } /** * Adds all DOM elements associated with a view. * * Because some root nodes of the view may be containers, we sometimes need * to propagate deeply into the nested containers to add all elements in the * views beneath it. * * @param tView The `TView' of the `LView` from which elements should be added or removed * @param parentTNode The `TNode` where the `LView` should be attached to. * @param renderer Current renderer to use for DOM manipulations. * @param lView The view from which elements should be added or removed * @param parentNativeNode The parent `RElement` where it should be inserted into. * @param beforeNode The node before which elements should be added, if insert mode */ function addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) { lView[HOST] = parentNativeNode; lView[T_HOST] = parentTNode; applyView(tView, lView, renderer, 1 /* Insert */, parentNativeNode, beforeNode); } /** * Detach a `LView` from the DOM by detaching its nodes. * * @param tView The `TView' of the `LView` to be detached * @param lView the `LView` to be detached. */ function renderDetachView(tView, lView) { applyView(tView, lView, lView[RENDERER], 2 /* Detach */, null, null); } /** * Traverses down and up the tree of views and containers to remove listeners and * call onDestroy callbacks. * * Notes: * - Because it's used for onDestroy calls, it needs to be bottom-up. * - Must process containers instead of their views to avoid splicing * when views are destroyed and re-added. * - Using a while loop because it's faster than recursion * - Destroy only called on movement to sibling or movement to parent (laterally or up) * * @param rootView The view to destroy */ function destroyViewTree(rootView) { // If the view has no children, we can clean it up and return early. let lViewOrLContainer = rootView[CHILD_HEAD]; if (!lViewOrLContainer) { return cleanUpView(rootView[TVIEW], rootView); } while (lViewOrLContainer) { let next = null; if (isLView(lViewOrLContainer)) { // If LView, traverse down to child. next = lViewOrLContainer[CHILD_HEAD]; } else { ngDevMode && assertLContainer(lViewOrLContainer); // If container, traverse down to its first LView. const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET]; if (firstView) next = firstView; } if (!next) { // Only clean up view when moving to the side or up, as destroy hooks // should be called in order from the bottom up. while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) { if (isLView(lViewOrLContainer)) { cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer); } lViewOrLContainer = lViewOrLContainer[PARENT]; } if (lViewOrLContainer === null) lViewOrLContainer = rootView; if (isLView(lViewOrLContainer)) { cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer); } next = lViewOrLContainer && lViewOrLContainer[NEXT]; } lViewOrLContainer = next; } } /** * Inserts a view into a container. * * This adds the view to the container's array of active views in the correct * position. It also adds the view's elements to the DOM if the container isn't a * root node of another view (in that case, the view's elements will be added when * the container's parent view is added later). * * @param tView The `TView' of the `LView` to insert * @param lView The view to insert * @param lContainer The container into which the view should be inserted * @param index Which index in the container to insert the child view into */ function insertView(tView, lView, lContainer, index) { ngDevMode && assertLView(lView); ngDevMode && assertLContainer(lContainer); const indexInContainer = CONTAINER_HEADER_OFFSET + index; const containerLength = lContainer.length; if (index > 0) { // This is a new view, we need to add it to the children. lContainer[indexInContainer - 1][NEXT] = lView; } if (index < containerLength - CONTAINER_HEADER_OFFSET) { lView[NEXT] = lContainer[indexInContainer]; addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView); } else { lContainer.push(lView); lView[NEXT] = null; } lView[PARENT] = lContainer; // track views where declaration and insertion points are different const declarationLContainer = lView[DECLARATION_LCONTAINER]; if (declarationLContainer !== null && lContainer !== declarationLContainer) { trackMovedView(declarationLContainer, lView); } // notify query that a new view has been added const lQueries = lView[QUERIES]; if (lQueries !== null) { lQueries.insertView(tView); } // Sets the attached flag lView[FLAGS] |= 128 /* Attached */; } /** * Track views created from the declaration container (TemplateRef) and inserted into a * different LContainer. */ function trackMovedView(declarationContainer, lView) { ngDevMode && assertDefined(lView, 'LView required'); ngDevMode && assertLContainer(declarationContainer); const movedViews = declarationContainer[MOVED_VIEWS]; const insertedLContainer = lView[PARENT]; ngDevMode && assertLContainer(insertedLContainer); const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW]; ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView'); const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW]; ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView'); if (declaredComponentLView !== insertedComponentLView) { // At this point the declaration-component is not same as insertion-component; this means that // this is a transplanted view. Mark the declared lView as having transplanted views so that // those views can participate in CD. declarationContainer[HAS_TRANSPLANTED_VIEWS] = true; } if (movedViews === null) { declarationContainer[MOVED_VIEWS] = [lView]; } else { movedViews.push(lView); } } function detachMovedView(declarationContainer, lView) { ngDevMode && assertLContainer(declarationContainer); ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection'); const movedViews = declarationContainer[MOVED_VIEWS]; const declarationViewIndex = movedViews.indexOf(lView); const insertionLContainer = lView[PARENT]; ngDevMode && assertLContainer(insertionLContainer); // If the view was marked for refresh but then detached before it was checked (where the flag // would be cleared and the counter decremented), we need to decrement the view counter here // instead. if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) { lView[FLAGS] &= ~1024 /* RefreshTransplantedView */; updateTransplantedViewCount(insertionLContainer, -1); } movedViews.splice(declarationViewIndex, 1); } /** * Detaches a view from a container. * * This method removes the view from the container's array of active views. It also * removes the view's elements from the DOM. * * @param lContainer The container from which to detach a view * @param removeIndex The index of the view to detach * @returns Detached LView instance. */ function detachView(lContainer, removeIndex) { if (lContainer.length <= CONTAINER_HEADER_OFFSET) return; const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex; const viewToDetach = lContainer[indexInContainer]; if (viewToDetach) { const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER]; if (declarationLContainer !== null && declarationLContainer !== lContainer) { detachMovedView(declarationLContainer, viewToDetach); } if (removeIndex > 0) { lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT]; } const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex); removeViewFromContainer(viewToDetach[TVIEW], viewToDetach); // notify query that a view has been removed const lQueries = removedLView[QUERIES]; if (lQueries !== null) { lQueries.detachView(removedLView[TVIEW]); } viewToDetach[PARENT] = null; viewToDetach[NEXT] = null; // Unsets the attached flag viewToDetach[FLAGS] &= ~128 /* Attached */; } return viewToDetach; } /** * A standalone function which destroys an LView, * conducting clean up (e.g. removing listeners, calling onDestroys). * * @param tView The `TView' of the `LView` to be destroyed * @param lView The view to be destroyed. */ function destroyLView(tView, lView) { if (!(lView[FLAGS] & 256 /* Destroyed */)) { const renderer = lView[RENDERER]; if (isProceduralRenderer(renderer) && renderer.destroyNode) { applyView(tView, lView, renderer, 3 /* Destroy */, null, null); } destroyViewTree(lView); } } /** * Calls onDestroys hooks for all directives and pipes in a given view and then removes all * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks * can be propagated to @Output listeners. * * @param tView `TView` for the `LView` to clean up. * @param lView The LView to clean up */ function cleanUpView(tView, lView) { if (!(lView[FLAGS] & 256 /* Destroyed */)) { // Usually the Attached flag is removed when the view is detached from its parent, however // if it's a root view, the flag won't be unset hence why we're also removing on destroy. lView[FLAGS] &= ~128 /* Attached */; // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop. // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is // really more of an "afterDestroy" hook if you think about it. lView[FLAGS] |= 256 /* Destroyed */; executeOnDestroys(tView, lView); processCleanups(tView, lView); // For component views only, the local renderer is destroyed at clean up time. if (lView[TVIEW].type === 1 /* Component */ && isProceduralRenderer(lView[RENDERER])) { ngDevMode && ngDevMode.rendererDestroy++; lView[RENDERER].destroy(); } const declarationContainer = lView[DECLARATION_LCONTAINER]; // we are dealing with an embedded view that is still inserted into a container if (declarationContainer !== null && isLContainer(lView[PARENT])) { // and this is a projected view if (declarationContainer !== lView[PARENT]) { detachMovedView(declarationContainer, lView); } // For embedded views still attached to a container: remove query result from this view. const lQueries = lView[QUERIES]; if (lQueries !== null) { lQueries.detachView(tView); } } } } /** Removes listeners and unsubscribes from output subscriptions */ function processCleanups(tView, lView) { const tCleanup = tView.cleanup; const lCleanup = lView[CLEANUP]; // `LCleanup` contains both share information with `TCleanup` as well as instance specific // information appended at the end. We need to know where the end of the `TCleanup` information // is, and we track this with `lastLCleanupIndex`. let lastLCleanupIndex = -1; if (tCleanup !== null) { for (let i = 0; i < tCleanup.length - 1; i += 2) { if (typeof tCleanup[i] === 'string') { // This is a native DOM listener const idxOrTargetGetter = tCleanup[i + 1]; const target = typeof idxOrTargetGetter === 'function' ? idxOrTargetGetter(lView) : unwrapRNode(lView[idxOrTargetGetter]); const listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]]; const useCaptureOrSubIdx = tCleanup[i + 3]; if (typeof useCaptureOrSubIdx === 'boolean') { // native DOM listener registered with Renderer3 target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx); } else { if (useCaptureOrSubIdx >= 0) { // unregister lCleanup[lastLCleanupIndex = useCaptureOrSubIdx](); } else { // Subscription lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe(); } } i += 2; } else { // This is a cleanup function that is grouped with the index of its context const context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]]; tCleanup[i].call(context); } } } if (lCleanup !== null) { for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) { const instanceCleanupFn = lCleanup[i]; ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.'); instanceCleanupFn(); } lView[CLEANUP] = null; } } /** Calls onDestroy hooks for this view */ function executeOnDestroys(tView, lView) { let destroyHooks; if (tView != null && (destroyHooks = tView.destroyHooks) != null) { for (let i = 0; i < destroyHooks.length; i += 2) { const context = lView[destroyHooks[i]]; // Only call the destroy hook if the context has been requested. if (!(context instanceof NodeInjectorFactory)) { const toCall = destroyHooks[i + 1]; if (Array.isArray(toCall)) { for (let j = 0; j < toCall.length; j += 2) { toCall[j + 1].call(context[toCall[j]]); } } else { toCall.call(context); } } } } } /** * Returns a native element if a node can be inserted into the given parent. * * There are two reasons why we may not be able to insert a element immediately. * - Projection: When creating a child content element of a component, we have to skip the * insertion because the content of a component will be projected. * `<component><content>delayed due to projection</content></component>` * - Parent container is disconnected: This can happen when we are inserting a view into * parent container, which itself is disconnected. For example the parent container is part * of a View which has not be inserted or is made for projection but has not been inserted * into destination. * * @param tView: Current `TView`. * @param tNode: `TNode` for which we wish to retrieve render parent. * @param lView: Current `LView`. */ function getParentRElement(tView, tNode, lView) { return getClosestRElement(tView, tNode.parent, lView); } /** * Get closest `RElement` or `null` if it can't be found. * * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location. * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively). * If `TNode` is `null` then return host `RElement`: * - return `null` if projection * - return `null` if parent container is disconnected (we have no parent.) * * @param tView: Current `TView`. * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is * needed). * @param lView: Current `LView`. * @returns `null` if the `RElement` can't be determined at this time (no parent / projection) */ function getClosestRElement(tView, tNode, lView) { let parentTNode = tNode; // Skip over element and ICU containers as those are represented by a comment node and // can't be used as a render parent. while (parentTNode !== null && (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */))) { tNode = parentTNode; parentTNode = tNode.parent; } // If the parent tNode is null, then we are inserting across views: either into an embedded view // or a component view. if (parentTNode === null) { // We are inserting a root element of the component view into the component host element and // it should always be eager. return lView[HOST]; } else { ngDevMode && assertTNodeType(parentTNode, 3 /* AnyRNode */ | 4 /* Container */); if (parentTNode.flags & 2 /* isComponentHost */) { ngDevMode && assertTNodeForLView(parentTNode, lView); const encapsulation = tView.data[parentTNode.directiveStart].encapsulation; // We've got a parent which is an element in the current view. We just need to verify if the // parent element is not a component. Component's content nodes are not inserted immediately // because they will be projected, and so doing insert at this point would be wasteful. // Since the projection would then move it to its final destination. Note that we can't // make this assumption when using the Shadow DOM, because the native projection placeholders // (<content> or <slot>) have to be in place as elements are being inserted. if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) { return null; } } return getNativeByTNode(parentTNode, lView); } } /** * Inserts a native node before another native node for a given parent using {@link Renderer3}. * This is a utility function that can be used when native nodes were determined - it abstracts an * actual renderer being used. */ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) { ngDevMode && ngDevMode.rendererInsertBefore++; if (isProceduralRenderer(renderer)) { renderer.insertBefore(parent, child, beforeNode, isMove); } else { parent.insertBefore(child, beforeNode, isMove); } } function nativeAppendChild(renderer, parent, child) { ngDevMode && ngDevMode.rendererAppendChild++; ngDevMode && assertDefined(parent, 'parent node must be defined'); if (isProceduralRenderer(renderer)) { renderer.appendChild(parent, child); } else { parent.appendChild(child); } } function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) { if (beforeNode !== null) { nativeInsertBefore(renderer, parent, child, beforeNode, isMove); } else { nativeAppendChild(renderer, parent, child); } } /** Removes a node from the DOM given its native parent. */ function nativeRemoveChild(renderer, parent, child, isHostElement) { if (isProceduralRenderer(renderer)) { renderer.removeChild(parent, child, isHostElement); } else { parent.removeChild(child); } } /** * Returns a native parent of a given native node. */ function nativeParentNode(renderer, node) { return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode); } /** * Returns a native sibling of a given native node. */ function nativeNextSibling(renderer, node) { return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling; } /** * Find a node in front of which `currentTNode` should be inserted. * * This method determines the `RNode` in front of which we should insert the `currentRNode`. This * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked. * * @param parentTNode parent `TNode` * @param currentTNode current `TNode` (The node which we would like to insert into the DOM) * @param lView current `LView` */ function getInsertInFrontOfRNode(parentTNode, currentTNode, lView) { return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView); } /** * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into * account) * * This method determines the `RNode` in front of which we should insert the `currentRNode`. This * does not take `TNode.insertBeforeIndex` into account. * * @param parentTNode parent `TNode` * @param currentTNode current `TNode` (The node which we would like to insert into the DOM) * @param lView current `LView` */ function getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) { if (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */)) { return getNativeByTNode(parentTNode, lView); } return null; } /** * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function. * * This function will only be set if i18n code runs. */ let _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n; /** * Tree shakable boundary for `processI18nInsertBefore` function. * * This function will only be set if i18n code runs. */ let _processI18nInsertBefore; function setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) { _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n; _processI18nInsertBefore = processI18nInsertBefore; } /** * Appends the `child` native node (or a collection of nodes) to the `parent`. * * @param tView The `TView' to be appended * @param lView The current LView * @param childRNode The native child (or children) that should be appended * @param childTNode The TNode of the child element */ function appendChild(tView, lView, childRNode, childTNode) { const parentRNode = getParentRElement(tView, childTNode, lView); const renderer = lView[RENDERER]; const parentTNode = childTNode.parent || lView[T_HOST]; const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView); if (parentRNode != null) { if (Array.isArray(childRNode)) { for (let i = 0; i < childRNode.length; i++) { nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false); } } else { nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false); } } _processI18nInsertBefore !== undefined && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode); } /** * Returns the first native node for a given LView, starting from the provided TNode. * * Native nodes are returned in the order in which those appear in the native tree (DOM). */ function getFirstNativeNode(lView, tNode) { if (tNode !== null) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */ | 16 /* Projection */); const tNodeType = tNode.type; if (tNodeType & 3 /* AnyRNode */) { return getNativeByTNode(tNode, lView); } else if (tNodeType & 4 /* Container */) { return getBeforeNodeForView(-1, lView[tNode.index]); } else if (tNodeType & 8 /* ElementContainer */) { const elIcuContainerChild = tNode.child; if (elIcuContainerChild !== null) { return getFirstNativeNode(lView, elIcuContainerChild); } else { const rNodeOrLContainer = lView[tNode.index]; if (isLContainer(rNodeOrLContainer)) { return getBeforeNodeForView(-1, rNodeOrLContainer); } else { return unwrapRNode(rNodeOrLContainer); } } } else if (tNodeType & 32 /* Icu */) { let nextRNode = icuContainerIterate(tNode, lView); let rNode = nextRNode(); // If the ICU container has no nodes, than we use the ICU anchor as the node. return rNode || unwrapRNode(lView[tNode.index]); } else { const projectionNodes = getProjectionNodes(lView, tNode); if (projectionNodes !== null) { if (Array.isArray(projectionNodes)) { return projectionNodes[0]; } const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]); ngDevMode && assertParentView(parentView); return getFirstNativeNode(parentView, projectionNodes); } else { return getFirstNativeNode(lView, tNode.next); } } } return null; } function getProjectionNodes(lView, tNode) { if (tNode !== null) { const componentView = lView[DECLARATION_COMPONENT_VIEW]; const componentHost = componentView[T_HOST]; const slotIdx = tNode.projection; ngDevMode && assertProjectionSlots(lView); return componentHost.projection[slotIdx]; } return null; } function getBeforeNodeForView(viewIndexInContainer, lContainer) { const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1; if (nextViewIndex < lContainer.length) { const lView = lContainer[nextViewIndex]; const firstTNodeOfView = lView[TVIEW].firstChild; if (firstTNodeOfView !== null) { return getFirstNativeNode(lView, firstTNodeOfView); } } return lContainer[NATIVE]; } /** * Removes a native node itself using a given renderer. To remove the node we are looking up its * parent from the native tree as not all platforms / browsers support the equivalent of * node.remove(). * * @param renderer A renderer to be used * @param rNode The native node that should be removed * @param isHostElement A flag indicating if a node to be removed is a host of a component. */ function nativeRemoveNode(renderer, rNode, isHostElement) { ngDevMode && ngDevMode.rendererRemoveNode++; const nativeParent = nativeParentNode(renderer, rNode); if (nativeParent) { nativeRemoveChild(renderer, nativeParent, rNode, isHostElement); } } /** * Performs the operation of `action` on the node. Typically this involves inserting or removing * nodes on the LView or projection boundary. */ function applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) { while (tNode != null) { ngDevMode && assertTNodeForLView(tNode, lView); ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */); const rawSlotValue = lView[tNode.index]; const tNodeType = tNode.type; if (isProjection) { if (action === 0 /* Create */) { rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView); tNode.flags |= 4 /* isProjected */; } } if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) { if (tNodeType & 8 /* ElementContainer */) { applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false); applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } else if (tNodeType & 32 /* Icu */) { const nextRNode = icuContainerIterate(tNode, lView); let rNode; while (rNode = nextRNode()) { applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode); } applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } else if (tNodeType & 16 /* Projection */) { applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode); } else { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 4 /* Container */); applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } } tNode = isProjection ? tNode.projectionNext : tNode.next; } } function applyView(tView, lView, renderer, action, parentRElement, beforeNode) { applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false); } /** * `applyProjection` performs operation on the projection. * * Inserting a projection requires us to locate the projected nodes from the parent component. The * complication is that those nodes themselves could be re-projected from their parent component. * * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed * @param lView The `LView` which needs to be inserted, detached, destroyed. * @param tProjectionNode node to project */ function applyProjection(tView, lView, tProjectionNode) { const renderer = lView[RENDERER]; const parentRNode = getParentRElement(tView, tProjectionNode, lView); const parentTNode = tProjectionNode.parent || lView[T_HOST]; let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView); applyProjectionRecursive(renderer, 0 /* Create */, lView, tProjectionNode, parentRNode, beforeNode); } /** * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert, * detach, destroy) * * Inserting a projection requires us to locate the projected nodes from the parent component. The * complication is that those nodes themselves could be re-projected from their parent component. * * @param renderer Render to use * @param action action to perform (insert, detach, destroy) * @param lView The LView which needs to be inserted, detached, destroyed. * @param tProjectionNode node to project * @param parentRElement parent DOM element for insertion/removal. * @param beforeNode Before which node the insertions should happen. */ function applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) { const componentLView = lView[DECLARATION_COMPONENT_VIEW]; const componentNode = componentLView[T_HOST]; ngDevMode && assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index'); const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection]; if (Array.isArray(nodeToProjectOrRNodes)) { // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we // need to support passing projectable nodes, so we cheat and put them in the TNode // of the Host TView. (Yes we put instance info at the T Level). We can get away with it // because we know that that TView is not shared and therefore it will not be a problem. // This should be refactored and cleaned up. for (let i = 0; i < nodeToProjectOrRNodes.length; i++) { const rNode = nodeToProjectOrRNodes[i]; applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode); } } else { let nodeToProject = nodeToProjectOrRNodes; const projectedComponentLView = componentLView[PARENT]; applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true); } } /** * `applyContainer` performs an operation on the container and its views as specified by * `action` (insert, detach, destroy) * * Inserting a Container is complicated by the fact that the container may have Views which * themselves have containers or projections. * * @param renderer Renderer to use * @param action action to perform (insert, detach, destroy) * @param lContainer The LContainer which needs to be inserted, detached, destroyed. * @param parentRElement parent DOM element for insertion/removal. * @param beforeNode Before which node the insertions should happen. */ function applyContainer(renderer, action, lContainer, parentRElement, beforeNode) { ngDevMode && assertLContainer(lContainer); const anchor = lContainer[NATIVE]; // LContainer has its own before node. const native = unwrapRNode(lContainer); // An LContainer can be created dynamically on any node by injecting ViewContainerRef. // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor // node (comment in the DOM) that will be different from the LContainer's host node. In this // particular case we need to execute action on 2 nodes: // - container's host node (this is done in the executeActionOnElementOrContainer) // - container's host node (this is done here) if (anchor !== native) { // This is very strange to me (Misko). I would expect that the native is same as anchor. I // don't see a reason why they should be different, but they are. // // If they are we need to process the second anchor as well. applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode); } for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const lView = lContainer[i]; applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor); } } /** * Writes class/style to element. * * @param renderer Renderer to use. * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`) * @param rNode The Node to write to. * @param prop Property to write to. This would be the class/style name. * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add * otherwise). */ function applyStyling(renderer, isClassBased, rNode, prop, value) { const isProcedural = isProceduralRenderer(renderer); if (isClassBased) { // We actually want JS true/false here because any truthy value should add the class if (!value) { ngDevMode && ngDevMode.rendererRemoveClass++; if (isProcedural) { renderer.removeClass(rNode, prop); } else { rNode.classList.remove(prop); } } else { ngDevMode && ngDevMode.rendererAddClass++; if (isProcedural) { renderer.addClass(rNode, prop); } else { ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected'); rNode.classList.add(prop); } } } else { let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase; if (value == null /** || value === undefined */) { ngDevMode && ngDevMode.rendererRemoveStyle++; if (isProcedural) { renderer.removeStyle(rNode, prop, flags); } else { rNode.style.removeProperty(prop); } } else { // A value is important if it ends with `!important`. The style // parser strips any semicolons at the end of the value. const isImportant = typeof value === 'string' ? value.endsWith('!important') : false; if (isImportant) { // !important has to be stripped from the value for it to be valid. value = value.slice(0, -10); flags |= RendererStyleFlags2.Important; } ngDevMode && ngDevMode.rendererSetStyle++; if (isProcedural) { renderer.setStyle(rNode, prop, value, flags); } else { ngDevMode && assertDefined(rNode.style, 'HTMLElement expected'); rNode.style.setProperty(prop, value, isImportant ? 'important' : ''); } } } } /** * Write `cssText` to `RElement`. * * This function does direct write without any reconciliation. Used for writing initial values, so * that static styling values do not pull in the style parser. * * @param renderer Renderer to use * @param element The element which needs to be updated. * @param newValue The new class list to write. */ function writeDirectStyle(renderer, element, newValue) { ngDevMode && assertString(newValue, '\'newValue\' should be a string'); if (isProceduralRenderer(renderer)) { renderer.setAttribute(element, 'style', newValue); } else { element.style.cssText = newValue; } ngDevMode && ngDevMode.rendererSetStyle++; } /** * Write `className` to `RElement`. * * This function does direct write without any reconciliation. Used for writing initial values, so * that static styling values do not pull in the style parser. * * @param renderer Renderer to use * @param element The element which needs to be updated. * @param newValue The new class list to write. */ function writeDirectClass(renderer, element, newValue) { ngDevMode && assertString(newValue, '\'newValue\' should be a string'); if (isProceduralRenderer(renderer)) { if (newValue === '') { // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`. renderer.removeAttribute(element, 'class'); } else { renderer.setAttribute(element, 'class', newValue); } } else { element.className = newValue; } ngDevMode && ngDevMode.rendererSetClassName++; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Returns an index of `classToSearch` in `className` taking token boundaries into account. * * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`) * * @param className A string containing classes (whitespace separated) * @param classToSearch A class name to locate * @param startingIndex Starting location of search * @returns an index of the located class (or -1 if not found) */ function classIndexOf(className, classToSearch, startingIndex) { ngDevMode && assertNotEqual(classToSearch, '', 'can not look for "" string.'); let end = className.length; while (true) { const foundIndex = className.indexOf(classToSearch, startingIndex); if (foundIndex === -1) return foundIndex; if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* SPACE */) { // Ensure that it has leading whitespace const length = classToSearch.length; if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32 /* SPACE */) { // Ensure that it has trailing whitespace return foundIndex; } } // False positive, keep searching from where we left off. startingIndex = foundIndex + 1; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5; const NG_TEMPLATE_SELECTOR = 'ng-template'; /** * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive) * * @param attrs `TAttributes` to search through. * @param cssClassToMatch class to match (lowercase) * @param isProjectionMode Whether or not class matching should look into the attribute `class` in * addition to the `AttributeMarker.Classes`. */ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) { // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect. // It is strange to me that sometimes the class information comes in form of `class` attribute // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine // if that is the right behavior. ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.'); let i = 0; while (i < attrs.length) { let item = attrs[i++]; if (isProjectionMode && item === 'class') { item = attrs[i]; if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) { return true; } } else if (item === 1 /* Classes */) { // We found the classes section. Start searching for the class. while (i < attrs.length && typeof (item = attrs[i++]) == 'string') { // while we have strings if (item.toLowerCase() === cssClassToMatch) return true; } return false; } } return false; } /** * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`). * * @param tNode current TNode */ function isInlineTemplate(tNode) { return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR; } /** * Function that checks whether a given tNode matches tag-based selector and has a valid type. * * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular * directive matching mode: * - in the "directive matching" mode we do _not_ take TContainer's tagName into account if it is * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a * tag name was extracted from * syntax so we would match the same directive twice); * - in the "projection" mode, we use a tag name potentially extracted from the * syntax processing * (applicable to TNodeType.Container only). */ function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) { const tagNameToCompare = tNode.type === 4 /* Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value; return currentSelector === tagNameToCompare; } /** * A utility function to match an Ivy node static data against a simple CSS selector * * @param node static data of the node to match * @param selector The selector to try matching against the node. * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing * directive matching. * @returns true if node matches the selector. */ function isNodeMatchingSelector(tNode, selector, isProjectionMode) { ngDevMode && assertDefined(selector[0], 'Selector should have a tag name'); let mode = 4 /* ELEMENT */; const nodeAttrs = tNode.attrs || []; // Find the index of first attribute that has no value, only a name. const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs); // When processing ":not" selectors, we skip to the next ":not" if the // current one doesn't match let skipToNextSelector = false; for (let i = 0; i < selector.length; i++) { const current = selector[i]; if (typeof current === 'number') { // If we finish processing a :not selector and it hasn't failed, return false if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) { return false; } // If we are skipping to the next :not() and this mode flag is positive, // it's a part of the current :not() selector, and we should keep skipping if (skipToNextSelector && isPositive(current)) continue; skipToNextSelector = false; mode = current | (mode & 1 /* NOT */); continue; } if (skipToNextSelector) continue; if (mode & 4 /* ELEMENT */) { mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */; if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) { if (isPositive(mode)) return false; skipToNextSelector = true; } } else { const selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i]; // special case for matching against classes when a tNode has been instantiated with // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo']) if ((mode & 8 /* CLASS */) && tNode.attrs !== null) { if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) { if (isPositive(mode)) return false; skipToNextSelector = true; } continue; } const attrName = (mode & 8 /* CLASS */) ? 'class' : current; const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode); if (attrIndexInNode === -1) { if (isPositive(mode)) return false; skipToNextSelector = true; continue; } if (selectorAttrValue !== '') { let nodeAttrValue; if (attrIndexInNode > nameOnlyMarkerIdx) { nodeAttrValue = ''; } else { ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes'); // we lowercase the attribute value to be able to match // selectors without case-sensitivity // (selectors are already in lowercase when generated) nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase(); } const compareAgainstClassName = mode & 8 /* CLASS */ ? nodeAttrValue : null; if (compareAgainstClassName && classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 || mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) { if (isPositive(mode)) return false; skipToNextSelector = true; } } } } return isPositive(mode) || skipToNextSelector; } function isPositive(mode) { return (mode & 1 /* NOT */) === 0; } /** * Examines the attribute's definition array for a node to find the index of the * attribute that matches the given `name`. * * NOTE: This will not match namespaced attributes. * * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`. * The following table summarizes which types of attributes we attempt to match: * * =========================================================================================================== * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n * Attributes * =========================================================================================================== * Inline + Projection | YES | YES | NO | YES * ----------------------------------------------------------------------------------------------------------- * Inline + Directive | NO | NO | YES | NO * ----------------------------------------------------------------------------------------------------------- * Non-inline + Projection | YES | YES | NO | YES * ----------------------------------------------------------------------------------------------------------- * Non-inline + Directive | YES | YES | NO | YES * =========================================================================================================== * * @param name the name of the attribute to find * @param attrs the attribute array to examine * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`) * rather than a manually expanded template node (e.g `<ng-template>`). * @param isProjectionMode true if we are matching against content projection otherwise we are * matching against directives. */ function findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) { if (attrs === null) return -1; let i = 0; if (isProjectionMode || !isInlineTemplate) { let bindingsMode = false; while (i < attrs.length) { const maybeAttrName = attrs[i]; if (maybeAttrName === name) { return i; } else if (maybeAttrName === 3 /* Bindings */ || maybeAttrName === 6 /* I18n */) { bindingsMode = true; } else if (maybeAttrName === 1 /* Classes */ || maybeAttrName === 2 /* Styles */) { let value = attrs[++i]; // We should skip classes here because we have a separate mechanism for // matching classes in projection mode. while (typeof value === 'string') { value = attrs[++i]; } continue; } else if (maybeAttrName === 4 /* Template */) { // We do not care about Template attributes in this scenario. break; } else if (maybeAttrName === 0 /* NamespaceURI */) { // Skip the whole namespaced attribute and value. This is by design. i += 4; continue; } // In binding mode there are only names, rather than name-value pairs. i += bindingsMode ? 1 : 2; } // We did not match the attribute return -1; } else { return matchTemplateAttribute(attrs, name); } } function isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) { for (let i = 0; i < selector.length; i++) { if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) { return true; } } return false; } function getProjectAsAttrValue(tNode) { const nodeAttrs = tNode.attrs; if (nodeAttrs != null) { const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* ProjectAs */); // only check for ngProjectAs in attribute names, don't accidentally match attribute's value // (attribute names are stored at even indexes) if ((ngProjectAsAttrIdx & 1) === 0) { return nodeAttrs[ngProjectAsAttrIdx + 1]; } } return null; } function getNameOnlyMarkerIndex(nodeAttrs) { for (let i = 0; i < nodeAttrs.length; i++) { const nodeAttr = nodeAttrs[i]; if (isNameOnlyAttributeMarker(nodeAttr)) { return i; } } return nodeAttrs.length; } function matchTemplateAttribute(attrs, name) { let i = attrs.indexOf(4 /* Template */); if (i > -1) { i++; while (i < attrs.length) { const attr = attrs[i]; // Return in case we checked all template attrs and are switching to the next section in the // attrs array (that starts with a number that represents an attribute marker). if (typeof attr === 'number') return -1; if (attr === name) return i; i++; } } return -1; } /** * Checks whether a selector is inside a CssSelectorList * @param selector Selector to be checked. * @param list List in which to look for the selector. */ function isSelectorInSelectorList(selector, list) { selectorListLoop: for (let i = 0; i < list.length; i++) { const currentSelectorInList = list[i]; if (selector.length !== currentSelectorInList.length) { continue; } for (let j = 0; j < selector.length; j++) { if (selector[j] !== currentSelectorInList[j]) { continue selectorListLoop; } } return true; } return false; } function maybeWrapInNotSelector(isNegativeMode, chunk) { return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk; } function stringifyCSSSelector(selector) { let result = selector[0]; let i = 1; let mode = 2 /* ATTRIBUTE */; let currentChunk = ''; let isNegativeMode = false; while (i < selector.length) { let valueOrMarker = selector[i]; if (typeof valueOrMarker === 'string') { if (mode & 2 /* ATTRIBUTE */) { const attrValue = selector[++i]; currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '="' + attrValue + '"' : '') + ']'; } else if (mode & 8 /* CLASS */) { currentChunk += '.' + valueOrMarker; } else if (mode & 4 /* ELEMENT */) { currentChunk += ' ' + valueOrMarker; } } else { // // Append current chunk to the final result in case we come across SelectorFlag, which // indicates that the previous section of a selector is over. We need to accumulate content // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g. // ``` // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC'] // ``` // should be transformed to `.classA :not(.classB .classC)`. // // Note: for negative selector part, we accumulate content between flags until we find the // next negative flag. This is needed to support a case where `:not()` rule contains more than // one chunk, e.g. the following selector: // ``` // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar'] // ``` // should be stringified to `:not(p.foo) :not(.bar)` // if (currentChunk !== '' && !isPositive(valueOrMarker)) { result += maybeWrapInNotSelector(isNegativeMode, currentChunk); currentChunk = ''; } mode = valueOrMarker; // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative // mode is maintained for remaining chunks of a selector. isNegativeMode = isNegativeMode || !isPositive(mode); } i++; } if (currentChunk !== '') { result += maybeWrapInNotSelector(isNegativeMode, currentChunk); } return result; } /** * Generates string representation of CSS selector in parsed form. * * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing * additional parsing at runtime (for example, for directive matching). However in some cases (for * example, while bootstrapping a component), a string version of the selector is required to query * for the host element on the page. This function takes the parsed form of a selector and returns * its string representation. * * @param selectorList selector in parsed form * @returns string representation of a given selector */ function stringifyCSSSelectorList(selectorList) { return selectorList.map(stringifyCSSSelector).join(','); } /** * Extracts attributes and classes information from a given CSS selector. * * This function is used while creating a component dynamically. In this case, the host element * (that is created dynamically) should contain attributes and classes specified in component's CSS * selector. * * @param selector CSS selector in parsed form (in a form of array) * @returns object with `attrs` and `classes` fields that contain extracted information */ function extractAttrsAndClassesFromSelector(selector) { const attrs = []; const classes = []; let i = 1; let mode = 2 /* ATTRIBUTE */; while (i < selector.length) { let valueOrMarker = selector[i]; if (typeof valueOrMarker === 'string') { if (mode === 2 /* ATTRIBUTE */) { if (valueOrMarker !== '') { attrs.push(valueOrMarker, selector[++i]); } } else if (mode === 8 /* CLASS */) { classes.push(valueOrMarker); } } else { // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative // mode is maintained for remaining chunks of a selector. Since attributes and classes are // extracted only for "positive" part of the selector, we can stop here. if (!isPositive(mode)) break; mode = valueOrMarker; } i++; } return { attrs, classes }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** A special value which designates that a value has not changed. */ const NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Advances to an element for later binding instructions. * * Used in conjunction with instructions like {@link property} to act on elements with specified * indices, for example those created with {@link element} or {@link elementStart}. * * ```ts * (rf: RenderFlags, ctx: any) => { * if (rf & 1) { * text(0, 'Hello'); * text(1, 'Goodbye') * element(2, 'div'); * } * if (rf & 2) { * advance(2); // Advance twice to the <div>. * property('title', 'test'); * } * } * ``` * @param delta Number of elements to advance forwards by. * * @codeGenApi */ function ɵɵadvance(delta) { ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward'); selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode()); } function selectIndexInternal(tView, lView, index, checkNoChangesMode) { ngDevMode && assertIndexInDeclRange(lView, index); // Flush the initial hooks for elements in the view that have been added up to this point. // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!checkNoChangesMode) { const hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */; if (hooksInitPhaseCompleted) { const preOrderCheckHooks = tView.preOrderCheckHooks; if (preOrderCheckHooks !== null) { executeCheckHooks(lView, preOrderCheckHooks, index); } } else { const preOrderHooks = tView.preOrderHooks; if (preOrderHooks !== null) { executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, index); } } } // We must set the selected index *after* running the hooks, because hooks may have side-effects // that cause other template functions to run, thus updating the selected index, which is global // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index // will be altered by the time we leave the `ɵɵadvance` instruction. setSelectedIndex(index); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function toTStylingRange(prev, next) { ngDevMode && assertNumberInRange(prev, 0, 32767 /* UNSIGNED_MASK */); ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */); return (prev << 17 /* PREV_SHIFT */ | next << 2 /* NEXT_SHIFT */); } function getTStylingRangePrev(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange >> 17 /* PREV_SHIFT */) & 32767 /* UNSIGNED_MASK */; } function getTStylingRangePrevDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange & 2 /* PREV_DUPLICATE */) == 2 /* PREV_DUPLICATE */; } function setTStylingRangePrev(tStylingRange, previous) { ngDevMode && assertNumber(tStylingRange, 'expected number'); ngDevMode && assertNumberInRange(previous, 0, 32767 /* UNSIGNED_MASK */); return ((tStylingRange & ~4294836224 /* PREV_MASK */) | (previous << 17 /* PREV_SHIFT */)); } function setTStylingRangePrevDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange | 2 /* PREV_DUPLICATE */); } function getTStylingRangeNext(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange & 131068 /* NEXT_MASK */) >> 2 /* NEXT_SHIFT */; } function setTStylingRangeNext(tStylingRange, next) { ngDevMode && assertNumber(tStylingRange, 'expected number'); ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */); return ((tStylingRange & ~131068 /* NEXT_MASK */) | // next << 2 /* NEXT_SHIFT */); } function getTStylingRangeNextDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange & 1 /* NEXT_DUPLICATE */) === 1 /* NEXT_DUPLICATE */; } function setTStylingRangeNextDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange | 1 /* NEXT_DUPLICATE */); } function getTStylingRangeTail(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); const next = getTStylingRangeNext(tStylingRange); return next === 0 ? getTStylingRangePrev(tStylingRange) : next; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Patch a `debug` property on top of the existing object. * * NOTE: always call this method with `ngDevMode && attachDebugObject(...)` * * @param obj Object to patch * @param debug Value to patch */ function attachDebugObject(obj, debug) { if (ngDevMode) { Object.defineProperty(obj, 'debug', { value: debug, enumerable: false }); } else { throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!'); } } /** * Patch a `debug` property getter on top of the existing object. * * NOTE: always call this method with `ngDevMode && attachDebugObject(...)` * * @param obj Object to patch * @param debugGetter Getter returning a value to patch */ function attachDebugGetter(obj, debugGetter) { if (ngDevMode) { Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false }); } else { throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!'); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode()); /* * This file contains conditionally attached classes which provide human readable (debug) level * information for `LView`, `LContainer` and other internal data structures. These data structures * are stored internally as array which makes it very difficult during debugging to reason about the * current state of the system. * * Patching the array with extra property does change the array's hidden class' but it does not * change the cost of access, therefore this patching should not have significant if any impact in * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array) * * So instead of seeing: * ``` * Array(30) [Object, 659, null, …] * ``` * * You get to see: * ``` * LViewDebug { * views: [...], * flags: {attached: true, ...} * nodes: [ * {html: '<div id="123">', ..., nodes: [ * {html: '<span>', ..., nodes: null} * ]} * ] * } * ``` */ let LVIEW_COMPONENT_CACHE; let LVIEW_EMBEDDED_CACHE; let LVIEW_ROOT; /** * This function clones a blueprint and creates LView. * * Simple slice will keep the same type, and we need it to be LView */ function cloneToLViewFromTViewBlueprint(tView) { const debugTView = tView; const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name); return lView.concat(tView.blueprint); } function getLViewToClone(type, name) { switch (type) { case 0 /* Root */: if (LVIEW_ROOT === undefined) LVIEW_ROOT = new (createNamedArrayType('LRootView'))(); return LVIEW_ROOT; case 1 /* Component */: if (LVIEW_COMPONENT_CACHE === undefined) LVIEW_COMPONENT_CACHE = new Map(); let componentArray = LVIEW_COMPONENT_CACHE.get(name); if (componentArray === undefined) { componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))(); LVIEW_COMPONENT_CACHE.set(name, componentArray); } return componentArray; case 2 /* Embedded */: if (LVIEW_EMBEDDED_CACHE === undefined) LVIEW_EMBEDDED_CACHE = new Map(); let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name); if (embeddedArray === undefined) { embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))(); LVIEW_EMBEDDED_CACHE.set(name, embeddedArray); } return embeddedArray; } } function nameSuffix(text) { if (text == null) return ''; const index = text.lastIndexOf('_Template'); return '_' + (index === -1 ? text : text.substr(0, index)); } /** * This class is a debug version of Object literal so that we can have constructor name show up * in * debug tools in ngDevMode. */ const TViewConstructor = class TView { constructor(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) { this.type = type; this.blueprint = blueprint; this.template = template; this.queries = queries; this.viewQuery = viewQuery; this.declTNode = declTNode; this.data = data; this.bindingStartIndex = bindingStartIndex; this.expandoStartIndex = expandoStartIndex; this.hostBindingOpCodes = hostBindingOpCodes; this.firstCreatePass = firstCreatePass; this.firstUpdatePass = firstUpdatePass; this.staticViewQueries = staticViewQueries; this.staticContentQueries = staticContentQueries; this.preOrderHooks = preOrderHooks; this.preOrderCheckHooks = preOrderCheckHooks; this.contentHooks = contentHooks; this.contentCheckHooks = contentCheckHooks; this.viewHooks = viewHooks; this.viewCheckHooks = viewCheckHooks; this.destroyHooks = destroyHooks; this.cleanup = cleanup; this.contentQueries = contentQueries; this.components = components; this.directiveRegistry = directiveRegistry; this.pipeRegistry = pipeRegistry; this.firstChild = firstChild; this.schemas = schemas; this.consts = consts; this.incompleteFirstPass = incompleteFirstPass; this._decls = _decls; this._vars = _vars; } get template_() { const buf = []; processTNodeChildren(this.firstChild, buf); return buf.join(''); } get type_() { return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`; } }; class TNode { constructor(tView_, // type, // index, // insertBeforeIndex, // injectorIndex, // directiveStart, // directiveEnd, // directiveStylingLast, // propertyBindings, // flags, // providerIndexes, // value, // attrs, // mergedAttrs, // localNames, // initialInputs, // inputs, // outputs, // tViews, // next, // projectionNext, // child, // parent, // projection, // styles, // stylesWithoutHost, // residualStyles, // classes, // classesWithoutHost, // residualClasses, // classBindings, // styleBindings) { this.tView_ = tView_; this.type = type; this.index = index; this.insertBeforeIndex = insertBeforeIndex; this.injectorIndex = injectorIndex; this.directiveStart = directiveStart; this.directiveEnd = directiveEnd; this.directiveStylingLast = directiveStylingLast; this.propertyBindings = propertyBindings; this.flags = flags; this.providerIndexes = providerIndexes; this.value = value; this.attrs = attrs; this.mergedAttrs = mergedAttrs; this.localNames = localNames; this.initialInputs = initialInputs; this.inputs = inputs; this.outputs = outputs; this.tViews = tViews; this.next = next; this.projectionNext = projectionNext; this.child = child; this.parent = parent; this.projection = projection; this.styles = styles; this.stylesWithoutHost = stylesWithoutHost; this.residualStyles = residualStyles; this.classes = classes; this.classesWithoutHost = classesWithoutHost; this.residualClasses = residualClasses; this.classBindings = classBindings; this.styleBindings = styleBindings; } /** * Return a human debug version of the set of `NodeInjector`s which will be consulted when * resolving tokens from this `TNode`. * * When debugging applications, it is often difficult to determine which `NodeInjector`s will be * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be * consulted in order when resolving a token starting at this `TNode`. * * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is * difficult to reason about. * * @param lView The `LView` instance for this `TNode`. */ debugNodeInjectorPath(lView) { const path = []; let injectorIndex = getInjectorIndex(this, lView); if (injectorIndex === -1) { // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for // parent NodeInjector. const parentLocation = getParentInjectorLocation(this, lView); if (parentLocation !== NO_PARENT_INJECTOR) { // We found a parent, so start searching from the parent location. injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } else { // No parents have been found, so there are no `NodeInjector`s to consult. } } while (injectorIndex !== -1) { ngDevMode && assertNodeInjector(lView, injectorIndex); const tNode = lView[TVIEW].data[injectorIndex + 8 /* TNODE */]; path.push(buildDebugNode(tNode, lView)); const parentLocation = lView[injectorIndex + 8 /* PARENT */]; if (parentLocation === NO_PARENT_INJECTOR) { injectorIndex = -1; } else { injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } } return path; } get type_() { return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`; } get flags_() { const flags = []; if (this.flags & 16 /* hasClassInput */) flags.push('TNodeFlags.hasClassInput'); if (this.flags & 8 /* hasContentQuery */) flags.push('TNodeFlags.hasContentQuery'); if (this.flags & 32 /* hasStyleInput */) flags.push('TNodeFlags.hasStyleInput'); if (this.flags & 128 /* hasHostBindings */) flags.push('TNodeFlags.hasHostBindings'); if (this.flags & 2 /* isComponentHost */) flags.push('TNodeFlags.isComponentHost'); if (this.flags & 1 /* isDirectiveHost */) flags.push('TNodeFlags.isDirectiveHost'); if (this.flags & 64 /* isDetached */) flags.push('TNodeFlags.isDetached'); if (this.flags & 4 /* isProjected */) flags.push('TNodeFlags.isProjected'); return flags.join('|'); } get template_() { if (this.type & 1 /* Text */) return this.value; const buf = []; const tagName = typeof this.value === 'string' && this.value || this.type_; buf.push('<', tagName); if (this.flags) { buf.push(' ', this.flags_); } if (this.attrs) { for (let i = 0; i < this.attrs.length;) { const attrName = this.attrs[i++]; if (typeof attrName == 'number') { break; } const attrValue = this.attrs[i++]; buf.push(' ', attrName, '="', attrValue, '"'); } } buf.push('>'); processTNodeChildren(this.child, buf); buf.push('</', tagName, '>'); return buf.join(''); } get styleBindings_() { return toDebugStyleBinding(this, false); } get classBindings_() { return toDebugStyleBinding(this, true); } get providerIndexStart_() { return this.providerIndexes & 1048575 /* ProvidersStartIndexMask */; } get providerIndexEnd_() { return this.providerIndexStart_ + (this.providerIndexes >>> 20 /* CptViewProvidersCountShift */); } } const TNodeDebug = TNode; function toDebugStyleBinding(tNode, isClassBased) { const tData = tNode.tView_.data; const bindings = []; const range = isClassBased ? tNode.classBindings : tNode.styleBindings; const prev = getTStylingRangePrev(range); const next = getTStylingRangeNext(range); let isTemplate = next !== 0; let cursor = isTemplate ? next : prev; while (cursor !== 0) { const itemKey = tData[cursor]; const itemRange = tData[cursor + 1]; bindings.unshift({ key: itemKey, index: cursor, isTemplate: isTemplate, prevDuplicate: getTStylingRangePrevDuplicate(itemRange), nextDuplicate: getTStylingRangeNextDuplicate(itemRange), nextIndex: getTStylingRangeNext(itemRange), prevIndex: getTStylingRangePrev(itemRange), }); if (cursor === prev) isTemplate = false; cursor = getTStylingRangePrev(itemRange); } bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null); return bindings; } function processTNodeChildren(tNode, buf) { while (tNode) { buf.push(tNode.template_); tNode = tNode.next; } } const TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null; let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because // `LView` constructor could have side-effects. /** * This function clones a blueprint and creates TData. * * Simple slice will keep the same type, and we need it to be TData */ function cloneToTViewData(list) { if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData(); return TVIEWDATA_EMPTY.concat(list); } const LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null; const MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null; const TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null; const TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null; const TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null; const TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null; const LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null; const TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null; function attachLViewDebug(lView) { attachDebugObject(lView, new LViewDebug(lView)); } function attachLContainerDebug(lContainer) { attachDebugObject(lContainer, new LContainerDebug(lContainer)); } function toDebug(obj) { if (obj) { const debug = obj.debug; assertDefined(debug, 'Object does not have a debug representation.'); return debug; } else { return obj; } } /** * Use this method to unwrap a native element in `LView` and convert it into HTML for easier * reading. * * @param value possibly wrapped native DOM node. * @param includeChildren If `true` then the serialized HTML form will include child elements * (same * as `outerHTML`). If `false` then the serialized HTML form will only contain the element * itself * (will not serialize child elements). */ function toHtml(value, includeChildren = false) { const node = unwrapRNode(value); if (node) { switch (node.nodeType) { case Node.TEXT_NODE: return node.textContent; case Node.COMMENT_NODE: return `<!--${node.textContent}-->`; case Node.ELEMENT_NODE: const outerHTML = node.outerHTML; if (includeChildren) { return outerHTML; } else { const innerHTML = '>' + node.innerHTML + '<'; return (outerHTML.split(innerHTML)[0]) + '>'; } } } return null; } class LViewDebug { constructor(_raw_lView) { this._raw_lView = _raw_lView; } /** * Flags associated with the `LView` unpacked into a more readable state. */ get flags() { const flags = this._raw_lView[FLAGS]; return { __raw__flags__: flags, initPhaseState: flags & 3 /* InitPhaseStateMask */, creationMode: !!(flags & 4 /* CreationMode */), firstViewPass: !!(flags & 8 /* FirstLViewPass */), checkAlways: !!(flags & 16 /* CheckAlways */), dirty: !!(flags & 64 /* Dirty */), attached: !!(flags & 128 /* Attached */), destroyed: !!(flags & 256 /* Destroyed */), isRoot: !!(flags & 512 /* IsRoot */), indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */, }; } get parent() { return toDebug(this._raw_lView[PARENT]); } get hostHTML() { return toHtml(this._raw_lView[HOST], true); } get html() { return (this.nodes || []).map(mapToHTML).join(''); } get context() { return this._raw_lView[CONTEXT]; } /** * The tree of nodes associated with the current `LView`. The nodes have been normalized into * a tree structure with relevant details pulled out for readability. */ get nodes() { const lView = this._raw_lView; const tNode = lView[TVIEW].firstChild; return toDebugNodes(tNode, lView); } get template() { return this.tView.template_; } get tView() { return this._raw_lView[TVIEW]; } get cleanup() { return this._raw_lView[CLEANUP]; } get injector() { return this._raw_lView[INJECTOR]; } get rendererFactory() { return this._raw_lView[RENDERER_FACTORY]; } get renderer() { return this._raw_lView[RENDERER]; } get sanitizer() { return this._raw_lView[SANITIZER]; } get childHead() { return toDebug(this._raw_lView[CHILD_HEAD]); } get next() { return toDebug(this._raw_lView[NEXT]); } get childTail() { return toDebug(this._raw_lView[CHILD_TAIL]); } get declarationView() { return toDebug(this._raw_lView[DECLARATION_VIEW]); } get queries() { return this._raw_lView[QUERIES]; } get tHost() { return this._raw_lView[T_HOST]; } get decls() { return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex); } get vars() { return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex); } get expando() { return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length); } /** * Normalized view of child views (and containers) attached at this location. */ get childViews() { const childViews = []; let child = this.childHead; while (child) { childViews.push(child); child = child.next; } return childViews; } } function mapToHTML(node) { if (node.type === 'ElementContainer') { return (node.children || []).map(mapToHTML).join(''); } else if (node.type === 'IcuContainer') { throw new Error('Not implemented'); } else { return toHtml(node.native, true) || ''; } } function toLViewRange(tView, lView, start, end) { let content = []; for (let index = start; index < end; index++) { content.push({ index: index, t: tView.data[index], l: lView[index] }); } return { start: start, end: end, length: end - start, content: content }; } /** * Turns a flat list of nodes into a tree by walking the associated `TNode` tree. * * @param tNode * @param lView */ function toDebugNodes(tNode, lView) { if (tNode) { const debugNodes = []; let tNodeCursor = tNode; while (tNodeCursor) { debugNodes.push(buildDebugNode(tNodeCursor, lView)); tNodeCursor = tNodeCursor.next; } return debugNodes; } else { return []; } } function buildDebugNode(tNode, lView) { const rawValue = lView[tNode.index]; const native = unwrapRNode(rawValue); const factories = []; const instances = []; const tView = lView[TVIEW]; for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) { const def = tView.data[i]; factories.push(def.type); instances.push(lView[i]); } return { html: toHtml(native), type: toTNodeTypeAsString(tNode.type), tNode, native: native, children: toDebugNodes(tNode.child, lView), factories, instances, injector: buildNodeInjectorDebug(tNode, tView, lView), get injectorResolutionPath() { return tNode.debugNodeInjectorPath(lView); }, }; } function buildNodeInjectorDebug(tNode, tView, lView) { const viewProviders = []; for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) { viewProviders.push(tView.data[i]); } const providers = []; for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) { providers.push(tView.data[i]); } const nodeInjectorDebug = { bloom: toBloom(lView, tNode.injectorIndex), cumulativeBloom: toBloom(tView.data, tNode.injectorIndex), providers, viewProviders, parentInjectorIndex: lView[tNode.providerIndexStart_ - 1], }; return nodeInjectorDebug; } /** * Convert a number at `idx` location in `array` into binary representation. * * @param array * @param idx */ function binary(array, idx) { const value = array[idx]; // If not a number we print 8 `?` to retain alignment but let user know that it was called on // wrong type. if (typeof value !== 'number') return '????????'; // We prefix 0s so that we have constant length number const text = '00000000' + value.toString(2); return text.substring(text.length - 8); } /** * Convert a bloom filter at location `idx` in `array` into binary representation. * * @param array * @param idx */ function toBloom(array, idx) { if (idx < 0) { return 'NO_NODE_INJECTOR'; } return `${binary(array, idx + 7)}_${binary(array, idx + 6)}_${binary(array, idx + 5)}_${binary(array, idx + 4)}_${binary(array, idx + 3)}_${binary(array, idx + 2)}_${binary(array, idx + 1)}_${binary(array, idx + 0)}`; } class LContainerDebug { constructor(_raw_lContainer) { this._raw_lContainer = _raw_lContainer; } get hasTransplantedViews() { return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS]; } get views() { return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET) .map(toDebug); } get parent() { return toDebug(this._raw_lContainer[PARENT]); } get movedViews() { return this._raw_lContainer[MOVED_VIEWS]; } get host() { return this._raw_lContainer[HOST]; } get native() { return this._raw_lContainer[NATIVE]; } get next() { return toDebug(this._raw_lContainer[NEXT]); } } const ɵ0$5 = () => Promise.resolve(null); /** * A permanent marker promise which signifies that the current CD tree is * clean. */ const _CLEAN_PROMISE = (ɵ0$5)(); /** * Invoke `HostBindingsFunction`s for view. * * This methods executes `TView.hostBindingOpCodes`. It is used to execute the * `HostBindingsFunction`s associated with the current `LView`. * * @param tView Current `TView`. * @param lView Current `LView`. */ function processHostBindingOpCodes(tView, lView) { const hostBindingOpCodes = tView.hostBindingOpCodes; if (hostBindingOpCodes === null) return; try { for (let i = 0; i < hostBindingOpCodes.length; i++) { const opCode = hostBindingOpCodes[i]; if (opCode < 0) { // Negative numbers are element indexes. setSelectedIndex(~opCode); } else { // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex. const directiveIdx = opCode; const bindingRootIndx = hostBindingOpCodes[++i]; const hostBindingFn = hostBindingOpCodes[++i]; setBindingRootForHostBindings(bindingRootIndx, directiveIdx); const context = lView[directiveIdx]; hostBindingFn(2 /* Update */, context); } } } finally { setSelectedIndex(-1); } } /** Refreshes all content queries declared by directives in a given view */ function refreshContentQueries(tView, lView) { const contentQueries = tView.contentQueries; if (contentQueries !== null) { for (let i = 0; i < contentQueries.length; i += 2) { const queryStartIdx = contentQueries[i]; const directiveDefIdx = contentQueries[i + 1]; if (directiveDefIdx !== -1) { const directiveDef = tView.data[directiveDefIdx]; ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.'); ngDevMode && assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined'); setCurrentQueryIndex(queryStartIdx); directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx); } } } } /** Refreshes child components in the current view (update mode). */ function refreshChildComponents(hostLView, components) { for (let i = 0; i < components.length; i++) { refreshComponent(hostLView, components[i]); } } /** Renders child components in the current view (creation mode). */ function renderChildComponents(hostLView, components) { for (let i = 0; i < components.length; i++) { renderComponent(hostLView, components[i]); } } function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) { const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice(); lView[HOST] = host; lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */; resetPreOrderHookFlags(lView); ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView); lView[PARENT] = lView[DECLARATION_VIEW] = parentLView; lView[CONTEXT] = context; lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]); ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required'); lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]); ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required'); lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null; lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null; lView[T_HOST] = tHostNode; ngDevMode && assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView'); lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2 /* Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView; ngDevMode && attachLViewDebug(lView); return lView; } function getOrCreateTNode(tView, index, type, name, attrs) { ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in // `view_engine_compatibility` for additional context. assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\'t be in the LView header.'); // Keep this function short, so that the VM will inline it. ngDevMode && assertPureTNodeType(type); let tNode = tView.data[index]; if (tNode === null) { tNode = createTNodeAtIndex(tView, index, type, name, attrs); if (isInI18nBlock()) { // If we are in i18n block then all elements should be pre declared through `Placeholder` // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context. // If the `TNode` was not pre-declared than it means it was not mentioned which means it was // removed, so we mark it as detached. tNode.flags |= 64 /* isDetached */; } } else if (tNode.type & 64 /* Placeholder */) { tNode.type = type; tNode.value = name; tNode.attrs = attrs; const parent = getCurrentParentTNode(); tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex; ngDevMode && assertTNodeForTView(tNode, tView); ngDevMode && assertEqual(index, tNode.index, 'Expecting same index'); } setCurrentTNode(tNode, true); return tNode; } function createTNodeAtIndex(tView, index, type, name, attrs) { const currentTNode = getCurrentTNodePlaceholderOk(); const isParent = isCurrentTNodeParent(); const parent = isParent ? currentTNode : currentTNode && currentTNode.parent; // Parents cannot cross component boundaries because components will be used in multiple places. const tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs); // Assign a pointer to the first child node of a given view. The first node is not always the one // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has // the index 1 or more, so we can't just check node index. if (tView.firstChild === null) { tView.firstChild = tNode; } if (currentTNode !== null) { if (isParent) { // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify? if (currentTNode.child == null && tNode.parent !== null) { // We are in the same view, which means we are adding content node to the parent view. currentTNode.child = tNode; } } else { if (currentTNode.next === null) { // In the case of i18n the `currentTNode` may already be linked, in which case we don't want // to break the links which i18n created. currentTNode.next = tNode; } } } return tNode; } /** * When elements are created dynamically after a view blueprint is created (e.g. through * i18nApply()), we need to adjust the blueprint for future * template passes. * * @param tView `TView` associated with `LView` * @param lView The `LView` containing the blueprint to adjust * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0 * @param initialValue Initial value to store in blueprint */ function allocExpando(tView, lView, numSlotsToAlloc, initialValue) { if (numSlotsToAlloc === 0) return -1; if (ngDevMode) { assertFirstCreatePass(tView); assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!'); assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView'); assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView'); assertFirstUpdatePass(tView); } const allocIdx = lView.length; for (let i = 0; i < numSlotsToAlloc; i++) { lView.push(initialValue); tView.blueprint.push(initialValue); tView.data.push(null); } return allocIdx; } ////////////////////////// //// Render ////////////////////////// /** * Processes a view in the creation mode. This includes a number of steps in a specific order: * - creating view query functions (if any); * - executing a template function in the creation mode; * - updating static queries (if any); * - creating child components defined in a given view. */ function renderView(tView, lView, context) { ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode'); enterView(lView); try { const viewQuery = tView.viewQuery; if (viewQuery !== null) { executeViewQueryFn(1 /* Create */, viewQuery, context); } // Execute a template associated with this view, if it exists. A template function might not be // defined for the root component views. const templateFn = tView.template; if (templateFn !== null) { executeTemplate(tView, lView, templateFn, 1 /* Create */, context); } // This needs to be set before children are processed to support recursive components. // This must be set to false immediately after the first creation run because in an // ngFor loop, all the views will be created together before update mode runs and turns // off firstCreatePass. If we don't set it here, instances will perform directive // matching, etc again and again. if (tView.firstCreatePass) { tView.firstCreatePass = false; } // We resolve content queries specifically marked as `static` in creation mode. Dynamic // content queries are resolved during change detection (i.e. update mode), after embedded // views are refreshed (see block above). if (tView.staticContentQueries) { refreshContentQueries(tView, lView); } // We must materialize query results before child components are processed // in case a child component has projected a container. The LContainer needs // to exist so the embedded views are properly attached by the container. if (tView.staticViewQueries) { executeViewQueryFn(2 /* Update */, tView.viewQuery, context); } // Render child component views. const components = tView.components; if (components !== null) { renderChildComponents(lView, components); } } catch (error) { // If we didn't manage to get past the first template pass due to // an error, mark the view as corrupted so we can try to recover. if (tView.firstCreatePass) { tView.incompleteFirstPass = true; } throw error; } finally { lView[FLAGS] &= ~4 /* CreationMode */; leaveView(); } } /** * Processes a view in update mode. This includes a number of steps in a specific order: * - executing a template function in update mode; * - executing hooks; * - refreshing queries; * - setting host bindings; * - refreshing child (embedded and component) views. */ function refreshView(tView, lView, templateFn, context) { ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode'); const flags = lView[FLAGS]; if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */) return; enterView(lView); // Check no changes mode is a dev only mode used to verify that bindings have not changed // since they were assigned. We do not want to execute lifecycle hooks in that mode. const isInCheckNoChangesPass = isInCheckNoChangesMode(); try { resetPreOrderHookFlags(lView); setBindingIndex(tView.bindingStartIndex); if (templateFn !== null) { executeTemplate(tView, lView, templateFn, 2 /* Update */, context); } const hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */; // execute pre-order hooks (OnInit, OnChanges, DoCheck) // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const preOrderCheckHooks = tView.preOrderCheckHooks; if (preOrderCheckHooks !== null) { executeCheckHooks(lView, preOrderCheckHooks, null); } } else { const preOrderHooks = tView.preOrderHooks; if (preOrderHooks !== null) { executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, null); } incrementInitPhaseFlags(lView, 0 /* OnInitHooksToBeRun */); } } // First mark transplanted views that are declared in this lView as needing a refresh at their // insertion points. This is needed to avoid the situation where the template is defined in this // `LView` but its declaration appears after the insertion component. markTransplantedViewsForRefresh(lView); refreshEmbeddedViews(lView); // Content query results must be refreshed before content hooks are called. if (tView.contentQueries !== null) { refreshContentQueries(tView, lView); } // execute content hooks (AfterContentInit, AfterContentChecked) // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const contentCheckHooks = tView.contentCheckHooks; if (contentCheckHooks !== null) { executeCheckHooks(lView, contentCheckHooks); } } else { const contentHooks = tView.contentHooks; if (contentHooks !== null) { executeInitAndCheckHooks(lView, contentHooks, 1 /* AfterContentInitHooksToBeRun */); } incrementInitPhaseFlags(lView, 1 /* AfterContentInitHooksToBeRun */); } } processHostBindingOpCodes(tView, lView); // Refresh child component views. const components = tView.components; if (components !== null) { refreshChildComponents(lView, components); } // View queries must execute after refreshing child components because a template in this view // could be inserted in a child component. If the view query executes before child component // refresh, the template might not yet be inserted. const viewQuery = tView.viewQuery; if (viewQuery !== null) { executeViewQueryFn(2 /* Update */, viewQuery, context); } // execute view hooks (AfterViewInit, AfterViewChecked) // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const viewCheckHooks = tView.viewCheckHooks; if (viewCheckHooks !== null) { executeCheckHooks(lView, viewCheckHooks); } } else { const viewHooks = tView.viewHooks; if (viewHooks !== null) { executeInitAndCheckHooks(lView, viewHooks, 2 /* AfterViewInitHooksToBeRun */); } incrementInitPhaseFlags(lView, 2 /* AfterViewInitHooksToBeRun */); } } if (tView.firstUpdatePass === true) { // We need to make sure that we only flip the flag on successful `refreshView` only // Don't do this in `finally` block. // If we did this in `finally` block then an exception could block the execution of styling // instructions which in turn would be unable to insert themselves into the styling linked // list. The result of this would be that if the exception would not be throw on subsequent CD // the styling would be unable to process it data and reflect to the DOM. tView.firstUpdatePass = false; } // Do not reset the dirty state when running in check no changes mode. We don't want components // to behave differently depending on whether check no changes is enabled or not. For example: // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to // refresh a `NgClass` binding should work. If we would reset the dirty state in the check // no changes cycle, the component would be not be dirty for the next update pass. This would // be different in production mode where the component dirty state is not reset. if (!isInCheckNoChangesPass) { lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */); } if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) { lView[FLAGS] &= ~1024 /* RefreshTransplantedView */; updateTransplantedViewCount(lView[PARENT], -1); } } finally { leaveView(); } } function renderComponentOrTemplate(tView, lView, templateFn, context) { const rendererFactory = lView[RENDERER_FACTORY]; const normalExecutionPath = !isInCheckNoChangesMode(); const creationModeIsActive = isCreationMode(lView); try { if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) { rendererFactory.begin(); } if (creationModeIsActive) { renderView(tView, lView, context); } refreshView(tView, lView, templateFn, context); } finally { if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) { rendererFactory.end(); } } } function executeTemplate(tView, lView, templateFn, rf, context) { const prevSelectedIndex = getSelectedIndex(); const isUpdatePhase = rf & 2 /* Update */; try { setSelectedIndex(-1); if (isUpdatePhase && lView.length > HEADER_OFFSET) { // When we're updating, inherently select 0 so we don't // have to generate that instruction for most update blocks. selectIndexInternal(tView, lView, HEADER_OFFSET, isInCheckNoChangesMode()); } const preHookType = isUpdatePhase ? 2 /* TemplateUpdateStart */ : 0 /* TemplateCreateStart */; profiler(preHookType, context); templateFn(rf, context); } finally { setSelectedIndex(prevSelectedIndex); const postHookType = isUpdatePhase ? 3 /* TemplateUpdateEnd */ : 1 /* TemplateCreateEnd */; profiler(postHookType, context); } } ////////////////////////// //// Element ////////////////////////// function executeContentQueries(tView, tNode, lView) { if (isContentQueryHost(tNode)) { const start = tNode.directiveStart; const end = tNode.directiveEnd; for (let directiveIndex = start; directiveIndex < end; directiveIndex++) { const def = tView.data[directiveIndex]; if (def.contentQueries) { def.contentQueries(1 /* Create */, lView[directiveIndex], directiveIndex); } } } } /** * Creates directive instances. */ function createDirectivesInstances(tView, lView, tNode) { if (!getBindingsEnabled()) return; instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView)); if ((tNode.flags & 128 /* hasHostBindings */) === 128 /* hasHostBindings */) { invokeDirectivesHostBindings(tView, lView, tNode); } } /** * Takes a list of local names and indices and pushes the resolved local variable values * to LView in the same order as they are loaded in the template with load(). */ function saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) { const localNames = tNode.localNames; if (localNames !== null) { let localIndex = tNode.index + 1; for (let i = 0; i < localNames.length; i += 2) { const index = localNames[i + 1]; const value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index]; viewData[localIndex++] = value; } } } /** * Gets TView from a template function or creates a new TView * if it doesn't already exist. * * @param def ComponentDef * @returns TView */ function getOrCreateTComponentView(def) { const tView = def.tView; // Create a TView if there isn't one, or recreate it if the first create pass didn't // complete successfully since we can't know for sure whether it's in a usable shape. if (tView === null || tView.incompleteFirstPass) { // Declaration node here is null since this function is called when we dynamically create a // component and hence there is no declaration. const declTNode = null; return def.tView = createTView(1 /* Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts); } return tView; } /** * Creates a TView instance * * @param type Type of `TView`. * @param declTNode Declaration location of this `TView`. * @param templateFn Template function * @param decls The number of nodes, local refs, and pipes in this template * @param directives Registry of directives for this view * @param pipes Registry of pipes for this view * @param viewQuery View queries for this view * @param schemas Schemas for this view * @param consts Constants for this view */ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) { ngDevMode && ngDevMode.tView++; const bindingStartIndex = HEADER_OFFSET + decls; // This length does not yet contain host bindings from child directives because at this point, // we don't know which directives are active on this template. As soon as a directive is matched // that has a host binding, we will update the blueprint with that def's hostVars count. const initialViewLength = bindingStartIndex + vars; const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength); const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory; const tView = blueprint[TVIEW] = ngDevMode ? new TViewConstructor(type, // type: TViewType, blueprint, // blueprint: LView, templateFn, // template: ComponentTemplate<{}>|null, null, // queries: TQueries|null viewQuery, // viewQuery: ViewQueriesFunction<{}>|null, declTNode, // declTNode: TNode|null, cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData, bindingStartIndex, // bindingStartIndex: number, initialViewLength, // expandoStartIndex: number, null, // hostBindingOpCodes: HostBindingOpCodes, true, // firstCreatePass: boolean, true, // firstUpdatePass: boolean, false, // staticViewQueries: boolean, false, // staticContentQueries: boolean, null, // preOrderHooks: HookData|null, null, // preOrderCheckHooks: HookData|null, null, // contentHooks: HookData|null, null, // contentCheckHooks: HookData|null, null, // viewHooks: HookData|null, null, // viewCheckHooks: HookData|null, null, // destroyHooks: DestroyHookData|null, null, // cleanup: any[]|null, null, // contentQueries: number[]|null, null, // components: number[]|null, typeof directives === 'function' ? // directives() : // directives, // directiveRegistry: DirectiveDefList|null, typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null, null, // firstChild: TNode|null, schemas, // schemas: SchemaMetadata[]|null, consts, // consts: TConstants|null false, // incompleteFirstPass: boolean decls, // ngDevMode only: decls vars) : { type: type, blueprint: blueprint, template: templateFn, queries: null, viewQuery: viewQuery, declTNode: declTNode, data: blueprint.slice().fill(null, bindingStartIndex), bindingStartIndex: bindingStartIndex, expandoStartIndex: initialViewLength, hostBindingOpCodes: null, firstCreatePass: true, firstUpdatePass: true, staticViewQueries: false, staticContentQueries: false, preOrderHooks: null, preOrderCheckHooks: null, contentHooks: null, contentCheckHooks: null, viewHooks: null, viewCheckHooks: null, destroyHooks: null, cleanup: null, contentQueries: null, components: null, directiveRegistry: typeof directives === 'function' ? directives() : directives, pipeRegistry: typeof pipes === 'function' ? pipes() : pipes, firstChild: null, schemas: schemas, consts: consts, incompleteFirstPass: false }; if (ngDevMode) { // For performance reasons it is important that the tView retains the same shape during runtime. // (To make sure that all of the code is monomorphic.) For this reason we seal the object to // prevent class transitions. Object.seal(tView); } return tView; } function createViewBlueprint(bindingStartIndex, initialViewLength) { const blueprint = ngDevMode ? new LViewBlueprint() : []; for (let i = 0; i < initialViewLength; i++) { blueprint.push(i < bindingStartIndex ? null : NO_CHANGE); } return blueprint; } function createError(text, token) { return new Error(`Renderer: ${text} [${stringifyForError(token)}]`); } function assertHostNodeExists(rElement, elementOrSelector) { if (!rElement) { if (typeof elementOrSelector === 'string') { throw createError('Host node with selector not found:', elementOrSelector); } else { throw createError('Host node is required:', elementOrSelector); } } } /** * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline. * * @param rendererFactory Factory function to create renderer instance. * @param elementOrSelector Render element or CSS selector to locate the element. * @param encapsulation View Encapsulation defined for component that requests host element. */ function locateHostElement(renderer, elementOrSelector, encapsulation) { if (isProceduralRenderer(renderer)) { // When using native Shadow DOM, do not clear host element to allow native slot projection const preserveContent = encapsulation === ViewEncapsulation.ShadowDom; return renderer.selectRootElement(elementOrSelector, preserveContent); } let rElement = typeof elementOrSelector === 'string' ? renderer.querySelector(elementOrSelector) : elementOrSelector; ngDevMode && assertHostNodeExists(rElement, elementOrSelector); // Always clear host element's content when Renderer3 is in use. For procedural renderer case we // make it depend on whether ShadowDom encapsulation is used (in which case the content should be // preserved to allow native slot projection). ShadowDom encapsulation requires procedural // renderer, and procedural renderer case is handled above. rElement.textContent = ''; return rElement; } /** * Saves context for this cleanup function in LView.cleanupInstances. * * On the first template pass, saves in TView: * - Cleanup function * - Index of context we just saved in LView.cleanupInstances * * This function can also be used to store instance specific cleanup fns. In that case the `context` * is `null` and the function is store in `LView` (rather than it `TView`). */ function storeCleanupWithContext(tView, lView, context, cleanupFn) { const lCleanup = getOrCreateLViewCleanup(lView); if (context === null) { // If context is null that this is instance specific callback. These callbacks can only be // inserted after template shared instances. For this reason in ngDevMode we freeze the TView. if (ngDevMode) { Object.freeze(getOrCreateTViewCleanup(tView)); } lCleanup.push(cleanupFn); } else { lCleanup.push(context); if (tView.firstCreatePass) { getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1); } } } function createTNode(tView, tParent, type, index, value, attrs) { ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in // `view_engine_compatibility` for additional context. assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\'t be in the LView header.'); ngDevMode && assertNotSame(attrs, undefined, '\'undefined\' is not valid value for \'attrs\''); ngDevMode && ngDevMode.tNode++; ngDevMode && tParent && assertTNodeForTView(tParent, tView); let injectorIndex = tParent ? tParent.injectorIndex : -1; const tNode = ngDevMode ? new TNodeDebug(tView, // tView_: TView type, // type: TNodeType index, // index: number null, // insertBeforeIndex: null|-1|number|number[] injectorIndex, // injectorIndex: number -1, // directiveStart: number -1, // directiveEnd: number -1, // directiveStylingLast: number null, // propertyBindings: number[]|null 0, // flags: TNodeFlags 0, // providerIndexes: TNodeProviderIndexes value, // value: string|null attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null null, // mergedAttrs null, // localNames: (string|number)[]|null undefined, // initialInputs: (string[]|null)[]|null|undefined null, // inputs: PropertyAliases|null null, // outputs: PropertyAliases|null null, // tViews: ITView|ITView[]|null null, // next: ITNode|null null, // projectionNext: ITNode|null null, // child: ITNode|null tParent, // parent: TElementNode|TContainerNode|null null, // projection: number|(ITNode|RNode[])[]|null null, // styles: string|null null, // stylesWithoutHost: string|null undefined, // residualStyles: string|null null, // classes: string|null null, // classesWithoutHost: string|null undefined, // residualClasses: string|null 0, // classBindings: TStylingRange; 0) : { type, index, insertBeforeIndex: null, injectorIndex, directiveStart: -1, directiveEnd: -1, directiveStylingLast: -1, propertyBindings: null, flags: 0, providerIndexes: 0, value: value, attrs: attrs, mergedAttrs: null, localNames: null, initialInputs: undefined, inputs: null, outputs: null, tViews: null, next: null, projectionNext: null, child: null, parent: tParent, projection: null, styles: null, stylesWithoutHost: null, residualStyles: undefined, classes: null, classesWithoutHost: null, residualClasses: undefined, classBindings: 0, styleBindings: 0, }; if (ngDevMode) { // For performance reasons it is important that the tNode retains the same shape during runtime. // (To make sure that all of the code is monomorphic.) For this reason we seal the object to // prevent class transitions. Object.seal(tNode); } return tNode; } function generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) { for (let publicName in inputAliasMap) { if (inputAliasMap.hasOwnProperty(publicName)) { propStore = propStore === null ? {} : propStore; const internalName = inputAliasMap[publicName]; if (propStore.hasOwnProperty(publicName)) { propStore[publicName].push(directiveDefIdx, internalName); } else { (propStore[publicName] = [directiveDefIdx, internalName]); } } } return propStore; } /** * Initializes data structures required to work with directive inputs and outputs. * Initialization is done for all directives matched on a given TNode. */ function initializeInputAndOutputAliases(tView, tNode) { ngDevMode && assertFirstCreatePass(tView); const start = tNode.directiveStart; const end = tNode.directiveEnd; const tViewData = tView.data; const tNodeAttrs = tNode.attrs; const inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : []; let inputsStore = null; let outputsStore = null; for (let i = start; i < end; i++) { const directiveDef = tViewData[i]; const directiveInputs = directiveDef.inputs; // Do not use unbound attributes as inputs to structural directives, since structural // directive inputs can only be set using microsyntax (e.g. `<div *dir="exp">`). // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which // should be set for inline templates. const initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ? generateInitialInputs(directiveInputs, tNodeAttrs) : null; inputsFromAttrs.push(initialInputs); inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore); outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore); } if (inputsStore !== null) { if (inputsStore.hasOwnProperty('class')) { tNode.flags |= 16 /* hasClassInput */; } if (inputsStore.hasOwnProperty('style')) { tNode.flags |= 32 /* hasStyleInput */; } } tNode.initialInputs = inputsFromAttrs; tNode.inputs = inputsStore; tNode.outputs = outputsStore; } /** * Mapping between attributes names that don't correspond to their element property names. * * Performance note: this function is written as a series of if checks (instead of, say, a property * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of * mapping property names. Do NOT change without benchmarking. * * Note: this mapping has to be kept in sync with the equally named mapping in the template * type-checking machinery of ngtsc. */ function mapPropName(name) { if (name === 'class') return 'className'; if (name === 'for') return 'htmlFor'; if (name === 'formaction') return 'formAction'; if (name === 'innerHtml') return 'innerHTML'; if (name === 'readonly') return 'readOnly'; if (name === 'tabindex') return 'tabIndex'; return name; } function elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) { ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.'); const element = getNativeByTNode(tNode, lView); let inputData = tNode.inputs; let dataValue; if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) { setInputsForProperty(tView, lView, dataValue, propName, value); if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index); if (ngDevMode) { setNgReflectProperties(lView, element, tNode.type, dataValue, value); } } else if (tNode.type & 3 /* AnyRNode */) { propName = mapPropName(propName); if (ngDevMode) { validateAgainstEventProperties(propName); if (!validateProperty(tView, element, propName, tNode)) { // Return here since we only log warnings for unknown properties. logUnknownPropertyError(propName, tNode); return; } ngDevMode.rendererSetProperty++; } // It is assumed that the sanitizer is only added when the compiler determines that the // property is risky, so sanitization can be done without further checks. value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value; if (isProceduralRenderer(renderer)) { renderer.setProperty(element, propName, value); } else if (!isAnimationProp(propName)) { element.setProperty ? element.setProperty(propName, value) : element[propName] = value; } } else if (tNode.type & 12 /* AnyContainer */) { // If the node is a container and the property didn't // match any of the inputs or schemas we should throw. if (ngDevMode && !matchingSchemas(tView, tNode.value)) { logUnknownPropertyError(propName, tNode); } } } /** If node is an OnPush component, marks its LView dirty. */ function markDirtyIfOnPush(lView, viewIndex) { ngDevMode && assertLView(lView); const childComponentLView = getComponentLViewByIndex(viewIndex, lView); if (!(childComponentLView[FLAGS] & 16 /* CheckAlways */)) { childComponentLView[FLAGS] |= 64 /* Dirty */; } } function setNgReflectProperty(lView, element, type, attrName, value) { const renderer = lView[RENDERER]; attrName = normalizeDebugBindingName(attrName); const debugValue = normalizeDebugBindingValue(value); if (type & 3 /* AnyRNode */) { if (value == null) { isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) : element.removeAttribute(attrName); } else { isProceduralRenderer(renderer) ? renderer.setAttribute(element, attrName, debugValue) : element.setAttribute(attrName, debugValue); } } else { const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`); if (isProceduralRenderer(renderer)) { renderer.setValue(element, textContent); } else { element.textContent = textContent; } } } function setNgReflectProperties(lView, element, type, dataValue, value) { if (type & (3 /* AnyRNode */ | 4 /* Container */)) { /** * dataValue is an array containing runtime input or output names for the directives: * i+0: directive instance index * i+1: privateName * * e.g. [0, 'change', 'change-minified'] * we want to set the reflected property with the privateName: dataValue[i+1] */ for (let i = 0; i < dataValue.length; i += 2) { setNgReflectProperty(lView, element, type, dataValue[i + 1], value); } } } function validateProperty(tView, element, propName, tNode) { // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT // mode where this check happens at compile time. In JIT mode, `schemas` is always present and // defined as an array (as an empty array in case `schemas` field is not defined) and we should // execute the check below. if (tView.schemas === null) return true; // The property is considered valid if the element matches the schema, it exists on the element // or it is synthetic, and we are in a browser context (web worker nodes should be skipped). if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) { return true; } // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we // need to account for both here, while being careful for `typeof null` also returning 'object'. return typeof Node === 'undefined' || Node === null || !(element instanceof Node); } function matchingSchemas(tView, tagName) { const schemas = tView.schemas; if (schemas !== null) { for (let i = 0; i < schemas.length; i++) { const schema = schemas[i]; if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) { return true; } } } return false; } /** * Logs an error that a property is not supported on an element. * @param propName Name of the invalid property. * @param tNode Node on which we encountered the property. */ function logUnknownPropertyError(propName, tNode) { let message = `Can't bind to '${propName}' since it isn't a known property of '${tNode.value}'.`; console.error(formatRuntimeError("303" /* UNKNOWN_BINDING */, message)); } /** * Instantiate a root component. */ function instantiateRootComponent(tView, lView, def) { const rootTNode = getCurrentTNode(); if (tView.firstCreatePass) { if (def.providersResolver) def.providersResolver(def); const directiveIndex = allocExpando(tView, lView, 1, null); ngDevMode && assertEqual(directiveIndex, rootTNode.directiveStart, 'Because this is a root component the allocated expando should match the TNode component.'); configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def); } const directive = getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode); attachPatchData(directive, lView); const native = getNativeByTNode(rootTNode, lView); if (native) { attachPatchData(native, lView); } return directive; } /** * Resolve the matched directives on a node. */ function resolveDirectives(tView, lView, tNode, localRefs) { // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in // tsickle. ngDevMode && assertFirstCreatePass(tView); let hasDirectives = false; if (getBindingsEnabled()) { const directiveDefs = findDirectiveDefMatches(tView, lView, tNode); const exportsMap = localRefs === null ? null : { '': -1 }; if (directiveDefs !== null) { hasDirectives = true; initTNodeFlags(tNode, tView.data.length, directiveDefs.length); // When the same token is provided by several directives on the same node, some rules apply in // the viewEngine: // - viewProviders have priority over providers // - the last directive in NgModule.declarations has priority over the previous one // So to match these rules, the order in which providers are added in the arrays is very // important. for (let i = 0; i < directiveDefs.length; i++) { const def = directiveDefs[i]; if (def.providersResolver) def.providersResolver(def); } let preOrderHooksFound = false; let preOrderCheckHooksFound = false; let directiveIdx = allocExpando(tView, lView, directiveDefs.length, null); ngDevMode && assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space'); for (let i = 0; i < directiveDefs.length; i++) { const def = directiveDefs[i]; // Merge the attrs in the order of matches. This assumes that the first directive is the // component itself, so that the component has the least priority. tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs); configureViewWithDirective(tView, tNode, lView, directiveIdx, def); saveNameToExportMap(directiveIdx, def, exportsMap); if (def.contentQueries !== null) tNode.flags |= 8 /* hasContentQuery */; if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0) tNode.flags |= 128 /* hasHostBindings */; const lifeCycleHooks = def.type.prototype; // Only push a node index into the preOrderHooks array if this is the first // pre-order hook found on this node. if (!preOrderHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) { // We will push the actual hook function into this array later during dir instantiation. // We cannot do it now because we must ensure hooks are registered in the same // order that directives are created (i.e. injection order). (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index); preOrderHooksFound = true; } if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) { (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index); preOrderCheckHooksFound = true; } directiveIdx++; } initializeInputAndOutputAliases(tView, tNode); } if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap); } // Merge the template attrs last so that they have the highest priority. tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs); return hasDirectives; } /** * Add `hostBindings` to the `TView.hostBindingOpCodes`. * * @param tView `TView` to which the `hostBindings` should be added. * @param tNode `TNode` the element which contains the directive * @param lView `LView` current `LView` * @param directiveIdx Directive index in view. * @param directiveVarsIdx Where will the directive's vars be stored * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add. */ function registerHostBindingOpCodes(tView, tNode, lView, directiveIdx, directiveVarsIdx, def) { ngDevMode && assertFirstCreatePass(tView); const hostBindings = def.hostBindings; if (hostBindings) { let hostBindingOpCodes = tView.hostBindingOpCodes; if (hostBindingOpCodes === null) { hostBindingOpCodes = tView.hostBindingOpCodes = []; } const elementIndx = ~tNode.index; if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) { // Conditionally add select element so that we are more efficient in execution. // NOTE: this is strictly not necessary and it trades code size for runtime perf. // (We could just always add it.) hostBindingOpCodes.push(elementIndx); } hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings); } } /** * Returns the last selected element index in the `HostBindingOpCodes` * * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only * if it changes. This method returns the last index (or '0' if not found.) * * Selected element index are only the ones which are negative. */ function lastSelectedElementIdx(hostBindingOpCodes) { let i = hostBindingOpCodes.length; while (i > 0) { const value = hostBindingOpCodes[--i]; if (typeof value === 'number' && value < 0) { return value; } } return 0; } /** * Instantiate all the directives that were previously resolved on the current node. */ function instantiateAllDirectives(tView, lView, tNode, native) { const start = tNode.directiveStart; const end = tNode.directiveEnd; if (!tView.firstCreatePass) { getOrCreateNodeInjectorForNode(tNode, lView); } attachPatchData(native, lView); const initialInputs = tNode.initialInputs; for (let i = start; i < end; i++) { const def = tView.data[i]; const isComponent = isComponentDef(def); if (isComponent) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */); addComponentLogic(lView, tNode, def); } const directive = getNodeInjectable(lView, tView, i, tNode); attachPatchData(directive, lView); if (initialInputs !== null) { setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs); } if (isComponent) { const componentView = getComponentLViewByIndex(tNode.index, lView); componentView[CONTEXT] = directive; } } } function invokeDirectivesHostBindings(tView, lView, tNode) { const start = tNode.directiveStart; const end = tNode.directiveEnd; const firstCreatePass = tView.firstCreatePass; const elementIndex = tNode.index; const currentDirectiveIndex = getCurrentDirectiveIndex(); try { setSelectedIndex(elementIndex); for (let dirIndex = start; dirIndex < end; dirIndex++) { const def = tView.data[dirIndex]; const directive = lView[dirIndex]; setCurrentDirectiveIndex(dirIndex); if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) { invokeHostBindingsInCreationMode(def, directive); } } } finally { setSelectedIndex(-1); setCurrentDirectiveIndex(currentDirectiveIndex); } } /** * Invoke the host bindings in creation mode. * * @param def `DirectiveDef` which may contain the `hostBindings` function. * @param directive Instance of directive. */ function invokeHostBindingsInCreationMode(def, directive) { if (def.hostBindings !== null) { def.hostBindings(1 /* Create */, directive); } } /** * Matches the current node against all available selectors. * If a component is matched (at most one), it is returned in first position in the array. */ function findDirectiveDefMatches(tView, viewData, tNode) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */); const registry = tView.directiveRegistry; let matches = null; if (registry) { for (let i = 0; i < registry.length; i++) { const def = registry[i]; if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) { matches || (matches = ngDevMode ? new MatchesArray() : []); diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type); if (isComponentDef(def)) { if (ngDevMode) { assertTNodeType(tNode, 2 /* Element */, `"${tNode.value}" tags cannot be used as component hosts. ` + `Please use a different tag to activate the ${stringify(def.type)} component.`); if (tNode.flags & 2 /* isComponentHost */) throwMultipleComponentError(tNode); } markAsComponentHost(tView, tNode); // The component is always stored first with directives after. matches.unshift(def); } else { matches.push(def); } } } } return matches; } /** * Marks a given TNode as a component's host. This consists of: * - setting appropriate TNode flags; * - storing index of component's host element so it will be queued for view refresh during CD. */ function markAsComponentHost(tView, hostTNode) { ngDevMode && assertFirstCreatePass(tView); hostTNode.flags |= 2 /* isComponentHost */; (tView.components || (tView.components = ngDevMode ? new TViewComponents() : [])) .push(hostTNode.index); } /** Caches local names and their matching directive indices for query and template lookups. */ function cacheMatchingLocalNames(tNode, localRefs, exportsMap) { if (localRefs) { const localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : []; // Local names must be stored in tNode in the same order that localRefs are defined // in the template to ensure the data is loaded in the same slots as their refs // in the template (for template queries). for (let i = 0; i < localRefs.length; i += 2) { const index = exportsMap[localRefs[i + 1]]; if (index == null) throw new RuntimeError("301" /* EXPORT_NOT_FOUND */, `Export of name '${localRefs[i + 1]}' not found!`); localNames.push(localRefs[i], index); } } } /** * Builds up an export map as directives are created, so local refs can be quickly mapped * to their directive instances. */ function saveNameToExportMap(directiveIdx, def, exportsMap) { if (exportsMap) { if (def.exportAs) { for (let i = 0; i < def.exportAs.length; i++) { exportsMap[def.exportAs[i]] = directiveIdx; } } if (isComponentDef(def)) exportsMap[''] = directiveIdx; } } /** * Initializes the flags on the current node, setting all indices to the initial index, * the directive count to 0, and adding the isComponent flag. * @param index the initial index */ function initTNodeFlags(tNode, index, numberOfDirectives) { ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives'); tNode.flags |= 1 /* isDirectiveHost */; // When the first directive is created on a node, save the index tNode.directiveStart = index; tNode.directiveEnd = index + numberOfDirectives; tNode.providerIndexes = index; } /** * Setup directive for instantiation. * * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well * as `LView`. `TView` gets the `DirectiveDef`. * * @param tView `TView` * @param tNode `TNode` * @param lView `LView` * @param directiveIndex Index where the directive will be stored in the Expando. * @param def `DirectiveDef` */ function configureViewWithDirective(tView, tNode, lView, directiveIndex, def) { ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section'); tView.data[directiveIndex] = def; const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true)); const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null); tView.blueprint[directiveIndex] = nodeInjectorFactory; lView[directiveIndex] = nodeInjectorFactory; registerHostBindingOpCodes(tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def); } function addComponentLogic(lView, hostTNode, def) { const native = getNativeByTNode(hostTNode, lView); const tView = getOrCreateTComponentView(def); // Only component views should be added to the view tree directly. Embedded views are // accessed through their containers because they may be removed / re-added later. const rendererFactory = lView[RENDERER_FACTORY]; const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null)); // Component view will always be created before any injected LContainers, // so this is a regular element, wrap it with the component view lView[hostTNode.index] = componentView; } function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) { if (ngDevMode) { assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.'); validateAgainstEventAttributes(name); assertTNodeType(tNode, 2 /* Element */, `Attempted to set attribute \`${name}\` on a container node. ` + `Host bindings are not valid on ng-container or ng-template.`); } const element = getNativeByTNode(tNode, lView); setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer); } function setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) { if (value == null) { ngDevMode && ngDevMode.rendererRemoveAttribute++; isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) : element.removeAttribute(name); } else { ngDevMode && ngDevMode.rendererSetAttribute++; const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name); if (isProceduralRenderer(renderer)) { renderer.setAttribute(element, name, strValue, namespace); } else { namespace ? element.setAttributeNS(namespace, name, strValue) : element.setAttribute(name, strValue); } } } /** * Sets initial input properties on directive instances from attribute data * * @param lView Current LView that is being processed. * @param directiveIndex Index of the directive in directives array * @param instance Instance of the directive on which to set the initial inputs * @param def The directive def that contains the list of inputs * @param tNode The static data for this node */ function setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) { const initialInputs = initialInputData[directiveIndex]; if (initialInputs !== null) { const setInput = def.setInput; for (let i = 0; i < initialInputs.length;) { const publicName = initialInputs[i++]; const privateName = initialInputs[i++]; const value = initialInputs[i++]; if (setInput !== null) { def.setInput(instance, value, publicName, privateName); } else { instance[privateName] = value; } if (ngDevMode) { const nativeElement = getNativeByTNode(tNode, lView); setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value); } } } } /** * Generates initialInputData for a node and stores it in the template's static storage * so subsequent template invocations don't have to recalculate it. * * initialInputData is an array containing values that need to be set as input properties * for directives on this node, but only once on creation. We need this array to support * the case where you set an @Input property of a directive using attribute-like syntax. * e.g. if you have a `name` @Input, you can set it once like this: * * <my-component name="Bess"></my-component> * * @param inputs The list of inputs from the directive def * @param attrs The static attrs on this node */ function generateInitialInputs(inputs, attrs) { let inputsToStore = null; let i = 0; while (i < attrs.length) { const attrName = attrs[i]; if (attrName === 0 /* NamespaceURI */) { // We do not allow inputs on namespaced attributes. i += 4; continue; } else if (attrName === 5 /* ProjectAs */) { // Skip over the `ngProjectAs` value. i += 2; continue; } // If we hit any other attribute markers, we're done anyway. None of those are valid inputs. if (typeof attrName === 'number') break; if (inputs.hasOwnProperty(attrName)) { if (inputsToStore === null) inputsToStore = []; inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]); } i += 2; } return inputsToStore; } ////////////////////////// //// ViewContainer & View ////////////////////////// // Not sure why I need to do `any` here but TS complains later. const LContainerArray = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) && createNamedArrayType('LContainer'); /** * Creates a LContainer, either from a container instruction, or for a ViewContainerRef. * * @param hostNative The host element for the LContainer * @param hostTNode The host TNode for the LContainer * @param currentView The parent view of the LContainer * @param native The native comment element * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case * @returns LContainer */ function createLContainer(hostNative, currentView, native, tNode) { ngDevMode && assertLView(currentView); ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native); // https://jsperf.com/array-literal-vs-new-array-really const lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native true, // Boolean `true` in this position signifies that this is an `LContainer` false, // has transplanted views currentView, // parent null, // next 0, // transplanted views to refresh count tNode, // t_host native, // native, null, // view refs null); ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.'); ngDevMode && attachLContainerDebug(lContainer); return lContainer; } /** * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes * them by executing an associated template function. */ function refreshEmbeddedViews(lView) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const embeddedLView = lContainer[i]; const embeddedTView = embeddedLView[TVIEW]; ngDevMode && assertDefined(embeddedTView, 'TView must be allocated'); if (viewAttachedToChangeDetector(embeddedLView)) { refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]); } } } } /** * Mark transplanted views as needing to be refreshed at their insertion points. * * @param lView The `LView` that may have transplanted views. */ function markTransplantedViewsForRefresh(lView) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue; const movedViews = lContainer[MOVED_VIEWS]; ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS'); for (let i = 0; i < movedViews.length; i++) { const movedLView = movedViews[i]; const insertionLContainer = movedLView[PARENT]; ngDevMode && assertLContainer(insertionLContainer); // We don't want to increment the counter if the moved LView was already marked for // refresh. if ((movedLView[FLAGS] & 1024 /* RefreshTransplantedView */) === 0) { updateTransplantedViewCount(insertionLContainer, 1); } // Note, it is possible that the `movedViews` is tracking views that are transplanted *and* // those that aren't (declaration component === insertion component). In the latter case, // it's fine to add the flag, as we will clear it immediately in // `refreshEmbeddedViews` for the view currently being refreshed. movedLView[FLAGS] |= 1024 /* RefreshTransplantedView */; } } } ///////////// /** * Refreshes components by entering the component view and processing its bindings, queries, etc. * * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET) */ function refreshComponent(hostLView, componentHostIdx) { ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode'); const componentView = getComponentLViewByIndex(componentHostIdx, hostLView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed if (viewAttachedToChangeDetector(componentView)) { const tView = componentView[TVIEW]; if (componentView[FLAGS] & (16 /* CheckAlways */ | 64 /* Dirty */)) { refreshView(tView, componentView, tView.template, componentView[CONTEXT]); } else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) { // Only attached components that are CheckAlways or OnPush and dirty should be refreshed refreshContainsDirtyView(componentView); } } } /** * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are * children or descendants of the given lView. * * @param lView The lView which contains descendant transplanted views that need to be refreshed. */ function refreshContainsDirtyView(lView) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const embeddedLView = lContainer[i]; if (embeddedLView[FLAGS] & 1024 /* RefreshTransplantedView */) { const embeddedTView = embeddedLView[TVIEW]; ngDevMode && assertDefined(embeddedTView, 'TView must be allocated'); refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]); } else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) { refreshContainsDirtyView(embeddedLView); } } } const tView = lView[TVIEW]; // Refresh child component views. const components = tView.components; if (components !== null) { for (let i = 0; i < components.length; i++) { const componentView = getComponentLViewByIndex(components[i], lView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed if (viewAttachedToChangeDetector(componentView) && componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) { refreshContainsDirtyView(componentView); } } } } function renderComponent(hostLView, componentHostIdx) { ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode'); const componentView = getComponentLViewByIndex(componentHostIdx, hostLView); const componentTView = componentView[TVIEW]; syncViewWithBlueprint(componentTView, componentView); renderView(componentTView, componentView, componentView[CONTEXT]); } /** * Syncs an LView instance with its blueprint if they have gotten out of sync. * * Typically, blueprints and their view instances should always be in sync, so the loop here * will be skipped. However, consider this case of two components side-by-side: * * App template: * ``` * <comp></comp> * <comp></comp> * ``` * * The following will happen: * 1. App template begins processing. * 2. First <comp> is matched as a component and its LView is created. * 3. Second <comp> is matched as a component and its LView is created. * 4. App template completes processing, so it's time to check child templates. * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint. * 6. Second <comp> template is checked. Its blueprint has been updated by the first * <comp> template, but its LView was created before this update, so it is out of sync. * * Note that embedded views inside ngFor loops will never be out of sync because these views * are processed as soon as they are created. * * @param tView The `TView` that contains the blueprint for syncing * @param lView The view to sync */ function syncViewWithBlueprint(tView, lView) { for (let i = lView.length; i < tView.blueprint.length; i++) { lView.push(tView.blueprint[i]); } } /** * Adds LView or LContainer to the end of the current view tree. * * This structure will be used to traverse through nested views to remove listeners * and call onDestroy callbacks. * * @param lView The view where LView or LContainer should be added * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header * @param lViewOrLContainer The LView or LContainer to add to the view tree * @returns The state passed in */ function addToViewTree(lView, lViewOrLContainer) { // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out // of order, the change detection will run out of order, as the act of retrieving the the // LContainer from the RNode is what adds it to the queue. if (lView[CHILD_HEAD]) { lView[CHILD_TAIL][NEXT] = lViewOrLContainer; } else { lView[CHILD_HEAD] = lViewOrLContainer; } lView[CHILD_TAIL] = lViewOrLContainer; return lViewOrLContainer; } /////////////////////////////// //// Change detection /////////////////////////////// /** * Marks current view and all ancestors dirty. * * Returns the root view because it is found as a byproduct of marking the view tree * dirty, and can be used by methods that consume markViewDirty() to easily schedule * change detection. Otherwise, such methods would need to traverse up the view tree * an additional time to get the root view and schedule a tick on it. * * @param lView The starting LView to mark dirty * @returns the root LView */ function markViewDirty(lView) { while (lView) { lView[FLAGS] |= 64 /* Dirty */; const parent = getLViewParent(lView); // Stop traversing up as soon as you find a root view that wasn't attached to any container if (isRootView(lView) && !parent) { return lView; } // continue otherwise lView = parent; } return null; } /** * Used to schedule change detection on the whole application. * * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run. * It is usually called indirectly by calling `markDirty` when the view needs to be * re-rendered. * * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple * `scheduleTick` requests. The scheduling function can be overridden in * `renderComponent`'s `scheduler` option. */ function scheduleTick(rootContext, flags) { const nothingScheduled = rootContext.flags === 0 /* Empty */; if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) { // https://github.com/angular/angular/issues/39296 // should only attach the flags when really scheduling a tick rootContext.flags |= flags; let res; rootContext.clean = new Promise((r) => res = r); rootContext.scheduler(() => { if (rootContext.flags & 1 /* DetectChanges */) { rootContext.flags &= ~1 /* DetectChanges */; tickRootContext(rootContext); } if (rootContext.flags & 2 /* FlushPlayers */) { rootContext.flags &= ~2 /* FlushPlayers */; const playerHandler = rootContext.playerHandler; if (playerHandler) { playerHandler.flushPlayers(); } } rootContext.clean = _CLEAN_PROMISE; res(null); }); } } function tickRootContext(rootContext) { for (let i = 0; i < rootContext.components.length; i++) { const rootComponent = rootContext.components[i]; const lView = readPatchedLView(rootComponent); const tView = lView[TVIEW]; renderComponentOrTemplate(tView, lView, tView.template, rootComponent); } } function detectChangesInternal(tView, lView, context) { const rendererFactory = lView[RENDERER_FACTORY]; if (rendererFactory.begin) rendererFactory.begin(); try { refreshView(tView, lView, tView.template, context); } catch (error) { handleError(lView, error); throw error; } finally { if (rendererFactory.end) rendererFactory.end(); } } /** * Synchronously perform change detection on a root view and its components. * * @param lView The view which the change detection should be performed on. */ function detectChangesInRootView(lView) { tickRootContext(lView[CONTEXT]); } function checkNoChangesInternal(tView, view, context) { setIsInCheckNoChangesMode(true); try { detectChangesInternal(tView, view, context); } finally { setIsInCheckNoChangesMode(false); } } /** * Checks the change detector on a root view and its components, and throws if any changes are * detected. * * This is used in development mode to verify that running change detection doesn't * introduce other changes. * * @param lView The view which the change detection should be checked on. */ function checkNoChangesInRootView(lView) { setIsInCheckNoChangesMode(true); try { detectChangesInRootView(lView); } finally { setIsInCheckNoChangesMode(false); } } function executeViewQueryFn(flags, viewQueryFn, component) { ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.'); setCurrentQueryIndex(0); viewQueryFn(flags, component); } /////////////////////////////// //// Bindings & interpolations /////////////////////////////// /** * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`. * * In order to support TestBed's `DebugElement.properties` we need to save, for each binding: * - a bound property name; * - a static parts of interpolated strings; * * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a * property binding metadata will be stored in `TView.data` at the same index as a bound value in * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the * following format: * - `propertyName` for bound properties; * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for * interpolated properties. * * @param tData `TData` where meta-data will be saved; * @param tNode `TNode` that is a target of the binding; * @param propertyName bound property name; * @param bindingIndex binding index in `LView` * @param interpolationParts static interpolation parts (for property interpolations) */ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) { // Binding meta-data are stored only the first time a given property instruction is processed. // Since we don't have a concept of the "first update pass" we need to check for presence of the // binding meta-data to decide if one should be stored (or if was stored already). if (tData[bindingIndex] === null) { if (tNode.inputs == null || !tNode.inputs[propertyName]) { const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []); propBindingIdxs.push(bindingIndex); let bindingMetadata = propertyName; if (interpolationParts.length > 0) { bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER); } tData[bindingIndex] = bindingMetadata; } } } const CLEAN_PROMISE = _CLEAN_PROMISE; function getOrCreateLViewCleanup(view) { // top level variables should not be exported for performance reasons (PERF_NOTES.md) return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []); } function getOrCreateTViewCleanup(tView) { return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []); } /** * There are cases where the sub component's renderer needs to be included * instead of the current renderer (see the componentSyntheticHost* instructions). */ function loadComponentRenderer(currentDef, tNode, lView) { // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root // component (see packages/core/src/render3/component.ts). This is not consistent with the process // of creating inner components, when current directive index is available in the state. In order // to avoid relying on current def being `null` (thus special-casing root component creation), the // process of creating root component should be unified with the process of creating inner // components. if (currentDef === null || isComponentDef(currentDef)) { lView = unwrapLView(lView[tNode.index]); } return lView[RENDERER]; } /** Handles an error thrown in an LView. */ function handleError(lView, error) { const injector = lView[INJECTOR]; const errorHandler = injector ? injector.get(ErrorHandler, null) : null; errorHandler && errorHandler.handleError(error); } /** * Set the inputs of directives at the current node to corresponding value. * * @param tView The current TView * @param lView the `LView` which contains the directives. * @param inputs mapping between the public "input" name and privately-known, * possibly minified, property names to write to. * @param value Value to set. */ function setInputsForProperty(tView, lView, inputs, publicName, value) { for (let i = 0; i < inputs.length;) { const index = inputs[i++]; const privateName = inputs[i++]; const instance = lView[index]; ngDevMode && assertIndexInRange(lView, index); const def = tView.data[index]; if (def.setInput !== null) { def.setInput(instance, value, publicName, privateName); } else { instance[privateName] = value; } } } /** * Updates a text binding at a given index in a given LView. */ function textBindingInternal(lView, index, value) { ngDevMode && assertString(value, 'Value should be a string'); ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE'); ngDevMode && assertIndexInRange(lView, index); const element = getNativeByIndex(index, lView); ngDevMode && assertDefined(element, 'native element should exist'); updateTextNode(lView[RENDERER], element, value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Compute the static styling (class/style) from `TAttributes`. * * This function should be called during `firstCreatePass` only. * * @param tNode The `TNode` into which the styling information should be loaded. * @param attrs `TAttributes` containing the styling information. * @param writeToHost Where should the resulting static styles be written? * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost` * - `true` Write to `TNode.styles` / `TNode.classes` */ function computeStaticStyling(tNode, attrs, writeToHost) { ngDevMode && assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only'); let styles = writeToHost ? tNode.styles : null; let classes = writeToHost ? tNode.classes : null; let mode = 0; if (attrs !== null) { for (let i = 0; i < attrs.length; i++) { const value = attrs[i]; if (typeof value === 'number') { mode = value; } else if (mode == 1 /* Classes */) { classes = concatStringsWithSpace(classes, value); } else if (mode == 2 /* Styles */) { const style = value; const styleValue = attrs[++i]; styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';'); } } } writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles; writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Synchronously perform change detection on a component (and possibly its sub-components). * * This function triggers change detection in a synchronous way on a component. * * @param component The component which the change detection should be performed on. */ function detectChanges(component) { const view = getComponentViewByInstance(component); detectChangesInternal(view[TVIEW], view, component); } /** * Marks the component as dirty (needing change detection). Marking a component dirty will * schedule a change detection on it at some point in the future. * * Marking an already dirty component as dirty won't do anything. Only one outstanding change * detection can be scheduled per component tree. * * @param component Component to mark as dirty. */ function markDirty(component) { ngDevMode && assertDefined(component, 'component'); const rootView = markViewDirty(getComponentViewByInstance(component)); ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined'); scheduleTick(rootView[CONTEXT], 1 /* DetectChanges */); } /** * Used to perform change detection on the whole application. * * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick` * executes lifecycle hooks and conditionally checks components based on their * `ChangeDetectionStrategy` and dirtiness. * * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can * be changed when calling `renderComponent` and providing the `scheduler` option. */ function tick(component) { const rootView = getRootView(component); const rootContext = rootView[CONTEXT]; tickRootContext(rootContext); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors. * * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a * project. * * @publicApi */ const INJECTOR$1 = new InjectionToken('INJECTOR', // Dissable tslint because this is const enum which gets inlined not top level prop access. // tslint:disable-next-line: no-toplevel-property-access -1 /* Injector */); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NullInjector { get(token, notFoundValue = THROW_IF_NOT_FOUND) { if (notFoundValue === THROW_IF_NOT_FOUND) { const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`); error.name = 'NullInjectorError'; throw error; } return notFoundValue; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An internal token whose presence in an injector indicates that the injector should treat itself * as a root scoped injector when processing requests for unknown tokens which may indicate * they are provided in the root scope. */ const INJECTOR_SCOPE = new InjectionToken('Set Injector scope.'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marker which indicates that a value has not yet been created from the factory function. */ const NOT_YET = {}; /** * Marker which indicates that the factory function for a token is in the process of being called. * * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates * injection of a dependency has recursively attempted to inject the original token, and there is * a circular dependency among the providers. */ const CIRCULAR = {}; const EMPTY_ARRAY$2 = []; /** * A lazily initialized NullInjector. */ let NULL_INJECTOR = undefined; function getNullInjector() { if (NULL_INJECTOR === undefined) { NULL_INJECTOR = new NullInjector(); } return NULL_INJECTOR; } /** * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s. * * @publicApi */ function createInjector(defType, parent = null, additionalProviders = null, name) { const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name); injector._resolveInjectorDefTypes(); return injector; } /** * Creates a new injector without eagerly resolving its injector types. Can be used in places * where resolving the injector types immediately can lead to an infinite loop. The injector types * should be resolved at a later point by calling `_resolveInjectorDefTypes`. */ function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name) { return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name); } class R3Injector { constructor(def, additionalProviders, parent, source = null) { this.parent = parent; /** * Map of tokens to records which contain the instances of those tokens. * - `null` value implies that we don't have the record. Used by tree-shakable injectors * to prevent further searches. */ this.records = new Map(); /** * The transitive set of `InjectorType`s which define this injector. */ this.injectorDefTypes = new Set(); /** * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks. */ this.onDestroy = new Set(); this._destroyed = false; const dedupStack = []; // Start off by creating Records for every provider declared in every InjectorType // included transitively in additional providers then do the same for `def`. This order is // important because `def` may include providers that override ones in additionalProviders. additionalProviders && deepForEach(additionalProviders, provider => this.processProvider(provider, def, additionalProviders)); deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack)); // Make sure the INJECTOR token provides this injector. this.records.set(INJECTOR$1, makeRecord(undefined, this)); // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide // any injectable scoped to APP_ROOT_SCOPE. const record = this.records.get(INJECTOR_SCOPE); this.scope = record != null ? record.value : null; // Source name, used for debugging this.source = source || (typeof def === 'object' ? null : stringify(def)); } /** * Flag indicating that this injector was previously destroyed. */ get destroyed() { return this._destroyed; } /** * Destroy the injector and release references to every instance or provider associated with it. * * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a * hook was found. */ destroy() { this.assertNotDestroyed(); // Set destroyed = true first, in case lifecycle hooks re-enter destroy(). this._destroyed = true; try { // Call all the lifecycle hooks. this.onDestroy.forEach(service => service.ngOnDestroy()); } finally { // Release all references. this.records.clear(); this.onDestroy.clear(); this.injectorDefTypes.clear(); } } get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) { this.assertNotDestroyed(); // Set the injection context. const previousInjector = setCurrentInjector(this); try { // Check for the SkipSelf flag. if (!(flags & InjectFlags.SkipSelf)) { // SkipSelf isn't set, check if the record belongs to this injector. let record = this.records.get(token); if (record === undefined) { // No record, but maybe the token is scoped to this injector. Look for an injectable // def with a scope matching this injector. const def = couldBeInjectableType(token) && getInjectableDef(token); if (def && this.injectableDefInScope(def)) { // Found an injectable def and it's scoped to this injector. Pretend as if it was here // all along. record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET); } else { record = null; } this.records.set(token, record); } // If a record was found, get the instance for it and return it. if (record != null /* NOT null || undefined */) { return this.hydrate(token, record); } } // Select the next injector based on the Self flag - if self is set, the next injector is // the NullInjector, otherwise it's the parent. const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector(); // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue // is undefined, the value is null, otherwise it's the notFoundValue. notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue; return nextInjector.get(token, notFoundValue); } catch (e) { if (e.name === 'NullInjectorError') { const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || []; path.unshift(stringify(token)); if (previousInjector) { // We still have a parent injector, keep throwing throw e; } else { // Format & throw the final error message when we don't have any previous injector return catchInjectorError(e, token, 'R3InjectorError', this.source); } } else { throw e; } } finally { // Lastly, clean up the state by restoring the previous injector. setCurrentInjector(previousInjector); } } /** @internal */ _resolveInjectorDefTypes() { this.injectorDefTypes.forEach(defType => this.get(defType)); } toString() { const tokens = [], records = this.records; records.forEach((v, token) => tokens.push(stringify(token))); return `R3Injector[${tokens.join(', ')}]`; } assertNotDestroyed() { if (this._destroyed) { throw new Error('Injector has already been destroyed.'); } } /** * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers * to this injector. * * If an `InjectorTypeWithProviders` that declares providers besides the type is specified, * the function will return "true" to indicate that the providers of the type definition need * to be processed. This allows us to process providers of injector types after all imports of * an injector definition are processed. (following View Engine semantics: see FW-1349) */ processInjectorType(defOrWrappedDef, parents, dedupStack) { defOrWrappedDef = resolveForwardRef(defOrWrappedDef); if (!defOrWrappedDef) return false; // Either the defOrWrappedDef is an InjectorType (with injector def) or an // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic // read, so care is taken to only do the read once. // First attempt to read the injector def (`ɵinj`). let def = getInjectorDef(defOrWrappedDef); // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders. const ngModule = (def == null) && defOrWrappedDef.ngModule || undefined; // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`, // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type // is the `ngModule`. const defType = (ngModule === undefined) ? defOrWrappedDef : ngModule; // Check for circular dependencies. if (ngDevMode && parents.indexOf(defType) !== -1) { const defName = stringify(defType); const path = parents.map(stringify); throwCyclicDependencyError(defName, path); } // Check for multiple imports of the same module const isDuplicate = dedupStack.indexOf(defType) !== -1; // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual // `InjectorDef` is on its `ngModule`. if (ngModule !== undefined) { def = getInjectorDef(ngModule); } // If no definition was found, it might be from exports. Remove it. if (def == null) { return false; } // Add providers in the same way that @NgModule resolution did: // First, include providers from any imports. if (def.imports != null && !isDuplicate) { // Before processing defType's imports, add it to the set of parents. This way, if it ends // up deeply importing itself, this can be detected. ngDevMode && parents.push(defType); // Add it to the set of dedups. This way we can detect multiple imports of the same module dedupStack.push(defType); let importTypesWithProviders; try { deepForEach(def.imports, imported => { if (this.processInjectorType(imported, parents, dedupStack)) { if (importTypesWithProviders === undefined) importTypesWithProviders = []; // If the processed import is an injector type with providers, we store it in the // list of import types with providers, so that we can process those afterwards. importTypesWithProviders.push(imported); } }); } finally { // Remove it from the parents set when finished. ngDevMode && parents.pop(); } // Imports which are declared with providers (TypeWithProviders) need to be processed // after all imported modules are processed. This is similar to how View Engine // processes/merges module imports in the metadata resolver. See: FW-1349. if (importTypesWithProviders !== undefined) { for (let i = 0; i < importTypesWithProviders.length; i++) { const { ngModule, providers } = importTypesWithProviders[i]; deepForEach(providers, provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY$2)); } } } // Track the InjectorType and add a provider for it. It's important that this is done after the // def's imports. this.injectorDefTypes.add(defType); const factory = getFactoryDef(defType) || (() => new defType()); this.records.set(defType, makeRecord(factory, NOT_YET)); // Next, include providers listed on the definition itself. const defProviders = def.providers; if (defProviders != null && !isDuplicate) { const injectorType = defOrWrappedDef; deepForEach(defProviders, provider => this.processProvider(provider, injectorType, defProviders)); } return (ngModule !== undefined && defOrWrappedDef.providers !== undefined); } /** * Process a `SingleProvider` and add it. */ processProvider(provider, ngModuleType, providers) { // Determine the token from the provider. Either it's its own token, or has a {provide: ...} // property. provider = resolveForwardRef(provider); let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide); // Construct a `Record` for the provider. const record = providerToRecord(provider, ngModuleType, providers); if (!isTypeProvider(provider) && provider.multi === true) { // If the provider indicates that it's a multi-provider, process it specially. // First check whether it's been defined already. let multiRecord = this.records.get(token); if (multiRecord) { // It has. Throw a nice error if if (ngDevMode && multiRecord.multi === undefined) { throwMixedMultiProviderError(); } } else { multiRecord = makeRecord(undefined, NOT_YET, true); multiRecord.factory = () => injectArgs(multiRecord.multi); this.records.set(token, multiRecord); } token = provider; multiRecord.multi.push(provider); } else { const existing = this.records.get(token); if (ngDevMode && existing && existing.multi !== undefined) { throwMixedMultiProviderError(); } } this.records.set(token, record); } hydrate(token, record) { if (ngDevMode && record.value === CIRCULAR) { throwCyclicDependencyError(stringify(token)); } else if (record.value === NOT_YET) { record.value = CIRCULAR; record.value = record.factory(); } if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) { this.onDestroy.add(record.value); } return record.value; } injectableDefInScope(def) { if (!def.providedIn) { return false; } else if (typeof def.providedIn === 'string') { return def.providedIn === 'any' || (def.providedIn === this.scope); } else { return this.injectorDefTypes.has(def.providedIn); } } } function injectableDefOrInjectorDefFactory(token) { // Most tokens will have an injectable def directly on them, which specifies a factory directly. const injectableDef = getInjectableDef(token); const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token); if (factory !== null) { return factory; } // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above. // If it's missing that, it's an error. if (token instanceof InjectionToken) { throw new Error(`Token ${stringify(token)} is missing a ɵprov definition.`); } // Undecorated types can sometimes be created if they have no constructor arguments. if (token instanceof Function) { return getUndecoratedInjectableFactory(token); } // There was no way to resolve a factory for this token. throw new Error('unreachable'); } function getUndecoratedInjectableFactory(token) { // If the token has parameters then it has dependencies that we cannot resolve implicitly. const paramLength = token.length; if (paramLength > 0) { const args = newArray(paramLength, '?'); throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`); } // The constructor function appears to have no parameters. // This might be because it inherits from a super-class. In which case, use an injectable // def from an ancestor if there is one. // Otherwise this really is a simple class with no dependencies, so return a factory that // just instantiates the zero-arg constructor. const inheritedInjectableDef = getInheritedInjectableDef(token); if (inheritedInjectableDef !== null) { return () => inheritedInjectableDef.factory(token); } else { return () => new token(); } } function providerToRecord(provider, ngModuleType, providers) { if (isValueProvider(provider)) { return makeRecord(undefined, provider.useValue); } else { const factory = providerToFactory(provider, ngModuleType, providers); return makeRecord(factory, NOT_YET); } } /** * Converts a `SingleProvider` into a factory function. * * @param provider provider to convert to factory */ function providerToFactory(provider, ngModuleType, providers) { let factory = undefined; if (isTypeProvider(provider)) { const unwrappedProvider = resolveForwardRef(provider); return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider); } else { if (isValueProvider(provider)) { factory = () => resolveForwardRef(provider.useValue); } else if (isFactoryProvider(provider)) { factory = () => provider.useFactory(...injectArgs(provider.deps || [])); } else if (isExistingProvider(provider)) { factory = () => ɵɵinject(resolveForwardRef(provider.useExisting)); } else { const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide)); if (ngDevMode && !classRef) { throwInvalidProviderError(ngModuleType, providers, provider); } if (hasDeps(provider)) { factory = () => new (classRef)(...injectArgs(provider.deps)); } else { return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef); } } } return factory; } function makeRecord(factory, value, multi = false) { return { factory: factory, value: value, multi: multi ? [] : undefined, }; } function isValueProvider(value) { return value !== null && typeof value == 'object' && USE_VALUE in value; } function isExistingProvider(value) { return !!(value && value.useExisting); } function isFactoryProvider(value) { return !!(value && value.useFactory); } function isTypeProvider(value) { return typeof value === 'function'; } function isClassProvider(value) { return !!value.useClass; } function hasDeps(value) { return !!value.deps; } function hasOnDestroy(value) { return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function'; } function couldBeInjectableType(value) { return (typeof value === 'function') || (typeof value === 'object' && value instanceof InjectionToken); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function INJECTOR_IMPL__PRE_R3__(providers, parent, name) { return new StaticInjector(providers, parent, name); } function INJECTOR_IMPL__POST_R3__(providers, parent, name) { return createInjector({ name: name }, parent, providers, name); } const INJECTOR_IMPL = INJECTOR_IMPL__POST_R3__; /** * Concrete injectors implement this interface. Injectors are configured * with [providers](guide/glossary#provider) that associate * dependencies of various types with [injection tokens](guide/glossary#di-token). * * @see ["DI Providers"](guide/dependency-injection-providers). * @see `StaticProvider` * * @usageNotes * * The following example creates a service injector instance. * * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'} * * ### Usage example * * {@example core/di/ts/injector_spec.ts region='Injector'} * * `Injector` returns itself when given `Injector` as a token: * * {@example core/di/ts/injector_spec.ts region='injectInjector'} * * @publicApi */ class Injector { static create(options, parent) { if (Array.isArray(options)) { return INJECTOR_IMPL(options, parent, ''); } else { return INJECTOR_IMPL(options.providers, options.parent, options.name || ''); } } } Injector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND; Injector.NULL = new NullInjector(); /** @nocollapse */ Injector.ɵprov = ɵɵdefineInjectable({ token: Injector, providedIn: 'any', factory: () => ɵɵinject(INJECTOR$1), }); /** * @internal * @nocollapse */ Injector.__NG_ELEMENT_ID__ = -1 /* Injector */; const IDENT = function (value) { return value; }; const ɵ0$6 = IDENT; const EMPTY = []; const CIRCULAR$1 = IDENT; const MULTI_PROVIDER_FN = function () { return Array.prototype.slice.call(arguments); }; const ɵ1$1 = MULTI_PROVIDER_FN; const NO_NEW_LINE$1 = 'ɵ'; class StaticInjector { constructor(providers, parent = Injector.NULL, source = null) { this.parent = parent; this.source = source; const records = this._records = new Map(); records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false }); records.set(INJECTOR$1, { token: INJECTOR$1, fn: IDENT, deps: EMPTY, value: this, useNew: false }); this.scope = recursivelyProcessProviders(records, providers); } get(token, notFoundValue, flags = InjectFlags.Default) { const records = this._records; let record = records.get(token); if (record === undefined) { // This means we have never seen this record, see if it is tree shakable provider. const injectableDef = getInjectableDef(token); if (injectableDef) { const providedIn = injectableDef && injectableDef.providedIn; if (providedIn === 'any' || providedIn != null && providedIn === this.scope) { records.set(token, record = resolveProvider({ provide: token, useFactory: injectableDef.factory, deps: EMPTY })); } } if (record === undefined) { // Set record to null to make sure that we don't go through expensive lookup above again. records.set(token, null); } } let lastInjector = setCurrentInjector(this); try { return tryResolveToken(token, record, records, this.parent, notFoundValue, flags); } catch (e) { return catchInjectorError(e, token, 'StaticInjectorError', this.source); } finally { setCurrentInjector(lastInjector); } } toString() { const tokens = [], records = this._records; records.forEach((v, token) => tokens.push(stringify(token))); return `StaticInjector[${tokens.join(', ')}]`; } } function resolveProvider(provider) { const deps = computeDeps(provider); let fn = IDENT; let value = EMPTY; let useNew = false; let provide = resolveForwardRef(provider.provide); if (USE_VALUE in provider) { // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined. value = provider.useValue; } else if (provider.useFactory) { fn = provider.useFactory; } else if (provider.useExisting) { // Just use IDENT } else if (provider.useClass) { useNew = true; fn = resolveForwardRef(provider.useClass); } else if (typeof provide == 'function') { useNew = true; fn = provide; } else { throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider); } return { deps, fn, useNew, value }; } function multiProviderMixError(token) { return staticError('Cannot mix multi providers and regular providers', token); } function recursivelyProcessProviders(records, provider) { let scope = null; if (provider) { provider = resolveForwardRef(provider); if (Array.isArray(provider)) { // if we have an array recurse into the array for (let i = 0; i < provider.length; i++) { scope = recursivelyProcessProviders(records, provider[i]) || scope; } } else if (typeof provider === 'function') { // Functions were supported in ReflectiveInjector, but are not here. For safety give useful // error messages throw staticError('Function/Class not supported', provider); } else if (provider && typeof provider === 'object' && provider.provide) { // At this point we have what looks like a provider: {provide: ?, ....} let token = resolveForwardRef(provider.provide); const resolvedProvider = resolveProvider(provider); if (provider.multi === true) { // This is a multi provider. let multiProvider = records.get(token); if (multiProvider) { if (multiProvider.fn !== MULTI_PROVIDER_FN) { throw multiProviderMixError(token); } } else { // Create a placeholder factory which will look up the constituents of the multi provider. records.set(token, multiProvider = { token: provider.provide, deps: [], useNew: false, fn: MULTI_PROVIDER_FN, value: EMPTY }); } // Treat the provider as the token. token = provider; multiProvider.deps.push({ token, options: 6 /* Default */ }); } const record = records.get(token); if (record && record.fn == MULTI_PROVIDER_FN) { throw multiProviderMixError(token); } if (token === INJECTOR_SCOPE) { scope = resolvedProvider.value; } records.set(token, resolvedProvider); } else { throw staticError('Unexpected provider', provider); } } return scope; } function tryResolveToken(token, record, records, parent, notFoundValue, flags) { try { return resolveToken(token, record, records, parent, notFoundValue, flags); } catch (e) { // ensure that 'e' is of type Error. if (!(e instanceof Error)) { e = new Error(e); } const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || []; path.unshift(token); if (record && record.value == CIRCULAR$1) { // Reset the Circular flag. record.value = EMPTY; } throw e; } } function resolveToken(token, record, records, parent, notFoundValue, flags) { let value; if (record && !(flags & InjectFlags.SkipSelf)) { // If we don't have a record, this implies that we don't own the provider hence don't know how // to resolve it. value = record.value; if (value == CIRCULAR$1) { throw Error(NO_NEW_LINE$1 + 'Circular dependency'); } else if (value === EMPTY) { record.value = CIRCULAR$1; let obj = undefined; let useNew = record.useNew; let fn = record.fn; let depRecords = record.deps; let deps = EMPTY; if (depRecords.length) { deps = []; for (let i = 0; i < depRecords.length; i++) { const depRecord = depRecords[i]; const options = depRecord.options; const childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined; deps.push(tryResolveToken( // Current Token to resolve depRecord.token, // A record which describes how to resolve the token. // If undefined, this means we don't have such a record childRecord, // Other records we know about. records, // If we don't know how to resolve dependency and we should not check parent for it, // than pass in Null injector. !childRecord && !(options & 4 /* CheckParent */) ? Injector.NULL : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default)); } } record.value = value = useNew ? new fn(...deps) : fn.apply(obj, deps); } } else if (!(flags & InjectFlags.Self)) { value = parent.get(token, notFoundValue, InjectFlags.Default); } else if (!(flags & InjectFlags.Optional)) { value = Injector.NULL.get(token, notFoundValue); } else { value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null); } return value; } function computeDeps(provider) { let deps = EMPTY; const providerDeps = provider.deps; if (providerDeps && providerDeps.length) { deps = []; for (let i = 0; i < providerDeps.length; i++) { let options = 6 /* Default */; let token = resolveForwardRef(providerDeps[i]); if (Array.isArray(token)) { for (let j = 0, annotations = token; j < annotations.length; j++) { const annotation = annotations[j]; if (annotation instanceof Optional || annotation == Optional) { options = options | 1 /* Optional */; } else if (annotation instanceof SkipSelf || annotation == SkipSelf) { options = options & ~2 /* CheckSelf */; } else if (annotation instanceof Self || annotation == Self) { options = options & ~4 /* CheckParent */; } else if (annotation instanceof Inject) { token = annotation.token; } else { token = resolveForwardRef(annotation); } } } deps.push({ token, options }); } } else if (provider.useExisting) { const token = resolveForwardRef(provider.useExisting); deps = [{ token, options: 6 /* Default */ }]; } else if (!providerDeps && !(USE_VALUE in provider)) { // useValue & useExisting are the only ones which are exempt from deps all others need it. throw staticError('\'deps\' required', provider); } return deps; } function staticError(text, obj) { return new Error(formatError(text, obj, 'StaticInjectorError')); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieves the component instance associated with a given DOM element. * * @usageNotes * Given the following DOM structure: * ```html * <my-app> * <div> * <child-comp></child-comp> * </div> * </my-app> * ``` * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent` * associated with this DOM element. * * Calling the function on `<my-app>` will return the `MyApp` instance. * * * @param element DOM element from which the component should be retrieved. * @returns Component instance associated with the element or `null` if there * is no component associated with it. * * @publicApi * @globalApi ng */ function getComponent(element) { assertDomElement(element); const context = loadLContext(element, false); if (context === null) return null; if (context.component === undefined) { context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView); } return context.component; } /** * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded * view that the element is part of. Otherwise retrieves the instance of the component whose view * owns the element (in this case, the result is the same as calling `getOwningComponent`). * * @param element Element for which to get the surrounding component instance. * @returns Instance of the component that is around the element or null if the element isn't * inside any component. * * @publicApi * @globalApi ng */ function getContext(element) { assertDomElement(element); const context = loadLContext(element, false); return context === null ? null : context.lView[CONTEXT]; } /** * Retrieves the component instance whose view contains the DOM element. * * For example, if `<child-comp>` is used in the template of `<app-comp>` * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>` * would return `<app-comp>`. * * @param elementOrDir DOM element, component or directive instance * for which to retrieve the root components. * @returns Component instance whose view owns the DOM element or null if the element is not * part of a component view. * * @publicApi * @globalApi ng */ function getOwningComponent(elementOrDir) { const context = loadLContext(elementOrDir, false); if (context === null) return null; let lView = context.lView; let parent; ngDevMode && assertLView(lView); while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) { lView = parent; } return lView[FLAGS] & 512 /* IsRoot */ ? null : lView[CONTEXT]; } /** * Retrieves all root components associated with a DOM element, directive or component instance. * Root components are those which have been bootstrapped by Angular. * * @param elementOrDir DOM element, component or directive instance * for which to retrieve the root components. * @returns Root components associated with the target object. * * @publicApi * @globalApi ng */ function getRootComponents(elementOrDir) { return [...getRootContext(elementOrDir).components]; } /** * Retrieves an `Injector` associated with an element, component or directive instance. * * @param elementOrDir DOM element, component or directive instance for which to * retrieve the injector. * @returns Injector associated with the element, component or directive instance. * * @publicApi * @globalApi ng */ function getInjector(elementOrDir) { const context = loadLContext(elementOrDir, false); if (context === null) return Injector.NULL; const tNode = context.lView[TVIEW].data[context.nodeIndex]; return new NodeInjector(tNode, context.lView); } /** * Retrieve a set of injection tokens at a given DOM node. * * @param element Element for which the injection tokens should be retrieved. */ function getInjectionTokens(element) { const context = loadLContext(element, false); if (context === null) return []; const lView = context.lView; const tView = lView[TVIEW]; const tNode = tView.data[context.nodeIndex]; const providerTokens = []; const startIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */; const endIndex = tNode.directiveEnd; for (let i = startIndex; i < endIndex; i++) { let value = tView.data[i]; if (isDirectiveDefHack(value)) { // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a // design flaw. We should always store same type so that we can be monomorphic. The issue // is that for Components/Directives we store the def instead the type. The correct behavior // is that we should always be storing injectable type in this location. value = value.type; } providerTokens.push(value); } return providerTokens; } /** * Retrieves directive instances associated with a given DOM element. Does not include * component instances. * * @usageNotes * Given the following DOM structure: * ``` * <my-app> * <button my-button></button> * <my-comp></my-comp> * </my-app> * ``` * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton` * directive that is associated with the DOM element. * * Calling `getDirectives` on `<my-comp>` will return an empty array. * * @param element DOM element for which to get the directives. * @returns Array of directives associated with the element. * * @publicApi * @globalApi ng */ function getDirectives(element) { const context = loadLContext(element); if (context.directives === undefined) { context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false); } // The `directives` in this case are a named array called `LComponentView`. Clone the // result so we don't expose an internal data structure in the user's console. return context.directives === null ? [] : [...context.directives]; } function loadLContext(target, throwOnNotFound = true) { const context = getLContext(target); if (!context && throwOnNotFound) { throw new Error(ngDevMode ? `Unable to find context associated with ${stringifyForError(target)}` : 'Invalid ng target'); } return context; } /** * Retrieve map of local references. * * The references are retrieved as a map of local reference name to element or directive instance. * * @param target DOM element, component or directive instance for which to retrieve * the local references. */ function getLocalRefs(target) { const context = loadLContext(target, false); if (context === null) return {}; if (context.localRefs === undefined) { context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex); } return context.localRefs || {}; } /** * Retrieves the host element of a component or directive instance. * The host element is the DOM element that matched the selector of the directive. * * @param componentOrDirective Component or directive instance for which the host * element should be retrieved. * @returns Host element of the target. * * @publicApi * @globalApi ng */ function getHostElement(componentOrDirective) { return getLContext(componentOrDirective).native; } /** * Retrieves the rendered text for a given component. * * This function retrieves the host element of a component and * and then returns the `textContent` for that element. This implies * that the text returned will include re-projected content of * the component as well. * * @param component The component to return the content text for. */ function getRenderedText(component) { const hostElement = getHostElement(component); return hostElement.textContent || ''; } function loadLContextFromNode(node) { if (!(node instanceof Node)) throw new Error('Expecting instance of DOM Element'); return loadLContext(node); } /** * Retrieves a list of event listeners associated with a DOM element. The list does include host * listeners, but it does not include event listeners defined outside of the Angular context * (e.g. through `addEventListener`). * * @usageNotes * Given the following DOM structure: * ``` * <my-app> * <div (click)="doSomething()"></div> * </my-app> * * ``` * Calling `getListeners` on `<div>` will return an object that looks as follows: * ``` * { * name: 'click', * element: <div>, * callback: () => doSomething(), * useCapture: false * } * ``` * * @param element Element for which the DOM listeners should be retrieved. * @returns Array of event listeners on the DOM element. * * @publicApi * @globalApi ng */ function getListeners(element) { assertDomElement(element); const lContext = loadLContext(element, false); if (lContext === null) return []; const lView = lContext.lView; const tView = lView[TVIEW]; const lCleanup = lView[CLEANUP]; const tCleanup = tView.cleanup; const listeners = []; if (tCleanup && lCleanup) { for (let i = 0; i < tCleanup.length;) { const firstParam = tCleanup[i++]; const secondParam = tCleanup[i++]; if (typeof firstParam === 'string') { const name = firstParam; const listenerElement = unwrapRNode(lView[secondParam]); const callback = lCleanup[tCleanup[i++]]; const useCaptureOrIndx = tCleanup[i++]; // if useCaptureOrIndx is boolean then report it as is. // if useCaptureOrIndx is positive number then it in unsubscribe method // if useCaptureOrIndx is negative number then it is a Subscription const type = (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output'; const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false; if (element == listenerElement) { listeners.push({ element, name, callback, useCapture, type }); } } } } listeners.sort(sortListeners); return listeners; } function sortListeners(a, b) { if (a.name == b.name) return 0; return a.name < b.name ? -1 : 1; } /** * This function should not exist because it is megamorphic and only mostly correct. * * See call site for more info. */ function isDirectiveDefHack(obj) { return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined; } /** * Returns the attached `DebugNode` instance for an element in the DOM. * * @param element DOM element which is owned by an existing component's view. */ function getDebugNode(element) { let debugNode = null; const lContext = loadLContextFromNode(element); const lView = lContext.lView; const nodeIndex = lContext.nodeIndex; if (nodeIndex !== -1) { const valueInLView = lView[nodeIndex]; // this means that value in the lView is a component with its own // data. In this situation the TNode is not accessed at the same spot. const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex); ngDevMode && assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index'); debugNode = buildDebugNode(tNode, lView); } return debugNode; } /** * Retrieve the component `LView` from component/element. * * NOTE: `LView` is a private and should not be leaked outside. * Don't export this method to `ng.*` on window. * * @param target DOM element or component instance for which to retrieve the LView. */ function getComponentLView(target) { const lContext = loadLContext(target); const nodeIndx = lContext.nodeIndex; const lView = lContext.lView; const componentLView = lView[nodeIndx]; ngDevMode && assertLView(componentLView); return componentLView; } /** Asserts that a value is a DOM Element. */ function assertDomElement(value) { if (typeof Element !== 'undefined' && !(value instanceof Element)) { throw new Error('Expecting instance of DOM Element'); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marks a component for check (in case of OnPush components) and synchronously * performs change detection on the application this component belongs to. * * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}. * * @publicApi * @globalApi ng */ function applyChanges(component) { markDirty(component); getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file introduces series of globally accessible debug tools * to allow for the Angular debugging story to function. * * To see this in action run the following command: * * bazel run --config=ivy * //packages/core/test/bundling/todo:devserver * * Then load `localhost:5432` and start using the console tools. */ /** * This value reflects the property on the window where the dev * tools are patched (window.ng). * */ const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng'; let _published = false; /** * Publishes a collection of default debug tools onto`window.ng`. * * These functions are available globally when Angular is in development * mode and are automatically stripped away from prod mode is on. */ function publishDefaultGlobalUtils() { if (!_published) { _published = true; /** * Warning: this function is *INTERNAL* and should not be relied upon in application's code. * The contract of the function might be changed in any release and/or the function can be * removed completely. */ publishGlobalUtil('ɵsetProfiler', setProfiler); publishGlobalUtil('getComponent', getComponent); publishGlobalUtil('getContext', getContext); publishGlobalUtil('getListeners', getListeners); publishGlobalUtil('getOwningComponent', getOwningComponent); publishGlobalUtil('getHostElement', getHostElement); publishGlobalUtil('getInjector', getInjector); publishGlobalUtil('getRootComponents', getRootComponents); publishGlobalUtil('getDirectives', getDirectives); publishGlobalUtil('applyChanges', applyChanges); } } /** * Publishes the given function to `window.ng` so that it can be * used from the browser console when an application is not in production. */ function publishGlobalUtil(name, fn) { if (typeof COMPILED === 'undefined' || !COMPILED) { // Note: we can't export `ng` when using closure enhanced optimization as: // - closure declares globals itself for minified names, which sometimes clobber our `ng` global // - we can't declare a closure extern as the namespace `ng` is already used within Google // for typings for AngularJS (via `goog.provide('ng....')`). const w = _global; ngDevMode && assertDefined(fn, 'function not defined'); if (w) { let container = w[GLOBAL_PUBLISH_EXPANDO_KEY]; if (!container) { container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {}; } container[name] = fn; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$7 = (token, notFoundValue) => { throwProviderNotFoundError(token, 'NullInjector'); }; // TODO: A hack to not pull in the NullInjector from @angular/core. const NULL_INJECTOR$1 = { get: ɵ0$7 }; /** * Bootstraps a Component into an existing host element and returns an instance * of the component. * * Use this function to bootstrap a component into the DOM tree. Each invocation * of this function will create a separate tree of components, injectors and * change detection cycles and lifetimes. To dynamically insert a new component * into an existing tree such that it shares the same injection, change detection * and object lifetime, use {@link ViewContainer#createComponent}. * * @param componentType Component to bootstrap * @param options Optional parameters which control bootstrapping */ function renderComponent$1(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts = {}) { ngDevMode && publishDefaultGlobalUtils(); ngDevMode && assertComponentType(componentType); const rendererFactory = opts.rendererFactory || domRendererFactory3; const sanitizer = opts.sanitizer || null; const componentDef = getComponentDef(componentType); if (componentDef.type != componentType) componentDef.type = componentType; // The first index of the first selector is the tag name. const componentTag = componentDef.selectors[0][0]; const hostRenderer = rendererFactory.createRenderer(null, null); const hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation); const rootFlags = componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ : 16 /* CheckAlways */ | 512 /* IsRoot */; const rootContext = createRootContext(opts.scheduler, opts.playerHandler); const renderer = rendererFactory.createRenderer(hostRNode, componentDef); const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null); const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null); enterView(rootView); let component; try { if (rendererFactory.begin) rendererFactory.begin(); const componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer); component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null); // create mode pass renderView(rootTView, rootView, null); // update mode pass refreshView(rootTView, rootView, null, null); } finally { leaveView(); if (rendererFactory.end) rendererFactory.end(); } return component; } /** * Creates the root component view and the root component node. * * @param rNode Render host element. * @param def ComponentDef * @param rootView The parent view where the host node is stored * @param rendererFactory Factory to be used for creating child renderers. * @param hostRenderer The current renderer * @param sanitizer The sanitizer, if provided * * @returns Component view created */ function createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) { const tView = rootView[TVIEW]; const index = HEADER_OFFSET; ngDevMode && assertIndexInRange(rootView, index); rootView[index] = rNode; // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at // the same time we want to communicate the debug `TNode` that this is a special `TNode` // representing a host element. const tNode = getOrCreateTNode(tView, index, 2 /* Element */, '#host', null); const mergedAttrs = tNode.mergedAttrs = def.hostAttrs; if (mergedAttrs !== null) { computeStaticStyling(tNode, mergedAttrs, true); if (rNode !== null) { setUpAttributes(hostRenderer, rNode, mergedAttrs); if (tNode.classes !== null) { writeDirectClass(hostRenderer, rNode, tNode.classes); } if (tNode.styles !== null) { writeDirectStyle(hostRenderer, rNode, tNode.styles); } } } const viewRenderer = rendererFactory.createRenderer(rNode, def); const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null); if (tView.firstCreatePass) { diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type); markAsComponentHost(tView, tNode); initTNodeFlags(tNode, rootView.length, 1); } addToViewTree(rootView, componentView); // Store component view at node index, with node as the HOST return rootView[index] = componentView; } /** * Creates a root component and sets it up with features and host bindings. Shared by * renderComponent() and ViewContainerRef.createComponent(). */ function createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) { const tView = rootLView[TVIEW]; // Create directive instance with factory() and store at next index in viewData const component = instantiateRootComponent(tView, rootLView, componentDef); rootContext.components.push(component); componentView[CONTEXT] = component; hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef)); // We want to generate an empty QueryList for root content queries for backwards // compatibility with ViewEngine. if (componentDef.contentQueries) { const tNode = getCurrentTNode(); ngDevMode && assertDefined(tNode, 'TNode expected'); componentDef.contentQueries(1 /* Create */, component, tNode.directiveStart); } const rootTNode = getCurrentTNode(); ngDevMode && assertDefined(rootTNode, 'tNode should have been already created'); if (tView.firstCreatePass && (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) { setSelectedIndex(rootTNode.index); const rootTView = rootLView[TVIEW]; registerHostBindingOpCodes(rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd, componentDef); invokeHostBindingsInCreationMode(componentDef, component); } return component; } function createRootContext(scheduler, playerHandler) { return { components: [], scheduler: scheduler || defaultScheduler, clean: CLEAN_PROMISE, playerHandler: playerHandler || null, flags: 0 /* Empty */ }; } /** * Used to enable lifecycle hooks on the root component. * * Include this feature when calling `renderComponent` if the root component * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't * be called properly. * * Example: * * ``` * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]}); * ``` */ function LifecycleHooksFeature(component, def) { const lView = readPatchedLView(component); ngDevMode && assertDefined(lView, 'LView is required'); const tView = lView[TVIEW]; const tNode = getCurrentTNode(); ngDevMode && assertDefined(tNode, 'TNode is required'); registerPostOrderHooks(tView, tNode); } /** * Wait on component until it is rendered. * * This function returns a `Promise` which is resolved when the component's * change detection is executed. This is determined by finding the scheduler * associated with the `component`'s render tree and waiting until the scheduler * flushes. If nothing is scheduled, the function returns a resolved promise. * * Example: * ``` * await whenRendered(myComponent); * ``` * * @param component Component to wait upon * @returns Promise which resolves when the component is rendered. */ function whenRendered(component) { return getRootContext(component).clean; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getSuperType(type) { return Object.getPrototypeOf(type.prototype).constructor; } /** * Merges the definition from a super class to a sub class. * @param definition The definition that is a SubClass of another directive of component * * @codeGenApi */ function ɵɵInheritDefinitionFeature(definition) { let superType = getSuperType(definition.type); let shouldInheritFields = true; const inheritanceChain = [definition]; while (superType) { let superDef = undefined; if (isComponentDef(definition)) { // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵcmp || superType.ɵdir; } else { if (superType.ɵcmp) { throw new Error('Directives cannot inherit Components'); } // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵdir; } if (superDef) { if (shouldInheritFields) { inheritanceChain.push(superDef); // Some fields in the definition may be empty, if there were no values to put in them that // would've justified object creation. Unwrap them if necessary. const writeableDef = definition; writeableDef.inputs = maybeUnwrapEmpty(definition.inputs); writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs); writeableDef.outputs = maybeUnwrapEmpty(definition.outputs); // Merge hostBindings const superHostBindings = superDef.hostBindings; superHostBindings && inheritHostBindings(definition, superHostBindings); // Merge queries const superViewQuery = superDef.viewQuery; const superContentQueries = superDef.contentQueries; superViewQuery && inheritViewQuery(definition, superViewQuery); superContentQueries && inheritContentQueries(definition, superContentQueries); // Merge inputs and outputs fillProperties(definition.inputs, superDef.inputs); fillProperties(definition.declaredInputs, superDef.declaredInputs); fillProperties(definition.outputs, superDef.outputs); // Merge animations metadata. // If `superDef` is a Component, the `data` field is present (defaults to an empty object). if (isComponentDef(superDef) && superDef.data.animation) { // If super def is a Component, the `definition` is also a Component, since Directives can // not inherit Components (we throw an error above and cannot reach this code). const defData = definition.data; defData.animation = (defData.animation || []).concat(superDef.data.animation); } } // Run parent features const features = superDef.features; if (features) { for (let i = 0; i < features.length; i++) { const feature = features[i]; if (feature && feature.ngInherit) { feature(definition); } // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this // def already has all the necessary information inherited from its super class(es), so we // can stop merging fields from super classes. However we need to iterate through the // prototype chain to look for classes that might contain other "features" (like // NgOnChanges), which we should invoke for the original `definition`. We set the // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance // logic and only invoking functions from the "features" list. if (feature === ɵɵInheritDefinitionFeature) { shouldInheritFields = false; } } } } superType = Object.getPrototypeOf(superType); } mergeHostAttrsAcrossInheritance(inheritanceChain); } /** * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class. * * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child * type. */ function mergeHostAttrsAcrossInheritance(inheritanceChain) { let hostVars = 0; let hostAttrs = null; // We process the inheritance order from the base to the leaves here. for (let i = inheritanceChain.length - 1; i >= 0; i--) { const def = inheritanceChain[i]; // For each `hostVars`, we need to add the superclass amount. def.hostVars = (hostVars += def.hostVars); // for each `hostAttrs` we need to merge it with superclass. def.hostAttrs = mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs)); } } function maybeUnwrapEmpty(value) { if (value === EMPTY_OBJ) { return {}; } else if (value === EMPTY_ARRAY$1) { return []; } else { return value; } } function inheritViewQuery(definition, superViewQuery) { const prevViewQuery = definition.viewQuery; if (prevViewQuery) { definition.viewQuery = (rf, ctx) => { superViewQuery(rf, ctx); prevViewQuery(rf, ctx); }; } else { definition.viewQuery = superViewQuery; } } function inheritContentQueries(definition, superContentQueries) { const prevContentQueries = definition.contentQueries; if (prevContentQueries) { definition.contentQueries = (rf, ctx, directiveIndex) => { superContentQueries(rf, ctx, directiveIndex); prevContentQueries(rf, ctx, directiveIndex); }; } else { definition.contentQueries = superContentQueries; } } function inheritHostBindings(definition, superHostBindings) { const prevHostBindings = definition.hostBindings; if (prevHostBindings) { definition.hostBindings = (rf, ctx) => { superHostBindings(rf, ctx); prevHostBindings(rf, ctx); }; } else { definition.hostBindings = superHostBindings; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Fields which exist on either directive or component definitions, and need to be copied from * parent to child classes by the `ɵɵCopyDefinitionFeature`. */ const COPY_DIRECTIVE_FIELDS = [ // The child class should use the providers of its parent. 'providersResolver', ]; /** * Fields which exist only on component definitions, and need to be copied from parent to child * classes by the `ɵɵCopyDefinitionFeature`. * * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`, * since those should go in `COPY_DIRECTIVE_FIELDS` above. */ const COPY_COMPONENT_FIELDS = [ // The child class should use the template function of its parent, including all template // semantics. 'template', 'decls', 'consts', 'vars', 'onPush', 'ngContentSelectors', // The child class should use the CSS styles of its parent, including all styling semantics. 'styles', 'encapsulation', // The child class should be checked by the runtime in the same way as its parent. 'schemas', ]; /** * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a * definition. * * This exists primarily to support ngcc migration of an existing View Engine pattern, where an * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it * generates a skeleton definition on the child class, and applies this feature. * * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition, * including things like the component template function. * * @param definition The definition of a child class which inherits from a parent class with its * own definition. * * @codeGenApi */ function ɵɵCopyDefinitionFeature(definition) { let superType = getSuperType(definition.type); let superDef = undefined; if (isComponentDef(definition)) { // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵcmp; } else { // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵdir; } // Needed because `definition` fields are readonly. const defAny = definition; // Copy over any fields that apply to either directives or components. for (const field of COPY_DIRECTIVE_FIELDS) { defAny[field] = superDef[field]; } if (isComponentDef(superDef)) { // Copy over any component-specific fields. for (const field of COPY_COMPONENT_FIELDS) { defAny[field] = superDef[field]; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _symbolIterator = null; function getSymbolIterator() { if (!_symbolIterator) { const Symbol = _global['Symbol']; if (Symbol && Symbol.iterator) { _symbolIterator = Symbol.iterator; } else { // es6-shim specific logic const keys = Object.getOwnPropertyNames(Map.prototype); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) { _symbolIterator = key; } } } } return _symbolIterator; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function devModeEqual(a, b) { const isListLikeIterableA = isListLikeIterable(a); const isListLikeIterableB = isListLikeIterable(b); if (isListLikeIterableA && isListLikeIterableB) { return areIterablesEqual(a, b, devModeEqual); } else { const isAObject = a && (typeof a === 'object' || typeof a === 'function'); const isBObject = b && (typeof b === 'object' || typeof b === 'function'); if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) { return true; } else { return Object.is(a, b); } } } /** * Indicates that the result of a {@link Pipe} transformation has changed even though the * reference has not changed. * * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value * is stored. * * Example: * * ``` * if (this._latestValue === this._latestReturnedValue) { * return this._latestReturnedValue; * } else { * this._latestReturnedValue = this._latestValue; * return WrappedValue.wrap(this._latestValue); // this will force update * } * ``` * * @publicApi * @deprecated from v10 stop using. (No replacement, deemed unnecessary.) */ class WrappedValue { constructor(value) { this.wrapped = value; } /** Creates a wrapped value. */ static wrap(value) { return new WrappedValue(value); } /** * Returns the underlying value of a wrapped value. * Returns the given `value` when it is not wrapped. **/ static unwrap(value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; } /** Returns true if `value` is a wrapped value. */ static isWrapped(value) { return value instanceof WrappedValue; } } function isListLikeIterable(obj) { if (!isJsObject(obj)) return false; return Array.isArray(obj) || (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v] getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop } function areIterablesEqual(a, b, comparator) { const iterator1 = a[getSymbolIterator()](); const iterator2 = b[getSymbolIterator()](); while (true) { const item1 = iterator1.next(); const item2 = iterator2.next(); if (item1.done && item2.done) return true; if (item1.done || item2.done) return false; if (!comparator(item1.value, item2.value)) return false; } } function iterateListLike(obj, fn) { if (Array.isArray(obj)) { for (let i = 0; i < obj.length; i++) { fn(obj[i]); } } else { const iterator = obj[getSymbolIterator()](); let item; while (!((item = iterator.next()).done)) { fn(item.value); } } } function isJsObject(o) { return o !== null && (typeof o === 'function' || typeof o === 'object'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // TODO(misko): consider inlining /** Updates binding and returns the value. */ function updateBinding(lView, bindingIndex, value) { return lView[bindingIndex] = value; } /** Gets the current binding value. */ function getBinding(lView, bindingIndex) { ngDevMode && assertIndexInRange(lView, bindingIndex); ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.'); return lView[bindingIndex]; } /** * Updates binding if changed, then returns whether it was updated. * * This function also checks the `CheckNoChangesMode` and throws if changes are made. * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE * behavior. * * @param lView current `LView` * @param bindingIndex The binding in the `LView` to check * @param value New value to check against `lView[bindingIndex]` * @returns `true` if the bindings has changed. (Throws if binding has changed during * `CheckNoChangesMode`) */ function bindingUpdated(lView, bindingIndex, value) { ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.'); ngDevMode && assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`); const oldValue = lView[bindingIndex]; if (Object.is(oldValue, value)) { return false; } else { if (ngDevMode && isInCheckNoChangesMode()) { // View engine didn't report undefined values as changed on the first checkNoChanges pass // (before the change detection was run). const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined; if (!devModeEqual(oldValueToCompare, value)) { const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value); throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName); } // There was a change, but the `devModeEqual` decided that the change is exempt from an error. // For this reason we exit as if no change. The early exit is needed to prevent the changed // value to be written into `LView` (If we would write the new value that we would not see it // as change on next CD.) return false; } lView[bindingIndex] = value; return true; } } /** Updates 2 bindings if changed, then returns whether either was updated. */ function bindingUpdated2(lView, bindingIndex, exp1, exp2) { const different = bindingUpdated(lView, bindingIndex, exp1); return bindingUpdated(lView, bindingIndex + 1, exp2) || different; } /** Updates 3 bindings if changed, then returns whether any was updated. */ function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) { const different = bindingUpdated2(lView, bindingIndex, exp1, exp2); return bindingUpdated(lView, bindingIndex + 2, exp3) || different; } /** Updates 4 bindings if changed, then returns whether any was updated. */ function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) { const different = bindingUpdated2(lView, bindingIndex, exp1, exp2); return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Updates the value of or removes a bound attribute on an Element. * * Used in the case of `[attr.title]="value"` * * @param name name The name of the attribute. * @param value value The attribute is removed when value is `null` or `undefined`. * Otherwise the attribute value is set to the stringified value. * @param sanitizer An optional function used to sanitize the value. * @param namespace Optional namespace to use when setting the attribute. * * @codeGenApi */ function ɵɵattribute(name, value, sanitizer, namespace) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex); } return ɵɵattribute; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Create interpolation bindings with a variable number of expressions. * * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead. * Those are faster because there is no need to create an array of expressions and iterate over it. * * `values`: * - has static text at even indexes, * - has evaluated expressions at odd indexes. * * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise. */ function interpolationV(lView, values) { ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values'); ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values'); let isBindingUpdated = false; let bindingIndex = getBindingIndex(); for (let i = 1; i < values.length; i += 2) { // Check if bindings (odd indexes) have changed isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated; } setBindingIndex(bindingIndex); if (!isBindingUpdated) { return NO_CHANGE; } // Build the updated content let content = values[0]; for (let i = 1; i < values.length; i += 2) { content += renderStringify(values[i]) + values[i + 1]; } return content; } /** * Creates an interpolation binding with 1 expression. * * @param prefix static value used for concatenation only. * @param v0 value checked for change. * @param suffix static value used for concatenation only. */ function interpolation1(lView, prefix, v0, suffix) { const different = bindingUpdated(lView, nextBindingIndex(), v0); return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 2 expressions. */ function interpolation2(lView, prefix, v0, i0, v1, suffix) { const bindingIndex = getBindingIndex(); const different = bindingUpdated2(lView, bindingIndex, v0, v1); incrementBindingIndex(2); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 3 expressions. */ function interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) { const bindingIndex = getBindingIndex(); const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2); incrementBindingIndex(3); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix : NO_CHANGE; } /** * Create an interpolation binding with 4 expressions. */ function interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const bindingIndex = getBindingIndex(); const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); incrementBindingIndex(4); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 5 expressions. */ function interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated(lView, bindingIndex + 4, v4) || different; incrementBindingIndex(5); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 6 expressions. */ function interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different; incrementBindingIndex(6); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 7 expressions. */ function interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different; incrementBindingIndex(7); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 8 expressions. */ function interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different; incrementBindingIndex(8); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix : NO_CHANGE; } /** * * Update an interpolated attribute on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div attr.title="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix); } return ɵɵattributeInterpolate1; } /** * * Update an interpolated attribute on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix); } return ɵɵattributeInterpolate2; } /** * * Update an interpolated attribute on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate3( * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix); } return ɵɵattributeInterpolate3; } /** * * Update an interpolated attribute on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate4( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix); } return ɵɵattributeInterpolate4; } /** * * Update an interpolated attribute on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate5( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix); } return ɵɵattributeInterpolate5; } /** * * Update an interpolated attribute on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate6( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix); } return ɵɵattributeInterpolate6; } /** * * Update an interpolated attribute on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate7( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix); } return ɵɵattributeInterpolate7; } /** * * Update an interpolated attribute on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate8( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix); } return ɵɵattributeInterpolate8; } /** * Update an interpolated attribute on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolateV( * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` * * @param attrName The name of the attribute to update. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) { const lView = getLView(); const interpolated = interpolationV(lView, values); if (interpolated !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace); if (ngDevMode) { const interpolationInBetween = [values[0]]; // prefix for (let i = 2; i < values.length; i += 2) { interpolationInBetween.push(values[i]); } storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween); } } return ɵɵattributeInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && ngDevMode.firstCreatePass++; const tViewConsts = tView.consts; // TODO(pk): refactor getOrCreateTNode to have the "create" only version const tNode = getOrCreateTNode(tView, index, 4 /* Container */, tagName || null, getConstant(tViewConsts, attrsIndex)); resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex)); registerPostOrderHooks(tView, tNode); const embeddedTView = tNode.tViews = createTView(2 /* Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts); if (tView.queries !== null) { tView.queries.template(tView, tNode); embeddedTView.queries = tView.queries.embeddedTView(tNode); } return tNode; } /** * Creates an LContainer for an ng-template (dynamically-inserted view), e.g. * * <ng-template #foo> * <div></div> * </ng-template> * * @param index The index of the container in the data array * @param templateFn Inline template * @param decls The number of nodes, local refs, and pipes for this template * @param vars The number of bindings for this template * @param tagName The name of the container element, if applicable * @param attrsIndex Index of template attributes in the `consts` array. * @param localRefs Index of the local references in the `consts` array. * @param localRefExtractor A function which extracts local-refs values from the template. * Defaults to the current element associated with the local-ref. * * @codeGenApi */ function ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) { const lView = getLView(); const tView = getTView(); const adjustedIndex = index + HEADER_OFFSET; const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) : tView.data[adjustedIndex]; setCurrentTNode(tNode, false); const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : ''); appendChild(tView, lView, comment, tNode); attachPatchData(comment, lView); addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode)); if (isDirectiveHost(tNode)) { createDirectivesInstances(tView, lView, tNode); } if (localRefsIndex != null) { saveResolvedLocalsInData(lView, tNode, localRefExtractor); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** Store a value in the `data` at a given `index`. */ function store(tView, lView, index, value) { // We don't store any static data for local variables, so the first time // we see the template, we should store as null to avoid a sparse array if (index >= tView.data.length) { tView.data[index] = null; tView.blueprint[index] = null; } lView[index] = value; } /** * Retrieves a local reference from the current contextViewData. * * If the reference to retrieve is in a parent view, this instruction is used in conjunction * with a nextContext() call, which walks up the tree and updates the contextViewData instance. * * @param index The index of the local ref in contextViewData. * * @codeGenApi */ function ɵɵreference(index) { const contextLView = getContextLView(); return load(contextLView, HEADER_OFFSET + index); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A mapping of the @angular/core API surface used in generated expressions to the actual symbols. * * This should be kept up to date with the public exports of @angular/core. */ const angularCoreDiEnv = { 'ɵɵdefineInjectable': ɵɵdefineInjectable, 'ɵɵdefineInjector': ɵɵdefineInjector, 'ɵɵinject': ɵɵinject, 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep, }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting * injectable def (`ɵprov`) onto the injectable type. */ function compileInjectable(type, srcMeta) { let ngInjectableDef = null; let ngFactoryDef = null; // if NG_PROV_DEF is already defined on this class then don't overwrite it if (!type.hasOwnProperty(NG_PROV_DEF)) { Object.defineProperty(type, NG_PROV_DEF, { get: () => { if (ngInjectableDef === null) { ngInjectableDef = getCompilerFacade().compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, srcMeta)); } return ngInjectableDef; }, }); } // if NG_FACTORY_DEF is already defined on this class then don't overwrite it if (!type.hasOwnProperty(NG_FACTORY_DEF)) { Object.defineProperty(type, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const metadata = getInjectableMetadata(type, srcMeta); const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, { name: metadata.name, type: metadata.type, typeArgumentCount: metadata.typeArgumentCount, deps: reflectDependencies(type), injectFn: 'inject', target: compiler.R3FactoryTarget.Injectable }); } return ngFactoryDef; }, // Leave this configurable so that the factories from directives or pipes can take precedence. configurable: true }); } } const ɵ0$8 = getClosureSafeProperty; const USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$8 }); function isUseClassProvider(meta) { return meta.useClass !== undefined; } function isUseValueProvider(meta) { return USE_VALUE$1 in meta; } function isUseFactoryProvider(meta) { return meta.useFactory !== undefined; } function isUseExistingProvider(meta) { return meta.useExisting !== undefined; } function getInjectableMetadata(type, srcMeta) { // Allow the compilation of a class with a `@Injectable()` decorator without parameters const meta = srcMeta || { providedIn: null }; const compilerMeta = { name: type.name, type: type, typeArgumentCount: 0, providedIn: meta.providedIn, userDeps: undefined, }; if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) { compilerMeta.userDeps = convertDependencies(meta.deps); } if (isUseClassProvider(meta)) { // The user explicitly specified useClass, and may or may not have provided deps. compilerMeta.useClass = resolveForwardRef(meta.useClass); } else if (isUseValueProvider(meta)) { // The user explicitly specified useValue. compilerMeta.useValue = resolveForwardRef(meta.useValue); } else if (isUseFactoryProvider(meta)) { // The user explicitly specified useFactory. compilerMeta.useFactory = meta.useFactory; } else if (isUseExistingProvider(meta)) { // The user explicitly specified useExisting. compilerMeta.useExisting = resolveForwardRef(meta.useExisting); } return compilerMeta; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$9 = getClosureSafeProperty; const USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$9 }); const EMPTY_ARRAY$3 = []; function convertInjectableProviderToFactory(type, provider) { if (!provider) { const reflectionCapabilities = new ReflectionCapabilities(); const deps = reflectionCapabilities.parameters(type); // TODO - convert to flags. return () => new type(...injectArgs(deps)); } if (USE_VALUE$2 in provider) { const valueProvider = provider; return () => valueProvider.useValue; } else if (provider.useExisting) { const existingProvider = provider; return () => ɵɵinject(resolveForwardRef(existingProvider.useExisting)); } else if (provider.useFactory) { const factoryProvider = provider; return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY$3)); } else if (provider.useClass) { const classProvider = provider; let deps = provider.deps; if (!deps) { const reflectionCapabilities = new ReflectionCapabilities(); deps = reflectionCapabilities.parameters(type); } return () => new (resolveForwardRef(classProvider.useClass))(...injectArgs(deps)); } else { let deps = provider.deps; if (!deps) { const reflectionCapabilities = new ReflectionCapabilities(); deps = reflectionCapabilities.parameters(type); } return () => new type(...injectArgs(deps)); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$a = (type, meta) => SWITCH_COMPILE_INJECTABLE(type, meta); /** * Injectable decorator and metadata. * * @Annotation * @publicApi */ const Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$a); /** * Supports @Injectable() in JIT mode for Render2. */ function render2CompileInjectable(injectableType, options) { if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) { injectableType.ɵprov = ɵɵdefineInjectable({ token: injectableType, providedIn: options.providedIn, factory: convertInjectableProviderToFactory(injectableType, options), }); } } const SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable; const SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable; const SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function findFirstClosedCycle(keys) { const res = []; for (let i = 0; i < keys.length; ++i) { if (res.indexOf(keys[i]) > -1) { res.push(keys[i]); return res; } res.push(keys[i]); } return res; } function constructResolvingPath(keys) { if (keys.length > 1) { const reversed = findFirstClosedCycle(keys.slice().reverse()); const tokenStrs = reversed.map(k => stringify(k.token)); return ' (' + tokenStrs.join(' -> ') + ')'; } return ''; } function injectionError(injector, key, constructResolvingMessage, originalError) { const keys = [key]; const errMsg = constructResolvingMessage(keys); const error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)); error.addKey = addKey; error.keys = keys; error.injectors = [injector]; error.constructResolvingMessage = constructResolvingMessage; error[ERROR_ORIGINAL_ERROR] = originalError; return error; } function addKey(injector, key) { this.injectors.push(injector); this.keys.push(key); // Note: This updated message won't be reflected in the `.stack` property this.message = this.constructResolvingMessage(this.keys); } /** * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the * {@link Injector} does not have a {@link Provider} for the given key. * * @usageNotes * ### Example * * ```typescript * class A { * constructor(b:B) {} * } * * expect(() => Injector.resolveAndCreate([A])).toThrowError(); * ``` */ function noProviderError(injector, key) { return injectionError(injector, key, function (keys) { const first = stringify(keys[0].token); return `No provider for ${first}!${constructResolvingPath(keys)}`; }); } /** * Thrown when dependencies form a cycle. * * @usageNotes * ### Example * * ```typescript * var injector = Injector.resolveAndCreate([ * {provide: "one", useFactory: (two) => "two", deps: [[new Inject("two")]]}, * {provide: "two", useFactory: (one) => "one", deps: [[new Inject("one")]]} * ]); * * expect(() => injector.get("one")).toThrowError(); * ``` * * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed. */ function cyclicDependencyError(injector, key) { return injectionError(injector, key, function (keys) { return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`; }); } /** * Thrown when a constructing type returns with an Error. * * The `InstantiationError` class contains the original error plus the dependency graph which caused * this object to be instantiated. * * @usageNotes * ### Example * * ```typescript * class A { * constructor() { * throw new Error('message'); * } * } * * var injector = Injector.resolveAndCreate([A]); * try { * injector.get(A); * } catch (e) { * expect(e instanceof InstantiationError).toBe(true); * expect(e.originalException.message).toEqual("message"); * expect(e.originalStack).toBeDefined(); * } * ``` */ function instantiationError(injector, originalException, originalStack, key) { return injectionError(injector, key, function (keys) { const first = stringify(keys[0].token); return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`; }, originalException); } /** * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector} * creation. * * @usageNotes * ### Example * * ```typescript * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError(); * ``` */ function invalidProviderError(provider) { return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`); } /** * Thrown when the class has no annotation information. * * Lack of annotation information prevents the {@link Injector} from determining which dependencies * need to be injected into the constructor. * * @usageNotes * ### Example * * ```typescript * class A { * constructor(b) {} * } * * expect(() => Injector.resolveAndCreate([A])).toThrowError(); * ``` * * This error is also thrown when the class not marked with {@link Injectable} has parameter types. * * ```typescript * class B {} * * class A { * constructor(b:B) {} // no information about the parameter types of A is available at runtime. * } * * expect(() => Injector.resolveAndCreate([A,B])).toThrowError(); * ``` * */ function noAnnotationError(typeOrFunc, params) { const signature = []; for (let i = 0, ii = params.length; i < ii; i++) { const parameter = params[i]; if (!parameter || parameter.length == 0) { signature.push('?'); } else { signature.push(parameter.map(stringify).join(' ')); } } return Error('Cannot resolve all parameters for \'' + stringify(typeOrFunc) + '\'(' + signature.join(', ') + '). ' + 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \'' + stringify(typeOrFunc) + '\' is decorated with Injectable.'); } /** * Thrown when getting an object by index. * * @usageNotes * ### Example * * ```typescript * class A {} * * var injector = Injector.resolveAndCreate([A]); * * expect(() => injector.getAt(100)).toThrowError(); * ``` * */ function outOfBoundsError(index) { return Error(`Index ${index} is out-of-bounds.`); } // TODO: add a working example after alpha38 is released /** * Thrown when a multi provider and a regular provider are bound to the same token. * * @usageNotes * ### Example * * ```typescript * expect(() => Injector.resolveAndCreate([ * { provide: "Strings", useValue: "string1", multi: true}, * { provide: "Strings", useValue: "string2", multi: false} * ])).toThrowError(); * ``` */ function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) { return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A unique object used for retrieving items from the {@link ReflectiveInjector}. * * Keys have: * - a system-wide unique `id`. * - a `token`. * * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows * the * injector to store created objects in a more efficient way. * * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when * resolving * providers. * * @deprecated No replacement * @publicApi */ class ReflectiveKey { /** * Private */ constructor(token, id) { this.token = token; this.id = id; if (!token) { throw new Error('Token must be defined!'); } this.displayName = stringify(this.token); } /** * Retrieves a `Key` for a token. */ static get(token) { return _globalKeyRegistry.get(resolveForwardRef(token)); } /** * @returns the number of keys registered in the system. */ static get numberOfKeys() { return _globalKeyRegistry.numberOfKeys; } } class KeyRegistry { constructor() { this._allKeys = new Map(); } get(token) { if (token instanceof ReflectiveKey) return token; if (this._allKeys.has(token)) { return this._allKeys.get(token); } const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys); this._allKeys.set(token, newKey); return newKey; } get numberOfKeys() { return this._allKeys.size; } } const _globalKeyRegistry = new KeyRegistry(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides access to reflection data about symbols. Used internally by Angular * to power dependency injection and compilation. */ class Reflector { constructor(reflectionCapabilities) { this.reflectionCapabilities = reflectionCapabilities; } updateCapabilities(caps) { this.reflectionCapabilities = caps; } factory(type) { return this.reflectionCapabilities.factory(type); } parameters(typeOrFunc) { return this.reflectionCapabilities.parameters(typeOrFunc); } annotations(typeOrFunc) { return this.reflectionCapabilities.annotations(typeOrFunc); } propMetadata(typeOrFunc) { return this.reflectionCapabilities.propMetadata(typeOrFunc); } hasLifecycleHook(type, lcProperty) { return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty); } getter(name) { return this.reflectionCapabilities.getter(name); } setter(name) { return this.reflectionCapabilities.setter(name); } method(name) { return this.reflectionCapabilities.method(name); } importUri(type) { return this.reflectionCapabilities.importUri(type); } resourceUri(type) { return this.reflectionCapabilities.resourceUri(type); } resolveIdentifier(name, moduleUrl, members, runtime) { return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime); } resolveEnum(identifier, name) { return this.reflectionCapabilities.resolveEnum(identifier, name); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The {@link Reflector} used internally in Angular to access metadata * about symbols. */ const reflector = new Reflector(new ReflectionCapabilities()); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * `Dependency` is used by the framework to extend DI. * This is internal to Angular and should not be used directly. */ class ReflectiveDependency { constructor(key, optional, visibility) { this.key = key; this.optional = optional; this.visibility = visibility; } static fromKey(key) { return new ReflectiveDependency(key, false, null); } } const _EMPTY_LIST = []; class ResolvedReflectiveProvider_ { constructor(key, resolvedFactories, multiProvider) { this.key = key; this.resolvedFactories = resolvedFactories; this.multiProvider = multiProvider; this.resolvedFactory = this.resolvedFactories[0]; } } /** * An internal resolved representation of a factory function created by resolving `Provider`. * @publicApi */ class ResolvedReflectiveFactory { constructor( /** * Factory function which can return an instance of an object represented by a key. */ factory, /** * Arguments (dependencies) to the `factory` function. */ dependencies) { this.factory = factory; this.dependencies = dependencies; } } /** * Resolve a single provider. */ function resolveReflectiveFactory(provider) { let factoryFn; let resolvedDeps; if (provider.useClass) { const useClass = resolveForwardRef(provider.useClass); factoryFn = reflector.factory(useClass); resolvedDeps = _dependenciesFor(useClass); } else if (provider.useExisting) { factoryFn = (aliasInstance) => aliasInstance; resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))]; } else if (provider.useFactory) { factoryFn = provider.useFactory; resolvedDeps = constructDependencies(provider.useFactory, provider.deps); } else { factoryFn = () => provider.useValue; resolvedDeps = _EMPTY_LIST; } return new ResolvedReflectiveFactory(factoryFn, resolvedDeps); } /** * Converts the `Provider` into `ResolvedProvider`. * * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider * syntax. */ function resolveReflectiveProvider(provider) { return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false); } /** * Resolve a list of Providers. */ function resolveReflectiveProviders(providers) { const normalized = _normalizeProviders(providers, []); const resolved = normalized.map(resolveReflectiveProvider); const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map()); return Array.from(resolvedProviderMap.values()); } /** * Merges a list of ResolvedProviders into a list where each key is contained exactly once and * multi providers have been merged. */ function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) { for (let i = 0; i < providers.length; i++) { const provider = providers[i]; const existing = normalizedProvidersMap.get(provider.key.id); if (existing) { if (provider.multiProvider !== existing.multiProvider) { throw mixingMultiProvidersWithRegularProvidersError(existing, provider); } if (provider.multiProvider) { for (let j = 0; j < provider.resolvedFactories.length; j++) { existing.resolvedFactories.push(provider.resolvedFactories[j]); } } else { normalizedProvidersMap.set(provider.key.id, provider); } } else { let resolvedProvider; if (provider.multiProvider) { resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider); } else { resolvedProvider = provider; } normalizedProvidersMap.set(provider.key.id, resolvedProvider); } } return normalizedProvidersMap; } function _normalizeProviders(providers, res) { providers.forEach(b => { if (b instanceof Type) { res.push({ provide: b, useClass: b }); } else if (b && typeof b == 'object' && b.provide !== undefined) { res.push(b); } else if (Array.isArray(b)) { _normalizeProviders(b, res); } else { throw invalidProviderError(b); } }); return res; } function constructDependencies(typeOrFunc, dependencies) { if (!dependencies) { return _dependenciesFor(typeOrFunc); } else { const params = dependencies.map(t => [t]); return dependencies.map(t => _extractToken(typeOrFunc, t, params)); } } function _dependenciesFor(typeOrFunc) { const params = reflector.parameters(typeOrFunc); if (!params) return []; if (params.some(p => p == null)) { throw noAnnotationError(typeOrFunc, params); } return params.map(p => _extractToken(typeOrFunc, p, params)); } function _extractToken(typeOrFunc, metadata, params) { let token = null; let optional = false; if (!Array.isArray(metadata)) { if (metadata instanceof Inject) { return _createDependency(metadata.token, optional, null); } else { return _createDependency(metadata, optional, null); } } let visibility = null; for (let i = 0; i < metadata.length; ++i) { const paramMetadata = metadata[i]; if (paramMetadata instanceof Type) { token = paramMetadata; } else if (paramMetadata instanceof Inject) { token = paramMetadata.token; } else if (paramMetadata instanceof Optional) { optional = true; } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) { visibility = paramMetadata; } else if (paramMetadata instanceof InjectionToken) { token = paramMetadata; } } token = resolveForwardRef(token); if (token != null) { return _createDependency(token, optional, visibility); } else { throw noAnnotationError(typeOrFunc, params); } } function _createDependency(token, optional, visibility) { return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Threshold for the dynamic version const UNDEFINED = {}; /** * A ReflectiveDependency injection container used for instantiating objects and resolving * dependencies. * * An `Injector` is a replacement for a `new` operator, which can automatically resolve the * constructor dependencies. * * In typical use, application code asks for the dependencies in the constructor and they are * resolved by the `Injector`. * * @usageNotes * ### Example * * The following example creates an `Injector` configured to create `Engine` and `Car`. * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]); * var car = injector.get(Car); * expect(car instanceof Car).toBe(true); * expect(car.engine instanceof Engine).toBe(true); * ``` * * Notice, we don't use the `new` operator because we explicitly want to have the `Injector` * resolve all of the object's dependencies automatically. * * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead. * @publicApi */ class ReflectiveInjector { /** * Turns an array of provider definitions into an array of resolved providers. * * A resolution is a process of flattening multiple nested arrays and converting individual * providers into an array of `ResolvedReflectiveProvider`s. * * @usageNotes * ### Example * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]); * * expect(providers.length).toEqual(2); * * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true); * expect(providers[0].key.displayName).toBe("Car"); * expect(providers[0].dependencies.length).toEqual(1); * expect(providers[0].factory).toBeDefined(); * * expect(providers[1].key.displayName).toBe("Engine"); * }); * ``` * */ static resolve(providers) { return resolveReflectiveProviders(providers); } /** * Resolves an array of providers and creates an injector from those providers. * * The passed-in providers can be an array of `Type`, `Provider`, * or a recursive array of more providers. * * @usageNotes * ### Example * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]); * expect(injector.get(Car) instanceof Car).toBe(true); * ``` */ static resolveAndCreate(providers, parent) { const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers); return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent); } /** * Creates an injector from previously resolved providers. * * This API is the recommended way to construct injectors in performance-sensitive parts. * * @usageNotes * ### Example * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var providers = ReflectiveInjector.resolve([Car, Engine]); * var injector = ReflectiveInjector.fromResolvedProviders(providers); * expect(injector.get(Car) instanceof Car).toBe(true); * ``` */ static fromResolvedProviders(providers, parent) { return new ReflectiveInjector_(providers, parent); } } class ReflectiveInjector_ { /** * Private */ constructor(_providers, _parent) { /** @internal */ this._constructionCounter = 0; this._providers = _providers; this.parent = _parent || null; const len = _providers.length; this.keyIds = []; this.objs = []; for (let i = 0; i < len; i++) { this.keyIds[i] = _providers[i].key.id; this.objs[i] = UNDEFINED; } } get(token, notFoundValue = THROW_IF_NOT_FOUND) { return this._getByKey(ReflectiveKey.get(token), null, notFoundValue); } resolveAndCreateChild(providers) { const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers); return this.createChildFromResolved(ResolvedReflectiveProviders); } createChildFromResolved(providers) { const inj = new ReflectiveInjector_(providers); inj.parent = this; return inj; } resolveAndInstantiate(provider) { return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]); } instantiateResolved(provider) { return this._instantiateProvider(provider); } getProviderAtIndex(index) { if (index < 0 || index >= this._providers.length) { throw outOfBoundsError(index); } return this._providers[index]; } /** @internal */ _new(provider) { if (this._constructionCounter++ > this._getMaxNumberOfObjects()) { throw cyclicDependencyError(this, provider.key); } return this._instantiateProvider(provider); } _getMaxNumberOfObjects() { return this.objs.length; } _instantiateProvider(provider) { if (provider.multiProvider) { const res = []; for (let i = 0; i < provider.resolvedFactories.length; ++i) { res[i] = this._instantiate(provider, provider.resolvedFactories[i]); } return res; } else { return this._instantiate(provider, provider.resolvedFactories[0]); } } _instantiate(provider, ResolvedReflectiveFactory) { const factory = ResolvedReflectiveFactory.factory; let deps; try { deps = ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep)); } catch (e) { if (e.addKey) { e.addKey(this, provider.key); } throw e; } let obj; try { obj = factory(...deps); } catch (e) { throw instantiationError(this, e, e.stack, provider.key); } return obj; } _getByReflectiveDependency(dep) { return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND); } _getByKey(key, visibility, notFoundValue) { if (key === ReflectiveInjector_.INJECTOR_KEY) { return this; } if (visibility instanceof Self) { return this._getByKeySelf(key, notFoundValue); } else { return this._getByKeyDefault(key, notFoundValue, visibility); } } _getObjByKeyId(keyId) { for (let i = 0; i < this.keyIds.length; i++) { if (this.keyIds[i] === keyId) { if (this.objs[i] === UNDEFINED) { this.objs[i] = this._new(this._providers[i]); } return this.objs[i]; } } return UNDEFINED; } /** @internal */ _throwOrNull(key, notFoundValue) { if (notFoundValue !== THROW_IF_NOT_FOUND) { return notFoundValue; } else { throw noProviderError(this, key); } } /** @internal */ _getByKeySelf(key, notFoundValue) { const obj = this._getObjByKeyId(key.id); return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue); } /** @internal */ _getByKeyDefault(key, notFoundValue, visibility) { let inj; if (visibility instanceof SkipSelf) { inj = this.parent; } else { inj = this; } while (inj instanceof ReflectiveInjector_) { const inj_ = inj; const obj = inj_._getObjByKeyId(key.id); if (obj !== UNDEFINED) return obj; inj = inj_.parent; } if (inj !== null) { return inj.get(key.token, notFoundValue); } else { return this._throwOrNull(key, notFoundValue); } } get displayName() { const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ') .join(', '); return `ReflectiveInjector(providers: [${providers}])`; } toString() { return this.displayName; } } ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector); function _mapProviders(injector, fn) { const res = []; for (let i = 0; i < injector._providers.length; ++i) { res[i] = fn(injector.getProviderAtIndex(i)); } return res; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function ɵɵdirectiveInject(token, flags = InjectFlags.Default) { const lView = getLView(); // Fall back to inject() if view hasn't been created. This situation can happen in tests // if inject utilities are used before bootstrapping. if (lView === null) { // Verify that we will not get into infinite loop. ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject); return ɵɵinject(token, flags); } const tNode = getCurrentTNode(); return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags); } /** * Throws an error indicating that a factory function could not be generated by the compiler for a * particular class. * * This instruction allows the actual error message to be optimized away when ngDevMode is turned * off, saving bytes of generated code while still providing a good experience in dev mode. * * The name of the class is not mentioned here, but will be in the generated factory function name * and thus in the stack trace. * * @codeGenApi */ function ɵɵinvalidFactory() { const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid'; throw new Error(msg); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Update a property on a selected element. * * Operates on the element selected by index via the {@link select} instruction. * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled * * @param propName Name of property. Because it is going to DOM, this is not subject to * renaming as part of minification. * @param value New value to write. * @param sanitizer An optional function used to sanitize the value. * @returns This function returns itself so that it may be chained * (e.g. `property('name', ctx.name)('title', ctx.title)`) * * @codeGenApi */ function ɵɵproperty(propName, value, sanitizer) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex); } return ɵɵproperty; } /** * Given `<div style="..." my-dir>` and `MyDir` with `@Input('style')` we need to write to * directive input. */ function setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) { const inputs = tNode.inputs; const property = isClassBased ? 'class' : 'style'; // We support both 'class' and `className` hence the fallback. setInputsForProperty(tView, lView, inputs[property], property, value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && ngDevMode.firstCreatePass++; const tViewConsts = tView.consts; const attrs = getConstant(tViewConsts, attrsIndex); const tNode = getOrCreateTNode(tView, index, 2 /* Element */, name, attrs); const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex)); ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives); if (tNode.attrs !== null) { computeStaticStyling(tNode, tNode.attrs, false); } if (tNode.mergedAttrs !== null) { computeStaticStyling(tNode, tNode.mergedAttrs, true); } if (tView.queries !== null) { tView.queries.elementStart(tView, tNode); } return tNode; } /** * Create DOM element. The instruction must later be followed by `elementEnd()` call. * * @param index Index of the element in the LView array * @param name Name of the DOM Node * @param attrsIndex Index of the element's attributes in the `consts` array. * @param localRefsIndex Index of the element's local references in the `consts` array. * * Attributes and localRefs are passed as an array of strings where elements with an even index * hold an attribute name and elements with an odd index hold an attribute value, ex.: * ['id', 'warning5', 'class', 'alert'] * * @codeGenApi */ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) { const lView = getLView(); const tView = getTView(); const adjustedIndex = HEADER_OFFSET + index; ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings'); ngDevMode && assertIndexInRange(lView, adjustedIndex); const renderer = lView[RENDERER]; const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace()); const tNode = tView.firstCreatePass ? elementStartFirstCreatePass(adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) : tView.data[adjustedIndex]; setCurrentTNode(tNode, true); const mergedAttrs = tNode.mergedAttrs; if (mergedAttrs !== null) { setUpAttributes(renderer, native, mergedAttrs); } const classes = tNode.classes; if (classes !== null) { writeDirectClass(renderer, native, classes); } const styles = tNode.styles; if (styles !== null) { writeDirectStyle(renderer, native, styles); } if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) { // In the i18n case, the translation may have removed this element, so only add it if it is not // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context. appendChild(tView, lView, native, tNode); } // any immediate children of a component or template container must be pre-emptively // monkey-patched with the component view data so that the element can be inspected // later on using any element discovery utility methods (see `element_discovery.ts`) if (getElementDepthCount() === 0) { attachPatchData(native, lView); } increaseElementDepthCount(); if (isDirectiveHost(tNode)) { createDirectivesInstances(tView, lView, tNode); executeContentQueries(tView, tNode, lView); } if (localRefsIndex !== null) { saveResolvedLocalsInData(lView, tNode); } } /** * Mark the end of the element. * * @codeGenApi */ function ɵɵelementEnd() { let currentTNode = getCurrentTNode(); ngDevMode && assertDefined(currentTNode, 'No parent node to close.'); if (isCurrentTNodeParent()) { setCurrentTNodeAsNotParent(); } else { ngDevMode && assertHasParent(getCurrentTNode()); currentTNode = currentTNode.parent; setCurrentTNode(currentTNode, false); } const tNode = currentTNode; ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */); decreaseElementDepthCount(); const tView = getTView(); if (tView.firstCreatePass) { registerPostOrderHooks(tView, currentTNode); if (isContentQueryHost(currentTNode)) { tView.queries.elementEnd(currentTNode); } } if (tNode.classesWithoutHost != null && hasClassInput(tNode)) { setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true); } if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) { setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false); } } /** * Creates an empty element using {@link elementStart} and {@link elementEnd} * * @param index Index of the element in the data array * @param name Name of the DOM Node * @param attrsIndex Index of the element's attributes in the `consts` array. * @param localRefsIndex Index of the element's local references in the `consts` array. * * @codeGenApi */ function ɵɵelement(index, name, attrsIndex, localRefsIndex) { ɵɵelementStart(index, name, attrsIndex, localRefsIndex); ɵɵelementEnd(); } function logUnknownElementError(tView, element, tNode, hasDirectives) { const schemas = tView.schemas; // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT // mode where this check happens at compile time. In JIT mode, `schemas` is always present and // defined as an array (as an empty array in case `schemas` field is not defined) and we should // execute the check below. if (schemas === null) return; const tagName = tNode.value; // If the element matches any directive, it's considered as valid. if (!hasDirectives && tagName !== null) { // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered // as a custom element. Note that unknown elements with a dash in their name won't be instances // of HTMLUnknownElement in browsers that support web components. const isUnknown = // Note that we can't check for `typeof HTMLUnknownElement === 'function'`, // because while most browsers return 'function', IE returns 'object'. (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement && element instanceof HTMLUnknownElement) || (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName)); if (isUnknown && !matchingSchemas(tView, tagName)) { let message = `'${tagName}' is not a known element:\n`; message += `1. If '${tagName}' is an Angular component, then verify that it is part of this module.\n`; if (tagName && tagName.indexOf('-') > -1) { message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.`; } else { message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`; } console.error(formatRuntimeError("304" /* UNKNOWN_ELEMENT */, message)); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) { ngDevMode && ngDevMode.firstCreatePass++; const tViewConsts = tView.consts; const attrs = getConstant(tViewConsts, attrsIndex); const tNode = getOrCreateTNode(tView, index, 8 /* ElementContainer */, 'ng-container', attrs); // While ng-container doesn't necessarily support styling, we use the style context to identify // and execute directives on the ng-container. if (attrs !== null) { computeStaticStyling(tNode, attrs, true); } const localRefs = getConstant(tViewConsts, localRefsIndex); resolveDirectives(tView, lView, tNode, localRefs); if (tView.queries !== null) { tView.queries.elementStart(tView, tNode); } return tNode; } /** * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM. * The instruction must later be followed by `elementContainerEnd()` call. * * @param index Index of the element in the LView array * @param attrsIndex Index of the container attributes in the `consts` array. * @param localRefsIndex Index of the container's local references in the `consts` array. * * Even if this instruction accepts a set of attributes no actual attribute values are propagated to * the DOM (as a comment node can't have attributes). Attributes are here only for directive * matching purposes and setting initial inputs of directives. * * @codeGenApi */ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) { const lView = getLView(); const tView = getTView(); const adjustedIndex = index + HEADER_OFFSET; ngDevMode && assertIndexInRange(lView, adjustedIndex); ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings'); const tNode = tView.firstCreatePass ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) : tView.data[adjustedIndex]; setCurrentTNode(tNode, true); ngDevMode && ngDevMode.rendererCreateComment++; const native = lView[adjustedIndex] = lView[RENDERER].createComment(ngDevMode ? 'ng-container' : ''); appendChild(tView, lView, native, tNode); attachPatchData(native, lView); if (isDirectiveHost(tNode)) { createDirectivesInstances(tView, lView, tNode); executeContentQueries(tView, tNode, lView); } if (localRefsIndex != null) { saveResolvedLocalsInData(lView, tNode); } } /** * Mark the end of the <ng-container>. * * @codeGenApi */ function ɵɵelementContainerEnd() { let currentTNode = getCurrentTNode(); const tView = getTView(); if (isCurrentTNodeParent()) { setCurrentTNodeAsNotParent(); } else { ngDevMode && assertHasParent(currentTNode); currentTNode = currentTNode.parent; setCurrentTNode(currentTNode, false); } ngDevMode && assertTNodeType(currentTNode, 8 /* ElementContainer */); if (tView.firstCreatePass) { registerPostOrderHooks(tView, currentTNode); if (isContentQueryHost(currentTNode)) { tView.queries.elementEnd(currentTNode); } } } /** * Creates an empty logical container using {@link elementContainerStart} * and {@link elementContainerEnd} * * @param index Index of the element in the LView array * @param attrsIndex Index of the container attributes in the `consts` array. * @param localRefsIndex Index of the container's local references in the `consts` array. * * @codeGenApi */ function ɵɵelementContainer(index, attrsIndex, localRefsIndex) { ɵɵelementContainerStart(index, attrsIndex, localRefsIndex); ɵɵelementContainerEnd(); } /** * Returns the current OpaqueViewState instance. * * Used in conjunction with the restoreView() instruction to save a snapshot * of the current view and restore it when listeners are invoked. This allows * walking the declaration view tree in listeners to get vars from parent views. * * @codeGenApi */ function ɵɵgetCurrentView() { return getLView(); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Determine if the argument is shaped like a Promise */ function isPromise(obj) { // allow any Promise/A+ compliant thenable. // It's up to the caller to ensure that obj.then conforms to the spec return !!obj && typeof obj.then === 'function'; } /** * Determine if the argument is a Subscribable */ function isSubscribable(obj) { return !!obj && typeof obj.subscribe === 'function'; } /** * Determine if the argument is an Observable * * Strictly this tests that the `obj` is `Subscribable`, since `Observable` * types need additional methods, such as `lift()`. But it is adequate for our * needs since within the Angular framework code we only ever need to use the * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects * into `Observable` as needed. */ const isObservable = isSubscribable; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Adds an event listener to the current node. * * If an output exists on one of the node's directives, it also subscribes to the output * and saves the subscription for later cleanup. * * @param eventName Name of the event * @param listenerFn The function to be called when event emits * @param useCapture Whether or not to use capture in event listener * @param eventTargetResolver Function that returns global target information in case this listener * should be attached to a global object like window, document or body * * @codeGenApi */ function ɵɵlistener(eventName, listenerFn, useCapture = false, eventTargetResolver) { const lView = getLView(); const tView = getTView(); const tNode = getCurrentTNode(); listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, useCapture, eventTargetResolver); return ɵɵlistener; } /** * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive. * * This instruction is for compatibility purposes and is designed to ensure that a * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered * in the component's renderer. Normally all host listeners are evaluated with the * parent component's renderer, but, in the case of animation @triggers, they need * to be evaluated with the sub component's renderer (because that's where the * animation triggers are defined). * * Do not use this instruction as a replacement for `listener`. This instruction * only exists to ensure compatibility with the ViewEngine's host binding behavior. * * @param eventName Name of the event * @param listenerFn The function to be called when event emits * @param useCapture Whether or not to use capture in event listener * @param eventTargetResolver Function that returns global target information in case this listener * should be attached to a global object like window, document or body * * @codeGenApi */ function ɵɵsyntheticHostListener(eventName, listenerFn, useCapture = false, eventTargetResolver) { const tNode = getCurrentTNode(); const lView = getLView(); const tView = getTView(); const currentDef = getCurrentDirectiveDef(tView.data); const renderer = loadComponentRenderer(currentDef, tNode, lView); listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver); return ɵɵsyntheticHostListener; } /** * A utility function that checks if a given element has already an event handler registered for an * event with a specified name. The TView.cleanup data structure is used to find out which events * are registered for a given element. */ function findExistingListener(tView, lView, eventName, tNodeIdx) { const tCleanup = tView.cleanup; if (tCleanup != null) { for (let i = 0; i < tCleanup.length - 1; i += 2) { const cleanupEventName = tCleanup[i]; if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) { // We have found a matching event name on the same node but it might not have been // registered yet, so we must explicitly verify entries in the LView cleanup data // structures. const lCleanup = lView[CLEANUP]; const listenerIdxInLCleanup = tCleanup[i + 2]; return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null; } // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or // 2-element entries (for directive and queries destroy hooks). As such we can encounter // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check // documentation of TView.cleanup for more details of this data structure layout. if (typeof cleanupEventName === 'string') { i += 2; } } } return null; } function listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture = false, eventTargetResolver) { const isTNodeDirectiveHost = isDirectiveHost(tNode); const firstCreatePass = tView.firstCreatePass; const tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView); const context = lView[CONTEXT]; // When the ɵɵlistener instruction was generated and is executed we know that there is either a // native listener or a directive output on this element. As such we we know that we will have to // register a listener and store its cleanup function on LView. const lCleanup = getOrCreateLViewCleanup(lView); ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */); let processOutputs = true; // add native event listener - applicable to elements only if (tNode.type & 3 /* AnyRNode */) { const native = getNativeByTNode(tNode, lView); const resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ; const target = resolved.target || native; const lCleanupIndex = lCleanup.length; const idxOrTargetGetter = eventTargetResolver ? (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])).target : tNode.index; // In order to match current behavior, native DOM event listeners must be added for all // events (including outputs). if (isProceduralRenderer(renderer)) { // There might be cases where multiple directives on the same element try to register an event // handler function for the same event. In this situation we want to avoid registration of // several native listeners as each registration would be intercepted by NgZone and // trigger change detection. This would mean that a single user action would result in several // change detections being invoked. To avoid this situation we want to have only one call to // native handler registration (for the same element and same type of event). // // In order to have just one native event handler in presence of multiple handler functions, // we just register a first handler function as a native event listener and then chain // (coalesce) other handler functions on top of the first native handler function. let existingListener = null; // Please note that the coalescing described here doesn't happen for events specifying an // alternative target (ex. (document:click)) - this is to keep backward compatibility with the // view engine. // Also, we don't have to search for existing listeners is there are no directives // matching on a given node as we can't register multiple event handlers for the same event in // a template (this would mean having duplicate attributes). if (!eventTargetResolver && isTNodeDirectiveHost) { existingListener = findExistingListener(tView, lView, eventName, tNode.index); } if (existingListener !== null) { // Attach a new listener to coalesced listeners list, maintaining the order in which // listeners are registered. For performance reasons, we keep a reference to the last // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through // the entire set each time we need to add a new listener. const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener; lastListenerFn.__ngNextListenerFn__ = listenerFn; existingListener.__ngLastListenerFn__ = listenerFn; processOutputs = false; } else { // The first argument of `listen` function in Procedural Renderer is: // - either a target name (as a string) in case of global target (window, document, body) // - or element reference (in all other cases) listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */); const cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn); ngDevMode && ngDevMode.rendererAddEventListener++; lCleanup.push(listenerFn, cleanupFn); tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1); } } else { listenerFn = wrapListener(tNode, lView, context, listenerFn, true /** preventDefault */); target.addEventListener(eventName, listenerFn, useCapture); ngDevMode && ngDevMode.rendererAddEventListener++; lCleanup.push(listenerFn); tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture); } } else { // Even if there is no native listener to add, we still need to wrap the listener so that OnPush // ancestors are marked dirty when an event occurs. listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */); } // subscribe to directive outputs const outputs = tNode.outputs; let props; if (processOutputs && outputs !== null && (props = outputs[eventName])) { const propsLength = props.length; if (propsLength) { for (let i = 0; i < propsLength; i += 2) { const index = props[i]; ngDevMode && assertIndexInRange(lView, index); const minifiedName = props[i + 1]; const directiveInstance = lView[index]; const output = directiveInstance[minifiedName]; if (ngDevMode && !isObservable(output)) { throw new Error(`@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`); } const subscription = output.subscribe(listenerFn); const idx = lCleanup.length; lCleanup.push(listenerFn, subscription); tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1)); } } } } function executeListenerWithErrorHandling(lView, context, listenerFn, e) { try { profiler(6 /* OutputStart */, context, listenerFn); // Only explicitly returning false from a listener should preventDefault return listenerFn(e) !== false; } catch (error) { handleError(lView, error); return false; } finally { profiler(7 /* OutputEnd */, context, listenerFn); } } /** * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior, * if applicable. * * @param tNode The TNode associated with this listener * @param lView The LView that contains this listener * @param listenerFn The listener function to call * @param wrapWithPreventDefault Whether or not to prevent default behavior * (the procedural renderer does this already, so in those cases, we should skip) */ function wrapListener(tNode, lView, context, listenerFn, wrapWithPreventDefault) { // Note: we are performing most of the work in the listener function itself // to optimize listener registration. return function wrapListenerIn_markDirtyAndPreventDefault(e) { // Ivy uses `Function` as a special token that allows us to unwrap the function // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. if (e === Function) { return listenerFn; } // In order to be backwards compatible with View Engine, events on component host nodes // must also mark the component view itself dirty (i.e. the view that it owns). const startView = tNode.flags & 2 /* isComponentHost */ ? getComponentLViewByIndex(tNode.index, lView) : lView; // See interfaces/view.ts for more on LViewFlags.ManualOnPush if ((lView[FLAGS] & 32 /* ManualOnPush */) === 0) { markViewDirty(startView); } let result = executeListenerWithErrorHandling(lView, context, listenerFn, e); // A just-invoked listener function might have coalesced listeners so we need to check for // their presence and invoke as needed. let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__; while (nextListenerFn) { // We should prevent default if any of the listeners explicitly return false result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result; nextListenerFn = nextListenerFn.__ngNextListenerFn__; } if (wrapWithPreventDefault && result === false) { e.preventDefault(); // Necessary for legacy browsers that don't support preventDefault (e.g. IE) e.returnValue = false; } return result; }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieves a context at the level specified and saves it as the global, contextViewData. * Will get the next level up if level is not specified. * * This is used to save contexts of parent views so they can be bound in embedded views, or * in conjunction with reference() to bind a ref from a parent view. * * @param level The relative level of the view from which to grab context compared to contextVewData * @returns context * * @codeGenApi */ function ɵɵnextContext(level = 1) { return nextContextImpl(level); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Checks a given node against matching projection slots and returns the * determined slot index. Returns "null" if no slot matched the given node. * * This function takes into account the parsed ngProjectAs selector from the * node's attributes. If present, it will check whether the ngProjectAs selector * matches any of the projection slot selectors. */ function matchingProjectionSlotIndex(tNode, projectionSlots) { let wildcardNgContentIndex = null; const ngProjectAsAttrVal = getProjectAsAttrValue(tNode); for (let i = 0; i < projectionSlots.length; i++) { const slotValue = projectionSlots[i]; // The last wildcard projection slot should match all nodes which aren't matching // any selector. This is necessary to be backwards compatible with view engine. if (slotValue === '*') { wildcardNgContentIndex = i; continue; } // If we ran into an `ngProjectAs` attribute, we should match its parsed selector // to the list of selectors, otherwise we fall back to matching against the node. if (ngProjectAsAttrVal === null ? isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) { return i; // first matching selector "captures" a given node } } return wildcardNgContentIndex; } /** * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template. * It takes all the selectors from the entire component's template and decides where * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is * backed by a selector). * * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text, * un-parsed form. * * The parsed form is needed for efficient matching of a node against a given CSS selector. * The un-parsed, textual form is needed for support of the ngProjectAs attribute. * * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more * drawbacks: * - having only a textual form would require runtime parsing of CSS selectors; * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a * template author). * * @param projectionSlots? A collection of projection slots. A projection slot can be based * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match * all nodes which do not match any selector. If not specified, a single wildcard * selector projection slot will be defined. * * @codeGenApi */ function ɵɵprojectionDef(projectionSlots) { const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST]; if (!componentNode.projection) { // If no explicit projection slots are defined, fall back to a single // projection slot with the wildcard selector. const numProjectionSlots = projectionSlots ? projectionSlots.length : 1; const projectionHeads = componentNode.projection = newArray(numProjectionSlots, null); const tails = projectionHeads.slice(); let componentChild = componentNode.child; while (componentChild !== null) { const slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0; if (slotIndex !== null) { if (tails[slotIndex]) { tails[slotIndex].projectionNext = componentChild; } else { projectionHeads[slotIndex] = componentChild; } tails[slotIndex] = componentChild; } componentChild = componentChild.next; } } } /** * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call * to the projectionDef instruction. * * @param nodeIndex * @param selectorIndex: * - 0 when the selector is `*` (or unspecified as this is the default value), * - 1 based index of the selector from the {@link projectionDef} * * @codeGenApi */ function ɵɵprojection(nodeIndex, selectorIndex = 0, attrs) { const lView = getLView(); const tView = getTView(); const tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16 /* Projection */, null, attrs || null); // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views. if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex; // `<ng-content>` has no content setCurrentTNodeAsNotParent(); if ((tProjectionNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) { // re-distribution of projectable nodes is stored on a component's view level applyProjection(tView, lView, tProjectionNode); } } /** * * Update an interpolated property on an element with a lone bound value * * Used when the value passed to a property has 1 interpolated value in it, an no additional text * surrounds that interpolated value: * * ```html * <div title="{{v0}}"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate('title', v0); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate(propName, v0, sanitizer) { ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer); return ɵɵpropertyInterpolate; } /** * * Update an interpolated property on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div title="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix); } return ɵɵpropertyInterpolate1; } /** * * Update an interpolated property on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix); } return ɵɵpropertyInterpolate2; } /** * * Update an interpolated property on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate3( * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix); } return ɵɵpropertyInterpolate3; } /** * * Update an interpolated property on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate4( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix); } return ɵɵpropertyInterpolate4; } /** * * Update an interpolated property on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate5( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix); } return ɵɵpropertyInterpolate5; } /** * * Update an interpolated property on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate6( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix); } return ɵɵpropertyInterpolate6; } /** * * Update an interpolated property on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate7( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix); } return ɵɵpropertyInterpolate7; } /** * * Update an interpolated property on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate8( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix); } return ɵɵpropertyInterpolate8; } /** * Update an interpolated property on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolateV( * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update. * @param values The collection of values and the strings inbetween those values, beginning with a * string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolateV(propName, values, sanitizer) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); if (ngDevMode) { const interpolationInBetween = [values[0]]; // prefix for (let i = 2; i < values.length; i += 2) { interpolationInBetween.push(values[i]); } storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween); } } return ɵɵpropertyInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * NOTE: The word `styling` is used interchangeably as style or class styling. * * This file contains code to link styling instructions together so that they can be replayed in * priority order. The file exists because Ivy styling instruction execution order does not match * that of the priority order. The purpose of this code is to create a linked list so that the * instructions can be traversed in priority order when computing the styles. * * Assume we are dealing with the following code: * ``` * @Component({ * template: ` * <my-cmp [style]=" {color: '#001'} " * [style.color]=" #002 " * dir-style-color-1 * dir-style-color-2> ` * }) * class ExampleComponent { * static ngComp = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#001'}); * ɵɵstyleProp('color', '#002'); * ... * } * } * * @Directive({ * selector: `[dir-style-color-1]', * }) * class Style1Directive { * @HostBinding('style') style = {color: '#005'}; * @HostBinding('style.color') color = '#006'; * * static ngDir = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#005'}); * ɵɵstyleProp('color', '#006'); * ... * } * } * * @Directive({ * selector: `[dir-style-color-2]', * }) * class Style2Directive { * @HostBinding('style') style = {color: '#007'}; * @HostBinding('style.color') color = '#008'; * * static ngDir = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#007'}); * ɵɵstyleProp('color', '#008'); * ... * } * } * * @Directive({ * selector: `my-cmp', * }) * class MyComponent { * @HostBinding('style') style = {color: '#003'}; * @HostBinding('style.color') color = '#004'; * * static ngComp = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#003'}); * ɵɵstyleProp('color', '#004'); * ... * } * } * ``` * * The Order of instruction execution is: * * NOTE: the comment binding location is for illustrative purposes only. * * ``` * // Template: (ExampleComponent) * ɵɵstyleMap({color: '#001'}); // Binding index: 10 * ɵɵstyleProp('color', '#002'); // Binding index: 12 * // MyComponent * ɵɵstyleMap({color: '#003'}); // Binding index: 20 * ɵɵstyleProp('color', '#004'); // Binding index: 22 * // Style1Directive * ɵɵstyleMap({color: '#005'}); // Binding index: 24 * ɵɵstyleProp('color', '#006'); // Binding index: 26 * // Style2Directive * ɵɵstyleMap({color: '#007'}); // Binding index: 28 * ɵɵstyleProp('color', '#008'); // Binding index: 30 * ``` * * The correct priority order of concatenation is: * * ``` * // MyComponent * ɵɵstyleMap({color: '#003'}); // Binding index: 20 * ɵɵstyleProp('color', '#004'); // Binding index: 22 * // Style1Directive * ɵɵstyleMap({color: '#005'}); // Binding index: 24 * ɵɵstyleProp('color', '#006'); // Binding index: 26 * // Style2Directive * ɵɵstyleMap({color: '#007'}); // Binding index: 28 * ɵɵstyleProp('color', '#008'); // Binding index: 30 * // Template: (ExampleComponent) * ɵɵstyleMap({color: '#001'}); // Binding index: 10 * ɵɵstyleProp('color', '#002'); // Binding index: 12 * ``` * * What color should be rendered? * * Once the items are correctly sorted in the list, the answer is simply the last item in the * concatenation list which is `#002`. * * To do so we keep a linked list of all of the bindings which pertain to this element. * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows * us to traverse them in the order of priority. * * |Idx|`TView.data`|`LView` | Notes * |---|------------|-----------------|-------------- * |...| | | * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})` * |11 |`30 | 12` | ... | * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')` * |13 |`10 | 0` | ... | * |...| | | * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})` * |21 |`0 | 22` | ... | * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')` * |23 |`20 | 24` | ... | * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})` * |25 |`22 | 26` | ... | * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')` * |27 |`24 | 28` | ... | * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})` * |29 |`26 | 30` | ... | * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')` * |31 |`28 | 10` | ... | * * The above data structure allows us to re-concatenate the styling no matter which data binding * changes. * * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next * duplicate bit. The duplicate bit if true says there either is a binding with the same name or * there is a map (which may contain the name). This information is useful in knowing if other * styles with higher priority need to be searched for overwrites. * * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in * `tnode_linked_list_spec.ts` for working example. */ let __unused_const_as_closure_does_not_like_standalone_comment_blocks__; /** * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked * list of styles and compute the duplicate flag. * * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`. * * The function works by keeping track of `tStylingRange` which contains two pointers pointing to * the head/tail of the template portion of the styles. * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange` * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange` * * @param tData The `TData` to insert into. * @param tNode `TNode` associated with the styling element. * @param tStylingKey See `TStylingKey`. * @param index location of where `tStyleValue` should be stored (and linked into list.) * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of * template.) * @param isClassBinding True if the associated `tStylingKey` as a `class` styling. * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.) */ function insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) { ngDevMode && assertFirstUpdatePass(getTView()); let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings; let tmplHead = getTStylingRangePrev(tBindings); let tmplTail = getTStylingRangeNext(tBindings); tData[index] = tStylingKeyWithStatic; let isKeyDuplicateOfStatic = false; let tStylingKey; if (Array.isArray(tStylingKeyWithStatic)) { // We are case when the `TStylingKey` contains static fields as well. const staticKeyValueArray = tStylingKeyWithStatic; tStylingKey = staticKeyValueArray[1]; // unwrap. // We need to check if our key is present in the static so that we can mark it as duplicate. if (tStylingKey === null || keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) { // tStylingKey is present in the statics, need to mark it as duplicate. isKeyDuplicateOfStatic = true; } } else { tStylingKey = tStylingKeyWithStatic; } if (isHostBinding) { // We are inserting host bindings // If we don't have template bindings then `tail` is 0. const hasTemplateBindings = tmplTail !== 0; // This is important to know because that means that the `head` can't point to the first // template bindings (there are none.) Instead the head points to the tail of the template. if (hasTemplateBindings) { // template head's "prev" will point to last host binding or to 0 if no host bindings yet const previousNode = getTStylingRangePrev(tData[tmplHead + 1]); tData[index + 1] = toTStylingRange(previousNode, tmplHead); // if a host binding has already been registered, we need to update the next of that host // binding to point to this one if (previousNode !== 0) { // We need to update the template-tail value to point to us. tData[previousNode + 1] = setTStylingRangeNext(tData[previousNode + 1], index); } // The "previous" of the template binding head should point to this host binding tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index); } else { tData[index + 1] = toTStylingRange(tmplHead, 0); // if a host binding has already been registered, we need to update the next of that host // binding to point to this one if (tmplHead !== 0) { // We need to update the template-tail value to point to us. tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index); } // if we don't have template, the head points to template-tail, and needs to be advanced. tmplHead = index; } } else { // We are inserting in template section. // We need to set this binding's "previous" to the current template tail tData[index + 1] = toTStylingRange(tmplTail, 0); ngDevMode && assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.'); if (tmplHead === 0) { tmplHead = index; } else { // We need to update the previous value "next" to point to this binding tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index); } tmplTail = index; } // Now we need to update / compute the duplicates. // Starting with our location search towards head (least priority) if (isKeyDuplicateOfStatic) { tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]); } markDuplicates(tData, tStylingKey, index, true, isClassBinding); markDuplicates(tData, tStylingKey, index, false, isClassBinding); markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding); tBindings = toTStylingRange(tmplHead, tmplTail); if (isClassBinding) { tNode.classBindings = tBindings; } else { tNode.styleBindings = tBindings; } } /** * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual. * * @param tNode `TNode` where the residual is stored. * @param tStylingKey `TStylingKey` to store. * @param tData `TData` associated with the current `LView`. * @param index location of where `tStyleValue` should be stored (and linked into list.) * @param isClassBinding True if the associated `tStylingKey` as a `class` styling. * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.) */ function markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) { const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles; if (residual != null /* or undefined */ && typeof tStylingKey == 'string' && keyValueArrayIndexOf(residual, tStylingKey) >= 0) { // We have duplicate in the residual so mark ourselves as duplicate. tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]); } } /** * Marks `TStyleValue`s as duplicates if another style binding in the list has the same * `TStyleValue`. * * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once * with it set to `false` to search both the previous as well as next items in the list. * * No duplicate case * ``` * [style.color] * [style.width.px] <<- index * [style.height.px] * ``` * * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no * duplicates because `width` is not found in any other part of the linked list. * * Duplicate case * ``` * [style.color] * [style.width.em] * [style.width.px] <<- index * ``` * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]` * because `width` is found in the chain. * * Map case 1 * ``` * [style.width.px] * [style.color] * [style] <<- index * ``` * In the above case adding `[style]` will produce a duplicate with any other bindings because * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`. * * Map case 2 * ``` * [style] * [style.width.px] * [style.color] <<- index * ``` * In the above case adding `[style.color]` will produce a duplicate because there is already a * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or * `width`. * * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates. * NOTE: We use `style` as example, but same logic is applied to `class`es as well. * * @param tData `TData` where the linked list is stored. * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in * the linked list. * @param index Starting location in the linked list to search from * @param isPrevDir Direction. * - `true` for previous (lower priority); * - `false` for next (higher priority). */ function markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) { const tStylingAtIndex = tData[index + 1]; const isMap = tStylingKey === null; let cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex); let foundDuplicate = false; // We keep iterating as long as we have a cursor // AND either: // - we found what we are looking for, OR // - we are a map in which case we have to continue searching even after we find what we were // looking for since we are a wild card and everything needs to be flipped to duplicate. while (cursor !== 0 && (foundDuplicate === false || isMap)) { ngDevMode && assertIndexInRange(tData, cursor); const tStylingValueAtCursor = tData[cursor]; const tStyleRangeAtCursor = tData[cursor + 1]; if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) { foundDuplicate = true; tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) : setTStylingRangePrevDuplicate(tStyleRangeAtCursor); } cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) : getTStylingRangeNext(tStyleRangeAtCursor); } if (foundDuplicate) { // if we found a duplicate, than mark ourselves. tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) : setTStylingRangeNextDuplicate(tStylingAtIndex); } } /** * Determines if two `TStylingKey`s are a match. * * When computing whether a binding contains a duplicate, we need to compare if the instruction * `TStylingKey` has a match. * * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is: * - `color` * - `color` // Match another color * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction * - `['', 'color', 'other', true]` // wrapped `color` so match * - `['', null, 'other', true]` // wrapped `null` so match * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'` * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction * * @param tStylingKeyCursor * @param tStylingKey */ function isStylingMatch(tStylingKeyCursor, tStylingKey) { ngDevMode && assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \'tStylingKey\' has been unwrapped'); if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that // location so we must assume that we have a match. tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it // contains a match. (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) === tStylingKey // If the keys match explicitly than we are a match. ) { return true; } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') { // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has // statics and we need to check those as well. return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >= 0; // see if we are matching the key } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Global state of the parser. (This makes parser non-reentrant, but that is not an issue) const parserState = { textEnd: 0, key: 0, keyEnd: 0, value: 0, valueEnd: 0, }; /** * Retrieves the last parsed `key` of style. * @param text the text to substring the key from. */ function getLastParsedKey(text) { return text.substring(parserState.key, parserState.keyEnd); } /** * Retrieves the last parsed `value` of style. * @param text the text to substring the key from. */ function getLastParsedValue(text) { return text.substring(parserState.value, parserState.valueEnd); } /** * Initializes `className` string for parsing and parses the first token. * * This function is intended to be used in this format: * ``` * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) { * const key = getLastParsedKey(); * ... * } * ``` * @param text `className` to parse * @returns index where the next invocation of `parseClassNameNext` should resume. */ function parseClassName(text) { resetParserState(text); return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd)); } /** * Parses next `className` token. * * This function is intended to be used in this format: * ``` * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) { * const key = getLastParsedKey(); * ... * } * ``` * * @param text `className` to parse * @param index where the parsing should resume. * @returns index where the next invocation of `parseClassNameNext` should resume. */ function parseClassNameNext(text, index) { const end = parserState.textEnd; if (end === index) { return -1; } index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end); return consumeWhitespace(text, index, end); } /** * Initializes `cssText` string for parsing and parses the first key/values. * * This function is intended to be used in this format: * ``` * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) { * const key = getLastParsedKey(); * const value = getLastParsedValue(); * ... * } * ``` * @param text `cssText` to parse * @returns index where the next invocation of `parseStyleNext` should resume. */ function parseStyle(text) { resetParserState(text); return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd)); } /** * Parses the next `cssText` key/values. * * This function is intended to be used in this format: * ``` * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) { * const key = getLastParsedKey(); * const value = getLastParsedValue(); * ... * } * * @param text `cssText` to parse * @param index where the parsing should resume. * @returns index where the next invocation of `parseStyleNext` should resume. */ function parseStyleNext(text, startIndex) { const end = parserState.textEnd; let index = parserState.key = consumeWhitespace(text, startIndex, end); if (end === index) { // we reached an end so just quit return -1; } index = parserState.keyEnd = consumeStyleKey(text, index, end); index = consumeSeparator(text, index, end, 58 /* COLON */); index = parserState.value = consumeWhitespace(text, index, end); index = parserState.valueEnd = consumeStyleValue(text, index, end); return consumeSeparator(text, index, end, 59 /* SEMI_COLON */); } /** * Reset the global state of the styling parser. * @param text The styling text to parse. */ function resetParserState(text) { parserState.key = 0; parserState.keyEnd = 0; parserState.value = 0; parserState.valueEnd = 0; parserState.textEnd = text.length; } /** * Returns index of next non-whitespace character. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at * that location.) */ function consumeWhitespace(text, startIndex, endIndex) { while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* SPACE */) { startIndex++; } return startIndex; } /** * Returns index of last char in class token. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after last char in class token. */ function consumeClassToken(text, startIndex, endIndex) { while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* SPACE */) { startIndex++; } return startIndex; } /** * Consumes all of the characters belonging to style key and token. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after last style key character. */ function consumeStyleKey(text, startIndex, endIndex) { let ch; while (startIndex < endIndex && ((ch = text.charCodeAt(startIndex)) === 45 /* DASH */ || ch === 95 /* UNDERSCORE */ || ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */) || (ch >= 48 /* ZERO */ && ch <= 57 /* NINE */))) { startIndex++; } return startIndex; } /** * Consumes all whitespace and the separator `:` after the style key. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after separator and surrounding whitespace. */ function consumeSeparator(text, startIndex, endIndex, separator) { startIndex = consumeWhitespace(text, startIndex, endIndex); if (startIndex < endIndex) { if (ngDevMode && text.charCodeAt(startIndex) !== separator) { malformedStyleError(text, String.fromCharCode(separator), startIndex); } startIndex++; } return startIndex; } /** * Consumes style value honoring `url()` and `""` text. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after last style value character. */ function consumeStyleValue(text, startIndex, endIndex) { let ch1 = -1; // 1st previous character let ch2 = -1; // 2nd previous character let ch3 = -1; // 3rd previous character let i = startIndex; let lastChIndex = i; while (i < endIndex) { const ch = text.charCodeAt(i++); if (ch === 59 /* SEMI_COLON */) { return lastChIndex; } else if (ch === 34 /* DOUBLE_QUOTE */ || ch === 39 /* SINGLE_QUOTE */) { lastChIndex = i = consumeQuotedText(text, ch, i, endIndex); } else if (startIndex === i - 4 && // We have seen only 4 characters so far "URL(" (Ignore "foo_URL()") ch3 === 85 /* U */ && ch2 === 82 /* R */ && ch1 === 76 /* L */ && ch === 40 /* OPEN_PAREN */) { lastChIndex = i = consumeQuotedText(text, 41 /* CLOSE_PAREN */, i, endIndex); } else if (ch > 32 /* SPACE */) { // if we have a non-whitespace character then capture its location lastChIndex = i; } ch3 = ch2; ch2 = ch1; ch1 = ch & -33 /* UPPER_CASE */; } return lastChIndex; } /** * Consumes all of the quoted characters. * * @param text Text to scan * @param quoteCharCode CharCode of either `"` or `'` quote or `)` for `url(...)`. * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after quoted characters. */ function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) { let ch1 = -1; // 1st previous character let index = startIndex; while (index < endIndex) { const ch = text.charCodeAt(index++); if (ch == quoteCharCode && ch1 !== 92 /* BACK_SLASH */) { return index; } if (ch == 92 /* BACK_SLASH */ && ch1 === 92 /* BACK_SLASH */) { // two back slashes cancel each other out. For example `"\\"` should properly end the // quotation. (It should not assume that the last `"` is escaped.) ch1 = 0; } else { ch1 = ch; } } throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) : new Error(); } function malformedStyleError(text, expecting, index) { ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here'); throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' + text.substring(index, index + 1) + '<<]' + text.substr(index + 1) + `'. Expecting '${expecting}'.`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Update a style binding on an element with the provided value. * * If the style value is falsy then it will be removed from the element * (or assigned a different value depending if there are any styles placed * on the element with `styleMap` or any static styles that are * present from when the element was created with `styling`). * * Note that the styling element is updated as part of `stylingApply`. * * @param prop A valid CSS property. * @param value New value to write (`null` or an empty string to remove). * @param suffix Optional suffix. Used with scalar values to add unit such as `px`. * * Note that this will apply the provided style value to the host element if this function is called * within a host binding function. * * @codeGenApi */ function ɵɵstyleProp(prop, value, suffix) { checkStylingProperty(prop, value, suffix, false); return ɵɵstyleProp; } /** * Update a class binding on an element with the provided value. * * This instruction is meant to handle the `[class.foo]="exp"` case and, * therefore, the class binding itself must already be allocated using * `styling` within the creation block. * * @param prop A valid CSS class (only one). * @param value A true/false value which will turn the class on or off. * * Note that this will apply the provided class value to the host element if this function * is called within a host binding function. * * @codeGenApi */ function ɵɵclassProp(className, value) { checkStylingProperty(className, value, null, true); return ɵɵclassProp; } /** * Update style bindings using an object literal on an element. * * This instruction is meant to apply styling via the `[style]="exp"` template bindings. * When styles are applied to the element they will then be updated with respect to * any styles/classes set via `styleProp`. If any styles are set to falsy * then they will be removed from the element. * * Note that the styling instruction will not be applied until `stylingApply` is called. * * @param styles A key/value style map of the styles that will be applied to the given element. * Any missing styles (that have already been applied to the element beforehand) will be * removed (unset) from the element's styling. * * Note that this will apply the provided styleMap value to the host element if this function * is called within a host binding. * * @codeGenApi */ function ɵɵstyleMap(styles) { checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false); } /** * Parse text as style and add values to KeyValueArray. * * This code is pulled out to a separate function so that it can be tree shaken away if it is not * needed. It is only referenced from `ɵɵstyleMap`. * * @param keyValueArray KeyValueArray to add parsed values to. * @param text text to parse. */ function styleStringParser(keyValueArray, text) { for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) { styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text)); } } /** * Update class bindings using an object literal or class-string on an element. * * This instruction is meant to apply styling via the `[class]="exp"` template bindings. * When classes are applied to the element they will then be updated with * respect to any styles/classes set via `classProp`. If any * classes are set to falsy then they will be removed from the element. * * Note that the styling instruction will not be applied until `stylingApply` is called. * Note that this will the provided classMap value to the host element if this function is called * within a host binding. * * @param classes A key/value map or string of CSS classes that will be added to the * given element. Any missing classes (that have already been applied to the element * beforehand) will be removed (unset) from the element's list of CSS classes. * * @codeGenApi */ function ɵɵclassMap(classes) { checkStylingMap(keyValueArraySet, classStringParser, classes, true); } /** * Parse text as class and add values to KeyValueArray. * * This code is pulled out to a separate function so that it can be tree shaken away if it is not * needed. It is only referenced from `ɵɵclassMap`. * * @param keyValueArray KeyValueArray to add parsed values to. * @param text text to parse. */ function classStringParser(keyValueArray, text) { for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) { keyValueArraySet(keyValueArray, getLastParsedKey(text), true); } } /** * Common code between `ɵɵclassProp` and `ɵɵstyleProp`. * * @param prop property name. * @param value binding value. * @param suffix suffix for the property (e.g. `em` or `px`) * @param isClassBased `true` if `class` change (`false` if `style`) */ function checkStylingProperty(prop, value, suffix, isClassBased) { const lView = getLView(); const tView = getTView(); // Styling instructions use 2 slots per binding. // 1. one for the value / TStylingKey // 2. one for the intermittent-value / TStylingRange const bindingIndex = incrementBindingIndex(2); if (tView.firstUpdatePass) { stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased); } if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) { const tNode = tView.data[getSelectedIndex()]; updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex); } } /** * Common code between `ɵɵclassMap` and `ɵɵstyleMap`. * * @param keyValueArraySet (See `keyValueArraySet` in "util/array_utils") Gets passed in as a * function so that `style` can be processed. This is done for tree shaking purposes. * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class` * have different parsers.) * @param value bound value from application * @param isClassBased `true` if `class` change (`false` if `style`) */ function checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) { const tView = getTView(); const bindingIndex = incrementBindingIndex(2); if (tView.firstUpdatePass) { stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased); } const lView = getLView(); if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) { // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the // if so as not to read unnecessarily. const tNode = tView.data[getSelectedIndex()]; if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) { if (ngDevMode) { // verify that if we are shadowing then `TData` is appropriately marked so that we skip // processing this binding in styling resolution. const tStylingKey = tView.data[bindingIndex]; assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \'false\''); } // VE does not concatenate the static portion like we are doing here. // Instead VE just ignores the static completely if dynamic binding is present. // Because of locality we have already set the static portion because we don't know if there // is a dynamic portion until later. If we would ignore the static portion it would look like // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong // thing as it would think that the static portion was removed. For this reason we // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed. let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost; ngDevMode && isClassBased === false && staticPrefix !== null && assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \';\''); if (staticPrefix !== null) { // We want to make sure that falsy values of `value` become empty strings. value = concatStringsWithSpace(staticPrefix, value ? value : ''); } // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`. // This takes over the `[style]` binding. (Same for `[class]`) setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased); } else { updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex); } } } /** * Determines when the binding is in `hostBindings` section * * @param tView Current `TView` * @param bindingIndex index of binding which we would like if it is in `hostBindings` */ function isInHostBindings(tView, bindingIndex) { // All host bindings are placed after the expando section. return bindingIndex >= tView.expandoStartIndex; } /** * Collects the necessary information to insert the binding into a linked list of style bindings * using `insertTStylingBinding`. * * @param tView `TView` where the binding linked list will be stored. * @param tStylingKey Property/key of the binding. * @param bindingIndex Index of binding associated with the `prop` * @param isClassBased `true` if `class` change (`false` if `style`) */ function stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) { ngDevMode && assertFirstUpdatePass(tView); const tData = tView.data; if (tData[bindingIndex + 1] === null) { // The above check is necessary because we don't clear first update pass until first successful // (no exception) template execution. This prevents the styling instruction from double adding // itself to the list. // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the // if so as not to read unnecessarily. const tNode = tData[getSelectedIndex()]; ngDevMode && assertDefined(tNode, 'TNode expected'); const isHostBindings = isInHostBindings(tView, bindingIndex); if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) { // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding. // If there is a directive which uses `@Input('style')` or `@Input('class')` than // we need to neutralize this binding since that directive is shadowing it. // We turn this into a noop by setting the key to `false` tStylingKey = false; } tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased); insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased); } } /** * Adds static styling information to the binding if applicable. * * The linked list of styles not only stores the list and keys, but also stores static styling * information on some of the keys. This function determines if the key should contain the styling * information and computes it. * * See `TStylingStatic` for more details. * * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey` * @param isClassBased `true` if `class` (`false` if `style`) */ function wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) { const hostDirectiveDef = getCurrentDirectiveDef(tData); let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles; if (hostDirectiveDef === null) { // We are in template node. // If template node already had styling instruction then it has already collected the static // styling and there is no need to collect them again. We know that we are the first styling // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet). const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0; if (isFirstStylingInstructionInTemplate) { // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point // they are already merged and it would not be possible to figure which property belongs where // in the priority. stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased); stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased); // We know that if we have styling binding in template we can't have residual. residual = null; } } else { // We are in host binding node and there was no binding instruction in template node. // This means that we need to compute the residual. const directiveStylingLast = tNode.directiveStylingLast; const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef; if (isFirstStylingInstructionInHostBinding) { stylingKey = collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased); if (residual === null) { // - If `null` than either: // - Template styling instruction already ran and it has consumed the static // styling into its `TStylingKey` and so there is no need to update residual. Instead // we need to update the `TStylingKey` associated with the first template node // instruction. OR // - Some other styling instruction ran and determined that there are no residuals let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased); if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) { // Only recompute if `templateStylingKey` had static values. (If no static value found // then there is nothing to do since this operation can only produce less static keys, not // more.) templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased); templateStylingKey = collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased); setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey); } } else { // We only need to recompute residual if it is not `null`. // - If existing residual (implies there was no template styling). This means that some of // the statics may have moved from the residual to the `stylingKey` and so we have to // recompute. // - If `undefined` this is the first time we are running. residual = collectResidual(tData, tNode, isClassBased); } } } if (residual !== undefined) { isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual); } return stylingKey; } /** * Retrieve the `TStylingKey` for the template styling instruction. * * This is needed since `hostBinding` styling instructions are inserted after the template * instruction. While the template instruction needs to update the residual in `TNode` the * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because * the template instruction is downstream from the `hostBindings` instructions. * * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param isClassBased `true` if `class` (`false` if `style`) * @return `TStylingKey` if found or `undefined` if not found. */ function getTemplateHeadTStylingKey(tData, tNode, isClassBased) { const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings; if (getTStylingRangeNext(bindings) === 0) { // There does not seem to be a styling instruction in the `template`. return undefined; } return tData[getTStylingRangePrev(bindings)]; } /** * Update the `TStylingKey` of the first template instruction in `TNode`. * * Logically `hostBindings` styling instructions are of lower priority than that of the template. * However, they execute after the template styling instructions. This means that they get inserted * in front of the template styling instructions. * * If we have a template styling instruction and a new `hostBindings` styling instruction is * executed it means that it may need to steal static fields from the template instruction. This * method allows us to update the first template instruction `TStylingKey` with a new value. * * Assume: * ``` * <div my-dir style="color: red" [style.color]="tmplExp"></div> * * @Directive({ * host: { * 'style': 'width: 100px', * '[style.color]': 'dirExp', * } * }) * class MyDir {} * ``` * * when `[style.color]="tmplExp"` executes it creates this data structure. * ``` * ['', 'color', 'color', 'red', 'width', '100px'], * ``` * * The reason for this is that the template instruction does not know if there are styling * instructions and must assume that there are none and must collect all of the static styling. * (both * `color' and 'width`) * * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list. * ``` * ['', 'color', 'width', '100px'], // newly inserted * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong * ``` * * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to * update it like so: * ``` * ['', 'color', 'width', '100px'], * ['', 'color', 'color', 'red'], // UPDATE * ``` * * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param isClassBased `true` if `class` (`false` if `style`) * @param tStylingKey New `TStylingKey` which is replacing the old one. */ function setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) { const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings; ngDevMode && assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.'); tData[getTStylingRangePrev(bindings)] = tStylingKey; } /** * Collect all static values after the current `TNode.directiveStylingLast` index. * * Collect the remaining styling information which has not yet been collected by an existing * styling instruction. * * @param tData `TData` where the `DirectiveDefs` are stored. * @param tNode `TNode` which contains the directive range. * @param isClassBased `true` if `class` (`false` if `style`) */ function collectResidual(tData, tNode, isClassBased) { let residual = undefined; const directiveEnd = tNode.directiveEnd; ngDevMode && assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.'); // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are // collecting things after the last `hostBindings` directive which had a styling instruction.) for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) { const attrs = tData[i].hostAttrs; residual = collectStylingFromTAttrs(residual, attrs, isClassBased); } return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased); } /** * Collect the static styling information with lower priority than `hostDirectiveDef`. * * (This is opposite of residual styling.) * * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static * styling. (Or `null` if template styling) * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param stylingKey Existing `TStylingKey` to update or wrap. * @param isClassBased `true` if `class` (`false` if `style`) */ function collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) { // We need to loop because there can be directives which have `hostAttrs` but don't have // `hostBindings` so this loop catches up to the current directive.. let currentDirective = null; const directiveEnd = tNode.directiveEnd; let directiveStylingLast = tNode.directiveStylingLast; if (directiveStylingLast === -1) { directiveStylingLast = tNode.directiveStart; } else { directiveStylingLast++; } while (directiveStylingLast < directiveEnd) { currentDirective = tData[directiveStylingLast]; ngDevMode && assertDefined(currentDirective, 'expected to be defined'); stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased); if (currentDirective === hostDirectiveDef) break; directiveStylingLast++; } if (hostDirectiveDef !== null) { // we only advance the styling cursor if we are collecting data from host bindings. // Template executes before host bindings and so if we would update the index, // host bindings would not get their statics. tNode.directiveStylingLast = directiveStylingLast; } return stylingKey; } /** * Convert `TAttrs` into `TStylingStatic`. * * @param stylingKey existing `TStylingKey` to update or wrap. * @param attrs `TAttributes` to process. * @param isClassBased `true` if `class` (`false` if `style`) */ function collectStylingFromTAttrs(stylingKey, attrs, isClassBased) { const desiredMarker = isClassBased ? 1 /* Classes */ : 2 /* Styles */; let currentMarker = -1 /* ImplicitAttributes */; if (attrs !== null) { for (let i = 0; i < attrs.length; i++) { const item = attrs[i]; if (typeof item === 'number') { currentMarker = item; } else { if (currentMarker === desiredMarker) { if (!Array.isArray(stylingKey)) { stylingKey = stylingKey === undefined ? [] : ['', stylingKey]; } keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]); } } } } return stylingKey === undefined ? null : stylingKey; } /** * Convert user input to `KeyValueArray`. * * This function takes user input which could be `string`, Object literal, or iterable and converts * it into a consistent representation. The output of this is `KeyValueArray` (which is an array * where * even indexes contain keys and odd indexes contain values for those keys). * * The advantage of converting to `KeyValueArray` is that we can perform diff in an input * independent * way. * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be * applied) * * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the * difference in linear fashion without the need to allocate any additional data. * * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine * which values need to be deleted, over the new `Map` to determine additions, and we would have to * keep additional `Map` to keep track of duplicates or items which have not yet been visited. * * @param keyValueArraySet (See `keyValueArraySet` in "util/array_utils") Gets passed in as a * function so that `style` can be processed. This is done * for tree shaking purposes. * @param stringParser The parser is passed in so that it will be tree shakable. See * `styleStringParser` and `classStringParser` * @param value The value to parse/convert to `KeyValueArray` */ function toStylingKeyValueArray(keyValueArraySet, stringParser, value) { if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY; const styleKeyValueArray = []; const unwrappedValue = unwrapSafeValue(value); if (Array.isArray(unwrappedValue)) { for (let i = 0; i < unwrappedValue.length; i++) { keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true); } } else if (typeof unwrappedValue === 'object') { for (const key in unwrappedValue) { if (unwrappedValue.hasOwnProperty(key)) { keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]); } } } else if (typeof unwrappedValue === 'string') { stringParser(styleKeyValueArray, unwrappedValue); } else { ngDevMode && throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue); } return styleKeyValueArray; } /** * Set a `value` for a `key`. * * See: `keyValueArraySet` for details * * @param keyValueArray KeyValueArray to add to. * @param key Style key to add. * @param value The value to set. */ function styleKeyValueArraySet(keyValueArray, key, value) { keyValueArraySet(keyValueArray, key, unwrapSafeValue(value)); } /** * Update map based styling. * * Map based styling could be anything which contains more than one binding. For example `string`, * or object literal. Dealing with all of these types would complicate the logic so * instead this function expects that the complex input is first converted into normalized * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it * very cheap to compute deltas between the previous and current value. * * @param tView Associated `TView.data` contains the linked list of binding priorities. * @param tNode `TNode` where the binding is located. * @param lView `LView` contains the values associated with other styling binding at this `TNode`. * @param renderer Renderer to use if any updates. * @param oldKeyValueArray Previous value represented as `KeyValueArray` * @param newKeyValueArray Current value represented as `KeyValueArray` * @param isClassBased `true` if `class` (`false` if `style`) * @param bindingIndex Binding index of the binding. */ function updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) { if (oldKeyValueArray === NO_CHANGE) { // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray. oldKeyValueArray = EMPTY_ARRAY; } let oldIndex = 0; let newIndex = 0; let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null; let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null; while (oldKey !== null || newKey !== null) { ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?'); ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?'); const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined; const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined; let setKey = null; let setValue = undefined; if (oldKey === newKey) { // UPDATE: Keys are equal => new value is overwriting old value. oldIndex += 2; newIndex += 2; if (oldValue !== newValue) { setKey = newKey; setValue = newValue; } } else if (newKey === null || oldKey !== null && oldKey < newKey) { // DELETE: oldKey key is missing or we did not find the oldKey in the newValue // (because the keyValueArray is sorted and `newKey` is found later alphabetically). // `"background" < "color"` so we need to delete `"background"` because it is not found in the // new array. oldIndex += 2; setKey = oldKey; } else { // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key. // `"color" > "background"` so we need to add `color` because it is in new array but not in // old array. ngDevMode && assertDefined(newKey, 'Expecting to have a valid key'); newIndex += 2; setKey = newKey; setValue = newValue; } if (setKey !== null) { updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex); } oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null; newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null; } } /** * Update a simple (property name) styling. * * This function takes `prop` and updates the DOM to that value. The function takes the binding * value as well as binding priority into consideration to determine which value should be written * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.) * * @param tView Associated `TView.data` contains the linked list of binding priorities. * @param tNode `TNode` where the binding is located. * @param lView `LView` contains the values associated with other styling binding at this `TNode`. * @param renderer Renderer to use if any updates. * @param prop Either style property name or a class name. * @param value Either style value for `prop` or `true`/`false` if `prop` is class. * @param isClassBased `true` if `class` (`false` if `style`) * @param bindingIndex Binding index of the binding. */ function updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) { if (!(tNode.type & 3 /* AnyRNode */)) { // It is possible to have styling on non-elements (such as ng-container). // This is rare, but it does happen. In such a case, just ignore the binding. return; } const tData = tView.data; const tRange = tData[bindingIndex + 1]; const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) : undefined; if (!isStylingValuePresent(higherPriorityValue)) { // We don't have a next duplicate, or we did not find a duplicate value. if (!isStylingValuePresent(value)) { // We should delete current value or restore to lower priority value. if (getTStylingRangePrevDuplicate(tRange)) { // We have a possible prev duplicate, let's retrieve it. value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased); } } const rNode = getNativeByIndex(getSelectedIndex(), lView); applyStyling(renderer, isClassBased, rNode, prop, value); } } /** * Search for styling value with higher priority which is overwriting current value, or a * value of lower priority to which we should fall back if the value is `undefined`. * * When value is being applied at a location, related values need to be consulted. * - If there is a higher priority binding, we should be using that one instead. * For example `<div [style]="{color:exp1}" [style.color]="exp2">` change to `exp1` * requires that we check `exp2` to see if it is set to value other than `undefined`. * - If there is a lower priority binding and we are changing to `undefined` * For example `<div [style]="{color:exp1}" [style.color]="exp2">` change to `exp2` to * `undefined` requires that we check `exp1` (and static values) and use that as new value. * * NOTE: The styling stores two values. * 1. The raw value which came from the application is stored at `index + 0` location. (This value * is used for dirty checking). * 2. The normalized value is stored at `index + 1`. * * @param tData `TData` used for traversing the priority. * @param tNode `TNode` to use for resolving static styling. Also controls search direction. * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true. * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value. * - `null` search prev and go all the way to end. Return last value where * `isStylingValuePresent(value)` is true. * @param lView `LView` used for retrieving the actual values. * @param prop Property which we are interested in. * @param index Starting index in the linked list of styling bindings where the search should start. * @param isClassBased `true` if `class` (`false` if `style`) */ function findStylingValue(tData, tNode, lView, prop, index, isClassBased) { // `TNode` to use for resolving static styling. Also controls search direction. // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true. // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value. // - `null` search prev and go all the way to end. Return last value where // `isStylingValuePresent(value)` is true. const isPrevDirection = tNode === null; let value = undefined; while (index > 0) { const rawKey = tData[index]; const containsStatics = Array.isArray(rawKey); // Unwrap the key if we contain static values. const key = containsStatics ? rawKey[1] : rawKey; const isStylingMap = key === null; let valueAtLViewIndex = lView[index + 1]; if (valueAtLViewIndex === NO_CHANGE) { // In firstUpdatePass the styling instructions create a linked list of styling. // On subsequent passes it is possible for a styling instruction to try to read a binding // which // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that // we have `undefined` (or empty array in case of styling-map instruction) instead. This // allows the resolution to apply the value (which may later be overwritten when the // binding actually executes.) valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined; } let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) : key === prop ? valueAtLViewIndex : undefined; if (containsStatics && !isStylingValuePresent(currentValue)) { currentValue = keyValueArrayGet(rawKey, prop); } if (isStylingValuePresent(currentValue)) { value = currentValue; if (isPrevDirection) { return value; } } const tRange = tData[index + 1]; index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange); } if (tNode !== null) { // in case where we are going in next direction AND we did not find anything, we need to // consult residual styling let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles; if (residual != null /** OR residual !=== undefined */) { value = keyValueArrayGet(residual, prop); } } return value; } /** * Determines if the binding value should be used (or if the value is 'undefined' and hence priority * resolution should be used.) * * @param value Binding style value. */ function isStylingValuePresent(value) { // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't // have an opinion as to what this binding should be and you should consult other bindings by // priority to determine the valid value. // This is extracted into a single function so that we have a single place to control this. return value !== undefined; } /** * Normalizes and/or adds a suffix to the value. * * If value is `null`/`undefined` no suffix is added * @param value * @param suffix */ function normalizeSuffix(value, suffix) { if (value == null /** || value === undefined */) { // do nothing } else if (typeof suffix === 'string') { value = value + suffix; } else if (typeof value === 'object') { value = stringify(unwrapSafeValue(value)); } return value; } /** * Tests if the `TNode` has input shadow. * * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or * `@Input('class')` as input. * * @param tNode `TNode` which we would like to see if it has shadow. * @param isClassBased `true` if `class` (`false` if `style`) */ function hasStylingInputShadow(tNode, isClassBased) { return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Create static text node * * @param index Index of the node in the data array * @param value Static string value to write. * * @codeGenApi */ function ɵɵtext(index, value = '') { const lView = getLView(); const tView = getTView(); const adjustedIndex = index + HEADER_OFFSET; ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings'); ngDevMode && assertIndexInRange(lView, adjustedIndex); const tNode = tView.firstCreatePass ? getOrCreateTNode(tView, adjustedIndex, 1 /* Text */, value, null) : tView.data[adjustedIndex]; const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value); appendChild(tView, lView, textNative, tNode); // Text nodes are self closing. setCurrentTNode(tNode, false); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update text content with a lone bound value * * Used when a text node has 1 interpolated value in it, an no additional text * surrounds that interpolated value: * * ```html * <div>{{v0}}</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate(v0); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate(v0) { ɵɵtextInterpolate1('', v0, ''); return ɵɵtextInterpolate; } /** * * Update text content with single bound value surrounded by other text. * * Used when a text node has 1 interpolated value in it: * * ```html * <div>prefix{{v0}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate1('prefix', v0, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate1(prefix, v0, suffix) { const lView = getLView(); const interpolated = interpolation1(lView, prefix, v0, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate1; } /** * * Update text content with 2 bound values surrounded by other text. * * Used when a text node has 2 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) { const lView = getLView(); const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate2; } /** * * Update text content with 3 bound values surrounded by other text. * * Used when a text node has 3 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate3( * 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) { const lView = getLView(); const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate3; } /** * * Update text content with 4 bound values surrounded by other text. * * Used when a text node has 4 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate4( * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see ɵɵtextInterpolateV * @codeGenApi */ function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const lView = getLView(); const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate4; } /** * * Update text content with 5 bound values surrounded by other text. * * Used when a text node has 5 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate5( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const lView = getLView(); const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate5; } /** * * Update text content with 6 bound values surrounded by other text. * * Used when a text node has 6 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate6( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const lView = getLView(); const interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate6; } /** * * Update text content with 7 bound values surrounded by other text. * * Used when a text node has 7 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate7( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const lView = getLView(); const interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate7; } /** * * Update text content with 8 bound values surrounded by other text. * * Used when a text node has 8 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate8( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const lView = getLView(); const interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate8; } /** * Update text content with 9 or more bound values other surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolateV( * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` *. * @param values The collection of values and the strings in between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵtextInterpolateV(values) { const lView = getLView(); const interpolated = interpolationV(lView, values); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update an interpolated class on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div class="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate1('prefix', v0, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate1(prefix, v0, suffix) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate3( * 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate4( * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate5( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate6( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate7( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate8( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * Update an interpolated class on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolateV( * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` *. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @codeGenApi */ function ɵɵclassMapInterpolateV(values) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update an interpolated style on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div style="key: {{v0}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate1(prefix, v0, suffix) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate3( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate4( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate5( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; * key5: {{v5}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate6( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}}; * key6: {{v6}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate7( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * '; key6: ', v6, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}}; * key6: {{v6}}; key7: {{v7}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate8( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * '; key6: ', v6, '; key7: ', v7, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); ɵɵstyleMap(interpolatedValue); } /** * Update an interpolated style on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}}; * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolateV( * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']); * ``` *. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`) * @codeGenApi */ function ɵɵstyleMapInterpolateV(values) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); ɵɵstyleMap(interpolatedValue); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update an interpolated style property on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div style.color="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate1; } /** * * Update an interpolated style property on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate2; } /** * * Update an interpolated style property on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate3; } /** * * Update an interpolated style property on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate4; } /** * * Update an interpolated style property on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate5; } /** * * Update an interpolated style property on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate6; } /** * * Update an interpolated style property on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate7( * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate7; } /** * * Update an interpolated style property on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, * '-', v7, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate8; } /** * Update an interpolated style property on an element with 9 or more bound values surrounded by * text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"> * </div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolateV( * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`.. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolateV(prop, values, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Update a property on a host element. Only applies to native node properties, not inputs. * * Operates on the element selected by index via the {@link select} instruction. * * @param propName Name of property. Because it is going to DOM, this is not subject to * renaming as part of minification. * @param value New value to write. * @param sanitizer An optional function used to sanitize the value. * @returns This function returns itself so that it may be chained * (e.g. `property('name', ctx.name)('title', ctx.title)`) * * @codeGenApi */ function ɵɵhostProperty(propName, value, sanitizer) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex); } return ɵɵhostProperty; } /** * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive. * * This instruction is for compatibility purposes and is designed to ensure that a * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in * the component's renderer. Normally all host bindings are evaluated with the parent * component's renderer, but, in the case of animation @triggers, they need to be * evaluated with the sub component's renderer (because that's where the animation * triggers are defined). * * Do not use this instruction as a replacement for `elementProperty`. This instruction * only exists to ensure compatibility with the ViewEngine's host binding behavior. * * @param index The index of the element to update in the data array * @param propName Name of property. Because it is going to DOM, this is not subject to * renaming as part of minification. * @param value New value to write. * @param sanitizer An optional function used to sanitize the value. * * @codeGenApi */ function ɵɵsyntheticHostProperty(propName, value, sanitizer) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); const currentDef = getCurrentDirectiveDef(tView.data); const renderer = loadComponentRenderer(currentDef, tNode, lView); elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex); } return ɵɵsyntheticHostProperty; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`. */ if (typeof ngI18nClosureMode === 'undefined') { // These property accesses can be ignored because ngI18nClosureMode will be set to false // when optimizing code and the whole if statement will be dropped. // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure. // NOTE: we need to have it in IIFE so that the tree-shaker is happy. (function () { // tslint:disable-next-line:no-toplevel-property-access _global['ngI18nClosureMode'] = // TODO(FW-1250): validate that this actually, you know, works. // tslint:disable-next-line:no-toplevel-property-access typeof goog !== 'undefined' && typeof goog.getMsg === 'function'; })(); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js const u = undefined; function plural(n) { let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length; if (i === 1 && v === 0) return 1; return 5; } var localeEn = [ 'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u], [ ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'] ], u, [ ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ] ], u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0], ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'], ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \'at\' {0}', u], ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'], ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], 'USD', '$', 'US Dollar', {}, 'ltr', plural ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This const is used to store the locale data registered with `registerLocaleData` */ let LOCALE_DATA = {}; /** * Register locale data to be used internally by Angular. See the * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data. * * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1 */ function registerLocaleData(data, localeId, extraData) { if (typeof localeId !== 'string') { extraData = localeId; localeId = data[LocaleDataIndex.LocaleId]; } localeId = localeId.toLowerCase().replace(/_/g, '-'); LOCALE_DATA[localeId] = data; if (extraData) { LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData; } } /** * Finds the locale data for a given locale. * * @param locale The locale code. * @returns The locale data. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function findLocaleData(locale) { const normalizedLocale = normalizeLocale(locale); let match = getLocaleData(normalizedLocale); if (match) { return match; } // let's try to find a parent locale const parentLocale = normalizedLocale.split('-')[0]; match = getLocaleData(parentLocale); if (match) { return match; } if (parentLocale === 'en') { return localeEn; } throw new Error(`Missing locale data for the locale "${locale}".`); } /** * Retrieves the default currency code for the given locale. * * The default is defined as the first currency which is still in use. * * @param locale The code of the locale whose currency code we want. * @returns The code of the default currency for the given locale. * */ function getLocaleCurrencyCode(locale) { const data = findLocaleData(locale); return data[LocaleDataIndex.CurrencyCode] || null; } /** * Retrieves the plural function used by ICU expressions to determine the plural case to use * for a given locale. * @param locale A locale code for the locale format rules to use. * @returns The plural function for the locale. * @see `NgPlural` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function getLocalePluralCase(locale) { const data = findLocaleData(locale); return data[LocaleDataIndex.PluralCase]; } /** * Helper function to get the given `normalizedLocale` from `LOCALE_DATA` * or from the global `ng.common.locale`. */ function getLocaleData(normalizedLocale) { if (!(normalizedLocale in LOCALE_DATA)) { LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales && _global.ng.common.locales[normalizedLocale]; } return LOCALE_DATA[normalizedLocale]; } /** * Helper function to remove all the locale data from `LOCALE_DATA`. */ function unregisterAllLocaleData() { LOCALE_DATA = {}; } /** * Index of each type of locale data from the locale data array */ var LocaleDataIndex; (function (LocaleDataIndex) { LocaleDataIndex[LocaleDataIndex["LocaleId"] = 0] = "LocaleId"; LocaleDataIndex[LocaleDataIndex["DayPeriodsFormat"] = 1] = "DayPeriodsFormat"; LocaleDataIndex[LocaleDataIndex["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone"; LocaleDataIndex[LocaleDataIndex["DaysFormat"] = 3] = "DaysFormat"; LocaleDataIndex[LocaleDataIndex["DaysStandalone"] = 4] = "DaysStandalone"; LocaleDataIndex[LocaleDataIndex["MonthsFormat"] = 5] = "MonthsFormat"; LocaleDataIndex[LocaleDataIndex["MonthsStandalone"] = 6] = "MonthsStandalone"; LocaleDataIndex[LocaleDataIndex["Eras"] = 7] = "Eras"; LocaleDataIndex[LocaleDataIndex["FirstDayOfWeek"] = 8] = "FirstDayOfWeek"; LocaleDataIndex[LocaleDataIndex["WeekendRange"] = 9] = "WeekendRange"; LocaleDataIndex[LocaleDataIndex["DateFormat"] = 10] = "DateFormat"; LocaleDataIndex[LocaleDataIndex["TimeFormat"] = 11] = "TimeFormat"; LocaleDataIndex[LocaleDataIndex["DateTimeFormat"] = 12] = "DateTimeFormat"; LocaleDataIndex[LocaleDataIndex["NumberSymbols"] = 13] = "NumberSymbols"; LocaleDataIndex[LocaleDataIndex["NumberFormats"] = 14] = "NumberFormats"; LocaleDataIndex[LocaleDataIndex["CurrencyCode"] = 15] = "CurrencyCode"; LocaleDataIndex[LocaleDataIndex["CurrencySymbol"] = 16] = "CurrencySymbol"; LocaleDataIndex[LocaleDataIndex["CurrencyName"] = 17] = "CurrencyName"; LocaleDataIndex[LocaleDataIndex["Currencies"] = 18] = "Currencies"; LocaleDataIndex[LocaleDataIndex["Directionality"] = 19] = "Directionality"; LocaleDataIndex[LocaleDataIndex["PluralCase"] = 20] = "PluralCase"; LocaleDataIndex[LocaleDataIndex["ExtraData"] = 21] = "ExtraData"; })(LocaleDataIndex || (LocaleDataIndex = {})); /** * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`. */ function normalizeLocale(locale) { return locale.toLowerCase().replace(/_/g, '-'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const pluralMapping = ['zero', 'one', 'two', 'few', 'many']; /** * Returns the plural case based on the locale */ function getPluralCase(value, locale) { const plural = getLocalePluralCase(locale)(parseInt(value, 10)); const result = pluralMapping[plural]; return (result !== undefined) ? result : 'other'; } /** * The locale id that the application is using by default (for translations and ICU expressions). */ const DEFAULT_LOCALE_ID = 'en-US'; /** * USD currency code that the application uses by default for CurrencyPipe when no * DEFAULT_CURRENCY_CODE is provided. */ const USD_CURRENCY_CODE = 'USD'; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marks that the next string is an element name. * * See `I18nMutateOpCodes` documentation. */ const ELEMENT_MARKER = { marker: 'element' }; /** * Marks that the next string is comment text need for ICU. * * See `I18nMutateOpCodes` documentation. */ const ICU_MARKER = { marker: 'ICU' }; /** * See `I18nCreateOpCodes` */ var I18nCreateOpCode; (function (I18nCreateOpCode) { /** * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and * `COMMENT`. */ I18nCreateOpCode[I18nCreateOpCode["SHIFT"] = 2] = "SHIFT"; /** * Should the node be appended to parent imedditatly after creation. */ I18nCreateOpCode[I18nCreateOpCode["APPEND_EAGERLY"] = 1] = "APPEND_EAGERLY"; /** * If set the node should be comment (rather than a text) node. */ I18nCreateOpCode[I18nCreateOpCode["COMMENT"] = 2] = "COMMENT"; })(I18nCreateOpCode || (I18nCreateOpCode = {})); // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$6 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The locale id that the application is currently using (for translations and ICU expressions). * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine * but is now defined as a global value. */ let LOCALE_ID = DEFAULT_LOCALE_ID; /** * Sets the locale id that will be used for translations and ICU expressions. * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine * but is now defined as a global value. * * @param localeId */ function setLocaleId(localeId) { assertDefined(localeId, `Expected localeId to be defined`); if (typeof localeId === 'string') { LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-'); } } /** * Gets the locale id that will be used for translations and ICU expressions. * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine * but is now defined as a global value. */ function getLocaleId() { return LOCALE_ID; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Find a node in front of which `currentTNode` should be inserted (takes i18n into account). * * This method determines the `RNode` in front of which we should insert the `currentRNode`. This * takes `TNode.insertBeforeIndex` into account. * * @param parentTNode parent `TNode` * @param currentTNode current `TNode` (The node which we would like to insert into the DOM) * @param lView current `LView` */ function getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) { const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex; const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex; if (insertBeforeIndex === null) { return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView); } else { ngDevMode && assertIndexInRange(lView, insertBeforeIndex); return unwrapRNode(lView[insertBeforeIndex]); } } /** * Process `TNode.insertBeforeIndex` by adding i18n text nodes. * * See `TNode.insertBeforeIndex` */ function processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) { const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex; if (Array.isArray(tNodeInsertBeforeIndex)) { // An array indicates that there are i18n nodes that need to be added as children of this // `childRNode`. These i18n nodes were created before this `childRNode` was available and so // only now can be added. The first element of the array is the normal index where we should // insert the `childRNode`. Additional elements are the extra nodes to be added as children of // `childRNode`. ngDevMode && assertDomNode(childRNode); let i18nParent = childRNode; let anchorRNode = null; if (!(childTNode.type & 3 /* AnyRNode */)) { anchorRNode = i18nParent; i18nParent = parentRElement; } if (i18nParent !== null && (childTNode.flags & 2 /* isComponentHost */) === 0) { for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) { // No need to `unwrapRNode` because all of the indexes point to i18n text nodes. // see `assertDomNode` below. const i18nChild = lView[tNodeInsertBeforeIndex[i]]; nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false); } } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list * `tNode.insertBeforeIndex`. * * Things to keep in mind: * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the * `ɵɵi18nStart` instruction. * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by * `ɵɵelementStart` instruction. * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a * smaller index `TNode` is guaranteed to be created before a larger one) * * We use the above three invariants to determine `TNode.insertBeforeIndex`. * * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However, * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that * the next node is not yet created and therefore we can't insert in front of it. * * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't * know if there will be further `TNode`s inserted after.) * Rule2: If `previousTNode` is created after the `tNode` being inserted, then * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check * previous to see if we can update its `insertBeforeTNode`) * * See `TNode.insertBeforeIndex` for more context. * * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in * reverse order. (If `TNode` would have `previous` this would not be necessary.) * @param newTNode A TNode to add to the `previousTNodes` list. */ function addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) { // Start with Rule1 ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set'); previousTNodes.push(newTNode); if (previousTNodes.length > 1) { for (let i = previousTNodes.length - 2; i >= 0; i--) { const existingTNode = previousTNodes[i]; // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated. // It is safe to ignore them. if (!isI18nText(existingTNode)) { if (isNewTNodeCreatedBefore(existingTNode, newTNode) && getInsertBeforeIndex(existingTNode) === null) { // If it was created before us in time, (and it does not yet have `insertBeforeIndex`) // then add the `insertBeforeIndex`. setInsertBeforeIndex(existingTNode, newTNode.index); } } } } } function isI18nText(tNode) { return !(tNode.type & 64 /* Placeholder */); } function isNewTNodeCreatedBefore(existingTNode, newTNode) { return isI18nText(newTNode) || existingTNode.index > newTNode.index; } function getInsertBeforeIndex(tNode) { const index = tNode.insertBeforeIndex; return Array.isArray(index) ? index[0] : index; } function setInsertBeforeIndex(tNode, value) { const index = tNode.insertBeforeIndex; if (Array.isArray(index)) { // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex` index[0] = value; } else { setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore); tNode.insertBeforeIndex = value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieve `TIcu` at a given `index`. * * The `TIcu` can be stored either directly (if it is nested ICU) OR * it is stored inside tho `TIcuContainer` if it is top level ICU. * * The reason for this is that the top level ICU need a `TNode` so that they are part of the render * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is * expressed (parent ICU may have selected a case which does not contain it.) * * @param tView Current `TView`. * @param index Index where the value should be read from. */ function getTIcu(tView, index) { const value = tView.data[index]; if (value === null || typeof value === 'string') return null; if (ngDevMode && !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) { throwError('We expect to get \'null\'|\'TIcu\'|\'TIcuContainer\', but got: ' + value); } // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it // will be just two cases which fits into the browser inline cache (inline cache can take up to // 4) const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value : value.value; ngDevMode && assertTIcu(tIcu); return tIcu; } /** * Store `TIcu` at a give `index`. * * The `TIcu` can be stored either directly (if it is nested ICU) OR * it is stored inside tho `TIcuContainer` if it is top level ICU. * * The reason for this is that the top level ICU need a `TNode` so that they are part of the render * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is * expressed (parent ICU may have selected a case which does not contain it.) * * @param tView Current `TView`. * @param index Index where the value should be stored at in `Tview.data` * @param tIcu The TIcu to store. */ function setTIcu(tView, index, tIcu) { const tNode = tView.data[index]; ngDevMode && assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \'null\'|\'TIcuContainer\''); if (tNode === null) { tView.data[index] = tIcu; } else { ngDevMode && assertTNodeType(tNode, 32 /* Icu */); tNode.value = tIcu; } } /** * Set `TNode.insertBeforeIndex` taking the `Array` into account. * * See `TNode.insertBeforeIndex` */ function setTNodeInsertBeforeIndex(tNode, index) { ngDevMode && assertTNode(tNode); let insertBeforeIndex = tNode.insertBeforeIndex; if (insertBeforeIndex === null) { setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore); insertBeforeIndex = tNode.insertBeforeIndex = [null /* may be updated to number later */, index]; } else { assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here'); insertBeforeIndex.push(index); } } /** * Create `TNode.type=TNodeType.Placeholder` node. * * See `TNodeType.Placeholder` for more information. */ function createTNodePlaceholder(tView, previousTNodes, index) { const tNode = createTNodeAtIndex(tView, index, 64 /* Placeholder */, null, null); addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode); return tNode; } /** * Returns current ICU case. * * ICU cases are stored as index into the `TIcu.cases`. * At times it is necessary to communicate that the ICU case just switched and that next ICU update * should update all bindings regardless of the mask. In such a case the we store negative numbers * for cases which have just been switched. This function removes the negative flag. */ function getCurrentICUCaseIndex(tIcu, lView) { const currentCase = lView[tIcu.currentCaseLViewIndex]; return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase); } function getParentFromIcuCreateOpCode(mergedCode) { return mergedCode >>> 17 /* SHIFT_PARENT */; } function getRefFromIcuCreateOpCode(mergedCode) { return (mergedCode & 131070 /* MASK_REF */) >>> 1 /* SHIFT_REF */; } function getInstructionFromIcuCreateOpCode(mergedCode) { return mergedCode & 1 /* MASK_INSTRUCTION */; } function icuCreateOpCode(opCode, parentIdx, refIdx) { ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index'); ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index'); return opCode | parentIdx << 17 /* SHIFT_PARENT */ | refIdx << 1 /* SHIFT_REF */; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Keep track of which input bindings in `ɵɵi18nExp` have changed. * * This is used to efficiently update expressions in i18n only when the corresponding input has * changed. * * 1) Each bit represents which of the `ɵɵi18nExp` has changed. * 2) There are 32 bits allowed in JS. * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare * so in practice it should not be an issue.) */ let changeMask = 0b0; /** * Keeps track of which bit needs to be updated in `changeMask` * * This value gets incremented on every call to `ɵɵi18nExp` */ let changeMaskCounter = 0; /** * Keep track of which input bindings in `ɵɵi18nExp` have changed. * * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`. * * @param hasChange did `ɵɵi18nExp` detect a change. */ function setMaskBit(hasChange) { if (hasChange) { changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31)); } changeMaskCounter++; } function applyI18n(tView, lView, index) { if (changeMaskCounter > 0) { ngDevMode && assertDefined(tView, `tView should be defined`); const tI18n = tView.data[index]; // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n` const updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update; const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1; applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask); } // Reset changeMask & maskBit to default for the next update cycle changeMask = 0b0; changeMaskCounter = 0; } /** * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`. * * Creates text (and comment) nodes which are internationalized. * * @param lView Current lView * @param createOpCodes Set of op-codes to apply * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is * a root node. * @param insertInFrontOf DOM node that should be used as an anchor. */ function applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) { const renderer = lView[RENDERER]; for (let i = 0; i < createOpCodes.length; i++) { const opCode = createOpCodes[i++]; const text = createOpCodes[i]; const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT; const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY; const index = opCode >>> I18nCreateOpCode.SHIFT; let rNode = lView[index]; if (rNode === null) { // We only create new DOM nodes if they don't already exist: If ICU switches case back to a // case which was already instantiated, no need to create new DOM nodes. rNode = lView[index] = isComment ? renderer.createComment(text) : createTextNode(renderer, text); } if (appendNow && parentRNode !== null) { nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false); } } } /** * Apply `I18nMutateOpCodes` OpCodes. * * @param tView Current `TView` * @param mutableOpCodes Mutable OpCodes to process * @param lView Current `LView` * @param anchorRNode place where the i18n node should be inserted. */ function applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) { ngDevMode && assertDomNode(anchorRNode); const renderer = lView[RENDERER]; // `rootIdx` represents the node into which all inserts happen. let rootIdx = null; // `rootRNode` represents the real node into which we insert. This can be different from // `lView[rootIdx]` if we have projection. // - null we don't have a parent (as can be the case in when we are inserting into a root of // LView which has no parent.) // - `RElement` The element representing the root after taking projection into account. let rootRNode; for (let i = 0; i < mutableOpCodes.length; i++) { const opCode = mutableOpCodes[i]; if (typeof opCode == 'string') { const textNodeIndex = mutableOpCodes[++i]; if (lView[textNodeIndex] === null) { ngDevMode && ngDevMode.rendererCreateTextNode++; ngDevMode && assertIndexInRange(lView, textNodeIndex); lView[textNodeIndex] = createTextNode(renderer, opCode); } } else if (typeof opCode == 'number') { switch (opCode & 1 /* MASK_INSTRUCTION */) { case 0 /* AppendChild */: const parentIdx = getParentFromIcuCreateOpCode(opCode); if (rootIdx === null) { // The first operation should save the `rootIdx` because the first operation // must insert into the root. (Only subsequent operations can insert into a dynamic // parent) rootIdx = parentIdx; rootRNode = nativeParentNode(renderer, anchorRNode); } let insertInFrontOf; let parentRNode; if (parentIdx === rootIdx) { insertInFrontOf = anchorRNode; parentRNode = rootRNode; } else { insertInFrontOf = null; parentRNode = unwrapRNode(lView[parentIdx]); } // FIXME(misko): Refactor with `processI18nText` if (parentRNode !== null) { // This can happen if the `LView` we are adding to is not attached to a parent `LView`. // In such a case there is no "root" we can attach to. This is fine, as we still need to // create the elements. When the `LView` gets later added to a parent these "root" nodes // get picked up and added. ngDevMode && assertDomNode(parentRNode); const refIdx = getRefFromIcuCreateOpCode(opCode); ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref'); // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n // which can't have components. const child = lView[refIdx]; ngDevMode && assertDomNode(child); nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false); const tIcu = getTIcu(tView, refIdx); if (tIcu !== null && typeof tIcu === 'object') { // If we just added a comment node which has ICU then that ICU may have already been // rendered and therefore we need to re-add it here. ngDevMode && assertTIcu(tIcu); const caseIndex = getCurrentICUCaseIndex(tIcu, lView); if (caseIndex !== null) { applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]); } } } break; case 1 /* Attr */: const elementNodeIndex = opCode >>> 1 /* SHIFT_REF */; const attrName = mutableOpCodes[++i]; const attrValue = mutableOpCodes[++i]; // This code is used for ICU expressions only, since we don't support // directives/components in ICUs, we don't need to worry about inputs here setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null); break; default: throw new Error(`Unable to determine the type of mutate operation for "${opCode}"`); } } else { switch (opCode) { case ICU_MARKER: const commentValue = mutableOpCodes[++i]; const commentNodeIndex = mutableOpCodes[++i]; if (lView[commentNodeIndex] === null) { ngDevMode && assertEqual(typeof commentValue, 'string', `Expected "${commentValue}" to be a comment node value`); ngDevMode && ngDevMode.rendererCreateComment++; ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex); const commentRNode = lView[commentNodeIndex] = createCommentNode(renderer, commentValue); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests) attachPatchData(commentRNode, lView); } break; case ELEMENT_MARKER: const tagName = mutableOpCodes[++i]; const elementNodeIndex = mutableOpCodes[++i]; if (lView[elementNodeIndex] === null) { ngDevMode && assertEqual(typeof tagName, 'string', `Expected "${tagName}" to be an element node tag name`); ngDevMode && ngDevMode.rendererCreateElement++; ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex); const elementRNode = lView[elementNodeIndex] = createElementNode(renderer, tagName, null); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests) attachPatchData(elementRNode, lView); } break; default: ngDevMode && throwError(`Unable to determine the type of mutate operation for "${opCode}"`); } } } } /** * Apply `I18nUpdateOpCodes` OpCodes * * @param tView Current `TView` * @param lView Current `LView` * @param updateOpCodes OpCodes to process * @param bindingsStartIndex Location of the first `ɵɵi18nApply` * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from * `bindingsStartIndex`) */ function applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) { for (let i = 0; i < updateOpCodes.length; i++) { // bit code to check if we should apply the next update const checkBit = updateOpCodes[i]; // Number of opCodes to skip until next set of update codes const skipCodes = updateOpCodes[++i]; if (checkBit & changeMask) { // The value has been updated since last checked let value = ''; for (let j = i + 1; j <= (i + skipCodes); j++) { const opCode = updateOpCodes[j]; if (typeof opCode == 'string') { value += opCode; } else if (typeof opCode == 'number') { if (opCode < 0) { // Negative opCode represent `i18nExp` values offset. value += renderStringify(lView[bindingsStartIndex - opCode]); } else { const nodeIndex = (opCode >>> 2 /* SHIFT_REF */); switch (opCode & 3 /* MASK_OPCODE */) { case 1 /* Attr */: const propName = updateOpCodes[++j]; const sanitizeFn = updateOpCodes[++j]; const tNodeOrTagName = tView.data[nodeIndex]; ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string'); if (typeof tNodeOrTagName === 'string') { // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does // not have TNode), in which case we know that there are no directives, and hence // we use attribute setting. setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn); } else { elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false); } break; case 0 /* Text */: const rText = lView[nodeIndex]; rText !== null && updateTextNode(lView[RENDERER], rText, value); break; case 2 /* IcuSwitch */: applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value); break; case 3 /* IcuUpdate */: applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView); break; } } } } } else { const opCode = updateOpCodes[i + 1]; if (opCode > 0 && (opCode & 3 /* MASK_OPCODE */) === 3 /* IcuUpdate */) { // Special case for the `icuUpdateCase`. It could be that the mask did not match, but // we still need to execute `icuUpdateCase` because the case has changed recently due to // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in // pairs.) const nodeIndex = (opCode >>> 2 /* SHIFT_REF */); const tIcu = getTIcu(tView, nodeIndex); const currentIndex = lView[tIcu.currentCaseLViewIndex]; if (currentIndex < 0) { applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView); } } } i += skipCodes; } } /** * Apply OpCodes associated with updating an existing ICU. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param bindingsStartIndex Location of the first `ɵɵi18nApply` * @param lView Current `LView` */ function applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) { ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex); let activeCaseIndex = lView[tIcu.currentCaseLViewIndex]; if (activeCaseIndex !== null) { let mask = changeMask; if (activeCaseIndex < 0) { // Clear the flag. // Negative number means that the ICU was freshly created and we need to force the update. activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex; // -1 is same as all bits on, which simulates creation since it marks all bits dirty mask = -1; } applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask); } } /** * Apply OpCodes associated with switching a case on ICU. * * This involves tearing down existing case and than building up a new case. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param lView Current `LView` * @param value Value of the case to update to. */ function applyIcuSwitchCase(tView, tIcu, lView, value) { // Rebuild a new case for this ICU const caseIndex = getCaseIndex(tIcu, value); let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView); if (activeCaseIndex !== caseIndex) { applyIcuSwitchCaseRemove(tView, tIcu, lView); lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex; if (caseIndex !== null) { // Add the nodes for the new case const anchorRNode = lView[tIcu.anchorIdx]; if (anchorRNode) { ngDevMode && assertDomNode(anchorRNode); applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode); } } } } /** * Apply OpCodes associated with tearing ICU case. * * This involves tearing down existing case and than building up a new case. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param lView Current `LView` */ function applyIcuSwitchCaseRemove(tView, tIcu, lView) { let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView); if (activeCaseIndex !== null) { const removeCodes = tIcu.remove[activeCaseIndex]; for (let i = 0; i < removeCodes.length; i++) { const nodeOrIcuIndex = removeCodes[i]; if (nodeOrIcuIndex > 0) { // Positive numbers are `RNode`s. const rNode = getNativeByIndex(nodeOrIcuIndex, lView); rNode !== null && nativeRemoveNode(lView[RENDERER], rNode); } else { // Negative numbers are ICUs applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView); } } } } /** * Returns the index of the current case of an ICU expression depending on the main binding value * * @param icuExpression * @param bindingValue The value of the main binding used by this ICU expression */ function getCaseIndex(icuExpression, bindingValue) { let index = icuExpression.cases.indexOf(bindingValue); if (index === -1) { switch (icuExpression.type) { case 1 /* plural */: { const resolvedCase = getPluralCase(bindingValue, getLocaleId()); index = icuExpression.cases.indexOf(resolvedCase); if (index === -1 && resolvedCase !== 'other') { index = icuExpression.cases.indexOf('other'); } break; } case 0 /* select */: { index = icuExpression.cases.indexOf('other'); break; } } } return index === -1 ? null : index; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function loadIcuContainerVisitor() { const _stack = []; let _index = -1; let _lView; let _removes; /** * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer` * to determine which root belong to the ICU. * * Example of usage. * ``` * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView); * let rNode: RNode|null; * while(rNode = nextRNode()) { * console.log(rNode); * } * ``` * * @param tIcuContainerNode Current `TIcuContainerNode` * @param lView `LView` where the `RNode`s should be looked up. */ function icuContainerIteratorStart(tIcuContainerNode, lView) { _lView = lView; while (_stack.length) _stack.pop(); ngDevMode && assertTNodeForLView(tIcuContainerNode, lView); enterIcu(tIcuContainerNode.value, lView); return icuContainerIteratorNext; } function enterIcu(tIcu, lView) { _index = 0; const currentCase = getCurrentICUCaseIndex(tIcu, lView); if (currentCase !== null) { ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1); _removes = tIcu.remove[currentCase]; } else { _removes = EMPTY_ARRAY$1; } } function icuContainerIteratorNext() { if (_index < _removes.length) { const removeOpCode = _removes[_index++]; ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number'); if (removeOpCode > 0) { const rNode = _lView[removeOpCode]; ngDevMode && assertDomNode(rNode); return rNode; } else { _stack.push(_index, _removes); // ICUs are represented by negative indices const tIcuIndex = ~removeOpCode; const tIcu = _lView[TVIEW].data[tIcuIndex]; ngDevMode && assertTIcu(tIcu); enterIcu(tIcu, _lView); return icuContainerIteratorNext(); } } else { if (_stack.length === 0) { return null; } else { _removes = _stack.pop(); _index = _stack.pop(); return icuContainerIteratorNext(); } } } return icuContainerIteratorStart; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Converts `I18nCreateOpCodes` array into a human readable format. * * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled. * This function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nCreateOpCodes` if attached as a method. * @param opcodes `I18nCreateOpCodes` if invoked as a function. */ function i18nCreateOpCodesToString(opcodes) { const createOpCodes = opcodes || (Array.isArray(this) ? this : []); let lines = []; for (let i = 0; i < createOpCodes.length; i++) { const opCode = createOpCodes[i++]; const text = createOpCodes[i]; const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT; const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY; const index = opCode >>> I18nCreateOpCode.SHIFT; lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${JSON.stringify(text)});`); if (appendNow) { lines.push(`parent.appendChild(lView[${index}]);`); } } return lines; } /** * Converts `I18nUpdateOpCodes` array into a human readable format. * * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled. * This function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nUpdateOpCodes` if attached as a method. * @param opcodes `I18nUpdateOpCodes` if invoked as a function. */ function i18nUpdateOpCodesToString(opcodes) { const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : [])); let lines = []; function consumeOpCode(value) { const ref = value >>> 2 /* SHIFT_REF */; const opCode = value & 3 /* MASK_OPCODE */; switch (opCode) { case 0 /* Text */: return `(lView[${ref}] as Text).textContent = $$$`; case 1 /* Attr */: const attrName = parser.consumeString(); const sanitizationFn = parser.consumeFunction(); const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$'; return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`; case 2 /* IcuSwitch */: return `icuSwitchCase(${ref}, $$$)`; case 3 /* IcuUpdate */: return `icuUpdateCase(${ref})`; } throw new Error('unexpected OpCode'); } while (parser.hasMore()) { let mask = parser.consumeNumber(); let size = parser.consumeNumber(); const end = parser.i + size; const statements = []; let statement = ''; while (parser.i < end) { let value = parser.consumeNumberOrString(); if (typeof value === 'string') { statement += value; } else if (value < 0) { // Negative numbers are ref indexes // Here `i` refers to current binding index. It is to signify that the value is relative, // rather than absolute. statement += '${lView[i' + value + ']}'; } else { // Positive numbers are operations. const opCodeText = consumeOpCode(value); statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';'); statement = ''; } } lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`); } return lines; } /** * Converts `I18nCreateOpCodes` array into a human readable format. * * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This * function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nCreateOpCodes` if attached as a method. * @param opcodes `I18nCreateOpCodes` if invoked as a function. */ function icuCreateOpCodesToString(opcodes) { const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : [])); let lines = []; function consumeOpCode(opCode) { const parent = getParentFromIcuCreateOpCode(opCode); const ref = getRefFromIcuCreateOpCode(opCode); switch (getInstructionFromIcuCreateOpCode(opCode)) { case 0 /* AppendChild */: return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`; case 1 /* Attr */: return `(lView[${ref}] as Element).setAttribute("${parser.consumeString()}", "${parser.consumeString()}")`; } throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode)); } let lastRef = -1; while (parser.hasMore()) { let value = parser.consumeNumberStringOrMarker(); if (value === ICU_MARKER) { const text = parser.consumeString(); lastRef = parser.consumeNumber(); lines.push(`lView[${lastRef}] = document.createComment("${text}")`); } else if (value === ELEMENT_MARKER) { const text = parser.consumeString(); lastRef = parser.consumeNumber(); lines.push(`lView[${lastRef}] = document.createElement("${text}")`); } else if (typeof value === 'string') { lastRef = parser.consumeNumber(); lines.push(`lView[${lastRef}] = document.createTextNode("${value}")`); } else if (typeof value === 'number') { const line = consumeOpCode(value); line && lines.push(line); } else { throw new Error('Unexpected value'); } } return lines; } /** * Converts `I18nRemoveOpCodes` array into a human readable format. * * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This * function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nRemoveOpCodes` if attached as a method. * @param opcodes `I18nRemoveOpCodes` if invoked as a function. */ function i18nRemoveOpCodesToString(opcodes) { const removeCodes = opcodes || (Array.isArray(this) ? this : []); let lines = []; for (let i = 0; i < removeCodes.length; i++) { const nodeOrIcuIndex = removeCodes[i]; if (nodeOrIcuIndex > 0) { // Positive numbers are `RNode`s. lines.push(`remove(lView[${nodeOrIcuIndex}])`); } else { // Negative numbers are ICUs lines.push(`removeNestedICU(${~nodeOrIcuIndex})`); } } return lines; } class OpCodeParser { constructor(codes) { this.i = 0; this.codes = codes; } hasMore() { return this.i < this.codes.length; } consumeNumber() { let value = this.codes[this.i++]; assertNumber(value, 'expecting number in OpCode'); return value; } consumeString() { let value = this.codes[this.i++]; assertString(value, 'expecting string in OpCode'); return value; } consumeFunction() { let value = this.codes[this.i++]; if (value === null || typeof value === 'function') { return value; } throw new Error('expecting function in OpCode'); } consumeNumberOrString() { let value = this.codes[this.i++]; if (typeof value === 'string') { return value; } assertNumber(value, 'expecting number or string in OpCode'); return value; } consumeNumberStringOrMarker() { let value = this.codes[this.i++]; if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER || value == ELEMENT_MARKER) { return value; } assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode'); return value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const BINDING_REGEXP = /�(\d+):?\d*�/gi; const ICU_REGEXP = /({\s*�\d+:?\d*�\s*,\s*\S{6}\s*,[\s\S]*})/gi; const NESTED_ICU = /�(\d+)�/; const ICU_BLOCK_REGEXP = /^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/; const MARKER = `�`; const SUBTEMPLATE_REGEXP = /�\/?\*(\d+:\d+)�/gi; const PH_REGEXP = /�(\/?[#*]\d+):?\d*�/gi; /** * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see: * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32 * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character * and later on replaced by a space. We are re-implementing the same idea here, since translations * might contain this special character. */ const NGSP_UNICODE_REGEXP = /\uE500/g; function replaceNgsp(value) { return value.replace(NGSP_UNICODE_REGEXP, ' '); } /** * Create dynamic nodes from i18n translation block. * * - Text nodes are created synchronously * - TNodes are linked into tree lazily * * @param tView Current `TView` * @parentTNodeIndex index to the parent TNode of this i18n block * @param lView Current `LView` * @param index Index of `ɵɵi18nStart` instruction. * @param message Message to translate. * @param subTemplateIndex Index into the sub template of message translation. (ie in case of * `ngIf`) (-1 otherwise) */ function i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) { const rootTNode = getCurrentParentTNode(); const createOpCodes = []; const updateOpCodes = []; const existingTNodeStack = [[]]; if (ngDevMode) { attachDebugGetter(createOpCodes, i18nCreateOpCodesToString); attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString); } message = getTranslationForTemplate(message, subTemplateIndex); const msgParts = replaceNgsp(message).split(PH_REGEXP); for (let i = 0; i < msgParts.length; i++) { let value = msgParts[i]; if ((i & 1) === 0) { // Even indexes are text (including bindings & ICU expressions) const parts = i18nParseTextIntoPartsAndICU(value); for (let j = 0; j < parts.length; j++) { let part = parts[j]; if ((j & 1) === 0) { // `j` is odd therefore `part` is string const text = part; ngDevMode && assertString(text, 'Parsed ICU part should be string'); if (text !== '') { i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text); } } else { // `j` is Even therefor `part` is an `ICUExpression` const icuExpression = part; // Verify that ICU expression has the right shape. Translations might contain invalid // constructions (while original messages were correct), so ICU parsing at runtime may // not succeed (thus `icuExpression` remains a string). // Note: we intentionally retain the error here by not using `ngDevMode`, because // the value can change based on the locale and users aren't guaranteed to hit // an invalid string while they're developing. if (typeof icuExpression !== 'object') { throw new Error(`Unable to parse ICU expression in "${message}" message.`); } const icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true); const icuNodeIndex = icuContainerTNode.index; ngDevMode && assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset'); icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex); } } } else { // Odd indexes are placeholders (elements and sub-templates) // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�') const isClosing = value.charCodeAt(0) === 47 /* SLASH */; const type = value.charCodeAt(isClosing ? 1 : 0); ngDevMode && assertOneOf(type, 42 /* STAR */, 35 /* HASH */); const index = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1))); if (isClosing) { existingTNodeStack.shift(); setCurrentTNode(getCurrentParentTNode(), false); } else { const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index); existingTNodeStack.unshift([]); setCurrentTNode(tNode, true); } } } tView.data[index] = { create: createOpCodes, update: updateOpCodes, }; } /** * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node. * * @param tView Current `TView` needed to allocate space in i18n range. * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`. * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`. * @param lView Current `LView` needed to allocate space in i18n range. * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added. * @param text Text to be added when the `Text` or `Comment` node will be created. * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created. */ function createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) { const i18nNodeIdx = allocExpando(tView, lView, 1, null); let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT; let parentTNode = getCurrentParentTNode(); if (rootTNode === parentTNode) { // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary. // (there is no parent), but in some circumstances (because we are inconsistent about how we set // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around. parentTNode = null; } if (parentTNode === null) { // If we don't have a parent that means that we can eagerly add nodes. // If we have a parent than these nodes can't be added now (as the parent has not been created // yet) and instead the `parentTNode` is responsible for adding it. See // `TNode.insertBeforeIndex` opCode |= I18nCreateOpCode.APPEND_EAGERLY; } if (isICU) { opCode |= I18nCreateOpCode.COMMENT; ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor); } createOpCodes.push(opCode, text === null ? '' : text); // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the // bindings are. const tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 /* Icu */ : 1 /* Text */, text === null ? (ngDevMode ? '{{?}}' : '') : text, null); addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode); const tNodeIdx = tNode.index; setCurrentTNode(tNode, false /* Text nodes are self closing */); if (parentTNode !== null && rootTNode !== parentTNode) { // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.) // We have to make sure to add ourselves to the parent. setTNodeInsertBeforeIndex(parentTNode, tNodeIdx); } return tNode; } /** * Processes text node in i18n block. * * Text nodes can have: * - Create instruction in `createOpCodes` for creating the text node. * - Allocate spec for text node in i18n range of `LView` * - If contains binding: * - bindings => allocate space in i18n range of `LView` to store the binding value. * - populate `updateOpCodes` with update instructions. * * @param tView Current `TView` * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will * be added as part of the `i18nStart` instruction or as part of the * `TNode.insertBeforeIndex`. * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`. * @param createOpCodes Location where the creation OpCodes will be stored. * @param lView Current `LView` * @param text The translated text (which may contain binding) */ function i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) { const hasBinding = text.match(BINDING_REGEXP); const tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false); if (hasBinding) { generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index); } } /** * See `i18nAttributes` above. */ function i18nAttributesFirstPass(tView, index, values) { const previousElement = getCurrentTNode(); const previousElementIndex = previousElement.index; const updateOpCodes = []; if (ngDevMode) { attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString); } if (tView.firstCreatePass && tView.data[index] === null) { for (let i = 0; i < values.length; i += 2) { const attrName = values[i]; const message = values[i + 1]; if (message !== '') { // Check if attribute value contains an ICU and throw an error if that's the case. // ICUs in element attributes are not supported. // Note: we intentionally retain the error here by not using `ngDevMode`, because // the `value` can change based on the locale and users aren't guaranteed to hit // an invalid string while they're developing. if (ICU_REGEXP.test(message)) { throw new Error(`ICU expressions are not supported in attributes. Message: "${message}".`); } // i18n attributes that hit this code path are guaranteed to have bindings, because // the compiler treats static i18n attributes as regular attribute bindings. generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName); } } tView.data[index] = updateOpCodes; } } /** * Generate the OpCodes to update the bindings of a string. * * @param updateOpCodes Place where the update opcodes will be stored. * @param str The string containing the bindings. * @param destinationNode Index of the destination node which will receive the binding. * @param attrName Name of the attribute, if the string belongs to an attribute. * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary. */ function generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, sanitizeFn = null) { ngDevMode && assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset'); const maskIndex = updateOpCodes.length; // Location of mask const sizeIndex = maskIndex + 1; // location of size for skipping updateOpCodes.push(null, null); // Alloc space for mask and size const startIndex = maskIndex + 2; // location of first allocation. if (ngDevMode) { attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString); } const textParts = str.split(BINDING_REGEXP); let mask = 0; for (let j = 0; j < textParts.length; j++) { const textValue = textParts[j]; if (j & 1) { // Odd indexes are bindings const bindingIndex = parseInt(textValue, 10); updateOpCodes.push(-1 - bindingIndex); mask = mask | toMaskBit(bindingIndex); } else if (textValue !== '') { // Even indexes are text updateOpCodes.push(textValue); } } updateOpCodes.push(destinationNode << 2 /* SHIFT_REF */ | (attrName ? 1 /* Attr */ : 0 /* Text */)); if (attrName) { updateOpCodes.push(attrName, sanitizeFn); } updateOpCodes[maskIndex] = mask; updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex; return mask; } /** * Convert binding index to mask bit. * * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner * case is that we will execute binding code more often than necessary. (penalty of performance) */ function toMaskBit(bindingIndex) { return 1 << Math.min(bindingIndex, 31); } function isRootTemplateMessage(subTemplateIndex) { return subTemplateIndex === -1; } /** * Removes everything inside the sub-templates of a message. */ function removeInnerTemplateTranslation(message) { let match; let res = ''; let index = 0; let inTemplate = false; let tagMatched; while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) { if (!inTemplate) { res += message.substring(index, match.index + match[0].length); tagMatched = match[1]; inTemplate = true; } else { if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) { index = match.index; inTemplate = false; } } } ngDevMode && assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation "${message}"`); res += message.substr(index); return res; } /** * Extracts a part of a message and removes the rest. * * This method is used for extracting a part of the message associated with a template. A * translated message can span multiple templates. * * Example: * ``` * <div i18n>Translate <span *ngIf>me</span>!</div> * ``` * * @param message The message to crop * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the * external template and removes all sub-templates. */ function getTranslationForTemplate(message, subTemplateIndex) { if (isRootTemplateMessage(subTemplateIndex)) { // We want the root template message, ignore all sub-templates return removeInnerTemplateTranslation(message); } else { // We want a specific sub-template const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length; const end = message.search(new RegExp(`${MARKER}\\/\\*\\d+:${subTemplateIndex}${MARKER}`)); return removeInnerTemplateTranslation(message.substring(start, end)); } } /** * Generate the OpCodes for ICU expressions. * * @param icuExpression * @param index Index where the anchor is stored and an optional `TIcuContainerNode` * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU. * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise) */ function icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) { ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined'); let bindingMask = 0; const tIcu = { type: icuExpression.type, currentCaseLViewIndex: allocExpando(tView, lView, 1, null), anchorIdx, cases: [], create: [], remove: [], update: [] }; addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx); setTIcu(tView, anchorIdx, tIcu); const values = icuExpression.values; for (let i = 0; i < values.length; i++) { // Each value is an array of strings & other ICU expressions const valueArr = values[i]; const nestedIcus = []; for (let j = 0; j < valueArr.length; j++) { const value = valueArr[j]; if (typeof value !== 'string') { // It is an nested ICU expression const icuIndex = nestedIcus.push(value) - 1; // Replace nested ICU expression by a comment node valueArr[j] = `<!--�${icuIndex}�-->`; } } bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) | bindingMask; } if (bindingMask) { addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx); } } /** * Parses text containing an ICU expression and produces a JSON object for it. * Original code from closure library, modified for Angular. * * @param pattern Text containing an ICU expression that needs to be parsed. * */ function parseICUBlock(pattern) { const cases = []; const values = []; let icuType = 1 /* plural */; let mainBinding = 0; pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) { if (type === 'select') { icuType = 0 /* select */; } else { icuType = 1 /* plural */; } mainBinding = parseInt(binding.substr(1), 10); return ''; }); const parts = i18nParseTextIntoPartsAndICU(pattern); // Looking for (key block)+ sequence. One of the keys has to be "other". for (let pos = 0; pos < parts.length;) { let key = parts[pos++].trim(); if (icuType === 1 /* plural */) { // Key can be "=x", we just want "x" key = key.replace(/\s*(?:=)?(\w+)\s*/, '$1'); } if (key.length) { cases.push(key); } const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]); if (cases.length > values.length) { values.push(blocks); } } // TODO(ocombe): support ICU expressions in attributes, see #21615 return { type: icuType, mainBinding: mainBinding, cases, values }; } /** * Breaks pattern into strings and top level {...} blocks. * Can be used to break a message into text and ICU expressions, or to break an ICU expression * into keys and cases. Original code from closure library, modified for Angular. * * @param pattern (sub)Pattern to be broken. * @returns An `Array<string|IcuExpression>` where: * - odd positions: `string` => text between ICU expressions * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record. */ function i18nParseTextIntoPartsAndICU(pattern) { if (!pattern) { return []; } let prevPos = 0; const braceStack = []; const results = []; const braces = /[{}]/g; // lastIndex doesn't get set to 0 so we have to. braces.lastIndex = 0; let match; while (match = braces.exec(pattern)) { const pos = match.index; if (match[0] == '}') { braceStack.pop(); if (braceStack.length == 0) { // End of the block. const block = pattern.substring(prevPos, pos); if (ICU_BLOCK_REGEXP.test(block)) { results.push(parseICUBlock(block)); } else { results.push(block); } prevPos = pos + 1; } } else { if (braceStack.length == 0) { const substring = pattern.substring(prevPos, pos); results.push(substring); prevPos = pos + 1; } braceStack.push('{'); } } const substring = pattern.substring(prevPos); results.push(substring); return results; } /** * Parses a node, its children and its siblings, and generates the mutate & update OpCodes. * */ function parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) { const create = []; const remove = []; const update = []; if (ngDevMode) { attachDebugGetter(create, icuCreateOpCodesToString); attachDebugGetter(remove, i18nRemoveOpCodesToString); attachDebugGetter(update, i18nUpdateOpCodesToString); } tIcu.cases.push(caseName); tIcu.create.push(create); tIcu.remove.push(remove); tIcu.update.push(update); const inertBodyHelper = getInertBodyHelper(getDocument()); const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml); ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element'); const inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement; if (inertRootNode) { return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0); } else { return 0; } } function walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) { let bindingMask = 0; let currentNode = parentNode.firstChild; while (currentNode) { const newIndex = allocExpando(tView, lView, 1, null); switch (currentNode.nodeType) { case Node.ELEMENT_NODE: const element = currentNode; const tagName = element.tagName.toLowerCase(); if (VALID_ELEMENTS.hasOwnProperty(tagName)) { addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex); tView.data[newIndex] = tagName; const elAttrs = element.attributes; for (let i = 0; i < elAttrs.length; i++) { const attr = elAttrs.item(i); const lowerAttrName = attr.name.toLowerCase(); const hasBinding = !!attr.value.match(BINDING_REGEXP); // we assume the input string is safe, unless it's using a binding if (hasBinding) { if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) { if (URI_ATTRS[lowerAttrName]) { generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, _sanitizeUrl); } else if (SRCSET_ATTRS[lowerAttrName]) { generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, sanitizeSrcset); } else { generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name); } } else { ngDevMode && console.warn(`WARNING: ignoring unsafe attribute value ` + `${lowerAttrName} on element ${tagName} ` + `(see https://g.co/ng/security#xss)`); } } else { addCreateAttribute(create, newIndex, attr); } } // Parse the children of this node (if any) bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) | bindingMask; addRemoveNode(remove, newIndex, depth); } break; case Node.TEXT_NODE: const value = currentNode.textContent || ''; const hasBinding = value.match(BINDING_REGEXP); addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex); addRemoveNode(remove, newIndex, depth); if (hasBinding) { bindingMask = generateBindingUpdateOpCodes(update, value, newIndex) | bindingMask; } break; case Node.COMMENT_NODE: // Check if the comment node is a placeholder for a nested ICU const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || ''); if (isNestedIcu) { const nestedIcuIndex = parseInt(isNestedIcu[1], 10); const icuExpression = nestedIcus[nestedIcuIndex]; // Create the comment node that will anchor the ICU expression addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx, newIndex); icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex); addRemoveNestedIcu(remove, newIndex, depth); } break; } currentNode = currentNode.nextSibling; } return bindingMask; } function addRemoveNode(remove, index, depth) { if (depth === 0) { remove.push(index); } } function addRemoveNestedIcu(remove, index, depth) { if (depth === 0) { remove.push(~index); // remove ICU at `index` remove.push(index); // remove ICU comment at `index` } } function addUpdateIcuSwitch(update, icuExpression, index) { update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */); } function addUpdateIcuUpdate(update, bindingMask, index) { update.push(bindingMask, 1, index << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */); } function addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) { if (marker !== null) { create.push(marker); } create.push(text, createAtIdx, icuCreateOpCode(0 /* AppendChild */, appendToParentIdx, createAtIdx)); } function addCreateAttribute(create, newIndex, attr) { create.push(newIndex << 1 /* SHIFT_REF */ | 1 /* Attr */, attr.name, attr.value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // i18nPostprocess consts const ROOT_TEMPLATE_ID = 0; const PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]/; const PP_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]|(�\/?\*\d+:\d+�)/g; const PP_ICU_VARS_REGEXP = /({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g; const PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g; const PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\d+)?)�/g; const PP_CLOSE_TEMPLATE_REGEXP = /\/\*/; const PP_TEMPLATE_ID_REGEXP = /\d+\:(\d+)/; /** * Handles message string post-processing for internationalization. * * Handles message string post-processing by transforming it from intermediate * format (that might contain some markers that we need to replace) to the final * form, consumable by i18nStart instruction. Post processing steps include: * * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�]) * 2. Replace all ICU vars (like "VAR_PLURAL") * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER} * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) * in case multiple ICUs have the same placeholder name * * @param message Raw translation string for post processing * @param replacements Set of replacements that should be applied * * @returns Transformed string that can be consumed by i18nStart instruction * * @codeGenApi */ function i18nPostprocess(message, replacements = {}) { /** * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�] * * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in * front of �#6�. The post processing step restores the right order by keeping track of the * template id stack and looks for placeholders that belong to the currently active template. */ let result = message; if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) { const matches = {}; const templateIdsStack = [ROOT_TEMPLATE_ID]; result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => { const content = phs || tmpl; const placeholders = matches[content] || []; if (!placeholders.length) { content.split('|').forEach((placeholder) => { const match = placeholder.match(PP_TEMPLATE_ID_REGEXP); const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID; const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder); placeholders.push([templateId, isCloseTemplateTag, placeholder]); }); matches[content] = placeholders; } if (!placeholders.length) { throw new Error(`i18n postprocess: unmatched placeholder - ${content}`); } const currentTemplateId = templateIdsStack[templateIdsStack.length - 1]; let idx = 0; // find placeholder index that matches current template id for (let i = 0; i < placeholders.length; i++) { if (placeholders[i][0] === currentTemplateId) { idx = i; break; } } // update template id stack based on the current tag extracted const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx]; if (isCloseTemplateTag) { templateIdsStack.pop(); } else if (currentTemplateId !== templateId) { templateIdsStack.push(templateId); } // remove processed tag from the list placeholders.splice(idx, 1); return placeholder; }); } // return current result if no replacements specified if (!Object.keys(replacements).length) { return result; } /** * Step 2: replace all ICU vars (like "VAR_PLURAL") */ result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end) => { return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match; }); /** * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER} */ result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key) => { return replacements.hasOwnProperty(key) ? replacements[key] : match; }); /** * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case * multiple ICUs have the same placeholder name */ result = result.replace(PP_ICUS_REGEXP, (match, key) => { if (replacements.hasOwnProperty(key)) { const list = replacements[key]; if (!list.length) { throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`); } return list.shift(); } return match; }); return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marks a block of text as translatable. * * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template. * The translation `message` is the value which is locale specific. The translation string may * contain placeholders which associate inner elements and sub-templates within the translation. * * The translation `message` placeholders are: * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be * interpolated into. The placeholder `index` points to the expression binding index. An optional * `block` that matches the sub-template in which it was declared. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning * and end of DOM element that were embedded in the original translation block. The placeholder * `index` points to the element index in the template instructions set. An optional `block` that * matches the sub-template in which it was declared. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be * split up and translated separately in each angular template function. The `index` points to the * `template` instruction index. A `block` that matches the sub-template in which it was declared. * * @param index A unique index of the translation in the static block. * @param messageIndex An index of the translation message from the `def.consts` array. * @param subTemplateIndex Optional sub-template index in the `message`. * * @codeGenApi */ function ɵɵi18nStart(index, messageIndex, subTemplateIndex = -1) { const tView = getTView(); const lView = getLView(); const adjustedIndex = HEADER_OFFSET + index; ngDevMode && assertDefined(tView, `tView should be defined`); const message = getConstant(tView.consts, messageIndex); const parentTNode = getCurrentParentTNode(); if (tView.firstCreatePass) { i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex); } const tI18n = tView.data[adjustedIndex]; const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode; const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView); // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`. // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`. const insertInFrontOf = parentTNode && (parentTNode.type & 8 /* ElementContainer */) ? lView[parentTNode.index] : null; applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf); setInI18nBlock(true); } /** * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes * into the render tree, moves the placeholder nodes and removes the deleted nodes. * * @codeGenApi */ function ɵɵi18nEnd() { setInI18nBlock(false); } /** * * Use this instruction to create a translation block that doesn't contain any placeholder. * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction. * * The translation `message` is the value which is locale specific. The translation string may * contain placeholders which associate inner elements and sub-templates within the translation. * * The translation `message` placeholders are: * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be * interpolated into. The placeholder `index` points to the expression binding index. An optional * `block` that matches the sub-template in which it was declared. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning * and end of DOM element that were embedded in the original translation block. The placeholder * `index` points to the element index in the template instructions set. An optional `block` that * matches the sub-template in which it was declared. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be * split up and translated separately in each angular template function. The `index` points to the * `template` instruction index. A `block` that matches the sub-template in which it was declared. * * @param index A unique index of the translation in the static block. * @param messageIndex An index of the translation message from the `def.consts` array. * @param subTemplateIndex Optional sub-template index in the `message`. * * @codeGenApi */ function ɵɵi18n(index, messageIndex, subTemplateIndex) { ɵɵi18nStart(index, messageIndex, subTemplateIndex); ɵɵi18nEnd(); } /** * Marks a list of attributes as translatable. * * @param index A unique index in the static block * @param values * * @codeGenApi */ function ɵɵi18nAttributes(index, attrsIndex) { const tView = getTView(); ngDevMode && assertDefined(tView, `tView should be defined`); const attrs = getConstant(tView.consts, attrsIndex); i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs); } /** * Stores the values of the bindings during each update cycle in order to determine if we need to * update the translated nodes. * * @param value The binding's value * @returns This function returns itself so that it may be chained * (e.g. `i18nExp(ctx.name)(ctx.title)`) * * @codeGenApi */ function ɵɵi18nExp(value) { const lView = getLView(); setMaskBit(bindingUpdated(lView, nextBindingIndex(), value)); return ɵɵi18nExp; } /** * Updates a translation block or an i18n attribute when the bindings have changed. * * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes} * (i18n attribute) on which it should update the content. * * @codeGenApi */ function ɵɵi18nApply(index) { applyI18n(getTView(), getLView(), index + HEADER_OFFSET); } /** * Handles message string post-processing for internationalization. * * Handles message string post-processing by transforming it from intermediate * format (that might contain some markers that we need to replace) to the final * form, consumable by i18nStart instruction. Post processing steps include: * * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�]) * 2. Replace all ICU vars (like "VAR_PLURAL") * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER} * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) * in case multiple ICUs have the same placeholder name * * @param message Raw translation string for post processing * @param replacements Set of replacements that should be applied * * @returns Transformed string that can be consumed by i18nStart instruction * * @codeGenApi */ function ɵɵi18nPostprocess(message, replacements = {}) { return i18nPostprocess(message, replacements); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Resolves the providers which are defined in the DirectiveDef. * * When inserting the tokens and the factories in their respective arrays, we can assume that * this method is called first for the component (if any), and then for other directives on the same * node. * As a consequence,the providers are always processed in that order: * 1) The view providers of the component * 2) The providers of the component * 3) The providers of the other directives * This matches the structure of the injectables arrays of a view (for each node). * So the tokens and the factories can be pushed at the end of the arrays, except * in one case for multi providers. * * @param def the directive definition * @param providers: Array of `providers`. * @param viewProviders: Array of `viewProviders`. */ function providersResolver(def, providers, viewProviders) { const tView = getTView(); if (tView.firstCreatePass) { const isComponent = isComponentDef(def); // The list of view providers is processed first, and the flags are updated resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true); // Then, the list of providers is processed, and the flags are updated resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false); } } /** * Resolves a provider and publishes it to the DI system. */ function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) { provider = resolveForwardRef(provider); if (Array.isArray(provider)) { // Recursively call `resolveProvider` // Recursion is OK in this case because this code will not be in hot-path once we implement // cloning of the initial state. for (let i = 0; i < provider.length; i++) { resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider); } } else { const tView = getTView(); const lView = getLView(); let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide); let providerFactory = providerToFactory(provider); const tNode = getCurrentTNode(); const beginIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */; const endIndex = tNode.directiveStart; const cptViewProvidersCount = tNode.providerIndexes >> 20 /* CptViewProvidersCountShift */; if (isTypeProvider(provider) || !provider.multi) { // Single provider case: the factory is created and pushed immediately const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject); const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex); if (existingFactoryIndex === -1) { diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token); registerDestroyHooksIfSupported(tView, provider, tInjectables.length); tInjectables.push(token); tNode.directiveStart++; tNode.directiveEnd++; if (isViewProvider) { tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */; } lInjectablesBlueprint.push(factory); lView.push(factory); } else { lInjectablesBlueprint[existingFactoryIndex] = factory; lView[existingFactoryIndex] = factory; } } else { // Multi provider case: // We create a multi factory which is going to aggregate all the values. // Since the output of such a factory depends on content or view injection, // we create two of them, which are linked together. // // The first one (for view providers) is always in the first block of the injectables array, // and the second one (for providers) is always in the second block. // This is important because view providers have higher priority. When a multi token // is being looked up, the view providers should be found first. // Note that it is not possible to have a multi factory in the third block (directive block). // // The algorithm to process multi providers is as follows: // 1) If the multi provider comes from the `viewProviders` of the component: // a) If the special view providers factory doesn't exist, it is created and pushed. // b) Else, the multi provider is added to the existing multi factory. // 2) If the multi provider comes from the `providers` of the component or of another // directive: // a) If the multi factory doesn't exist, it is created and provider pushed into it. // It is also linked to the multi factory for view providers, if it exists. // b) Else, the multi provider is added to the existing multi factory. const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex); const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount); const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex]; const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex]; if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) { // Cases 1.a and 2.a diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token); const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory); if (!isViewProvider && doesViewProvidersFactoryExist) { lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory; } registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0); tInjectables.push(token); tNode.directiveStart++; tNode.directiveEnd++; if (isViewProvider) { tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */; } lInjectablesBlueprint.push(factory); lView.push(factory); } else { // Cases 1.b and 2.b const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent); registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory); } if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) { lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++; } } } } /** * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks. * @param tView `TView` in which to register the hook. * @param provider Provider whose hook should be registered. * @param contextIndex Index under which to find the context for the hook when it's being invoked. * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi * provider factory. */ function registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) { const providerIsTypeProvider = isTypeProvider(provider); if (providerIsTypeProvider || isClassProvider(provider)) { const prototype = (provider.useClass || provider).prototype; const ngOnDestroy = prototype.ngOnDestroy; if (ngOnDestroy) { const hooks = tView.destroyHooks || (tView.destroyHooks = []); if (!providerIsTypeProvider && provider.multi) { ngDevMode && assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook'); const existingCallbacksIndex = hooks.indexOf(contextIndex); if (existingCallbacksIndex === -1) { hooks.push(contextIndex, [indexInFactory, ngOnDestroy]); } else { hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy); } } else { hooks.push(contextIndex, ngOnDestroy); } } } } /** * Add a factory in a multi factory. * @returns Index at which the factory was inserted. */ function multiFactoryAdd(multiFactory, factory, isComponentProvider) { if (isComponentProvider) { multiFactory.componentProviders++; } return multiFactory.multi.push(factory) - 1; } /** * Returns the index of item in the array, but only in the begin to end range. */ function indexOf(item, arr, begin, end) { for (let i = begin; i < end; i++) { if (arr[i] === item) return i; } return -1; } /** * Use this with `multi` `providers`. */ function multiProvidersFactoryResolver(_, tData, lData, tNode) { return multiResolve(this.multi, []); } /** * Use this with `multi` `viewProviders`. * * This factory knows how to concatenate itself with the existing `multi` `providers`. */ function multiViewProvidersFactoryResolver(_, tData, lView, tNode) { const factories = this.multi; let result; if (this.providerFactory) { const componentCount = this.providerFactory.componentProviders; const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode); // Copy the section of the array which contains `multi` `providers` from the component result = multiProviders.slice(0, componentCount); // Insert the `viewProvider` instances. multiResolve(factories, result); // Copy the section of the array which contains `multi` `providers` from other directives for (let i = componentCount; i < multiProviders.length; i++) { result.push(multiProviders[i]); } } else { result = []; // Insert the `viewProvider` instances. multiResolve(factories, result); } return result; } /** * Maps an array of factories into an array of values. */ function multiResolve(factories, result) { for (let i = 0; i < factories.length; i++) { const factory = factories[i]; result.push(factory()); } return result; } /** * Creates a multi factory. */ function multiFactory(factoryFn, index, isViewProvider, isComponent, f) { const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject); factory.multi = []; factory.index = index; factory.componentProviders = 0; multiFactoryAdd(factory, f, isComponent && !isViewProvider); return factory; } /** * This feature resolves the providers of a directive (or component), * and publish them into the DI system, making it visible to others for injection. * * For example: * ```ts * class ComponentWithProviders { * constructor(private greeter: GreeterDE) {} * * static ɵcmp = defineComponent({ * type: ComponentWithProviders, * selectors: [['component-with-providers']], * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)), * decls: 1, * vars: 1, * template: function(fs: RenderFlags, ctx: ComponentWithProviders) { * if (fs & RenderFlags.Create) { * ɵɵtext(0); * } * if (fs & RenderFlags.Update) { * ɵɵtextInterpolate(ctx.greeter.greet()); * } * }, * features: [ɵɵProvidersFeature([GreeterDE])] * }); * } * ``` * * @param definition * * @codeGenApi */ function ɵɵProvidersFeature(providers, viewProviders = []) { return (definition) => { definition.providersResolver = (def, processProvidersFn) => { return providersResolver(def, // processProvidersFn ? processProvidersFn(providers) : providers, // viewProviders); }; }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents a component created by a `ComponentFactory`. * Provides access to the component instance and related objects, * and provides the means of destroying the instance. * * @publicApi */ class ComponentRef { } /** * Base class for a factory that can create a component dynamically. * Instantiate a factory for a given type of component with `resolveComponentFactory()`. * Use the resulting `ComponentFactory.create()` method to create a component of that type. * * @see [Dynamic Components](guide/dynamic-component-loader) * * @publicApi */ class ComponentFactory { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function noComponentFactoryError(component) { const error = Error(`No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`); error[ERROR_COMPONENT] = component; return error; } const ERROR_COMPONENT = 'ngComponent'; function getComponent$1(error) { return error[ERROR_COMPONENT]; } class _NullComponentFactoryResolver { resolveComponentFactory(component) { throw noComponentFactoryError(component); } } /** * A simple registry that maps `Components` to generated `ComponentFactory` classes * that can be used to create instances of components. * Use to obtain the factory for a given component type, * then use the factory's `create()` method to create a component of that type. * * @see [Dynamic Components](guide/dynamic-component-loader) * @publicApi */ class ComponentFactoryResolver { } ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver(); class CodegenComponentFactoryResolver { constructor(factories, _parent, _ngModule) { this._parent = _parent; this._ngModule = _ngModule; this._factories = new Map(); for (let i = 0; i < factories.length; i++) { const factory = factories[i]; this._factories.set(factory.componentType, factory); } } resolveComponentFactory(component) { let factory = this._factories.get(component); if (!factory && this._parent) { factory = this._parent.resolveComponentFactory(component); } if (!factory) { throw noComponentFactoryError(component); } return new ComponentFactoryBoundToModule(factory, this._ngModule); } } class ComponentFactoryBoundToModule extends ComponentFactory { constructor(factory, ngModule) { super(); this.factory = factory; this.ngModule = ngModule; this.selector = factory.selector; this.componentType = factory.componentType; this.ngContentSelectors = factory.ngContentSelectors; this.inputs = factory.inputs; this.outputs = factory.outputs; } create(injector, projectableNodes, rootSelectorOrNode, ngModule) { return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function noop(...args) { // Do nothing. } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Creates an ElementRef from the most recent node. * * @returns The ElementRef instance to use */ function injectElementRef() { return createElementRef(getCurrentTNode(), getLView()); } /** * Creates an ElementRef given a node. * * @param tNode The node for which you'd like an ElementRef * @param lView The view to which the node belongs * @returns The ElementRef instance to use */ function createElementRef(tNode, lView) { return new ElementRef(getNativeByTNode(tNode, lView)); } const SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef; const SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop; const SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__POST_R3__; /** * A wrapper around a native element inside of a View. * * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM * element. * * @security Permitting direct access to the DOM can make your application more vulnerable to * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the * [Security Guide](https://g.co/ng/security). * * @publicApi */ // Note: We don't expose things like `Injector`, `ViewContainer`, ... here, // i.e. users have to ask for what they need. With that, we can build better analysis tools // and could do better codegen in the future. class ElementRef { constructor(nativeElement) { this.nativeElement = nativeElement; } } /** * @internal * @nocollapse */ ElementRef.__NG_ELEMENT_ID__ = SWITCH_ELEMENT_REF_FACTORY; /** * Unwraps `ElementRef` and return the `nativeElement`. * * @param value value to unwrap * @returns `nativeElement` if `ElementRef` otherwise returns value as is. */ function unwrapElementRef(value) { return value instanceof ElementRef ? value.nativeElement : value; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor'); /** * Creates and initializes a custom renderer that implements the `Renderer2` base class. * * @publicApi */ class RendererFactory2 { } /** * Extend this base class to implement custom rendering. By default, Angular * renders a template into DOM. You can use custom rendering to intercept * rendering calls, or to render to something other than DOM. * * Create your custom renderer using `RendererFactory2`. * * Use a custom renderer to bypass Angular's templating and * make custom UI changes that can't be expressed declaratively. * For example if you need to set a property or an attribute whose name is * not statically known, use the `setProperty()` or * `setAttribute()` method. * * @publicApi */ class Renderer2 { } /** * @internal * @nocollapse */ Renderer2.__NG_ELEMENT_ID__ = () => SWITCH_RENDERER2_FACTORY(); const SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2; const SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop; const SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__POST_R3__; /** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */ function getOrCreateRenderer2(lView) { const renderer = lView[RENDERER]; if (ngDevMode && !isProceduralRenderer(renderer)) { throw new Error('Cannot inject Renderer2 when the application uses Renderer3!'); } return renderer; } /** Injects a Renderer2 for the current component. */ function injectRenderer2() { // We need the Renderer to be based on the component that it's being injected into, however since // DI happens before we've entered its view, `getLView` will return the parent view instead. const lView = getLView(); const tNode = getCurrentTNode(); const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView); return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Sanitizer is used by the views to sanitize potentially dangerous values. * * @publicApi */ class Sanitizer { } /** @nocollapse */ Sanitizer.ɵprov = ɵɵdefineInjectable({ token: Sanitizer, providedIn: 'root', factory: () => null, }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description Represents the version of Angular * * @publicApi */ class Version { constructor(full) { this.full = full; this.major = full.split('.')[0]; this.minor = full.split('.')[1]; this.patch = full.split('.').slice(2).join('.'); } } /** * @publicApi */ const VERSION = new Version('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class DefaultIterableDifferFactory { constructor() { } supports(obj) { return isListLikeIterable(obj); } create(trackByFn) { return new DefaultIterableDiffer(trackByFn); } } const trackByIdentity = (index, item) => item; const ɵ0$b = trackByIdentity; /** * @deprecated v4.0.0 - Should not be part of public API. * @publicApi */ class DefaultIterableDiffer { constructor(trackByFn) { this.length = 0; // Keeps track of the used records at any point in time (during & across `_check()` calls) this._linkedRecords = null; // Keeps track of the removed records at any point in time during `_check()` calls. this._unlinkedRecords = null; this._previousItHead = null; this._itHead = null; this._itTail = null; this._additionsHead = null; this._additionsTail = null; this._movesHead = null; this._movesTail = null; this._removalsHead = null; this._removalsTail = null; // Keeps track of records where custom track by is the same, but item identity has changed this._identityChangesHead = null; this._identityChangesTail = null; this._trackByFn = trackByFn || trackByIdentity; } forEachItem(fn) { let record; for (record = this._itHead; record !== null; record = record._next) { fn(record); } } forEachOperation(fn) { let nextIt = this._itHead; let nextRemove = this._removalsHead; let addRemoveOffset = 0; let moveOffsets = null; while (nextIt || nextRemove) { // Figure out which is the next record to process // Order: remove, add, move const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove; const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets); const currentIndex = record.currentIndex; // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary if (record === nextRemove) { addRemoveOffset--; nextRemove = nextRemove._nextRemoved; } else { nextIt = nextIt._next; if (record.previousIndex == null) { addRemoveOffset++; } else { // INVARIANT: currentIndex < previousIndex if (!moveOffsets) moveOffsets = []; const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset; const localCurrentIndex = currentIndex - addRemoveOffset; if (localMovePreviousIndex != localCurrentIndex) { for (let i = 0; i < localMovePreviousIndex; i++) { const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0); const index = offset + i; if (localCurrentIndex <= index && index < localMovePreviousIndex) { moveOffsets[i] = offset + 1; } } const previousIndex = record.previousIndex; moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex; } } } if (adjPreviousIndex !== currentIndex) { fn(record, adjPreviousIndex, currentIndex); } } } forEachPreviousItem(fn) { let record; for (record = this._previousItHead; record !== null; record = record._nextPrevious) { fn(record); } } forEachAddedItem(fn) { let record; for (record = this._additionsHead; record !== null; record = record._nextAdded) { fn(record); } } forEachMovedItem(fn) { let record; for (record = this._movesHead; record !== null; record = record._nextMoved) { fn(record); } } forEachRemovedItem(fn) { let record; for (record = this._removalsHead; record !== null; record = record._nextRemoved) { fn(record); } } forEachIdentityChange(fn) { let record; for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) { fn(record); } } diff(collection) { if (collection == null) collection = []; if (!isListLikeIterable(collection)) { throw new Error(`Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`); } if (this.check(collection)) { return this; } else { return null; } } onDestroy() { } check(collection) { this._reset(); let record = this._itHead; let mayBeDirty = false; let index; let item; let itemTrackBy; if (Array.isArray(collection)) { this.length = collection.length; for (let index = 0; index < this.length; index++) { item = collection[index]; itemTrackBy = this._trackByFn(index, item); if (record === null || !Object.is(record.trackById, itemTrackBy)) { record = this._mismatch(record, item, itemTrackBy, index); mayBeDirty = true; } else { if (mayBeDirty) { // TODO(misko): can we limit this to duplicates only? record = this._verifyReinsertion(record, item, itemTrackBy, index); } if (!Object.is(record.item, item)) this._addIdentityChange(record, item); } record = record._next; } } else { index = 0; iterateListLike(collection, (item) => { itemTrackBy = this._trackByFn(index, item); if (record === null || !Object.is(record.trackById, itemTrackBy)) { record = this._mismatch(record, item, itemTrackBy, index); mayBeDirty = true; } else { if (mayBeDirty) { // TODO(misko): can we limit this to duplicates only? record = this._verifyReinsertion(record, item, itemTrackBy, index); } if (!Object.is(record.item, item)) this._addIdentityChange(record, item); } record = record._next; index++; }); this.length = index; } this._truncate(record); this.collection = collection; return this.isDirty; } /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity * changes. */ get isDirty() { return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null; } /** * Reset the state of the change objects to show no changes. This means set previousKey to * currentKey, and clear all of the queues (additions, moves, removals). * Set the previousIndexes of moved and added items to their currentIndexes * Reset the list of additions, moves and removals * * @internal */ _reset() { if (this.isDirty) { let record; for (record = this._previousItHead = this._itHead; record !== null; record = record._next) { record._nextPrevious = record._next; } for (record = this._additionsHead; record !== null; record = record._nextAdded) { record.previousIndex = record.currentIndex; } this._additionsHead = this._additionsTail = null; for (record = this._movesHead; record !== null; record = record._nextMoved) { record.previousIndex = record.currentIndex; } this._movesHead = this._movesTail = null; this._removalsHead = this._removalsTail = null; this._identityChangesHead = this._identityChangesTail = null; // TODO(vicb): when assert gets supported // assert(!this.isDirty); } } /** * This is the core function which handles differences between collections. * * - `record` is the record which we saw at this position last time. If null then it is a new * item. * - `item` is the current item in the collection * - `index` is the position of the item in the collection * * @internal */ _mismatch(record, item, itemTrackBy, index) { // The previous record after which we will append the current one. let previousRecord; if (record === null) { previousRecord = this._itTail; } else { previousRecord = record._prev; // Remove the record from the collection since we know it does not match the item. this._remove(record); } // See if we have evicted the item, which used to be at some anterior position of _itHead list. record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null); if (record !== null) { // It is an item which we have evicted earlier: reinsert it back into the list. // But first we need to check if identity changed, so we can update in view if necessary. if (!Object.is(record.item, item)) this._addIdentityChange(record, item); this._reinsertAfter(record, previousRecord, index); } else { // Attempt to see if the item is at some posterior position of _itHead list. record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index); if (record !== null) { // We have the item in _itHead at/after `index` position. We need to move it forward in the // collection. // But first we need to check if identity changed, so we can update in view if necessary. if (!Object.is(record.item, item)) this._addIdentityChange(record, item); this._moveAfter(record, previousRecord, index); } else { // It is a new item: add it. record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index); } } return record; } /** * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty) * * Use case: `[a, a]` => `[b, a, a]` * * If we did not have this check then the insertion of `b` would: * 1) evict first `a` * 2) insert `b` at `0` index. * 3) leave `a` at index `1` as is. <-- this is wrong! * 3) reinsert `a` at index 2. <-- this is wrong! * * The correct behavior is: * 1) evict first `a` * 2) insert `b` at `0` index. * 3) reinsert `a` at index 1. * 3) move `a` at from `1` to `2`. * * * Double check that we have not evicted a duplicate item. We need to check if the item type may * have already been removed: * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a' * at the end. * * @internal */ _verifyReinsertion(record, item, itemTrackBy, index) { let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null); if (reinsertRecord !== null) { record = this._reinsertAfter(reinsertRecord, record._prev, index); } else if (record.currentIndex != index) { record.currentIndex = index; this._addToMoves(record, index); } return record; } /** * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection * * - `record` The first excess {@link IterableChangeRecord_}. * * @internal */ _truncate(record) { // Anything after that needs to be removed; while (record !== null) { const nextRecord = record._next; this._addToRemovals(this._unlink(record)); record = nextRecord; } if (this._unlinkedRecords !== null) { this._unlinkedRecords.clear(); } if (this._additionsTail !== null) { this._additionsTail._nextAdded = null; } if (this._movesTail !== null) { this._movesTail._nextMoved = null; } if (this._itTail !== null) { this._itTail._next = null; } if (this._removalsTail !== null) { this._removalsTail._nextRemoved = null; } if (this._identityChangesTail !== null) { this._identityChangesTail._nextIdentityChange = null; } } /** @internal */ _reinsertAfter(record, prevRecord, index) { if (this._unlinkedRecords !== null) { this._unlinkedRecords.remove(record); } const prev = record._prevRemoved; const next = record._nextRemoved; if (prev === null) { this._removalsHead = next; } else { prev._nextRemoved = next; } if (next === null) { this._removalsTail = prev; } else { next._prevRemoved = prev; } this._insertAfter(record, prevRecord, index); this._addToMoves(record, index); return record; } /** @internal */ _moveAfter(record, prevRecord, index) { this._unlink(record); this._insertAfter(record, prevRecord, index); this._addToMoves(record, index); return record; } /** @internal */ _addAfter(record, prevRecord, index) { this._insertAfter(record, prevRecord, index); if (this._additionsTail === null) { // TODO(vicb): // assert(this._additionsHead === null); this._additionsTail = this._additionsHead = record; } else { // TODO(vicb): // assert(_additionsTail._nextAdded === null); // assert(record._nextAdded === null); this._additionsTail = this._additionsTail._nextAdded = record; } return record; } /** @internal */ _insertAfter(record, prevRecord, index) { // TODO(vicb): // assert(record != prevRecord); // assert(record._next === null); // assert(record._prev === null); const next = prevRecord === null ? this._itHead : prevRecord._next; // TODO(vicb): // assert(next != record); // assert(prevRecord != record); record._next = next; record._prev = prevRecord; if (next === null) { this._itTail = record; } else { next._prev = record; } if (prevRecord === null) { this._itHead = record; } else { prevRecord._next = record; } if (this._linkedRecords === null) { this._linkedRecords = new _DuplicateMap(); } this._linkedRecords.put(record); record.currentIndex = index; return record; } /** @internal */ _remove(record) { return this._addToRemovals(this._unlink(record)); } /** @internal */ _unlink(record) { if (this._linkedRecords !== null) { this._linkedRecords.remove(record); } const prev = record._prev; const next = record._next; // TODO(vicb): // assert((record._prev = null) === null); // assert((record._next = null) === null); if (prev === null) { this._itHead = next; } else { prev._next = next; } if (next === null) { this._itTail = prev; } else { next._prev = prev; } return record; } /** @internal */ _addToMoves(record, toIndex) { // TODO(vicb): // assert(record._nextMoved === null); if (record.previousIndex === toIndex) { return record; } if (this._movesTail === null) { // TODO(vicb): // assert(_movesHead === null); this._movesTail = this._movesHead = record; } else { // TODO(vicb): // assert(_movesTail._nextMoved === null); this._movesTail = this._movesTail._nextMoved = record; } return record; } _addToRemovals(record) { if (this._unlinkedRecords === null) { this._unlinkedRecords = new _DuplicateMap(); } this._unlinkedRecords.put(record); record.currentIndex = null; record._nextRemoved = null; if (this._removalsTail === null) { // TODO(vicb): // assert(_removalsHead === null); this._removalsTail = this._removalsHead = record; record._prevRemoved = null; } else { // TODO(vicb): // assert(_removalsTail._nextRemoved === null); // assert(record._nextRemoved === null); record._prevRemoved = this._removalsTail; this._removalsTail = this._removalsTail._nextRemoved = record; } return record; } /** @internal */ _addIdentityChange(record, item) { record.item = item; if (this._identityChangesTail === null) { this._identityChangesTail = this._identityChangesHead = record; } else { this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record; } return record; } } class IterableChangeRecord_ { constructor(item, trackById) { this.item = item; this.trackById = trackById; this.currentIndex = null; this.previousIndex = null; /** @internal */ this._nextPrevious = null; /** @internal */ this._prev = null; /** @internal */ this._next = null; /** @internal */ this._prevDup = null; /** @internal */ this._nextDup = null; /** @internal */ this._prevRemoved = null; /** @internal */ this._nextRemoved = null; /** @internal */ this._nextAdded = null; /** @internal */ this._nextMoved = null; /** @internal */ this._nextIdentityChange = null; } } // A linked list of IterableChangeRecords with the same IterableChangeRecord_.item class _DuplicateItemRecordList { constructor() { /** @internal */ this._head = null; /** @internal */ this._tail = null; } /** * Append the record to the list of duplicates. * * Note: by design all records in the list of duplicates hold the same value in record.item. */ add(record) { if (this._head === null) { this._head = this._tail = record; record._nextDup = null; record._prevDup = null; } else { // TODO(vicb): // assert(record.item == _head.item || // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN); this._tail._nextDup = record; record._prevDup = this._tail; record._nextDup = null; this._tail = record; } } // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and // IterableChangeRecord_.currentIndex >= atOrAfterIndex get(trackById, atOrAfterIndex) { let record; for (record = this._head; record !== null; record = record._nextDup) { if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) { return record; } } return null; } /** * Remove one {@link IterableChangeRecord_} from the list of duplicates. * * Returns whether the list of duplicates is empty. */ remove(record) { // TODO(vicb): // assert(() { // // verify that the record being removed is in the list. // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) { // if (identical(cursor, record)) return true; // } // return false; //}); const prev = record._prevDup; const next = record._nextDup; if (prev === null) { this._head = next; } else { prev._nextDup = next; } if (next === null) { this._tail = prev; } else { next._prevDup = prev; } return this._head === null; } } class _DuplicateMap { constructor() { this.map = new Map(); } put(record) { const key = record.trackById; let duplicates = this.map.get(key); if (!duplicates) { duplicates = new _DuplicateItemRecordList(); this.map.set(key, duplicates); } duplicates.add(record); } /** * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there. * * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we * have any more `a`s needs to return the second `a`. */ get(trackById, atOrAfterIndex) { const key = trackById; const recordList = this.map.get(key); return recordList ? recordList.get(trackById, atOrAfterIndex) : null; } /** * Removes a {@link IterableChangeRecord_} from the list of duplicates. * * The list of duplicates also is removed from the map if it gets empty. */ remove(record) { const key = record.trackById; const recordList = this.map.get(key); // Remove the list of duplicates when it gets empty if (recordList.remove(record)) { this.map.delete(key); } return record; } get isEmpty() { return this.map.size === 0; } clear() { this.map.clear(); } } function getPreviousIndex(item, addRemoveOffset, moveOffsets) { const previousIndex = item.previousIndex; if (previousIndex === null) return previousIndex; let moveOffset = 0; if (moveOffsets && previousIndex < moveOffsets.length) { moveOffset = moveOffsets[previousIndex]; } return previousIndex + addRemoveOffset + moveOffset; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class DefaultKeyValueDifferFactory { constructor() { } supports(obj) { return obj instanceof Map || isJsObject(obj); } create() { return new DefaultKeyValueDiffer(); } } class DefaultKeyValueDiffer { constructor() { this._records = new Map(); this._mapHead = null; // _appendAfter is used in the check loop this._appendAfter = null; this._previousMapHead = null; this._changesHead = null; this._changesTail = null; this._additionsHead = null; this._additionsTail = null; this._removalsHead = null; this._removalsTail = null; } get isDirty() { return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null; } forEachItem(fn) { let record; for (record = this._mapHead; record !== null; record = record._next) { fn(record); } } forEachPreviousItem(fn) { let record; for (record = this._previousMapHead; record !== null; record = record._nextPrevious) { fn(record); } } forEachChangedItem(fn) { let record; for (record = this._changesHead; record !== null; record = record._nextChanged) { fn(record); } } forEachAddedItem(fn) { let record; for (record = this._additionsHead; record !== null; record = record._nextAdded) { fn(record); } } forEachRemovedItem(fn) { let record; for (record = this._removalsHead; record !== null; record = record._nextRemoved) { fn(record); } } diff(map) { if (!map) { map = new Map(); } else if (!(map instanceof Map || isJsObject(map))) { throw new Error(`Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`); } return this.check(map) ? this : null; } onDestroy() { } /** * Check the current state of the map vs the previous. * The algorithm is optimised for when the keys do no change. */ check(map) { this._reset(); let insertBefore = this._mapHead; this._appendAfter = null; this._forEach(map, (value, key) => { if (insertBefore && insertBefore.key === key) { this._maybeAddToChanges(insertBefore, value); this._appendAfter = insertBefore; insertBefore = insertBefore._next; } else { const record = this._getOrCreateRecordForKey(key, value); insertBefore = this._insertBeforeOrAppend(insertBefore, record); } }); // Items remaining at the end of the list have been deleted if (insertBefore) { if (insertBefore._prev) { insertBefore._prev._next = null; } this._removalsHead = insertBefore; for (let record = insertBefore; record !== null; record = record._nextRemoved) { if (record === this._mapHead) { this._mapHead = null; } this._records.delete(record.key); record._nextRemoved = record._next; record.previousValue = record.currentValue; record.currentValue = null; record._prev = null; record._next = null; } } // Make sure tails have no next records from previous runs if (this._changesTail) this._changesTail._nextChanged = null; if (this._additionsTail) this._additionsTail._nextAdded = null; return this.isDirty; } /** * Inserts a record before `before` or append at the end of the list when `before` is null. * * Notes: * - This method appends at `this._appendAfter`, * - This method updates `this._appendAfter`, * - The return value is the new value for the insertion pointer. */ _insertBeforeOrAppend(before, record) { if (before) { const prev = before._prev; record._next = before; record._prev = prev; before._prev = record; if (prev) { prev._next = record; } if (before === this._mapHead) { this._mapHead = record; } this._appendAfter = before; return before; } if (this._appendAfter) { this._appendAfter._next = record; record._prev = this._appendAfter; } else { this._mapHead = record; } this._appendAfter = record; return null; } _getOrCreateRecordForKey(key, value) { if (this._records.has(key)) { const record = this._records.get(key); this._maybeAddToChanges(record, value); const prev = record._prev; const next = record._next; if (prev) { prev._next = next; } if (next) { next._prev = prev; } record._next = null; record._prev = null; return record; } const record = new KeyValueChangeRecord_(key); this._records.set(key, record); record.currentValue = value; this._addToAdditions(record); return record; } /** @internal */ _reset() { if (this.isDirty) { let record; // let `_previousMapHead` contain the state of the map before the changes this._previousMapHead = this._mapHead; for (record = this._previousMapHead; record !== null; record = record._next) { record._nextPrevious = record._next; } // Update `record.previousValue` with the value of the item before the changes // We need to update all changed items (that's those which have been added and changed) for (record = this._changesHead; record !== null; record = record._nextChanged) { record.previousValue = record.currentValue; } for (record = this._additionsHead; record != null; record = record._nextAdded) { record.previousValue = record.currentValue; } this._changesHead = this._changesTail = null; this._additionsHead = this._additionsTail = null; this._removalsHead = null; } } // Add the record or a given key to the list of changes only when the value has actually changed _maybeAddToChanges(record, newValue) { if (!Object.is(newValue, record.currentValue)) { record.previousValue = record.currentValue; record.currentValue = newValue; this._addToChanges(record); } } _addToAdditions(record) { if (this._additionsHead === null) { this._additionsHead = this._additionsTail = record; } else { this._additionsTail._nextAdded = record; this._additionsTail = record; } } _addToChanges(record) { if (this._changesHead === null) { this._changesHead = this._changesTail = record; } else { this._changesTail._nextChanged = record; this._changesTail = record; } } /** @internal */ _forEach(obj, fn) { if (obj instanceof Map) { obj.forEach(fn); } else { Object.keys(obj).forEach(k => fn(obj[k], k)); } } } class KeyValueChangeRecord_ { constructor(key) { this.key = key; this.previousValue = null; this.currentValue = null; /** @internal */ this._nextPrevious = null; /** @internal */ this._next = null; /** @internal */ this._prev = null; /** @internal */ this._nextAdded = null; /** @internal */ this._nextRemoved = null; /** @internal */ this._nextChanged = null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function defaultIterableDiffersFactory() { return new IterableDiffers([new DefaultIterableDifferFactory()]); } /** * A repository of different iterable diffing strategies used by NgFor, NgClass, and others. * * @publicApi */ class IterableDiffers { constructor(factories) { this.factories = factories; } static create(factories, parent) { if (parent != null) { const copied = parent.factories.slice(); factories = factories.concat(copied); } return new IterableDiffers(factories); } /** * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the * inherited {@link IterableDiffers} instance with the provided factories and return a new * {@link IterableDiffers} instance. * * @usageNotes * ### Example * * The following example shows how to extend an existing list of factories, * which will only be applied to the injector for this component and its children. * This step is all that's required to make a new {@link IterableDiffer} available. * * ``` * @Component({ * viewProviders: [ * IterableDiffers.extend([new ImmutableListDiffer()]) * ] * }) * ``` */ static extend(factories) { return { provide: IterableDiffers, useFactory: (parent) => { // if parent is null, it means that we are in the root injector and we have just overridden // the default injection mechanism for IterableDiffers, in such a case just assume // `defaultIterableDiffersFactory`. return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory()); }, // Dependency technically isn't optional, but we can provide a better error message this way. deps: [[IterableDiffers, new SkipSelf(), new Optional()]] }; } find(iterable) { const factory = this.factories.find(f => f.supports(iterable)); if (factory != null) { return factory; } else { throw new Error(`Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`); } } } /** @nocollapse */ IterableDiffers.ɵprov = ɵɵdefineInjectable({ token: IterableDiffers, providedIn: 'root', factory: defaultIterableDiffersFactory }); function getTypeNameForDebugging(type) { return type['name'] || typeof type; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function defaultKeyValueDiffersFactory() { return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]); } /** * A repository of different Map diffing strategies used by NgClass, NgStyle, and others. * * @publicApi */ class KeyValueDiffers { constructor(factories) { this.factories = factories; } static create(factories, parent) { if (parent) { const copied = parent.factories.slice(); factories = factories.concat(copied); } return new KeyValueDiffers(factories); } /** * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the * inherited {@link KeyValueDiffers} instance with the provided factories and return a new * {@link KeyValueDiffers} instance. * * @usageNotes * ### Example * * The following example shows how to extend an existing list of factories, * which will only be applied to the injector for this component and its children. * This step is all that's required to make a new {@link KeyValueDiffer} available. * * ``` * @Component({ * viewProviders: [ * KeyValueDiffers.extend([new ImmutableMapDiffer()]) * ] * }) * ``` */ static extend(factories) { return { provide: KeyValueDiffers, useFactory: (parent) => { // if parent is null, it means that we are in the root injector and we have just overridden // the default injection mechanism for KeyValueDiffers, in such a case just assume // `defaultKeyValueDiffersFactory`. return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory()); }, // Dependency technically isn't optional, but we can provide a better error message this way. deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]] }; } find(kv) { const factory = this.factories.find(f => f.supports(kv)); if (factory) { return factory; } throw new Error(`Cannot find a differ supporting object '${kv}'`); } } /** @nocollapse */ KeyValueDiffers.ɵprov = ɵɵdefineInjectable({ token: KeyValueDiffers, providedIn: 'root', factory: defaultKeyValueDiffersFactory }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function collectNativeNodes(tView, lView, tNode, result, isProjection = false) { while (tNode !== null) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */); const lNode = lView[tNode.index]; if (lNode !== null) { result.push(unwrapRNode(lNode)); } // A given lNode can represent either a native node or a LContainer (when it is a host of a // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes // from the views in this container. if (isLContainer(lNode)) { for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) { const lViewInAContainer = lNode[i]; const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild; if (lViewFirstChildTNode !== null) { collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result); } } } const tNodeType = tNode.type; if (tNodeType & 8 /* ElementContainer */) { collectNativeNodes(tView, lView, tNode.child, result); } else if (tNodeType & 32 /* Icu */) { const nextRNode = icuContainerIterate(tNode, lView); let rNode; while (rNode = nextRNode()) { result.push(rNode); } } else if (tNodeType & 16 /* Projection */) { const nodesInSlot = getProjectionNodes(lView, tNode); if (Array.isArray(nodesInSlot)) { result.push(...nodesInSlot); } else { const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]); ngDevMode && assertParentView(parentView); collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true); } } tNode = isProjection ? tNode.projectionNext : tNode.next; } return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class ViewRef { constructor( /** * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef. * * When ViewRef is created for a dynamic component, this also represents the `LView` for the * component. * * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded * view. * * @internal */ _lView, /** * This represents the `LView` associated with the point where `ChangeDetectorRef` was * requested. * * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view. */ _cdRefInjectingView) { this._lView = _lView; this._cdRefInjectingView = _cdRefInjectingView; this._appRef = null; this._attachedToViewContainer = false; } get rootNodes() { const lView = this._lView; const tView = lView[TVIEW]; return collectNativeNodes(tView, lView, tView.firstChild, []); } get context() { return this._lView[CONTEXT]; } get destroyed() { return (this._lView[FLAGS] & 256 /* Destroyed */) === 256 /* Destroyed */; } destroy() { if (this._appRef) { this._appRef.detachView(this); } else if (this._attachedToViewContainer) { const parent = this._lView[PARENT]; if (isLContainer(parent)) { const viewRefs = parent[VIEW_REFS]; const index = viewRefs ? viewRefs.indexOf(this) : -1; if (index > -1) { ngDevMode && assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.'); detachView(parent, index); removeFromArray(viewRefs, index); } } this._attachedToViewContainer = false; } destroyLView(this._lView[TVIEW], this._lView); } onDestroy(callback) { storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback); } /** * Marks a view and all of its ancestors dirty. * * It also triggers change detection by calling `scheduleTick` internally, which coalesces * multiple `markForCheck` calls to into one change detection run. * * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is * checked when it needs to be re-rendered but the two normal triggers haven't marked it * dirty (i.e. inputs haven't changed and events haven't fired in the view). * * <!-- TODO: Add a link to a chapter on OnPush components --> * * @usageNotes * ### Example * * ```typescript * @Component({ * selector: 'my-app', * template: `Number of ticks: {{numberOfTicks}}` * changeDetection: ChangeDetectionStrategy.OnPush, * }) * class AppComponent { * numberOfTicks = 0; * * constructor(private ref: ChangeDetectorRef) { * setInterval(() => { * this.numberOfTicks++; * // the following is required, otherwise the view will not be updated * this.ref.markForCheck(); * }, 1000); * } * } * ``` */ markForCheck() { markViewDirty(this._cdRefInjectingView || this._lView); } /** * Detaches the view from the change detection tree. * * Detached views will not be checked during change detection runs until they are * re-attached, even if they are dirty. `detach` can be used in combination with * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change * detection checks. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * <!-- TODO: Add a live demo once ref.detectChanges is merged into master --> * * @usageNotes * ### Example * * The following example defines a component with a large list of readonly data. * Imagine the data changes constantly, many times per second. For performance reasons, * we want to check and update the list every five seconds. We can do that by detaching * the component's change detector and doing a local check every five seconds. * * ```typescript * class DataProvider { * // in a real application the returned data will be different every time * get data() { * return [1,2,3,4,5]; * } * } * * @Component({ * selector: 'giant-list', * template: ` * <li *ngFor="let d of dataProvider.data">Data {{d}}</li> * `, * }) * class GiantList { * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) { * ref.detach(); * setInterval(() => { * this.ref.detectChanges(); * }, 5000); * } * } * * @Component({ * selector: 'app', * providers: [DataProvider], * template: ` * <giant-list><giant-list> * `, * }) * class App { * } * ``` */ detach() { this._lView[FLAGS] &= ~128 /* Attached */; } /** * Re-attaches a view to the change detection tree. * * This can be used to re-attach views that were previously detached from the tree * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * * @usageNotes * ### Example * * The following example creates a component displaying `live` data. The component will detach * its change detector from the main change detector tree when the component's live property * is set to false. * * ```typescript * class DataProvider { * data = 1; * * constructor() { * setInterval(() => { * this.data = this.data * 2; * }, 500); * } * } * * @Component({ * selector: 'live-data', * inputs: ['live'], * template: 'Data: {{dataProvider.data}}' * }) * class LiveData { * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {} * * set live(value) { * if (value) { * this.ref.reattach(); * } else { * this.ref.detach(); * } * } * } * * @Component({ * selector: 'my-app', * providers: [DataProvider], * template: ` * Live Update: <input type="checkbox" [(ngModel)]="live"> * <live-data [live]="live"><live-data> * `, * }) * class AppComponent { * live = true; * } * ``` */ reattach() { this._lView[FLAGS] |= 128 /* Attached */; } /** * Checks the view and its children. * * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement * local change detection checks. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * <!-- TODO: Add a live demo once ref.detectChanges is merged into master --> * * @usageNotes * ### Example * * The following example defines a component with a large list of readonly data. * Imagine, the data changes constantly, many times per second. For performance reasons, * we want to check and update the list every five seconds. * * We can do that by detaching the component's change detector and doing a local change detection * check every five seconds. * * See {@link ChangeDetectorRef#detach detach} for more information. */ detectChanges() { detectChangesInternal(this._lView[TVIEW], this._lView, this.context); } /** * Checks the change detector and its children, and throws if any changes are detected. * * This is used in development mode to verify that running change detection doesn't * introduce other changes. */ checkNoChanges() { checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context); } attachToViewContainerRef() { if (this._appRef) { throw new Error('This view is already attached directly to the ApplicationRef!'); } this._attachedToViewContainer = true; } detachFromAppRef() { this._appRef = null; renderDetachView(this._lView[TVIEW], this._lView); } attachToAppRef(appRef) { if (this._attachedToViewContainer) { throw new Error('This view is already attached to a ViewContainer!'); } this._appRef = appRef; } } /** @internal */ class RootViewRef extends ViewRef { constructor(_view) { super(_view); this._view = _view; } detectChanges() { detectChangesInRootView(this._view); } checkNoChanges() { checkNoChangesInRootView(this._view); } get context() { return null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef; const SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop; const SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__; /** * Base class that provides change detection functionality. * A change-detection tree collects all views that are to be checked for changes. * Use the methods to add and remove views from the tree, initiate change-detection, * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered. * * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks) * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection) * * @usageNotes * * The following examples demonstrate how to modify default change-detection behavior * to perform explicit detection when needed. * * ### Use `markForCheck()` with `CheckOnce` strategy * * The following example sets the `OnPush` change-detection strategy for a component * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview). * * <code-example path="core/ts/change_detect/change-detection.ts" * region="mark-for-check"></code-example> * * ### Detach change detector to limit how often check occurs * * The following example defines a component with a large list of read-only data * that is expected to change constantly, many times per second. * To improve performance, we want to check and update the list * less often than the changes actually occur. To do that, we detach * the component's change detector and perform an explicit local check every five seconds. * * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example> * * * ### Reattaching a detached component * * The following example creates a component displaying live data. * The component detaches its change detector from the main change detector tree * when the `live` property is set to false, and reattaches it when the property * becomes true. * * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example> * * @publicApi */ class ChangeDetectorRef { } /** * @internal * @nocollapse */ ChangeDetectorRef.__NG_ELEMENT_ID__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY; /** * This marker is need so that the JIT compiler can correctly identify this class as special. * * @internal * @nocollapse */ ChangeDetectorRef.__ChangeDetectorRef__ = true; /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */ function injectChangeDetectorRef(isPipe = false) { return createViewRef(getCurrentTNode(), getLView(), isPipe); } /** * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias). * * @param tNode The node that is requesting a ChangeDetectorRef * @param lView The view to which the node belongs * @param isPipe Whether the view is being injected into a pipe. * @returns The ChangeDetectorRef to use */ function createViewRef(tNode, lView, isPipe) { // `isComponentView` will be true for Component and Directives (but not for Pipes). // See https://github.com/angular/angular/pull/33072 for proper fix const isComponentView = !isPipe && isComponentHost(tNode); if (isComponentView) { // The LView represents the location where the component is declared. // Instead we want the LView for the component View and so we need to look it up. const componentView = getComponentLViewByIndex(tNode.index, lView); // look down return new ViewRef(componentView, componentView); } else if (tNode.type & (3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */)) { // The LView represents the location where the injection is requested from. // We need to locate the containing LView (in case where the `lView` is an embedded view) const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up return new ViewRef(hostComponentView, lView); } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Structural diffing for `Object`s and `Map`s. */ const keyValDiff = [new DefaultKeyValueDifferFactory()]; /** * Structural diffing for `Iterable` types such as `Array`s. */ const iterableDiff = [new DefaultIterableDifferFactory()]; const defaultIterableDiffers = new IterableDiffers(iterableDiff); const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef; const SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop; const SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__POST_R3__; /** * Represents an embedded template that can be used to instantiate embedded views. * To instantiate embedded views based on a template, use the `ViewContainerRef` * method `createEmbeddedView()`. * * Access a `TemplateRef` instance by placing a directive on an `<ng-template>` * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view * is injected into the constructor of the directive, * using the `TemplateRef` token. * * You can also use a `Query` to find a `TemplateRef` associated with * a component or a directive. * * @see `ViewContainerRef` * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree) * * @publicApi */ class TemplateRef { } /** * @internal * @nocollapse */ TemplateRef.__NG_ELEMENT_ID__ = SWITCH_TEMPLATE_REF_FACTORY; const ViewEngineTemplateRef = TemplateRef; const R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef { constructor(_declarationLView, _declarationTContainer, elementRef) { super(); this._declarationLView = _declarationLView; this._declarationTContainer = _declarationTContainer; this.elementRef = elementRef; } createEmbeddedView(context) { const embeddedTView = this._declarationTContainer.tViews; const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null); const declarationLContainer = this._declarationLView[this._declarationTContainer.index]; ngDevMode && assertLContainer(declarationLContainer); embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer; const declarationViewLQueries = this._declarationLView[QUERIES]; if (declarationViewLQueries !== null) { embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView); } renderView(embeddedTView, embeddedLView, context); return new ViewRef(embeddedLView); } }; /** * Creates a TemplateRef given a node. * * @returns The TemplateRef instance to use */ function injectTemplateRef() { return createTemplateRef(getCurrentTNode(), getLView()); } /** * Creates a TemplateRef and stores it on the injector. * * @param hostTNode The node on which a TemplateRef is requested * @param hostLView The `LView` to which the node belongs * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type */ function createTemplateRef(hostTNode, hostLView) { if (hostTNode.type & 4 /* Container */) { ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated'); return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView)); } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents an instance of an `NgModule` created by an `NgModuleFactory`. * Provides access to the `NgModule` instance and related objects. * * @publicApi */ class NgModuleRef { } /** * @publicApi */ class NgModuleFactory { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef; const SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop; const SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__; /** * Represents a container where one or more views can be attached to a component. * * Can contain *host views* (created by instantiating a * component with the `createComponent()` method), and *embedded views* * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method). * * A view container instance can contain other view containers, * creating a [view hierarchy](guide/glossary#view-tree). * * @see `ComponentRef` * @see `EmbeddedViewRef` * * @publicApi */ class ViewContainerRef { } /** * @internal * @nocollapse */ ViewContainerRef.__NG_ELEMENT_ID__ = SWITCH_VIEW_CONTAINER_REF_FACTORY; /** * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef * already exists, retrieves the existing ViewContainerRef. * * @returns The ViewContainerRef instance to use */ function injectViewContainerRef() { const previousTNode = getCurrentTNode(); return createContainerRef(previousTNode, getLView()); } const VE_ViewContainerRef = ViewContainerRef; const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef { constructor(_lContainer, _hostTNode, _hostLView) { super(); this._lContainer = _lContainer; this._hostTNode = _hostTNode; this._hostLView = _hostLView; } get element() { return createElementRef(this._hostTNode, this._hostLView); } get injector() { return new NodeInjector(this._hostTNode, this._hostLView); } /** @deprecated No replacement */ get parentInjector() { const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView); if (hasParentInjector(parentLocation)) { const parentView = getParentInjectorView(parentLocation, this._hostLView); const injectorIndex = getParentInjectorIndex(parentLocation); ngDevMode && assertNodeInjector(parentView, injectorIndex); const parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* TNODE */]; return new NodeInjector(parentTNode, parentView); } else { return new NodeInjector(null, this._hostLView); } } clear() { while (this.length > 0) { this.remove(this.length - 1); } } get(index) { const viewRefs = getViewRefs(this._lContainer); return viewRefs !== null && viewRefs[index] || null; } get length() { return this._lContainer.length - CONTAINER_HEADER_OFFSET; } createEmbeddedView(templateRef, context, index) { const viewRef = templateRef.createEmbeddedView(context || {}); this.insert(viewRef, index); return viewRef; } createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) { const contextInjector = injector || this.parentInjector; if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) { // DO NOT REFACTOR. The code here used to have a `value || undefined` expression // which seems to cause internal google apps to fail. This is documented in the // following internal bug issue: go/b/142967802 const result = contextInjector.get(NgModuleRef, null); if (result) { ngModuleRef = result; } } const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef); this.insert(componentRef.hostView, index); return componentRef; } insert(viewRef, index) { const lView = viewRef._lView; const tView = lView[TVIEW]; if (ngDevMode && viewRef.destroyed) { throw new Error('Cannot insert a destroyed View in a ViewContainer!'); } if (viewAttachedToContainer(lView)) { // If view is already attached, detach it first so we clean up references appropriately. const prevIdx = this.indexOf(viewRef); // A view might be attached either to this or a different container. The `prevIdx` for // those cases will be: // equal to -1 for views attached to this ViewContainerRef // >= 0 for views attached to a different ViewContainerRef if (prevIdx !== -1) { this.detach(prevIdx); } else { const prevLContainer = lView[PARENT]; ngDevMode && assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.'); // We need to re-create a R3ViewContainerRef instance since those are not stored on // LView (nor anywhere else). const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]); prevVCRef.detach(prevVCRef.indexOf(viewRef)); } } // Logical operation of adding `LView` to `LContainer` const adjustedIdx = this._adjustIndex(index); const lContainer = this._lContainer; insertView(tView, lView, lContainer, adjustedIdx); // Physical operation of adding the DOM nodes. const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer); const renderer = lView[RENDERER]; const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]); if (parentRNode !== null) { addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode); } viewRef.attachToViewContainerRef(); addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef); return viewRef; } move(viewRef, newIndex) { if (ngDevMode && viewRef.destroyed) { throw new Error('Cannot move a destroyed View in a ViewContainer!'); } return this.insert(viewRef, newIndex); } indexOf(viewRef) { const viewRefsArr = getViewRefs(this._lContainer); return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1; } remove(index) { const adjustedIdx = this._adjustIndex(index, -1); const detachedView = detachView(this._lContainer, adjustedIdx); if (detachedView) { // Before destroying the view, remove it from the container's array of `ViewRef`s. // This ensures the view container length is updated before calling // `destroyLView`, which could recursively call view container methods that // rely on an accurate container length. // (e.g. a method on this view container being called by a child directive's OnDestroy // lifecycle hook) removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx); destroyLView(detachedView[TVIEW], detachedView); } } detach(index) { const adjustedIdx = this._adjustIndex(index, -1); const view = detachView(this._lContainer, adjustedIdx); const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null; return wasDetached ? new ViewRef(view) : null; } _adjustIndex(index, shift = 0) { if (index == null) { return this.length + shift; } if (ngDevMode) { assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`); // +1 because it's legal to insert at the end. assertLessThan(index, this.length + 1 + shift, 'index'); } return index; } }; function getViewRefs(lContainer) { return lContainer[VIEW_REFS]; } function getOrCreateViewRefs(lContainer) { return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = [])); } /** * Creates a ViewContainerRef and stores it on the injector. * * @param ViewContainerRefToken The ViewContainerRef type * @param ElementRefToken The ElementRef type * @param hostTNode The node that is requesting a ViewContainerRef * @param hostLView The view to which the node belongs * @returns The ViewContainerRef instance to use */ function createContainerRef(hostTNode, hostLView) { ngDevMode && assertTNodeType(hostTNode, 12 /* AnyContainer */ | 3 /* AnyRNode */); let lContainer; const slotValue = hostLView[hostTNode.index]; if (isLContainer(slotValue)) { // If the host is a container, we don't need to create a new LContainer lContainer = slotValue; } else { let commentNode; // If the host is an element container, the native host element is guaranteed to be a // comment and we can reuse that comment as anchor element for the new LContainer. // The comment node in question is already part of the DOM structure so we don't need to append // it again. if (hostTNode.type & 8 /* ElementContainer */) { commentNode = unwrapRNode(slotValue); } else { // If the host is a regular element, we have to insert a comment node manually which will // be used as an anchor when inserting elements. In this specific case we use low-level DOM // manipulation to insert it. const renderer = hostLView[RENDERER]; ngDevMode && ngDevMode.rendererCreateComment++; commentNode = renderer.createComment(ngDevMode ? 'container' : ''); const hostNative = getNativeByTNode(hostTNode, hostLView); const parentOfHostNative = nativeParentNode(renderer, hostNative); nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false); } hostLView[hostTNode.index] = lContainer = createLContainer(slotValue, hostLView, commentNode, hostTNode); addToViewTree(hostLView, lContainer); } return new R3ViewContainerRef(lContainer, hostTNode, hostLView); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) { let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`; if (isFirstCheck) { msg += ` It seems like the view has been created after its parent and its children have been dirty checked.` + ` Has it been created in a change detection hook ?`; } return viewDebugError(msg, context); } function viewWrappedDebugError(err, context) { if (!(err instanceof Error)) { // errors that are not Error instances don't have a stack, // so it is ok to wrap them into a new Error object... err = new Error(err.toString()); } _addDebugContext(err, context); return err; } function viewDebugError(msg, context) { const err = new Error(msg); _addDebugContext(err, context); return err; } function _addDebugContext(err, context) { err[ERROR_DEBUG_CONTEXT] = context; err[ERROR_LOGGER] = context.logError.bind(context); } function isViewDebugError(err) { return !!getDebugContext(err); } function viewDestroyedError(action) { return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Called before each cycle of a view's check to detect whether this is in the // initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit // lifecycle methods. Returns true if this check cycle should call lifecycle // methods. function shiftInitState(view, priorInitState, newInitState) { // Only update the InitState if we are currently in the prior state. // For example, only move into CallingInit if we are in BeforeInit. Only // move into CallingContentInit if we are in CallingInit. Normally this will // always be true because of how checkCycle is called in checkAndUpdateView. // However, if checkAndUpdateView is called recursively or if an exception is // thrown while checkAndUpdateView is running, checkAndUpdateView starts over // from the beginning. This ensures the state is monotonically increasing, // terminating in the AfterInit state, which ensures the Init methods are called // at least once and only once. const state = view.state; const initState = state & 1792 /* InitState_Mask */; if (initState === priorInitState) { view.state = (state & ~1792 /* InitState_Mask */) | newInitState; view.initIndex = -1; return true; } return initState === newInitState; } // Returns true if the lifecycle init method should be called for the node with // the given init index. function shouldCallLifecycleInitHook(view, initState, index) { if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) { view.initIndex = index + 1; return true; } return false; } /** * Node instance data. * * We have a separate type per NodeType to save memory * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>) * * To keep our code monomorphic, * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...). * This way, no usage site can get a `NodeData` from view.nodes and then use it for different * purposes. */ class NodeData { } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asTextData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asElementData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asProviderData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asPureExpressionData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asQueryList(view, index) { return view.nodes[index]; } class DebugContext { } /** * This object is used to prevent cycles in the source files and to have a place where * debug mode can hook it. It is lazily filled when `isDevMode` is known. */ const Services = { setCurrentNode: undefined, createRootView: undefined, createEmbeddedView: undefined, createComponentView: undefined, createNgModuleRef: undefined, overrideProvider: undefined, overrideComponentView: undefined, clearOverrides: undefined, checkAndUpdateView: undefined, checkNoChangesView: undefined, destroyView: undefined, resolveDep: undefined, createDebugContext: undefined, handleEvent: undefined, updateDirectives: undefined, updateRenderer: undefined, dirtyParentQueries: undefined, }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NOOP = () => { }; const _tokenKeyCache = new Map(); function tokenKey(token) { let key = _tokenKeyCache.get(token); if (!key) { key = stringify(token) + '_' + _tokenKeyCache.size; _tokenKeyCache.set(token, key); } return key; } function unwrapValue(view, nodeIdx, bindingIdx, value) { if (WrappedValue.isWrapped(value)) { value = WrappedValue.unwrap(value); const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx; const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]); view.oldValues[globalBindingIdx] = new WrappedValue(oldValue); } return value; } const UNDEFINED_RENDERER_TYPE_ID = '$$undefined'; const EMPTY_RENDERER_TYPE_ID = '$$empty'; // Attention: this function is called as top level function. // Putting any logic in here will destroy closure tree shaking! function createRendererType2(values) { return { id: UNDEFINED_RENDERER_TYPE_ID, styles: values.styles, encapsulation: values.encapsulation, data: values.data }; } let _renderCompCount$1 = 0; function resolveRendererType2(type) { if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) { // first time we see this RendererType2. Initialize it... const isFilled = ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) || type.styles.length || Object.keys(type.data).length); if (isFilled) { type.id = `c${_renderCompCount$1++}`; } else { type.id = EMPTY_RENDERER_TYPE_ID; } } if (type && type.id === EMPTY_RENDERER_TYPE_ID) { type = null; } return type || null; } function checkBinding(view, def, bindingIdx, value) { const oldValues = view.oldValues; if ((view.state & 2 /* FirstCheck */) || !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) { return true; } return false; } function checkAndUpdateBinding(view, def, bindingIdx, value) { if (checkBinding(view, def, bindingIdx, value)) { view.oldValues[def.bindingIndex + bindingIdx] = value; return true; } return false; } function checkBindingNoChanges(view, def, bindingIdx, value) { const oldValue = view.oldValues[def.bindingIndex + bindingIdx]; if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) { const bindingName = def.bindings[bindingIdx].name; throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`, `${bindingName}: ${value}`, (view.state & 1 /* BeforeFirstCheck */) !== 0); } } function markParentViewsForCheck(view) { let currView = view; while (currView) { if (currView.def.flags & 2 /* OnPush */) { currView.state |= 8 /* ChecksEnabled */; } currView = currView.viewContainerParent || currView.parent; } } function markParentViewsForCheckProjectedViews(view, endView) { let currView = view; while (currView && currView !== endView) { currView.state |= 64 /* CheckProjectedViews */; currView = currView.viewContainerParent || currView.parent; } } function dispatchEvent(view, nodeIndex, eventName, event) { try { const nodeDef = view.def.nodes[nodeIndex]; const startView = nodeDef.flags & 33554432 /* ComponentView */ ? asElementData(view, nodeIndex).componentView : view; markParentViewsForCheck(startView); return Services.handleEvent(view, nodeIndex, eventName, event); } catch (e) { // Attention: Don't rethrow, as it would cancel Observable subscriptions! view.root.errorHandler.handleError(e); } } function declaredViewContainer(view) { if (view.parent) { const parentView = view.parent; return asElementData(parentView, view.parentNodeDef.nodeIndex); } return null; } /** * for component views, this is the host element. * for embedded views, this is the index of the parent node * that contains the view container. */ function viewParentEl(view) { const parentView = view.parent; if (parentView) { return view.parentNodeDef.parent; } else { return null; } } function renderNode(view, def) { switch (def.flags & 201347067 /* Types */) { case 1 /* TypeElement */: return asElementData(view, def.nodeIndex).renderElement; case 2 /* TypeText */: return asTextData(view, def.nodeIndex).renderText; } } function elementEventFullName(target, name) { return target ? `${target}:${name}` : name; } function isComponentView(view) { return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */); } function isEmbeddedView(view) { return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */); } function filterQueryId(queryId) { return 1 << (queryId % 32); } function splitMatchedQueriesDsl(matchedQueriesDsl) { const matchedQueries = {}; let matchedQueryIds = 0; const references = {}; if (matchedQueriesDsl) { matchedQueriesDsl.forEach(([queryId, valueType]) => { if (typeof queryId === 'number') { matchedQueries[queryId] = valueType; matchedQueryIds |= filterQueryId(queryId); } else { references[queryId] = valueType; } }); } return { matchedQueries, references, matchedQueryIds }; } function splitDepsDsl(deps, sourceName) { return deps.map(value => { let token; let flags; if (Array.isArray(value)) { [flags, token] = value; } else { flags = 0 /* None */; token = value; } if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) { Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true }); } return { flags, token, tokenKey: tokenKey(token) }; }); } function getParentRenderElement(view, renderHost, def) { let renderParent = def.renderParent; if (renderParent) { if ((renderParent.flags & 1 /* TypeElement */) === 0 || (renderParent.flags & 33554432 /* ComponentView */) === 0 || (renderParent.element.componentRendererType && (renderParent.element.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom || // TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12. renderParent.element.componentRendererType.encapsulation === 1))) { // only children of non components, or children of components with native encapsulation should // be attached. return asElementData(view, def.renderParent.nodeIndex).renderElement; } } else { return renderHost; } } const DEFINITION_CACHE = new WeakMap(); function resolveDefinition(factory) { let value = DEFINITION_CACHE.get(factory); if (!value) { value = factory(() => NOOP); value.factory = factory; DEFINITION_CACHE.set(factory, value); } return value; } function rootRenderNodes(view) { const renderNodes = []; visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes); return renderNodes; } function visitRootRenderNodes(view, action, parentNode, nextSibling, target) { // We need to re-compute the parent node in case the nodes have been moved around manually if (action === 3 /* RemoveChild */) { parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode)); } visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target); } function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) { for (let i = startIndex; i <= endIndex; i++) { const nodeDef = view.def.nodes[i]; if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) { visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target); } // jump to next sibling i += nodeDef.childCount; } } function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) { let compView = view; while (compView && !isComponentView(compView)) { compView = compView.parent; } const hostView = compView.parent; const hostElDef = viewParentEl(compView); const startIndex = hostElDef.nodeIndex + 1; const endIndex = hostElDef.nodeIndex + hostElDef.childCount; for (let i = startIndex; i <= endIndex; i++) { const nodeDef = hostView.def.nodes[i]; if (nodeDef.ngContentIndex === ngContentIndex) { visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target); } // jump to next sibling i += nodeDef.childCount; } if (!hostView.parent) { // a root view const projectedNodes = view.root.projectableNodes[ngContentIndex]; if (projectedNodes) { for (let i = 0; i < projectedNodes.length; i++) { execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target); } } } } function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) { if (nodeDef.flags & 8 /* TypeNgContent */) { visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target); } else { const rn = renderNode(view, nodeDef); if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) && (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) { // Note: we might need to do both actions. if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) { execRenderNodeAction(view, rn, action, parentNode, nextSibling, target); } if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) { const compView = asElementData(view, nodeDef.nodeIndex).componentView; execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target); } } else { execRenderNodeAction(view, rn, action, parentNode, nextSibling, target); } if (nodeDef.flags & 16777216 /* EmbeddedViews */) { const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews; for (let k = 0; k < embeddedViews.length; k++) { visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target); } } if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) { visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target); } } } function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) { const renderer = view.renderer; switch (action) { case 1 /* AppendChild */: renderer.appendChild(parentNode, renderNode); break; case 2 /* InsertBefore */: renderer.insertBefore(parentNode, renderNode, nextSibling); break; case 3 /* RemoveChild */: renderer.removeChild(parentNode, renderNode); break; case 0 /* Collect */: target.push(renderNode); break; } } const NS_PREFIX_RE = /^:([^:]+):(.+)$/; function splitNamespace(name) { if (name[0] === ':') { const match = name.match(NS_PREFIX_RE); return [match[1], match[2]]; } return ['', name]; } function calcBindingFlags(bindings) { let flags = 0; for (let i = 0; i < bindings.length; i++) { flags |= bindings[i].flags; } return flags; } function interpolate(valueCount, constAndInterp) { let result = ''; for (let i = 0; i < valueCount * 2; i = i + 2) { result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]); } return result + constAndInterp[valueCount * 2]; } function inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) { switch (valueCount) { case 1: return c0 + _toStringWithNull(a1) + c1; case 2: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2; case 3: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3; case 4: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4; case 5: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5; case 6: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6; case 7: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7; case 8: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8; case 9: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9; default: throw new Error(`Does not support more than 9 expressions`); } } function _toStringWithNull(v) { return v != null ? v.toString() : ''; } const EMPTY_ARRAY$4 = []; const EMPTY_MAP = {}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const UNDEFINED_VALUE = {}; const InjectorRefTokenKey = tokenKey(Injector); const INJECTORRefTokenKey = tokenKey(INJECTOR$1); const NgModuleRefTokenKey = tokenKey(NgModuleRef); function moduleProvideDef(flags, token, value, deps) { // Need to resolve forwardRefs as e.g. for `useValue` we // lowered the expression and then stopped evaluating it, // i.e. also didn't unwrap it. value = resolveForwardRef(value); const depDefs = splitDepsDsl(deps, stringify(token)); return { // will bet set by the module definition index: -1, deps: depDefs, flags, token, value }; } function moduleDef(providers) { const providersByKey = {}; const modules = []; let scope = null; for (let i = 0; i < providers.length; i++) { const provider = providers[i]; if (provider.token === INJECTOR_SCOPE) { scope = provider.value; } if (provider.flags & 1073741824 /* TypeNgModule */) { modules.push(provider.token); } provider.index = i; providersByKey[tokenKey(provider.token)] = provider; } return { // Will be filled later... factory: null, providersByKey, providers, modules, scope: scope, }; } function initNgModule(data) { const def = data._def; const providers = data._providers = newArray(def.providers.length); for (let i = 0; i < def.providers.length; i++) { const provDef = def.providers[i]; if (!(provDef.flags & 4096 /* LazyProvider */)) { // Make sure the provider has not been already initialized outside this loop. if (providers[i] === undefined) { providers[i] = _createProviderInstance(data, provDef); } } } } function resolveNgModuleDep(data, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) { const former = setCurrentInjector(data); try { if (depDef.flags & 8 /* Value */) { return depDef.token; } if (depDef.flags & 2 /* Optional */) { notFoundValue = null; } if (depDef.flags & 1 /* SkipSelf */) { return data._parent.get(depDef.token, notFoundValue); } const tokenKey = depDef.tokenKey; switch (tokenKey) { case InjectorRefTokenKey: case INJECTORRefTokenKey: case NgModuleRefTokenKey: return data; } const providerDef = data._def.providersByKey[tokenKey]; let injectableDef; if (providerDef) { let providerInstance = data._providers[providerDef.index]; if (providerInstance === undefined) { providerInstance = data._providers[providerDef.index] = _createProviderInstance(data, providerDef); } return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance; } else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) { const index = data._providers.length; data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = { flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */, value: injectableDef.factory, deps: [], index, token: depDef.token, }; data._providers[index] = UNDEFINED_VALUE; return (data._providers[index] = _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey])); } else if (depDef.flags & 4 /* Self */) { return notFoundValue; } return data._parent.get(depDef.token, notFoundValue); } finally { setCurrentInjector(former); } } function moduleTransitivelyPresent(ngModule, scope) { return ngModule._def.modules.indexOf(scope) > -1; } function targetsModule(ngModule, def) { const providedIn = def.providedIn; return providedIn != null && (providedIn === 'any' || providedIn === ngModule._def.scope || moduleTransitivelyPresent(ngModule, providedIn)); } function _createProviderInstance(ngModule, providerDef) { let injectable; switch (providerDef.flags & 201347067 /* Types */) { case 512 /* TypeClassProvider */: injectable = _createClass(ngModule, providerDef.value, providerDef.deps); break; case 1024 /* TypeFactoryProvider */: injectable = _callFactory(ngModule, providerDef.value, providerDef.deps); break; case 2048 /* TypeUseExistingProvider */: injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]); break; case 256 /* TypeValueProvider */: injectable = providerDef.value; break; } // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already // set (ngOnDestroy was detected statically). if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' && !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') { providerDef.flags |= 131072 /* OnDestroy */; } return injectable === undefined ? UNDEFINED_VALUE : injectable; } function _createClass(ngModule, ctor, deps) { const len = deps.length; switch (len) { case 0: return new ctor(); case 1: return new ctor(resolveNgModuleDep(ngModule, deps[0])); case 2: return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1])); case 3: return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues[i] = resolveNgModuleDep(ngModule, deps[i]); } return new ctor(...depValues); } } function _callFactory(ngModule, factory, deps) { const len = deps.length; switch (len) { case 0: return factory(); case 1: return factory(resolveNgModuleDep(ngModule, deps[0])); case 2: return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1])); case 3: return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues[i] = resolveNgModuleDep(ngModule, deps[i]); } return factory(...depValues); } } function callNgModuleLifecycle(ngModule, lifecycles) { const def = ngModule._def; const destroyed = new Set(); for (let i = 0; i < def.providers.length; i++) { const provDef = def.providers[i]; if (provDef.flags & 131072 /* OnDestroy */) { const instance = ngModule._providers[i]; if (instance && instance !== UNDEFINED_VALUE) { const onDestroy = instance.ngOnDestroy; if (typeof onDestroy === 'function' && !destroyed.has(instance)) { onDestroy.apply(instance); destroyed.add(instance); } } } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function attachEmbeddedView(parentView, elementData, viewIndex, view) { let embeddedViews = elementData.viewContainer._embeddedViews; if (viewIndex === null || viewIndex === undefined) { viewIndex = embeddedViews.length; } view.viewContainerParent = parentView; addToArray(embeddedViews, viewIndex, view); attachProjectedView(elementData, view); Services.dirtyParentQueries(view); const prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null; renderAttachEmbeddedView(elementData, prevView, view); } function attachProjectedView(vcElementData, view) { const dvcElementData = declaredViewContainer(view); if (!dvcElementData || dvcElementData === vcElementData || view.state & 16 /* IsProjectedView */) { return; } // Note: For performance reasons, we // - add a view to template._projectedViews only 1x throughout its lifetime, // and remove it not until the view is destroyed. // (hard, as when a parent view is attached/detached we would need to attach/detach all // nested projected views as well, even across component boundaries). // - don't track the insertion order of views in the projected views array // (hard, as when the views of the same template are inserted different view containers) view.state |= 16 /* IsProjectedView */; let projectedViews = dvcElementData.template._projectedViews; if (!projectedViews) { projectedViews = dvcElementData.template._projectedViews = []; } projectedViews.push(view); // Note: we are changing the NodeDef here as we cannot calculate // the fact whether a template is used for projection during compilation. markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef); } function markNodeAsProjectedTemplate(viewDef, nodeDef) { if (nodeDef.flags & 4 /* ProjectedTemplate */) { return; } viewDef.nodeFlags |= 4 /* ProjectedTemplate */; nodeDef.flags |= 4 /* ProjectedTemplate */; let parentNodeDef = nodeDef.parent; while (parentNodeDef) { parentNodeDef.childFlags |= 4 /* ProjectedTemplate */; parentNodeDef = parentNodeDef.parent; } } function detachEmbeddedView(elementData, viewIndex) { const embeddedViews = elementData.viewContainer._embeddedViews; if (viewIndex == null || viewIndex >= embeddedViews.length) { viewIndex = embeddedViews.length - 1; } if (viewIndex < 0) { return null; } const view = embeddedViews[viewIndex]; view.viewContainerParent = null; removeFromArray(embeddedViews, viewIndex); // See attachProjectedView for why we don't update projectedViews here. Services.dirtyParentQueries(view); renderDetachView$1(view); return view; } function detachProjectedView(view) { if (!(view.state & 16 /* IsProjectedView */)) { return; } const dvcElementData = declaredViewContainer(view); if (dvcElementData) { const projectedViews = dvcElementData.template._projectedViews; if (projectedViews) { removeFromArray(projectedViews, projectedViews.indexOf(view)); Services.dirtyParentQueries(view); } } } function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) { const embeddedViews = elementData.viewContainer._embeddedViews; const view = embeddedViews[oldViewIndex]; removeFromArray(embeddedViews, oldViewIndex); if (newViewIndex == null) { newViewIndex = embeddedViews.length; } addToArray(embeddedViews, newViewIndex, view); // Note: Don't need to change projectedViews as the order in there // as always invalid... Services.dirtyParentQueries(view); renderDetachView$1(view); const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null; renderAttachEmbeddedView(elementData, prevView, view); return view; } function renderAttachEmbeddedView(elementData, prevView, view) { const prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : elementData.renderElement; const parentNode = view.renderer.parentNode(prevRenderNode); const nextSibling = view.renderer.nextSibling(prevRenderNode); // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be! // However, browsers automatically do `appendChild` when there is no `nextSibling`. visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined); } function renderDetachView$1(view) { visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const EMPTY_CONTEXT = {}; // Attention: this function is called as top level function. // Putting any logic in here will destroy closure tree shaking! function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) { return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors); } function getComponentViewDefinitionFactory(componentFactory) { return componentFactory.viewDefFactory; } class ComponentFactory_ extends ComponentFactory { constructor(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) { // Attention: this ctor is called as top level function. // Putting any logic in here will destroy closure tree shaking! super(); this.selector = selector; this.componentType = componentType; this._inputs = _inputs; this._outputs = _outputs; this.ngContentSelectors = ngContentSelectors; this.viewDefFactory = viewDefFactory; } get inputs() { const inputsArr = []; const inputs = this._inputs; for (let propName in inputs) { const templateName = inputs[propName]; inputsArr.push({ propName, templateName }); } return inputsArr; } get outputs() { const outputsArr = []; for (let propName in this._outputs) { const templateName = this._outputs[propName]; outputsArr.push({ propName, templateName }); } return outputsArr; } /** * Creates a new component. */ create(injector, projectableNodes, rootSelectorOrNode, ngModule) { if (!ngModule) { throw new Error('ngModule should be provided'); } const viewDef = resolveDefinition(this.viewDefFactory); const componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex; const view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT); const component = asProviderData(view, componentNodeIndex).instance; if (rootSelectorOrNode) { view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full); } return new ComponentRef_(view, new ViewRef_(view), component); } } class ComponentRef_ extends ComponentRef { constructor(_view, _viewRef, _component) { super(); this._view = _view; this._viewRef = _viewRef; this._component = _component; this._elDef = this._view.def.nodes[0]; this.hostView = _viewRef; this.changeDetectorRef = _viewRef; this.instance = _component; } get location() { return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement); } get injector() { return new Injector_(this._view, this._elDef); } get componentType() { return this._component.constructor; } destroy() { this._viewRef.destroy(); } onDestroy(callback) { this._viewRef.onDestroy(callback); } } function createViewContainerData(view, elDef, elData) { return new ViewContainerRef_(view, elDef, elData); } class ViewContainerRef_ { constructor(_view, _elDef, _data) { this._view = _view; this._elDef = _elDef; this._data = _data; /** * @internal */ this._embeddedViews = []; } get element() { return new ElementRef(this._data.renderElement); } get injector() { return new Injector_(this._view, this._elDef); } /** @deprecated No replacement */ get parentInjector() { let view = this._view; let elDef = this._elDef.parent; while (!elDef && view) { elDef = viewParentEl(view); view = view.parent; } return view ? new Injector_(view, elDef) : new Injector_(this._view, null); } clear() { const len = this._embeddedViews.length; for (let i = len - 1; i >= 0; i--) { const view = detachEmbeddedView(this._data, i); Services.destroyView(view); } } get(index) { const view = this._embeddedViews[index]; if (view) { const ref = new ViewRef_(view); ref.attachToViewContainerRef(this); return ref; } return null; } get length() { return this._embeddedViews.length; } createEmbeddedView(templateRef, context, index) { const viewRef = templateRef.createEmbeddedView(context || {}); this.insert(viewRef, index); return viewRef; } createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) { const contextInjector = injector || this.parentInjector; if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) { ngModuleRef = contextInjector.get(NgModuleRef); } const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef); this.insert(componentRef.hostView, index); return componentRef; } insert(viewRef, index) { if (viewRef.destroyed) { throw new Error('Cannot insert a destroyed View in a ViewContainer!'); } const viewRef_ = viewRef; const viewData = viewRef_._view; attachEmbeddedView(this._view, this._data, index, viewData); viewRef_.attachToViewContainerRef(this); return viewRef; } move(viewRef, currentIndex) { if (viewRef.destroyed) { throw new Error('Cannot move a destroyed View in a ViewContainer!'); } const previousIndex = this._embeddedViews.indexOf(viewRef._view); moveEmbeddedView(this._data, previousIndex, currentIndex); return viewRef; } indexOf(viewRef) { return this._embeddedViews.indexOf(viewRef._view); } remove(index) { const viewData = detachEmbeddedView(this._data, index); if (viewData) { Services.destroyView(viewData); } } detach(index) { const view = detachEmbeddedView(this._data, index); return view ? new ViewRef_(view) : null; } } function createChangeDetectorRef(view) { return new ViewRef_(view); } class ViewRef_ { constructor(_view) { this._view = _view; this._viewContainerRef = null; this._appRef = null; } get rootNodes() { return rootRenderNodes(this._view); } get context() { return this._view.context; } get destroyed() { return (this._view.state & 128 /* Destroyed */) !== 0; } markForCheck() { markParentViewsForCheck(this._view); } detach() { this._view.state &= ~4 /* Attached */; } detectChanges() { const fs = this._view.root.rendererFactory; if (fs.begin) { fs.begin(); } try { Services.checkAndUpdateView(this._view); } finally { if (fs.end) { fs.end(); } } } checkNoChanges() { Services.checkNoChangesView(this._view); } reattach() { this._view.state |= 4 /* Attached */; } onDestroy(callback) { if (!this._view.disposables) { this._view.disposables = []; } this._view.disposables.push(callback); } destroy() { if (this._appRef) { this._appRef.detachView(this); } else if (this._viewContainerRef) { this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)); } Services.destroyView(this._view); } detachFromAppRef() { this._appRef = null; renderDetachView$1(this._view); Services.dirtyParentQueries(this._view); } attachToAppRef(appRef) { if (this._viewContainerRef) { throw new Error('This view is already attached to a ViewContainer!'); } this._appRef = appRef; } attachToViewContainerRef(vcRef) { if (this._appRef) { throw new Error('This view is already attached directly to the ApplicationRef!'); } this._viewContainerRef = vcRef; } } function createTemplateData(view, def) { return new TemplateRef_(view, def); } class TemplateRef_ extends TemplateRef { constructor(_parentView, _def) { super(); this._parentView = _parentView; this._def = _def; } createEmbeddedView(context) { return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context)); } get elementRef() { return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement); } } function createInjector$1(view, elDef) { return new Injector_(view, elDef); } class Injector_ { constructor(view, elDef) { this.view = view; this.elDef = elDef; } get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND) { const allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false; return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token, tokenKey: tokenKey(token) }, notFoundValue); } } function nodeValue(view, index) { const def = view.def.nodes[index]; if (def.flags & 1 /* TypeElement */) { const elData = asElementData(view, def.nodeIndex); return def.element.template ? elData.template : elData.renderElement; } else if (def.flags & 2 /* TypeText */) { return asTextData(view, def.nodeIndex).renderText; } else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) { return asProviderData(view, def.nodeIndex).instance; } throw new Error(`Illegal state: read nodeValue for node index ${index}`); } function createNgModuleRef(moduleType, parent, bootstrapComponents, def) { return new NgModuleRef_(moduleType, parent, bootstrapComponents, def); } class NgModuleRef_ { constructor(_moduleType, _parent, _bootstrapComponents, _def) { this._moduleType = _moduleType; this._parent = _parent; this._bootstrapComponents = _bootstrapComponents; this._def = _def; this._destroyListeners = []; this._destroyed = false; this.injector = this; initNgModule(this); } get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) { let flags = 0 /* None */; if (injectFlags & InjectFlags.SkipSelf) { flags |= 1 /* SkipSelf */; } else if (injectFlags & InjectFlags.Self) { flags |= 4 /* Self */; } return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue); } get instance() { return this.get(this._moduleType); } get componentFactoryResolver() { return this.get(ComponentFactoryResolver); } destroy() { if (this._destroyed) { throw new Error(`The ng module ${stringify(this.instance.constructor)} has already been destroyed.`); } this._destroyed = true; callNgModuleLifecycle(this, 131072 /* OnDestroy */); this._destroyListeners.forEach((listener) => listener()); } onDestroy(callback) { this._destroyListeners.push(callback); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Renderer2TokenKey = tokenKey(Renderer2); const ElementRefTokenKey = tokenKey(ElementRef); const ViewContainerRefTokenKey = tokenKey(ViewContainerRef); const TemplateRefTokenKey = tokenKey(TemplateRef); const ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef); const InjectorRefTokenKey$1 = tokenKey(Injector); const INJECTORRefTokenKey$1 = tokenKey(INJECTOR$1); function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) { const bindings = []; if (props) { for (let prop in props) { const [bindingIndex, nonMinifiedName] = props[prop]; bindings[bindingIndex] = { flags: 8 /* TypeProperty */, name: prop, nonMinifiedName, ns: null, securityContext: null, suffix: null }; } } const outputDefs = []; if (outputs) { for (let propName in outputs) { outputDefs.push({ type: 1 /* DirectiveOutput */, propName, target: null, eventName: outputs[propName] }); } } flags |= 16384 /* TypeDirective */; return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs); } function pipeDef(flags, ctor, deps) { flags |= 16 /* TypePipe */; return _def(-1, flags, null, 0, ctor, ctor, deps); } function providerDef(flags, matchedQueries, token, value, deps) { return _def(-1, flags, matchedQueries, 0, token, value, deps); } function _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) { const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl); if (!outputs) { outputs = []; } if (!bindings) { bindings = []; } // Need to resolve forwardRefs as e.g. for `useValue` we // lowered the expression and then stopped evaluating it, // i.e. also didn't unwrap it. value = resolveForwardRef(value); const depDefs = splitDepsDsl(deps, stringify(token)); return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex: -1, childCount, bindings, bindingFlags: calcBindingFlags(bindings), outputs, element: null, provider: { token, value, deps: depDefs }, text: null, query: null, ngContent: null }; } function createProviderInstance(view, def) { return _createProviderInstance$1(view, def); } function createPipeInstance(view, def) { // deps are looked up from component. let compView = view; while (compView.parent && !isComponentView(compView)) { compView = compView.parent; } // pipes can see the private services of the component const allowPrivateServices = true; // pipes are always eager and classes! return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps); } function createDirectiveInstance(view, def) { // components can see other private services, other directives can't. const allowPrivateServices = (def.flags & 32768 /* Component */) > 0; // directives are always eager and classes! const instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps); if (def.outputs.length) { for (let i = 0; i < def.outputs.length; i++) { const output = def.outputs[i]; const outputObservable = instance[output.propName]; if (isObservable(outputObservable)) { const subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName)); view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription); } else { throw new Error(`@Output ${output.propName} not initialized in '${instance.constructor.name}'.`); } } } return instance; } function eventHandlerClosure(view, index, eventName) { return (event) => dispatchEvent(view, index, eventName, event); } function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const providerData = asProviderData(view, def.nodeIndex); const directive = providerData.instance; let changed = false; let changes = undefined; const bindLen = def.bindings.length; if (bindLen > 0 && checkBinding(view, def, 0, v0)) { changed = true; changes = updateProp(view, providerData, def, 0, v0, changes); } if (bindLen > 1 && checkBinding(view, def, 1, v1)) { changed = true; changes = updateProp(view, providerData, def, 1, v1, changes); } if (bindLen > 2 && checkBinding(view, def, 2, v2)) { changed = true; changes = updateProp(view, providerData, def, 2, v2, changes); } if (bindLen > 3 && checkBinding(view, def, 3, v3)) { changed = true; changes = updateProp(view, providerData, def, 3, v3, changes); } if (bindLen > 4 && checkBinding(view, def, 4, v4)) { changed = true; changes = updateProp(view, providerData, def, 4, v4, changes); } if (bindLen > 5 && checkBinding(view, def, 5, v5)) { changed = true; changes = updateProp(view, providerData, def, 5, v5, changes); } if (bindLen > 6 && checkBinding(view, def, 6, v6)) { changed = true; changes = updateProp(view, providerData, def, 6, v6, changes); } if (bindLen > 7 && checkBinding(view, def, 7, v7)) { changed = true; changes = updateProp(view, providerData, def, 7, v7, changes); } if (bindLen > 8 && checkBinding(view, def, 8, v8)) { changed = true; changes = updateProp(view, providerData, def, 8, v8, changes); } if (bindLen > 9 && checkBinding(view, def, 9, v9)) { changed = true; changes = updateProp(view, providerData, def, 9, v9, changes); } if (changes) { directive.ngOnChanges(changes); } if ((def.flags & 65536 /* OnInit */) && shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) { directive.ngOnInit(); } if (def.flags & 262144 /* DoCheck */) { directive.ngDoCheck(); } return changed; } function checkAndUpdateDirectiveDynamic(view, def, values) { const providerData = asProviderData(view, def.nodeIndex); const directive = providerData.instance; let changed = false; let changes = undefined; for (let i = 0; i < values.length; i++) { if (checkBinding(view, def, i, values[i])) { changed = true; changes = updateProp(view, providerData, def, i, values[i], changes); } } if (changes) { directive.ngOnChanges(changes); } if ((def.flags & 65536 /* OnInit */) && shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) { directive.ngOnInit(); } if (def.flags & 262144 /* DoCheck */) { directive.ngDoCheck(); } return changed; } function _createProviderInstance$1(view, def) { // private services can see other private services const allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0; const providerDef = def.provider; switch (def.flags & 201347067 /* Types */) { case 512 /* TypeClassProvider */: return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps); case 1024 /* TypeFactoryProvider */: return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps); case 2048 /* TypeUseExistingProvider */: return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]); case 256 /* TypeValueProvider */: return providerDef.value; } } function createClass(view, elDef, allowPrivateServices, ctor, deps) { const len = deps.length; switch (len) { case 0: return new ctor(); case 1: return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0])); case 2: return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1])); case 3: return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i])); } return new ctor(...depValues); } } function callFactory(view, elDef, allowPrivateServices, factory, deps) { const len = deps.length; switch (len) { case 0: return factory(); case 1: return factory(resolveDep(view, elDef, allowPrivateServices, deps[0])); case 2: return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1])); case 3: return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i])); } return factory(...depValues); } } // This default value is when checking the hierarchy for a token. // // It means both: // - the token is not provided by the current injector, // - only the element injectors should be checked (ie do not check module injectors // // mod1 // / // el1 mod2 // \ / // el2 // // When requesting el2.injector.get(token), we should check in the following order and return the // first found value: // - el2.injector.get(token, default) // - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module // - mod2.injector.get(token, default) const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {}; function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) { if (depDef.flags & 8 /* Value */) { return depDef.token; } const startView = view; if (depDef.flags & 2 /* Optional */) { notFoundValue = null; } const tokenKey = depDef.tokenKey; if (tokenKey === ChangeDetectorRefTokenKey) { // directives on the same element as a component should be able to control the change detector // of that component as well. allowPrivateServices = !!(elDef && elDef.element.componentView); } if (elDef && (depDef.flags & 1 /* SkipSelf */)) { allowPrivateServices = false; elDef = elDef.parent; } let searchView = view; while (searchView) { if (elDef) { switch (tokenKey) { case Renderer2TokenKey: { const compView = findCompView(searchView, elDef, allowPrivateServices); return compView.renderer; } case ElementRefTokenKey: return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement); case ViewContainerRefTokenKey: return asElementData(searchView, elDef.nodeIndex).viewContainer; case TemplateRefTokenKey: { if (elDef.element.template) { return asElementData(searchView, elDef.nodeIndex).template; } break; } case ChangeDetectorRefTokenKey: { let cdView = findCompView(searchView, elDef, allowPrivateServices); return createChangeDetectorRef(cdView); } case InjectorRefTokenKey$1: case INJECTORRefTokenKey$1: return createInjector$1(searchView, elDef); default: const providerDef = (allowPrivateServices ? elDef.element.allProviders : elDef.element.publicProviders)[tokenKey]; if (providerDef) { let providerData = asProviderData(searchView, providerDef.nodeIndex); if (!providerData) { providerData = { instance: _createProviderInstance$1(searchView, providerDef) }; searchView.nodes[providerDef.nodeIndex] = providerData; } return providerData.instance; } } } allowPrivateServices = isComponentView(searchView); elDef = viewParentEl(searchView); searchView = searchView.parent; if (depDef.flags & 4 /* Self */) { searchView = null; } } const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR); if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) { // Return the value from the root element injector when // - it provides it // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) // - the module injector should not be checked // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) return value; } return startView.root.ngModule.injector.get(depDef.token, notFoundValue); } function findCompView(view, elDef, allowPrivateServices) { let compView; if (allowPrivateServices) { compView = asElementData(view, elDef.nodeIndex).componentView; } else { compView = view; while (compView.parent && !isComponentView(compView)) { compView = compView.parent; } } return compView; } function updateProp(view, providerData, def, bindingIdx, value, changes) { if (def.flags & 32768 /* Component */) { const compView = asElementData(view, def.parent.nodeIndex).componentView; if (compView.def.flags & 2 /* OnPush */) { compView.state |= 8 /* ChecksEnabled */; } } const binding = def.bindings[bindingIdx]; const propName = binding.name; // Note: This is still safe with Closure Compiler as // the user passed in the property name as an object has to `providerDef`, // so Closure Compiler will have renamed the property correctly already. providerData.instance[propName] = value; if (def.flags & 524288 /* OnChanges */) { changes = changes || {}; const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]); const binding = def.bindings[bindingIdx]; changes[binding.nonMinifiedName] = new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0); } view.oldValues[def.bindingIndex + bindingIdx] = value; return changes; } // This function calls the ngAfterContentCheck, ngAfterContentInit, // ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node // flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are // called during a pre-order traversal of the view tree (that is calling the // parent hooks before the child hooks) these events are sent in using a // post-order traversal of the tree (children before parents). This changes the // meaning of initIndex in the view state. For ngOnInit, initIndex tracks the // expected nodeIndex which a ngOnInit should be called. When sending // ngAfterContentInit and ngAfterViewInit it is the expected count of // ngAfterContentInit or ngAfterViewInit methods that have been called. This // ensure that despite being called recursively or after picking up after an // exception, the ngAfterContentInit or ngAfterViewInit will be called on the // correct nodes. Consider for example, the following (where E is an element // and D is a directive) // Tree: pre-order index post-order index // E1 0 6 // E2 1 1 // D3 2 0 // E4 3 5 // E5 4 4 // E6 5 2 // E7 6 3 // As can be seen, the post-order index has an unclear relationship to the // pre-order index (postOrderIndex === preOrderIndex - parentCount + // childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit // are stable (will be the same for the same view regardless of exceptions or // recursion) we just need to count them which will roughly correspond to the // post-order index (it skips elements and directives that do not have // lifecycle hooks). // // For example, if an exception is raised in the E6.onAfterViewInit() the // initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to // initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will // not have their ngAfterViewInit() called but, starting with E7, the rest of // the view will begin getting ngAfterViewInit() called until a check and // pass is complete. // // This algorthim also handles recursion. Consider if E4's ngAfterViewInit() // indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected // initIndex is set to 6, the recusive checkAndUpdateView() starts walk again. // D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1. // When the recursion returns the initIndex will be 7 so E1 is skipped as it // has already been called in the recursively called checkAnUpdateView(). function callLifecycleHooksChildrenFirst(view, lifecycles) { if (!(view.def.nodeFlags & lifecycles)) { return; } const nodes = view.def.nodes; let initIndex = 0; for (let i = 0; i < nodes.length; i++) { const nodeDef = nodes[i]; let parent = nodeDef.parent; if (!parent && nodeDef.flags & lifecycles) { // matching root node (e.g. a pipe) callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++); } if ((nodeDef.childFlags & lifecycles) === 0) { // no child matches one of the lifecycles i += nodeDef.childCount; } while (parent && (parent.flags & 1 /* TypeElement */) && i === parent.nodeIndex + parent.childCount) { // last child of an element if (parent.directChildFlags & lifecycles) { initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex); } parent = parent.parent; } } } function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) { for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) { const nodeDef = view.def.nodes[i]; if (nodeDef.flags & lifecycles) { callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++); } // only visit direct children i += nodeDef.childCount; } return initIndex; } function callProviderLifecycles(view, index, lifecycles, initIndex) { const providerData = asProviderData(view, index); if (!providerData) { return; } const provider = providerData.instance; if (!provider) { return; } Services.setCurrentNode(view, index); if (lifecycles & 1048576 /* AfterContentInit */ && shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) { provider.ngAfterContentInit(); } if (lifecycles & 2097152 /* AfterContentChecked */) { provider.ngAfterContentChecked(); } if (lifecycles & 4194304 /* AfterViewInit */ && shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) { provider.ngAfterViewInit(); } if (lifecycles & 8388608 /* AfterViewChecked */) { provider.ngAfterViewChecked(); } if (lifecycles & 131072 /* OnDestroy */) { provider.ngOnDestroy(); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class ComponentFactoryResolver$1 extends ComponentFactoryResolver { /** * @param ngModule The NgModuleRef to which all resolved factories are bound. */ constructor(ngModule) { super(); this.ngModule = ngModule; } resolveComponentFactory(component) { ngDevMode && assertComponentType(component); const componentDef = getComponentDef(component); return new ComponentFactory$1(componentDef, this.ngModule); } } function toRefArray(map) { const array = []; for (let nonMinified in map) { if (map.hasOwnProperty(nonMinified)) { const minified = map[nonMinified]; array.push({ propName: minified, templateName: nonMinified }); } } return array; } function getNamespace$1(elementName) { const name = elementName.toLowerCase(); return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null); } /** * A change detection scheduler token for {@link RootContext}. This token is the default value used * for the default `RootContext` found in the {@link ROOT_CONTEXT} token. */ const SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', { providedIn: 'root', factory: () => defaultScheduler, }); function createChainedInjector(rootViewInjector, moduleInjector) { return { get: (token, notFoundValue, flags) => { const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags); if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) { // Return the value from the root element injector when // - it provides it // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) // - the module injector should not be checked // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) return value; } return moduleInjector.get(token, notFoundValue, flags); } }; } /** * Render3 implementation of {@link viewEngine_ComponentFactory}. */ class ComponentFactory$1 extends ComponentFactory { /** * @param componentDef The component definition. * @param ngModule The NgModuleRef to which the factory is bound. */ constructor(componentDef, ngModule) { super(); this.componentDef = componentDef; this.ngModule = ngModule; this.componentType = componentDef.type; this.selector = stringifyCSSSelectorList(componentDef.selectors); this.ngContentSelectors = componentDef.ngContentSelectors ? componentDef.ngContentSelectors : []; this.isBoundToModule = !!ngModule; } get inputs() { return toRefArray(this.componentDef.inputs); } get outputs() { return toRefArray(this.componentDef.outputs); } create(injector, projectableNodes, rootSelectorOrNode, ngModule) { ngModule = ngModule || this.ngModule; const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector; const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3); const sanitizer = rootViewInjector.get(Sanitizer, null); const hostRenderer = rendererFactory.createRenderer(null, this.componentDef); // Determine a tag name used for creating host elements when this component is created // dynamically. Default to 'div' if this component did not specify any tag name in its selector. const elementName = this.componentDef.selectors[0][0] || 'div'; const hostRNode = rootSelectorOrNode ? locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) : createElementNode(rendererFactory.createRenderer(null, this.componentDef), elementName, getNamespace$1(elementName)); const rootFlags = this.componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ : 16 /* CheckAlways */ | 512 /* IsRoot */; const rootContext = createRootContext(); // Create the root view. Uses empty TView and ContentTemplate. const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null); const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector); // rootView is the parent when bootstrapping // TODO(misko): it looks like we are entering view here but we don't really need to as // `renderView` does that. However as the code is written it is needed because // `createRootComponentView` and `createRootComponent` both read global state. Fixing those // issues would allow us to drop this. enterView(rootLView); let component; let tElementNode; try { const componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer); if (hostRNode) { if (rootSelectorOrNode) { setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]); } else { // If host element is created as a part of this function call (i.e. `rootSelectorOrNode` // is not defined), also apply attributes and classes extracted from component selector. // Extract attributes and classes from the first selector only to match VE behavior. const { attrs, classes } = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]); if (attrs) { setUpAttributes(hostRenderer, hostRNode, attrs); } if (classes && classes.length > 0) { writeDirectClass(hostRenderer, hostRNode, classes.join(' ')); } } } tElementNode = getTNode(rootTView, HEADER_OFFSET); if (projectableNodes !== undefined) { const projection = tElementNode.projection = []; for (let i = 0; i < this.ngContentSelectors.length; i++) { const nodesforSlot = projectableNodes[i]; // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade // case). Here we do normalize passed data structure to be an array of arrays to avoid // complex checks down the line. // We also normalize the length of the passed in projectable nodes (to match the number of // <ng-container> slots defined by a component). projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null); } } // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and // executed here? // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]); renderView(rootTView, rootLView, null); } finally { leaveView(); } return new ComponentRef$1(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode); } } const componentFactoryResolver = new ComponentFactoryResolver$1(); /** * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the * ComponentFactoryResolver * already exists, retrieves the existing ComponentFactoryResolver. * * @returns The ComponentFactoryResolver instance to use */ function injectComponentFactoryResolver() { return componentFactoryResolver; } /** * Represents an instance of a Component created via a {@link ComponentFactory}. * * `ComponentRef` provides access to the Component Instance as well other objects related to this * Component Instance and allows you to destroy the Component Instance via the {@link #destroy} * method. * */ class ComponentRef$1 extends ComponentRef { constructor(componentType, instance, location, _rootLView, _tNode) { super(); this.location = location; this._rootLView = _rootLView; this._tNode = _tNode; this.instance = instance; this.hostView = this.changeDetectorRef = new RootViewRef(_rootLView); this.componentType = componentType; } get injector() { return new NodeInjector(this._tNode, this._rootLView); } destroy() { this.hostView.destroy(); } onDestroy(callback) { this.hostView.onDestroy(callback); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Adds decorator, constructor, and property metadata to a given type via static metadata fields * on the type. * * These metadata fields can later be read with Angular's `ReflectionCapabilities` API. * * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments * being tree-shaken away during production builds. */ function setClassMetadata(type, decorators, ctorParameters, propDecorators) { return noSideEffects(() => { const clazz = type; if (decorators !== null) { if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) { clazz.decorators.push(...decorators); } else { clazz.decorators = decorators; } } if (ctorParameters !== null) { // Rather than merging, clobber the existing parameters. If other projects exist which // use tsickle-style annotations and reflect over them in the same way, this could // cause issues, but that is vanishingly unlikely. clazz.ctorParameters = ctorParameters; } if (propDecorators !== null) { // The property decorator objects are merged as it is possible different fields have // different decorator types. Decorators on individual fields are not merged, as it's // also incredibly unlikely that a field will be decorated both with an Angular // decorator and a non-Angular decorator that's also been downleveled. if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) { clazz.propDecorators = Object.assign(Object.assign({}, clazz.propDecorators), propDecorators); } else { clazz.propDecorators = propDecorators; } } }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Map of module-id to the corresponding NgModule. * - In pre Ivy we track NgModuleFactory, * - In post Ivy we track the NgModuleType */ const modules = new Map(); /** * Registers a loaded module. Should only be called from generated NgModuleFactory code. * @publicApi */ function registerModuleFactory(id, factory) { const existing = modules.get(id); assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType); modules.set(id, factory); } function assertSameOrNotExisting(id, type, incoming) { if (type && type !== incoming) { throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`); } } function registerNgModuleType(ngModuleType) { const visited = new Set(); recurse(ngModuleType); function recurse(ngModuleType) { // The imports array of an NgModule must refer to other NgModules, // so an error is thrown if no module definition is available. const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true); const id = def.id; if (id !== null) { const existing = modules.get(id); assertSameOrNotExisting(id, existing, ngModuleType); modules.set(id, ngModuleType); } const imports = maybeUnwrapFn(def.imports); for (const i of imports) { if (!visited.has(i)) { visited.add(i); recurse(i); } } } } function clearModulesForTest() { modules.clear(); } function getRegisteredNgModuleType(id) { return modules.get(id) || autoRegisterModuleById[id]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NgModuleRef$1 extends NgModuleRef { constructor(ngModuleType, _parent) { super(); this._parent = _parent; // tslint:disable-next-line:require-internal-with-underscore this._bootstrapComponents = []; this.injector = this; this.destroyCbs = []; // When bootstrapping a module we have a dependency graph that looks like this: // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the // module being resolved tries to inject the ComponentFactoryResolver, it'll create a // circular dependency which will result in a runtime error, because the injector doesn't // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves // and providing it, rather than letting the injector resolve it. this.componentFactoryResolver = new ComponentFactoryResolver$1(this); const ngModuleDef = getNgModuleDef(ngModuleType); ngDevMode && assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`); const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType); ngLocaleIdDef && setLocaleId(ngLocaleIdDef); this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap); this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [ { provide: NgModuleRef, useValue: this }, { provide: ComponentFactoryResolver, useValue: this.componentFactoryResolver } ], stringify(ngModuleType)); // We need to resolve the injector types separately from the injector creation, because // the module might be trying to use this ref in its contructor for DI which will cause a // circular error that will eventually error out, because the injector isn't created yet. this._r3Injector._resolveInjectorDefTypes(); this.instance = this.get(ngModuleType); } get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) { if (token === Injector || token === NgModuleRef || token === INJECTOR$1) { return this; } return this._r3Injector.get(token, notFoundValue, injectFlags); } destroy() { ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed'); const injector = this._r3Injector; !injector.destroyed && injector.destroy(); this.destroyCbs.forEach(fn => fn()); this.destroyCbs = null; } onDestroy(callback) { ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed'); this.destroyCbs.push(callback); } } class NgModuleFactory$1 extends NgModuleFactory { constructor(moduleType) { super(); this.moduleType = moduleType; const ngModuleDef = getNgModuleDef(moduleType); if (ngModuleDef !== null) { // Register the NgModule with Angular's module registry. The location (and hence timing) of // this call is critical to ensure this works correctly (modules get registered when expected) // without bloating bundles (modules are registered when otherwise not referenced). // // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has // several practical consequences: // // - If an .ngfactory file is not imported from, the module won't be registered (and can be // tree shaken). // - If an .ngfactory file is imported from, the module will be registered even if an instance // is not actually created (via `create` below). // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's // imports, // // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are // not a required API to use - there are other ways to obtain an NgModuleFactory for a given // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead, // the side effect of registration is added here, in the constructor of NgModuleFactory, // ensuring no matter how a factory is created, the module is registered correctly. // // An alternative would be to include the registration side effect inline following the actual // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules // will be registered and retained even if they're otherwise never referenced. registerNgModuleType(moduleType); } } create(parentInjector) { return new NgModuleRef$1(this.moduleType, parentInjector); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Bindings for pure functions are stored after regular bindings. * * |-------decls------|---------vars---------| |----- hostVars (dir1) ------| * ------------------------------------------------------------------------------------------ * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots | * ------------------------------------------------------------------------------------------ * ^ ^ * TView.bindingStartIndex TView.expandoStartIndex * * Pure function instructions are given an offset from the binding root. Adding the offset to the * binding root gives the first index where the bindings are stored. In component views, the binding * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex + * any directive instances + any hostVars in directives evaluated before it. * * See VIEW_DATA.md for more information about host binding resolution. */ /** * If the value hasn't been saved, calls the pure function to store and return the * value. If it has been saved, returns the saved value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn Function that returns a value * @param thisArg Optional calling context of pureFn * @returns value * * @codeGenApi */ function ɵɵpureFunction0(slotOffset, pureFn, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); return lView[bindingIndex] === NO_CHANGE ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) : getBinding(lView, bindingIndex); } /** * If the value of the provided exp has changed, calls the pure function to return * an updated value. Or if the value has not changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn Function that returns an updated value * @param exp Updated expression value * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) { return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) { return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) { return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) { return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated(lView, bindingIndex + 4, exp5) || different ? updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) : pureFn(exp1, exp2, exp3, exp4, exp5)) : getBinding(lView, bindingIndex + 5); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param exp6 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ? updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) : getBinding(lView, bindingIndex + 6); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param exp6 * @param exp7 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ? updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) : getBinding(lView, bindingIndex + 7); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param exp6 * @param exp7 * @param exp8 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ? updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) : getBinding(lView, bindingIndex + 8); } /** * pureFunction instruction that can support any number of bindings. * * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn A pure function that takes binding values and builds an object or array * containing those values. * @param exps An array of binding values * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) { return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg); } /** * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert * it to `undefined`. */ function getPureFunctionReturnValue(lView, returnValueIndex) { ngDevMode && assertIndexInRange(lView, returnValueIndex); const lastReturnValue = lView[returnValueIndex]; return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue; } /** * If the value of the provided exp has changed, calls the pure function to return * an updated value. Or if the value has not changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn Function that returns an updated value * @param exp Updated expression value * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated(lView, bindingIndex, exp) ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) : getPureFunctionReturnValue(lView, bindingIndex + 1); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated2(lView, bindingIndex, exp1, exp2) ? updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) : getPureFunctionReturnValue(lView, bindingIndex + 2); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ? updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) : getPureFunctionReturnValue(lView, bindingIndex + 3); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * */ function pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ? updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) : getPureFunctionReturnValue(lView, bindingIndex + 4); } /** * pureFunction instruction that can support any number of bindings. * * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn A pure function that takes binding values and builds an object or array * containing those values. * @param exps An array of binding values * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) { let bindingIndex = bindingRoot + slotOffset; let different = false; for (let i = 0; i < exps.length; i++) { bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true); } return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) : getPureFunctionReturnValue(lView, bindingIndex); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Create a pipe. * * @param index Pipe index where the pipe will be stored. * @param pipeName The name of the pipe * @returns T the instance of the pipe. * * @codeGenApi */ function ɵɵpipe(index, pipeName) { const tView = getTView(); let pipeDef; const adjustedIndex = index + HEADER_OFFSET; if (tView.firstCreatePass) { pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry); tView.data[adjustedIndex] = pipeDef; if (pipeDef.onDestroy) { (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy); } } else { pipeDef = tView.data[adjustedIndex]; } const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true)); const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject); try { // DI for pipes is supposed to behave like directives when placed on a component // host node, which means that we have to disable access to `viewProviders`. const previousIncludeViewProviders = setIncludeViewProviders(false); const pipeInstance = pipeFactory(); setIncludeViewProviders(previousIncludeViewProviders); store(tView, getLView(), adjustedIndex, pipeInstance); return pipeInstance; } finally { // we have to restore the injector implementation in finally, just in case the creation of the // pipe throws an error. setInjectImplementation(previousInjectImplementation); } } /** * Searches the pipe registry for a pipe with the given name. If one is found, * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved. * * @param name Name of pipe to resolve * @param registry Full list of available pipes * @returns Matching PipeDef */ function getPipeDef$1(name, registry) { if (registry) { for (let i = registry.length - 1; i >= 0; i--) { const pipeDef = registry[i]; if (name === pipeDef.name) { return pipeDef; } } } throw new RuntimeError("302" /* PIPE_NOT_FOUND */, `The pipe '${name}' could not be found!`); } /** * Invokes a pipe with 1 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind1(index, slotOffset, v1) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) : pipeInstance.transform(v1)); } /** * Invokes a pipe with 2 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * @param v2 2nd argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind2(index, slotOffset, v1, v2) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : pipeInstance.transform(v1, v2)); } /** * Invokes a pipe with 3 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * @param v2 2nd argument to {@link PipeTransform#transform}. * @param v3 4rd argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind3(index, slotOffset, v1, v2, v3) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : pipeInstance.transform(v1, v2, v3)); } /** * Invokes a pipe with 4 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * @param v2 2nd argument to {@link PipeTransform#transform}. * @param v3 3rd argument to {@link PipeTransform#transform}. * @param v4 4th argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : pipeInstance.transform(v1, v2, v3, v4)); } /** * Invokes a pipe with variable number of arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param values Array of arguments to pass to {@link PipeTransform#transform} method. * * @codeGenApi */ function ɵɵpipeBindV(index, slotOffset, values) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values)); } function isPure(lView, index) { return lView[TVIEW].data[index].pure; } /** * Unwrap the output of a pipe transformation. * In order to trick change detection into considering that the new value is always different from * the old one, the old value is overwritten by NO_CHANGE. * * @param newValue the pipe transformation output. */ function unwrapValue$1(lView, newValue) { if (WrappedValue.isWrapped(newValue)) { newValue = WrappedValue.unwrap(newValue); // The NO_CHANGE value needs to be written at the index where the impacted binding value is // stored const bindingToInvalidateIdx = getBindingIndex(); lView[bindingToInvalidateIdx] = NO_CHANGE; } return newValue; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class EventEmitter_ extends rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor(isAsync = false) { super(); this.__isAsync = isAsync; } emit(value) { super.next(value); } subscribe(observerOrNext, error, complete) { let schedulerFn; let errorFn = (err) => null; let completeFn = () => null; if (observerOrNext && typeof observerOrNext === 'object') { schedulerFn = this.__isAsync ? (value) => { setTimeout(() => observerOrNext.next(value)); } : (value) => { observerOrNext.next(value); }; if (observerOrNext.error) { errorFn = this.__isAsync ? (err) => { setTimeout(() => observerOrNext.error(err)); } : (err) => { observerOrNext.error(err); }; } if (observerOrNext.complete) { completeFn = this.__isAsync ? () => { setTimeout(() => observerOrNext.complete()); } : () => { observerOrNext.complete(); }; } } else { schedulerFn = this.__isAsync ? (value) => { setTimeout(() => observerOrNext(value)); } : (value) => { observerOrNext(value); }; if (error) { errorFn = this.__isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); }; } if (complete) { completeFn = this.__isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); }; } } const sink = super.subscribe(schedulerFn, errorFn, completeFn); if (observerOrNext instanceof rxjs__WEBPACK_IMPORTED_MODULE_0__["Subscription"]) { observerOrNext.add(sink); } return sink; } } /** * @publicApi */ const EventEmitter = EventEmitter_; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function symbolIterator() { return this._results[getSymbolIterator()](); } /** * An unmodifiable list of items that Angular keeps up to date when the state * of the application changes. * * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList} * provide. * * Implements an iterable interface, therefore it can be used in both ES6 * javascript `for (var i of items)` loops as well as in Angular templates with * `*ngFor="let i of myList"`. * * Changes can be observed by subscribing to the changes `Observable`. * * NOTE: In the future this class will implement an `Observable` interface. * * @usageNotes * ### Example * ```typescript * @Component({...}) * class Container { * @ViewChildren(Item) items:QueryList<Item>; * } * ``` * * @publicApi */ class QueryList { /** * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in * the same result) This is set to `false` for backwards compatibility but will be changed to * true in v12. */ constructor(_emitDistinctChangesOnly = false) { this._emitDistinctChangesOnly = _emitDistinctChangesOnly; this.dirty = true; this._results = []; this._changesDetected = false; this._changes = null; this.length = 0; this.first = undefined; this.last = undefined; // This function should be declared on the prototype, but doing so there will cause the class // declaration to have side-effects and become not tree-shakable. For this reason we do it in // the constructor. // [getSymbolIterator()](): Iterator<T> { ... } const symbol = getSymbolIterator(); const proto = QueryList.prototype; if (!proto[symbol]) proto[symbol] = symbolIterator; } /** * Returns `Observable` of `QueryList` notifying the subscriber of changes. */ get changes() { return this._changes || (this._changes = new EventEmitter()); } /** * Returns the QueryList entry at `index`. */ get(index) { return this._results[index]; } /** * See * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) */ map(fn) { return this._results.map(fn); } /** * See * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) */ filter(fn) { return this._results.filter(fn); } /** * See * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) */ find(fn) { return this._results.find(fn); } /** * See * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) */ reduce(fn, init) { return this._results.reduce(fn, init); } /** * See * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) */ forEach(fn) { this._results.forEach(fn); } /** * See * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) */ some(fn) { return this._results.some(fn); } /** * Returns a copy of the internal results list as an Array. */ toArray() { return this._results.slice(); } toString() { return this._results.toString(); } /** * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that * on change detection, it will not notify of changes to the queries, unless a new change * occurs. * * @param resultsTree The query results to store * @param identityAccessor Optional function for extracting stable object identity from a value * in the array. This function is executed for each element of the query result list while * comparing current query list with the new one (provided as a first argument of the `reset` * function) to detect if the lists are different. If the function is not provided, elements * are compared as is (without any pre-processing). */ reset(resultsTree, identityAccessor) { // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of // QueryList (but not for QueryList itself.) const self = this; self.dirty = false; const newResultFlat = flatten(resultsTree); if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) { self._results = newResultFlat; self.length = newResultFlat.length; self.last = newResultFlat[this.length - 1]; self.first = newResultFlat[0]; } } /** * Triggers a change event by emitting on the `changes` {@link EventEmitter}. */ notifyOnChanges() { if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly)) this._changes.emit(this); } /** internal */ setDirty() { this.dirty = true; } /** internal */ destroy() { this.changes.complete(); this.changes.unsubscribe(); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$7 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$8 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8; class LQuery_ { constructor(queryList) { this.queryList = queryList; this.matches = null; } clone() { return new LQuery_(this.queryList); } setDirty() { this.queryList.setDirty(); } } class LQueries_ { constructor(queries = []) { this.queries = queries; } createEmbeddedView(tView) { const tQueries = tView.queries; if (tQueries !== null) { const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length; const viewLQueries = []; // An embedded view has queries propagated from a declaration view at the beginning of the // TQueries collection and up until a first content query declared in the embedded view. Only // propagated LQueries are created at this point (LQuery corresponding to declared content // queries will be instantiated from the content query instructions for each directive). for (let i = 0; i < noOfInheritedQueries; i++) { const tQuery = tQueries.getByIndex(i); const parentLQuery = this.queries[tQuery.indexInDeclarationView]; viewLQueries.push(parentLQuery.clone()); } return new LQueries_(viewLQueries); } return null; } insertView(tView) { this.dirtyQueriesWithMatches(tView); } detachView(tView) { this.dirtyQueriesWithMatches(tView); } dirtyQueriesWithMatches(tView) { for (let i = 0; i < this.queries.length; i++) { if (getTQuery(tView, i).matches !== null) { this.queries[i].setDirty(); } } } } class TQueryMetadata_ { constructor(predicate, flags, read = null) { this.predicate = predicate; this.flags = flags; this.read = read; } } class TQueries_ { constructor(queries = []) { this.queries = queries; } elementStart(tView, tNode) { ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only'); for (let i = 0; i < this.queries.length; i++) { this.queries[i].elementStart(tView, tNode); } } elementEnd(tNode) { for (let i = 0; i < this.queries.length; i++) { this.queries[i].elementEnd(tNode); } } embeddedTView(tNode) { let queriesForTemplateRef = null; for (let i = 0; i < this.length; i++) { const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0; const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex); if (tqueryClone) { tqueryClone.indexInDeclarationView = i; if (queriesForTemplateRef !== null) { queriesForTemplateRef.push(tqueryClone); } else { queriesForTemplateRef = [tqueryClone]; } } } return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null; } template(tView, tNode) { ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only'); for (let i = 0; i < this.queries.length; i++) { this.queries[i].template(tView, tNode); } } getByIndex(index) { ngDevMode && assertIndexInRange(this.queries, index); return this.queries[index]; } get length() { return this.queries.length; } track(tquery) { this.queries.push(tquery); } } class TQuery_ { constructor(metadata, nodeIndex = -1) { this.metadata = metadata; this.matches = null; this.indexInDeclarationView = -1; this.crossesNgTemplate = false; /** * A flag indicating if a given query still applies to nodes it is crossing. We use this flag * (alongside with _declarationNodeIndex) to know when to stop applying content queries to * elements in a template. */ this._appliesToNextNode = true; this._declarationNodeIndex = nodeIndex; } elementStart(tView, tNode) { if (this.isApplyingToNode(tNode)) { this.matchTNode(tView, tNode); } } elementEnd(tNode) { if (this._declarationNodeIndex === tNode.index) { this._appliesToNextNode = false; } } template(tView, tNode) { this.elementStart(tView, tNode); } embeddedTView(tNode, childQueryIndex) { if (this.isApplyingToNode(tNode)) { this.crossesNgTemplate = true; // A marker indicating a `<ng-template>` element (a placeholder for query results from // embedded views created based on this `<ng-template>`). this.addMatch(-tNode.index, childQueryIndex); return new TQuery_(this.metadata); } return null; } isApplyingToNode(tNode) { if (this._appliesToNextNode && (this.metadata.flags & 1 /* descendants */) !== 1 /* descendants */) { const declarationNodeIdx = this._declarationNodeIndex; let parent = tNode.parent; // Determine if a given TNode is a "direct" child of a node on which a content query was // declared (only direct children of query's host node can match with the descendants: false // option). There are 3 main use-case / conditions to consider here: // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query // host node; // - <needs-target><ng-template [ngIf]="true"><i #target></i></ng-template></needs-target>: // here <i #target> parent node is null; // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse // up past the query's host node!). while (parent !== null && (parent.type & 8 /* ElementContainer */) && parent.index !== declarationNodeIdx) { parent = parent.parent; } return declarationNodeIdx === (parent !== null ? parent.index : -1); } return this._appliesToNextNode; } matchTNode(tView, tNode) { const predicate = this.metadata.predicate; if (Array.isArray(predicate)) { for (let i = 0; i < predicate.length; i++) { const name = predicate[i]; this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name)); // Also try matching the name to a provider since strings can be used as DI tokens too. this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false)); } } else { if (predicate === TemplateRef) { if (tNode.type & 4 /* Container */) { this.matchTNodeWithReadOption(tView, tNode, -1); } } else { this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false)); } } } matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) { if (nodeMatchIdx !== null) { const read = this.metadata.read; if (read !== null) { if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && (tNode.type & 4 /* Container */)) { this.addMatch(tNode.index, -2); } else { const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false); if (directiveOrProviderIdx !== null) { this.addMatch(tNode.index, directiveOrProviderIdx); } } } else { this.addMatch(tNode.index, nodeMatchIdx); } } } addMatch(tNodeIdx, matchIdx) { if (this.matches === null) { this.matches = [tNodeIdx, matchIdx]; } else { this.matches.push(tNodeIdx, matchIdx); } } } /** * Iterates over local names for a given node and returns directive index * (or -1 if a local name points to an element). * * @param tNode static data of a node to check * @param selector selector to match * @returns directive index, -1 or null if a selector didn't match any of the local names */ function getIdxOfMatchingSelector(tNode, selector) { const localNames = tNode.localNames; if (localNames !== null) { for (let i = 0; i < localNames.length; i += 2) { if (localNames[i] === selector) { return localNames[i + 1]; } } } return null; } function createResultByTNodeType(tNode, currentView) { if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) { return createElementRef(tNode, currentView); } else if (tNode.type & 4 /* Container */) { return createTemplateRef(tNode, currentView); } return null; } function createResultForNode(lView, tNode, matchingIdx, read) { if (matchingIdx === -1) { // if read token and / or strategy is not specified, detect it using appropriate tNode type return createResultByTNodeType(tNode, lView); } else if (matchingIdx === -2) { // read a special token from a node injector return createSpecialToken(lView, tNode, read); } else { // read a token return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode); } } function createSpecialToken(lView, tNode, read) { if (read === ElementRef) { return createElementRef(tNode, lView); } else if (read === TemplateRef) { return createTemplateRef(tNode, lView); } else if (read === ViewContainerRef) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */); return createContainerRef(tNode, lView); } else { ngDevMode && throwError(`Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`); } } /** * A helper function that creates query results for a given view. This function is meant to do the * processing once and only once for a given view instance (a set of results for a given view * doesn't change). */ function materializeViewResults(tView, lView, tQuery, queryIndex) { const lQuery = lView[QUERIES].queries[queryIndex]; if (lQuery.matches === null) { const tViewData = tView.data; const tQueryMatches = tQuery.matches; const result = []; for (let i = 0; i < tQueryMatches.length; i += 2) { const matchedNodeIdx = tQueryMatches[i]; if (matchedNodeIdx < 0) { // we at the <ng-template> marker which might have results in views created based on this // <ng-template> - those results will be in separate views though, so here we just leave // null as a placeholder result.push(null); } else { ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx); const tNode = tViewData[matchedNodeIdx]; result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read)); } } lQuery.matches = result; } return lQuery.matches; } /** * A helper function that collects (already materialized) query results from a tree of views, * starting with a provided LView. */ function collectQueryResults(tView, lView, queryIndex, result) { const tQuery = tView.queries.getByIndex(queryIndex); const tQueryMatches = tQuery.matches; if (tQueryMatches !== null) { const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex); for (let i = 0; i < tQueryMatches.length; i += 2) { const tNodeIdx = tQueryMatches[i]; if (tNodeIdx > 0) { result.push(lViewResults[i / 2]); } else { const childQueryIndex = tQueryMatches[i + 1]; const declarationLContainer = lView[-tNodeIdx]; ngDevMode && assertLContainer(declarationLContainer); // collect matches for views inserted in this container for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) { const embeddedLView = declarationLContainer[i]; if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) { collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result); } } // collect matches for views created from this declaration container and inserted into // different containers if (declarationLContainer[MOVED_VIEWS] !== null) { const embeddedLViews = declarationLContainer[MOVED_VIEWS]; for (let i = 0; i < embeddedLViews.length; i++) { const embeddedLView = embeddedLViews[i]; collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result); } } } } } return result; } /** * Refreshes a query by combining matches from all active views and removing matches from deleted * views. * * @returns `true` if a query got dirty during change detection or if this is a static query * resolving in creation mode, `false` otherwise. * * @codeGenApi */ function ɵɵqueryRefresh(queryList) { const lView = getLView(); const tView = getTView(); const queryIndex = getCurrentQueryIndex(); setCurrentQueryIndex(queryIndex + 1); const tQuery = getTQuery(tView, queryIndex); if (queryList.dirty && (isCreationMode(lView) === ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) { if (tQuery.matches === null) { queryList.reset([]); } else { const result = tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex); queryList.reset(result, unwrapElementRef); queryList.notifyOnChanges(); } return true; } return false; } /** * Creates new QueryList, stores the reference in LView and returns QueryList. * * @param predicate The type for which the query will search * @param flags Flags associated with the query * @param read What to save in the query * * @codeGenApi */ function ɵɵviewQuery(predicate, flags, read) { ngDevMode && assertNumber(flags, 'Expecting flags'); const tView = getTView(); if (tView.firstCreatePass) { createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1); if ((flags & 2 /* isStatic */) === 2 /* isStatic */) { tView.staticViewQueries = true; } } createLQuery(tView, getLView(), flags); } /** * Registers a QueryList, associated with a content query, for later refresh (part of a view * refresh). * * @param directiveIndex Current directive index * @param predicate The type for which the query will search * @param flags Flags associated with the query * @param read What to save in the query * @returns QueryList<T> * * @codeGenApi */ function ɵɵcontentQuery(directiveIndex, predicate, flags, read) { ngDevMode && assertNumber(flags, 'Expecting flags'); const tView = getTView(); if (tView.firstCreatePass) { const tNode = getCurrentTNode(); createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index); saveContentQueryAndDirectiveIndex(tView, directiveIndex); if ((flags & 2 /* isStatic */) === 2 /* isStatic */) { tView.staticContentQueries = true; } } createLQuery(tView, getLView(), flags); } /** * Loads a QueryList corresponding to the current view or content query. * * @codeGenApi */ function ɵɵloadQuery() { return loadQueryInternal(getLView(), getCurrentQueryIndex()); } function loadQueryInternal(lView, queryIndex) { ngDevMode && assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query'); ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex); return lView[QUERIES].queries[queryIndex].queryList; } function createLQuery(tView, lView, flags) { const queryList = new QueryList((flags & 4 /* emitDistinctChangesOnly */) === 4 /* emitDistinctChangesOnly */); storeCleanupWithContext(tView, lView, queryList, queryList.destroy); if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_(); lView[QUERIES].queries.push(new LQuery_(queryList)); } function createTQuery(tView, metadata, nodeIndex) { if (tView.queries === null) tView.queries = new TQueries_(); tView.queries.track(new TQuery_(metadata, nodeIndex)); } function saveContentQueryAndDirectiveIndex(tView, directiveIndex) { const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []); const lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1; if (directiveIndex !== lastSavedDirectiveIndex) { tViewContentQueries.push(tView.queries.length - 1, directiveIndex); } } function getTQuery(tView, index) { ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery'); return tView.queries.getByIndex(index); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the * `<ng-template>` element. * * @codeGenApi */ function ɵɵtemplateRefExtractor(tNode, lView) { return createTemplateRef(tNode, lView); } /** * Returns the appropriate `ChangeDetectorRef` for a pipe. * * @codeGenApi */ function ɵɵinjectPipeChangeDetectorRef(flags = InjectFlags.Default) { const value = injectChangeDetectorRef(true); if (value == null && !(flags & InjectFlags.Optional)) { throwProviderNotFoundError('ChangeDetectorRef'); } else { return value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$c = () => ({ 'ɵɵattribute': ɵɵattribute, 'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1, 'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2, 'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3, 'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4, 'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5, 'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6, 'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7, 'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8, 'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV, 'ɵɵdefineComponent': ɵɵdefineComponent, 'ɵɵdefineDirective': ɵɵdefineDirective, 'ɵɵdefineInjectable': ɵɵdefineInjectable, 'ɵɵdefineInjector': ɵɵdefineInjector, 'ɵɵdefineNgModule': ɵɵdefineNgModule, 'ɵɵdefinePipe': ɵɵdefinePipe, 'ɵɵdirectiveInject': ɵɵdirectiveInject, 'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory, 'ɵɵinject': ɵɵinject, 'ɵɵinjectAttribute': ɵɵinjectAttribute, 'ɵɵinvalidFactory': ɵɵinvalidFactory, 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep, 'ɵɵinjectPipeChangeDetectorRef': ɵɵinjectPipeChangeDetectorRef, 'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor, 'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature, 'ɵɵProvidersFeature': ɵɵProvidersFeature, 'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature, 'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature, 'ɵɵnextContext': ɵɵnextContext, 'ɵɵnamespaceHTML': ɵɵnamespaceHTML, 'ɵɵnamespaceMathML': ɵɵnamespaceMathML, 'ɵɵnamespaceSVG': ɵɵnamespaceSVG, 'ɵɵenableBindings': ɵɵenableBindings, 'ɵɵdisableBindings': ɵɵdisableBindings, 'ɵɵelementStart': ɵɵelementStart, 'ɵɵelementEnd': ɵɵelementEnd, 'ɵɵelement': ɵɵelement, 'ɵɵelementContainerStart': ɵɵelementContainerStart, 'ɵɵelementContainerEnd': ɵɵelementContainerEnd, 'ɵɵelementContainer': ɵɵelementContainer, 'ɵɵpureFunction0': ɵɵpureFunction0, 'ɵɵpureFunction1': ɵɵpureFunction1, 'ɵɵpureFunction2': ɵɵpureFunction2, 'ɵɵpureFunction3': ɵɵpureFunction3, 'ɵɵpureFunction4': ɵɵpureFunction4, 'ɵɵpureFunction5': ɵɵpureFunction5, 'ɵɵpureFunction6': ɵɵpureFunction6, 'ɵɵpureFunction7': ɵɵpureFunction7, 'ɵɵpureFunction8': ɵɵpureFunction8, 'ɵɵpureFunctionV': ɵɵpureFunctionV, 'ɵɵgetCurrentView': ɵɵgetCurrentView, 'ɵɵrestoreView': ɵɵrestoreView, 'ɵɵlistener': ɵɵlistener, 'ɵɵprojection': ɵɵprojection, 'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty, 'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener, 'ɵɵpipeBind1': ɵɵpipeBind1, 'ɵɵpipeBind2': ɵɵpipeBind2, 'ɵɵpipeBind3': ɵɵpipeBind3, 'ɵɵpipeBind4': ɵɵpipeBind4, 'ɵɵpipeBindV': ɵɵpipeBindV, 'ɵɵprojectionDef': ɵɵprojectionDef, 'ɵɵhostProperty': ɵɵhostProperty, 'ɵɵproperty': ɵɵproperty, 'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate, 'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1, 'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2, 'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3, 'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4, 'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5, 'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6, 'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7, 'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8, 'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV, 'ɵɵpipe': ɵɵpipe, 'ɵɵqueryRefresh': ɵɵqueryRefresh, 'ɵɵviewQuery': ɵɵviewQuery, 'ɵɵloadQuery': ɵɵloadQuery, 'ɵɵcontentQuery': ɵɵcontentQuery, 'ɵɵreference': ɵɵreference, 'ɵɵclassMap': ɵɵclassMap, 'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1, 'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2, 'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3, 'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4, 'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5, 'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6, 'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7, 'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8, 'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV, 'ɵɵstyleMap': ɵɵstyleMap, 'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1, 'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2, 'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3, 'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4, 'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5, 'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6, 'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7, 'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8, 'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV, 'ɵɵstyleProp': ɵɵstyleProp, 'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1, 'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2, 'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3, 'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4, 'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5, 'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6, 'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7, 'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8, 'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV, 'ɵɵclassProp': ɵɵclassProp, 'ɵɵadvance': ɵɵadvance, 'ɵɵtemplate': ɵɵtemplate, 'ɵɵtext': ɵɵtext, 'ɵɵtextInterpolate': ɵɵtextInterpolate, 'ɵɵtextInterpolate1': ɵɵtextInterpolate1, 'ɵɵtextInterpolate2': ɵɵtextInterpolate2, 'ɵɵtextInterpolate3': ɵɵtextInterpolate3, 'ɵɵtextInterpolate4': ɵɵtextInterpolate4, 'ɵɵtextInterpolate5': ɵɵtextInterpolate5, 'ɵɵtextInterpolate6': ɵɵtextInterpolate6, 'ɵɵtextInterpolate7': ɵɵtextInterpolate7, 'ɵɵtextInterpolate8': ɵɵtextInterpolate8, 'ɵɵtextInterpolateV': ɵɵtextInterpolateV, 'ɵɵi18n': ɵɵi18n, 'ɵɵi18nAttributes': ɵɵi18nAttributes, 'ɵɵi18nExp': ɵɵi18nExp, 'ɵɵi18nStart': ɵɵi18nStart, 'ɵɵi18nEnd': ɵɵi18nEnd, 'ɵɵi18nApply': ɵɵi18nApply, 'ɵɵi18nPostprocess': ɵɵi18nPostprocess, 'ɵɵresolveWindow': ɵɵresolveWindow, 'ɵɵresolveDocument': ɵɵresolveDocument, 'ɵɵresolveBody': ɵɵresolveBody, 'ɵɵsetComponentScope': ɵɵsetComponentScope, 'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope, 'ɵɵsanitizeHtml': ɵɵsanitizeHtml, 'ɵɵsanitizeStyle': ɵɵsanitizeStyle, 'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl, 'ɵɵsanitizeScript': ɵɵsanitizeScript, 'ɵɵsanitizeUrl': ɵɵsanitizeUrl, 'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl, 'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml, 'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl, 'forwardRef': forwardRef, 'resolveForwardRef': resolveForwardRef, }); /** * A mapping of the @angular/core API surface used in generated expressions to the actual symbols. * * This should be kept up to date with the public exports of @angular/core. */ const angularCoreEnv = (ɵ0$c)(); let jitOptions = null; function setJitOptions(options) { if (jitOptions !== null) { if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) { ngDevMode && console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.'); return; } if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) { ngDevMode && console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.'); return; } } jitOptions = options; } function getJitOptions() { return jitOptions; } function resetJitOptions() { jitOptions = null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const EMPTY_ARRAY$5 = []; const moduleQueue = []; /** * Enqueues moduleDef to be checked later to see if scope can be set on its * component declarations. */ function enqueueModuleForDelayedScoping(moduleType, ngModule) { moduleQueue.push({ moduleType, ngModule }); } let flushingModuleQueue = false; /** * Loops over queued module definitions, if a given module definition has all of its * declarations resolved, it dequeues that module definition and sets the scope on * its declarations. */ function flushModuleScopingQueueAsMuchAsPossible() { if (!flushingModuleQueue) { flushingModuleQueue = true; try { for (let i = moduleQueue.length - 1; i >= 0; i--) { const { moduleType, ngModule } = moduleQueue[i]; if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) { // dequeue moduleQueue.splice(i, 1); setScopeOnDeclaredComponents(moduleType, ngModule); } } } finally { flushingModuleQueue = false; } } } /** * Returns truthy if a declaration has resolved. If the declaration happens to be * an array of declarations, it will recurse to check each declaration in that array * (which may also be arrays). */ function isResolvedDeclaration(declaration) { if (Array.isArray(declaration)) { return declaration.every(isResolvedDeclaration); } return !!resolveForwardRef(declaration); } /** * Compiles a module in JIT mode. * * This function automatically gets called when a class has a `@NgModule` decorator. */ function compileNgModule(moduleType, ngModule = {}) { compileNgModuleDefs(moduleType, ngModule); // Because we don't know if all declarations have resolved yet at the moment the // NgModule decorator is executing, we're enqueueing the setting of module scope // on its declarations to be run at a later time when all declarations for the module, // including forward refs, have resolved. enqueueModuleForDelayedScoping(moduleType, ngModule); } /** * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class. * * It's possible to compile a module via this API which will allow duplicate declarations in its * root. */ function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot = false) { ngDevMode && assertDefined(moduleType, 'Required value moduleType'); ngDevMode && assertDefined(ngModule, 'Required value ngModule'); const declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5); let ngModuleDef = null; Object.defineProperty(moduleType, NG_MOD_DEF, { configurable: true, get: () => { if (ngModuleDef === null) { if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) { // We need to assert this immediately, because allowing it to continue will cause it to // go into an infinite loop before we've reached the point where we throw all the errors. throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`); } ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, { type: moduleType, bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$5).map(resolveForwardRef), declarations: declarations.map(resolveForwardRef), imports: flatten(ngModule.imports || EMPTY_ARRAY$5) .map(resolveForwardRef) .map(expandModuleWithProviders), exports: flatten(ngModule.exports || EMPTY_ARRAY$5) .map(resolveForwardRef) .map(expandModuleWithProviders), schemas: ngModule.schemas ? flatten(ngModule.schemas) : null, id: ngModule.id || null, }); // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime // should verify that there are no unknown elements in a template. In AOT mode, that check // happens at compile time and `schemas` information is not present on Component and Module // defs after compilation (so the check doesn't happen the second time at runtime). if (!ngModuleDef.schemas) { ngModuleDef.schemas = []; } } return ngModuleDef; } }); let ngFactoryDef = null; Object.defineProperty(moduleType, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, { name: moduleType.name, type: moduleType, deps: reflectDependencies(moduleType), injectFn: 'inject', target: compiler.R3FactoryTarget.NgModule, typeArgumentCount: 0, }); } return ngFactoryDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); let ngInjectorDef = null; Object.defineProperty(moduleType, NG_INJ_DEF, { get: () => { if (ngInjectorDef === null) { ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot); const meta = { name: moduleType.name, type: moduleType, providers: ngModule.providers || EMPTY_ARRAY$5, imports: [ (ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef), (ngModule.exports || EMPTY_ARRAY$5).map(resolveForwardRef), ], }; ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta); } return ngInjectorDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) { if (verifiedNgModule.get(moduleType)) return; verifiedNgModule.set(moduleType, true); moduleType = resolveForwardRef(moduleType); let ngModuleDef; if (importingModule) { ngModuleDef = getNgModuleDef(moduleType); if (!ngModuleDef) { throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`); } } else { ngModuleDef = getNgModuleDef(moduleType, true); } const errors = []; const declarations = maybeUnwrapFn(ngModuleDef.declarations); const imports = maybeUnwrapFn(ngModuleDef.imports); flatten(imports).map(unwrapModuleWithProvidersImports).forEach(mod => { verifySemanticsOfNgModuleImport(mod, moduleType); verifySemanticsOfNgModuleDef(mod, false, moduleType); }); const exports = maybeUnwrapFn(ngModuleDef.exports); declarations.forEach(verifyDeclarationsHaveDefinitions); declarations.forEach(verifyDirectivesHaveSelector); const combinedDeclarations = [ ...declarations.map(resolveForwardRef), ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef), ]; exports.forEach(verifyExportsAreDeclaredOrReExported); declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot)); declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule); const ngModule = getAnnotation(moduleType, 'NgModule'); if (ngModule) { ngModule.imports && flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => { verifySemanticsOfNgModuleImport(mod, moduleType); verifySemanticsOfNgModuleDef(mod, false, moduleType); }); ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType); ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule); ngModule.entryComponents && deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule); } // Throw Error if any errors were detected. if (errors.length) { throw new Error(errors.join('\n')); } //////////////////////////////////////////////////////////////////////////////////////////////// function verifyDeclarationsHaveDefinitions(type) { type = resolveForwardRef(type); const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type); if (!def) { errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`); } } function verifyDirectivesHaveSelector(type) { type = resolveForwardRef(type); const def = getDirectiveDef(type); if (!getComponentDef(type) && def && def.selectors.length == 0) { errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`); } } function verifyExportsAreDeclaredOrReExported(type) { type = resolveForwardRef(type); const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' || getPipeDef(type) && 'pipe'; if (kind) { // only checked if we are declared as Component, Directive, or Pipe // Modules don't need to be declared or imported. if (combinedDeclarations.lastIndexOf(type) === -1) { // We are exporting something which we don't explicitly declare or import. errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`); } } } function verifyDeclarationIsUnique(type, suppressErrors) { type = resolveForwardRef(type); const existingModule = ownerNgModule.get(type); if (existingModule && existingModule !== moduleType) { if (!suppressErrors) { const modules = [existingModule, moduleType].map(stringifyForError).sort(); errors.push(`Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` + `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` + `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`); } } else { // Mark type as having owner. ownerNgModule.set(type, moduleType); } } function verifyComponentIsPartOfNgModule(type) { type = resolveForwardRef(type); const existingModule = ownerNgModule.get(type); if (!existingModule) { errors.push(`Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`); } } function verifyCorrectBootstrapType(type) { type = resolveForwardRef(type); if (!getComponentDef(type)) { errors.push(`${stringifyForError(type)} cannot be used as an entry component.`); } } function verifyComponentEntryComponentsIsPartOfNgModule(type) { type = resolveForwardRef(type); if (getComponentDef(type)) { // We know we are component const component = getAnnotation(type, 'Component'); if (component && component.entryComponents) { deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule); } } } function verifySemanticsOfNgModuleImport(type, importingModule) { type = resolveForwardRef(type); if (getComponentDef(type) || getDirectiveDef(type)) { throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`); } if (getPipeDef(type)) { throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`); } } } function unwrapModuleWithProvidersImports(typeOrWithProviders) { typeOrWithProviders = resolveForwardRef(typeOrWithProviders); return typeOrWithProviders.ngModule || typeOrWithProviders; } function getAnnotation(type, name) { let annotation = null; collect(type.__annotations__); collect(type.decorators); return annotation; function collect(annotations) { if (annotations) { annotations.forEach(readAnnotation); } } function readAnnotation(decorator) { if (!annotation) { const proto = Object.getPrototypeOf(decorator); if (proto.ngMetadataName == name) { annotation = decorator; } else if (decorator.type) { const proto = Object.getPrototypeOf(decorator.type); if (proto.ngMetadataName == name) { annotation = decorator.args[0]; } } } } } /** * Keep track of compiled components. This is needed because in tests we often want to compile the * same component with more than one NgModule. This would cause an error unless we reset which * NgModule the component belongs to. We keep the list of compiled components here so that the * TestBed can reset it later. */ let ownerNgModule = new Map(); let verifiedNgModule = new Map(); function resetCompiledComponents() { ownerNgModule = new Map(); verifiedNgModule = new Map(); moduleQueue.length = 0; } /** * Computes the combined declarations of explicit declarations, as well as declarations inherited by * traversing the exports of imported modules. * @param type */ function computeCombinedExports(type) { type = resolveForwardRef(type); const ngModuleDef = getNgModuleDef(type, true); return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => { const ngModuleDef = getNgModuleDef(type); if (ngModuleDef) { verifySemanticsOfNgModuleDef(type, false); return computeCombinedExports(type); } else { return type; } }))]; } /** * Some declared components may be compiled asynchronously, and thus may not have their * ɵcmp set yet. If this is the case, then a reference to the module is written into * the `ngSelectorScope` property of the declared type. */ function setScopeOnDeclaredComponents(moduleType, ngModule) { const declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5); const transitiveScopes = transitiveScopesFor(moduleType); declarations.forEach(declaration => { if (declaration.hasOwnProperty(NG_COMP_DEF)) { // A `ɵcmp` field exists - go ahead and patch the component directly. const component = declaration; const componentDef = getComponentDef(component); patchComponentDefWithScope(componentDef, transitiveScopes); } else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) { // Set `ngSelectorScope` for future reference when the component compilation finishes. declaration.ngSelectorScope = moduleType; } }); } /** * Patch the definition of a component with directives and pipes from the compilation scope of * a given module. */ function patchComponentDefWithScope(componentDef, transitiveScopes) { componentDef.directiveDefs = () => Array.from(transitiveScopes.compilation.directives) .map(dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir)) .filter(def => !!def); componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe)); componentDef.schemas = transitiveScopes.schemas; // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we // may face a problem where previously compiled defs available to a given Component/Directive // are cached in TView and may become stale (in case any of these defs gets recompiled). In // order to avoid this problem, we force fresh TView to be created. componentDef.tView = null; } /** * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module. * * This operation is memoized and the result is cached on the module's definition. This function can * be called on modules with components that have not fully compiled yet, but the result should not * be used until they have. * * @param moduleType module that transitive scope should be calculated for. */ function transitiveScopesFor(moduleType) { if (!isNgModule(moduleType)) { throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`); } const def = getNgModuleDef(moduleType); if (def.transitiveCompileScopes !== null) { return def.transitiveCompileScopes; } const scopes = { schemas: def.schemas || null, compilation: { directives: new Set(), pipes: new Set(), }, exported: { directives: new Set(), pipes: new Set(), }, }; maybeUnwrapFn(def.imports).forEach((imported) => { const importedType = imported; if (!isNgModule(importedType)) { throw new Error(`Importing ${importedType.name} which does not have a ɵmod property`); } // When this module imports another, the imported module's exported directives and pipes are // added to the compilation scope of this module. const importedScope = transitiveScopesFor(importedType); importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry)); importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry)); }); maybeUnwrapFn(def.declarations).forEach(declared => { const declaredWithDefs = declared; if (getPipeDef(declaredWithDefs)) { scopes.compilation.pipes.add(declared); } else { // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't // had its template compiled yet. In either case, it gets added to the compilation's // directives. scopes.compilation.directives.add(declared); } }); maybeUnwrapFn(def.exports).forEach((exported) => { const exportedType = exported; // Either the type is a module, a pipe, or a component/directive (which may not have a // ɵcmp as it might be compiled asynchronously). if (isNgModule(exportedType)) { // When this module exports another, the exported module's exported directives and pipes are // added to both the compilation and exported scopes of this module. const exportedScope = transitiveScopesFor(exportedType); exportedScope.exported.directives.forEach(entry => { scopes.compilation.directives.add(entry); scopes.exported.directives.add(entry); }); exportedScope.exported.pipes.forEach(entry => { scopes.compilation.pipes.add(entry); scopes.exported.pipes.add(entry); }); } else if (getPipeDef(exportedType)) { scopes.exported.pipes.add(exportedType); } else { scopes.exported.directives.add(exportedType); } }); def.transitiveCompileScopes = scopes; return scopes; } function expandModuleWithProviders(value) { if (isModuleWithProviders(value)) { return value.ngModule; } return value; } function isModuleWithProviders(value) { return value.ngModule !== undefined; } function isNgModule(value) { return !!getNgModuleDef(value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This * matters in the following scenario: * * Consider a component 'A' that extends component 'B', both declared in module 'M'. During * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain, * potentially triggering compilation of 'B'. If this nested compilation were to trigger * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure * all compilations have finished. */ let compilationDepth = 0; /** * Compile an Angular component according to its decorator metadata, and patch the resulting * component def (ɵcmp) onto the component type. * * Compilation may be asynchronous (due to the need to resolve URLs for the component template or * other resources, for example). In the event that compilation is not immediate, `compileComponent` * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp` * until the global queue has been resolved with a call to `resolveComponentResources`. */ function compileComponent(type, metadata) { // Initialize ngDevMode. This must be the first statement in compileComponent. // See the `initNgDevMode` docstring for more information. (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode(); let ngComponentDef = null; // Metadata may have resources which need to be resolved. maybeQueueResolutionOfComponentResources(type, metadata); // Note that we're using the same function as `Directive`, because that's only subset of metadata // that we need to create the ngFactoryDef. We're avoiding using the component metadata // because we'd have to resolve the asynchronous templates. addDirectiveFactoryDef(type, metadata); Object.defineProperty(type, NG_COMP_DEF, { get: () => { if (ngComponentDef === null) { const compiler = getCompilerFacade(); if (componentNeedsResolution(metadata)) { const error = [`Component '${type.name}' is not resolved:`]; if (metadata.templateUrl) { error.push(` - templateUrl: ${metadata.templateUrl}`); } if (metadata.styleUrls && metadata.styleUrls.length) { error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`); } error.push(`Did you run and wait for 'resolveComponentResources()'?`); throw new Error(error.join('\n')); } // This const was called `jitOptions` previously but had to be renamed to `options` because // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`. // This bug was investigated in https://github.com/angular/angular-cli/issues/17264. // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed. const options = getJitOptions(); let preserveWhitespaces = metadata.preserveWhitespaces; if (preserveWhitespaces === undefined) { if (options !== null && options.preserveWhitespaces !== undefined) { preserveWhitespaces = options.preserveWhitespaces; } else { preserveWhitespaces = false; } } let encapsulation = metadata.encapsulation; if (encapsulation === undefined) { if (options !== null && options.defaultEncapsulation !== undefined) { encapsulation = options.defaultEncapsulation; } else { encapsulation = ViewEncapsulation.Emulated; } } const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`; const meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY$1, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null }); compilationDepth++; try { if (meta.usesInheritance) { addDirectiveDefToUndecoratedParents(type); } ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta); } finally { // Ensure that the compilation depth is decremented even when the compilation failed. compilationDepth--; } if (compilationDepth === 0) { // When NgModule decorator executed, we enqueued the module definition such that // it would only dequeue and add itself as module scope to all of its declarations, // but only if if all of its declarations had resolved. This call runs the check // to see if any modules that are in the queue can be dequeued and add scope to // their declarations. flushModuleScopingQueueAsMuchAsPossible(); } // If component compilation is async, then the @NgModule annotation which declares the // component may execute and set an ngSelectorScope property on the component type. This // allows the component to patch itself with directiveDefs from the module after it // finishes compiling. if (hasSelectorScope(type)) { const scopes = transitiveScopesFor(type.ngSelectorScope); patchComponentDefWithScope(ngComponentDef, scopes); } } return ngComponentDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function hasSelectorScope(component) { return component.ngSelectorScope !== undefined; } /** * Compile an Angular directive according to its decorator metadata, and patch the resulting * directive def onto the component type. * * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which * will resolve when compilation completes and the directive becomes usable. */ function compileDirective(type, directive) { let ngDirectiveDef = null; addDirectiveFactoryDef(type, directive || {}); Object.defineProperty(type, NG_DIR_DEF, { get: () => { if (ngDirectiveDef === null) { // `directive` can be null in the case of abstract directives as a base class // that use `@Directive()` with no selector. In that case, pass empty object to the // `directiveMetadata` function instead of null. const meta = getDirectiveMetadata(type, directive || {}); ngDirectiveDef = getCompilerFacade().compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata); } return ngDirectiveDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function getDirectiveMetadata(type, metadata) { const name = type && type.name; const sourceMapUrl = `ng:///${name}/ɵdir.js`; const compiler = getCompilerFacade(); const facade = directiveMetadata(type, metadata); facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl); if (facade.usesInheritance) { addDirectiveDefToUndecoratedParents(type); } return { metadata: facade, sourceMapUrl }; } function addDirectiveFactoryDef(type, metadata) { let ngFactoryDef = null; Object.defineProperty(type, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const meta = getDirectiveMetadata(type, metadata); const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, Object.assign(Object.assign({}, meta.metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Directive })); } return ngFactoryDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function extendsDirectlyFromObject(type) { return Object.getPrototypeOf(type.prototype) === Object.prototype; } /** * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a * `Component`). */ function directiveMetadata(type, metadata) { // Reflect inputs and outputs. const reflect = getReflect(); const propMetadata = reflect.ownPropMetadata(type); return { name: type.name, type: type, typeArgumentCount: 0, selector: metadata.selector !== undefined ? metadata.selector : null, deps: reflectDependencies(type), host: metadata.host || EMPTY_OBJ, propMetadata: propMetadata, inputs: metadata.inputs || EMPTY_ARRAY$1, outputs: metadata.outputs || EMPTY_ARRAY$1, queries: extractQueriesMetadata(type, propMetadata, isContentQuery), lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges') }, typeSourceSpan: null, usesInheritance: !extendsDirectlyFromObject(type), exportAs: extractExportAs(metadata.exportAs), providers: metadata.providers || null, viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery) }; } /** * Adds a directive definition to all parent classes of a type that don't have an Angular decorator. */ function addDirectiveDefToUndecoratedParents(type) { const objPrototype = Object.prototype; let parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`. while (parent && parent !== objPrototype) { // Since inheritance works if the class was annotated already, we only need to add // the def if there are no annotations and the def hasn't been created already. if (!getDirectiveDef(parent) && !getComponentDef(parent) && shouldAddAbstractDirective(parent)) { compileDirective(parent, null); } parent = Object.getPrototypeOf(parent); } } function convertToR3QueryPredicate(selector) { return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector); } function convertToR3QueryMetadata(propertyName, ann) { return { propertyName: propertyName, predicate: convertToR3QueryPredicate(ann.selector), descendants: ann.descendants, first: ann.first, read: ann.read ? ann.read : null, static: !!ann.static, emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly, }; } function extractQueriesMetadata(type, propMetadata, isQueryAnn) { const queriesMeta = []; for (const field in propMetadata) { if (propMetadata.hasOwnProperty(field)) { const annotations = propMetadata[field]; annotations.forEach(ann => { if (isQueryAnn(ann)) { if (!ann.selector) { throw new Error(`Can't construct a query for the property "${field}" of ` + `"${stringifyForError(type)}" since the query selector wasn't defined.`); } if (annotations.some(isInputAnnotation)) { throw new Error(`Cannot combine @Input decorators with query decorators`); } queriesMeta.push(convertToR3QueryMetadata(field, ann)); } }); } } return queriesMeta; } function extractExportAs(exportAs) { return exportAs === undefined ? null : splitByComma(exportAs); } function isContentQuery(value) { const name = value.ngMetadataName; return name === 'ContentChild' || name === 'ContentChildren'; } function isViewQuery(value) { const name = value.ngMetadataName; return name === 'ViewChild' || name === 'ViewChildren'; } function isInputAnnotation(value) { return value.ngMetadataName === 'Input'; } function splitByComma(value) { return value.split(',').map(piece => piece.trim()); } const LIFECYCLE_HOOKS = [ 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked', 'ngAfterContentInit', 'ngAfterContentChecked' ]; function shouldAddAbstractDirective(type) { const reflect = getReflect(); if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) { return true; } const propMetadata = reflect.propMetadata(type); for (const field in propMetadata) { const annotations = propMetadata[field]; for (let i = 0; i < annotations.length; i++) { const current = annotations[i]; const metadataName = current.ngMetadataName; if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) || metadataName === 'Output' || metadataName === 'HostBinding' || metadataName === 'HostListener') { return true; } } } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function compilePipe(type, meta) { let ngPipeDef = null; let ngFactoryDef = null; Object.defineProperty(type, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const metadata = getPipeMetadata(type, meta); const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, Object.assign(Object.assign({}, metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Pipe })); } return ngFactoryDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); Object.defineProperty(type, NG_PIPE_DEF, { get: () => { if (ngPipeDef === null) { const metadata = getPipeMetadata(type, meta); ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata); } return ngPipeDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function getPipeMetadata(type, meta) { return { type: type, typeArgumentCount: 0, name: type.name, deps: reflectDependencies(type), pipeName: meta.name, pure: meta.pure !== undefined ? meta.pure : true }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$d = (dir = {}) => dir, ɵ1$2 = (type, meta) => SWITCH_COMPILE_DIRECTIVE(type, meta); /** * Type of the Directive metadata. * * @publicApi */ const Directive = makeDecorator('Directive', ɵ0$d, undefined, undefined, ɵ1$2); const ɵ2$1 = (c = {}) => (Object.assign({ changeDetection: ChangeDetectionStrategy.Default }, c)), ɵ3$1 = (type, meta) => SWITCH_COMPILE_COMPONENT(type, meta); /** * Component decorator and metadata. * * @Annotation * @publicApi */ const Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1); const ɵ4 = (p) => (Object.assign({ pure: true }, p)), ɵ5 = (type, meta) => SWITCH_COMPILE_PIPE(type, meta); /** * @Annotation * @publicApi */ const Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5); const ɵ6 = (bindingPropertyName) => ({ bindingPropertyName }); /** * @Annotation * @publicApi */ const Input = makePropDecorator('Input', ɵ6); const ɵ7 = (bindingPropertyName) => ({ bindingPropertyName }); /** * @Annotation * @publicApi */ const Output = makePropDecorator('Output', ɵ7); const ɵ8 = (hostPropertyName) => ({ hostPropertyName }); /** * @Annotation * @publicApi */ const HostBinding = makePropDecorator('HostBinding', ɵ8); const ɵ9 = (eventName, args) => ({ eventName, args }); /** * Decorator that binds a DOM event to a host listener and supplies configuration metadata. * Angular invokes the supplied handler method when the host element emits the specified event, * and updates the bound element with the result. * * If the handler method returns false, applies `preventDefault` on the bound element. * * @usageNotes * * The following example declares a directive * that attaches a click listener to a button and counts clicks. * * ```ts * @Directive({selector: 'button[counting]'}) * class CountClicks { * numberOfClicks = 0; * * @HostListener('click', ['$event.target']) * onClick(btn) { * console.log('button', btn, 'number of clicks:', this.numberOfClicks++); * } * } * * @Component({ * selector: 'app', * template: '<button counting>Increment</button>', * }) * class App {} * * ``` * * The following example registers another DOM event handler that listens for key-press events. * ``` ts * import { HostListener, Component } from "@angular/core"; * * @Component({ * selector: 'app', * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to * increment the counter. * <button (click)="resetCounter()">Reset Counter</button>` * }) * class AppComponent { * counter = 0; * @HostListener('window:keydown', ['$event']) * handleKeyDown(event: KeyboardEvent) { * this.counter++; * } * resetCounter() { * this.counter = 0; * } * } * ``` * * @Annotation * @publicApi */ const HostListener = makePropDecorator('HostListener', ɵ9); const SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent; const SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective; const SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe; const SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop; const SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop; const SWITCH_COMPILE_PIPE__PRE_R3__ = noop; const SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__POST_R3__; const SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__POST_R3__; const SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$e = (ngModule) => ngModule, ɵ1$3 = /** * Decorator that marks the following class as an NgModule, and supplies * configuration metadata for it. * * * The `declarations` and `entryComponents` options configure the compiler * with information about what belongs to the NgModule. * * The `providers` options configures the NgModule's injector to provide * dependencies the NgModule members. * * The `imports` and `exports` options bring in members from other modules, and make * this module's members available to others. */ (type, meta) => SWITCH_COMPILE_NGMODULE(type, meta); /** * @Annotation * @publicApi */ const NgModule = makeDecorator('NgModule', ɵ0$e, undefined, undefined, ɵ1$3); function preR3NgModuleCompile(moduleType, metadata) { let imports = (metadata && metadata.imports) || []; if (metadata && metadata.exports) { imports = [...imports, metadata.exports]; } const moduleInjectorType = moduleType; moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, { useClass: moduleType }); moduleInjectorType.ɵinj = ɵɵdefineInjector({ providers: metadata && metadata.providers, imports: imports }); } const SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule; const SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile; const SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide * one or more initialization functions. * * The provided functions are injected at application startup and executed during * app initialization. If any of these functions returns a Promise, initialization * does not complete until the Promise is resolved. * * You can, for example, create a factory function that loads language data * or an external configuration, and provide that function to the `APP_INITIALIZER` token. * The function is executed during the application bootstrap process, * and the needed data is available on startup. * * @see `ApplicationInitStatus` * * @publicApi */ const APP_INITIALIZER = new InjectionToken('Application Initializer'); /** * A class that reflects the state of running {@link APP_INITIALIZER} functions. * * @publicApi */ class ApplicationInitStatus { constructor(appInits) { this.appInits = appInits; this.resolve = noop; this.reject = noop; this.initialized = false; this.done = false; this.donePromise = new Promise((res, rej) => { this.resolve = res; this.reject = rej; }); } /** @internal */ runInitializers() { if (this.initialized) { return; } const asyncInitPromises = []; const complete = () => { this.done = true; this.resolve(); }; if (this.appInits) { for (let i = 0; i < this.appInits.length; i++) { const initResult = this.appInits[i](); if (isPromise(initResult)) { asyncInitPromises.push(initResult); } } } Promise.all(asyncInitPromises) .then(() => { complete(); }) .catch(e => { this.reject(e); }); if (asyncInitPromises.length === 0) { complete(); } this.initialized = true; } } ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); }; ApplicationInitStatus.ɵprov = ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac }); ApplicationInitStatus.ctorParameters = () => [ { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{ type: Injectable }], function () { return [{ type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER] }, { type: Optional }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A [DI token](guide/glossary#di-token "DI token definition") representing a unique string ID, used * primarily for prefixing application attributes and CSS styles when * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used. * * BY default, the value is randomly generated and assigned to the application by Angular. * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure * the root {@link Injector} that uses this token. * * @publicApi */ const APP_ID = new InjectionToken('AppId'); function _appIdRandomProviderFactory() { return `${_randomChar()}${_randomChar()}${_randomChar()}`; } /** * Providers that generate a random `APP_ID_TOKEN`. * @publicApi */ const APP_ID_RANDOM_PROVIDER = { provide: APP_ID, useFactory: _appIdRandomProviderFactory, deps: [], }; function _randomChar() { return String.fromCharCode(97 + Math.floor(Math.random() * 25)); } /** * A function that is executed when a platform is initialized. * @publicApi */ const PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer'); /** * A token that indicates an opaque platform ID. * @publicApi */ const PLATFORM_ID = new InjectionToken('Platform ID'); /** * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to * be called for every component that is bootstrapped. * * Each callback must take a `ComponentRef` instance and return nothing. * * `(componentRef: ComponentRef) => void` * * @publicApi */ const APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener'); /** * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of * the application * @publicApi */ const PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Console { log(message) { // tslint:disable-next-line:no-console console.log(message); } // Note: for reporting errors use `DOM.logError()` as it is platform specific warn(message) { // tslint:disable-next-line:no-console console.warn(message); } } Console.ɵfac = function Console_Factory(t) { return new (t || Console)(); }; Console.ɵprov = ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Console, [{ type: Injectable }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provide this token to set the locale of your application. * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe, * DecimalPipe and PercentPipe) and by ICU expressions. * * See the [i18n guide](guide/i18n#setting-up-locale) for more information. * * @usageNotes * ### Example * * ```typescript * import { LOCALE_ID } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: LOCALE_ID, useValue: 'en-US' }] * }); * ``` * * @publicApi */ const LOCALE_ID$1 = new InjectionToken('LocaleId'); /** * Provide this token to set the default currency code your application uses for * CurrencyPipe when there is no currency code passed into it. This is only used by * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured. * * See the [i18n guide](guide/i18n#setting-up-locale) for more information. * * <div class="alert is-helpful"> * * **Deprecation notice:** * * The default currency code is currently always `USD` but this is deprecated from v9. * * **In v10 the default currency code will be taken from the current locale.** * * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in * your application `NgModule`: * * ```ts * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'} * ``` * * </div> * * @usageNotes * ### Example * * ```typescript * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }] * }); * ``` * * @publicApi */ const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode'); /** * Use this token at bootstrap to provide the content of your translation file (`xtb`, * `xlf` or `xlf2`) when you want to translate your application in another language. * * See the [i18n guide](guide/i18n#merge) for more information. * * @usageNotes * ### Example * * ```typescript * import { TRANSLATIONS } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * // content of your translation file * const translations = '....'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: TRANSLATIONS, useValue: translations }] * }); * ``` * * @publicApi */ const TRANSLATIONS = new InjectionToken('Translations'); /** * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`, * `xlf` or `xlf2`. * * See the [i18n guide](guide/i18n#merge) for more information. * * @usageNotes * ### Example * * ```typescript * import { TRANSLATIONS_FORMAT } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }] * }); * ``` * * @publicApi */ const TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat'); /** * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy * that the compiler should use in case of missing translations: * - Error: throw if you have missing translations. * - Warning (default): show a warning in the console and/or shell. * - Ignore: do nothing. * * See the [i18n guide](guide/i18n#missing-translation) for more information. * * @usageNotes * ### Example * ```typescript * import { MissingTranslationStrategy } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * missingTranslation: MissingTranslationStrategy.Error * }); * ``` * * @publicApi */ var MissingTranslationStrategy; (function (MissingTranslationStrategy) { MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error"; MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning"; MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore"; })(MissingTranslationStrategy || (MissingTranslationStrategy = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_IVY_ENABLED__POST_R3__ = true; const SWITCH_IVY_ENABLED__PRE_R3__ = false; const ivyEnabled = SWITCH_IVY_ENABLED__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Combination of NgModuleFactory and ComponentFactories. * * @publicApi */ class ModuleWithComponentFactories { constructor(ngModuleFactory, componentFactories) { this.ngModuleFactory = ngModuleFactory; this.componentFactories = componentFactories; } } function _throwError() { throw new Error(`Runtime compiler is not loaded`); } const Compiler_compileModuleSync__PRE_R3__ = _throwError; const Compiler_compileModuleSync__POST_R3__ = function (moduleType) { return new NgModuleFactory$1(moduleType); }; const Compiler_compileModuleSync = Compiler_compileModuleSync__POST_R3__; const Compiler_compileModuleAsync__PRE_R3__ = _throwError; const Compiler_compileModuleAsync__POST_R3__ = function (moduleType) { return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType)); }; const Compiler_compileModuleAsync = Compiler_compileModuleAsync__POST_R3__; const Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError; const Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function (moduleType) { const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType); const moduleDef = getNgModuleDef(moduleType); const componentFactories = maybeUnwrapFn(moduleDef.declarations) .reduce((factories, declaration) => { const componentDef = getComponentDef(declaration); componentDef && factories.push(new ComponentFactory$1(componentDef)); return factories; }, []); return new ModuleWithComponentFactories(ngModuleFactory, componentFactories); }; const Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__POST_R3__; const Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError; const Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function (moduleType) { return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType)); }; const Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__POST_R3__; /** * Low-level service for running the angular compiler during runtime * to create {@link ComponentFactory}s, which * can later be used to create and render a Component instance. * * Each `@NgModule` provides an own `Compiler` to its injector, * that will use the directives/pipes of the ng module for compilation * of components. * * @publicApi */ class Compiler { constructor() { /** * Compiles the given NgModule and all of its components. All templates of the components listed * in `entryComponents` have to be inlined. */ this.compileModuleSync = Compiler_compileModuleSync; /** * Compiles the given NgModule and all of its components */ this.compileModuleAsync = Compiler_compileModuleAsync; /** * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components. */ this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync; /** * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components. */ this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync; } /** * Clears all caches. */ clearCache() { } /** * Clears the cache for the given component/ngModule. */ clearCacheFor(type) { } /** * Returns the id for a given NgModule, if one is defined and known to the compiler. */ getModuleId(moduleType) { return undefined; } } Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); }; Compiler.ɵprov = ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{ type: Injectable }], function () { return []; }, null); })(); /** * Token to provide CompilerOptions in the platform injector. * * @publicApi */ const COMPILER_OPTIONS = new InjectionToken('compilerOptions'); /** * A factory for creating a Compiler * * @publicApi */ class CompilerFactory { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const promise = (() => Promise.resolve(0))(); function scheduleMicroTask(fn) { if (typeof Zone === 'undefined') { // use promise to schedule microTask instead of use Zone promise.then(() => { fn && fn.apply(null, null); }); } else { Zone.current.scheduleMicroTask('scheduleMicrotask', fn); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getNativeRequestAnimationFrame() { let nativeRequestAnimationFrame = _global['requestAnimationFrame']; let nativeCancelAnimationFrame = _global['cancelAnimationFrame']; if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) { // use unpatched version of requestAnimationFrame(native delegate) if possible // to avoid another Change detection const unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')]; if (unpatchedRequestAnimationFrame) { nativeRequestAnimationFrame = unpatchedRequestAnimationFrame; } const unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')]; if (unpatchedCancelAnimationFrame) { nativeCancelAnimationFrame = unpatchedCancelAnimationFrame; } } return { nativeRequestAnimationFrame, nativeCancelAnimationFrame }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An injectable service for executing work inside or outside of the Angular zone. * * The most common use of this service is to optimize performance when starting a work consisting of * one or more asynchronous tasks that don't require UI updates or error handling to be handled by * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks * can reenter the Angular zone via {@link #run}. * * <!-- TODO: add/fix links to: * - docs explaining zones and the use of zones in Angular and change-detection * - link to runOutsideAngular/run (throughout this file!) * --> * * @usageNotes * ### Example * * ``` * import {Component, NgZone} from '@angular/core'; * import {NgIf} from '@angular/common'; * * @Component({ * selector: 'ng-zone-demo', * template: ` * <h2>Demo: NgZone</h2> * * <p>Progress: {{progress}}%</p> * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p> * * <button (click)="processWithinAngularZone()">Process within Angular zone</button> * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button> * `, * }) * export class NgZoneDemo { * progress: number = 0; * label: string; * * constructor(private _ngZone: NgZone) {} * * // Loop inside the Angular zone * // so the UI DOES refresh after each setTimeout cycle * processWithinAngularZone() { * this.label = 'inside'; * this.progress = 0; * this._increaseProgress(() => console.log('Inside Done!')); * } * * // Loop outside of the Angular zone * // so the UI DOES NOT refresh after each setTimeout cycle * processOutsideOfAngularZone() { * this.label = 'outside'; * this.progress = 0; * this._ngZone.runOutsideAngular(() => { * this._increaseProgress(() => { * // reenter the Angular zone and display done * this._ngZone.run(() => { console.log('Outside Done!'); }); * }); * }); * } * * _increaseProgress(doneCallback: () => void) { * this.progress += 1; * console.log(`Current progress: ${this.progress}%`); * * if (this.progress < 100) { * window.setTimeout(() => this._increaseProgress(doneCallback), 10); * } else { * doneCallback(); * } * } * } * ``` * * @publicApi */ class NgZone { constructor({ enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false }) { this.hasPendingMacrotasks = false; this.hasPendingMicrotasks = false; /** * Whether there are no outstanding microtasks or macrotasks. */ this.isStable = true; /** * Notifies when code enters Angular Zone. This gets fired first on VM Turn. */ this.onUnstable = new EventEmitter(false); /** * Notifies when there is no more microtasks enqueued in the current VM Turn. * This is a hint for Angular to do change detection, which may enqueue more microtasks. * For this reason this event can fire multiple times per VM Turn. */ this.onMicrotaskEmpty = new EventEmitter(false); /** * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which * implies we are about to relinquish VM turn. * This event gets called just once. */ this.onStable = new EventEmitter(false); /** * Notifies that an error has been delivered. */ this.onError = new EventEmitter(false); if (typeof Zone == 'undefined') { throw new Error(`In this configuration Angular requires Zone.js`); } Zone.assertZonePatched(); const self = this; self._nesting = 0; self._outer = self._inner = Zone.current; if (Zone['TaskTrackingZoneSpec']) { self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']); } if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) { self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']); } // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped. self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection; self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection; self.lastRequestAnimationFrameId = -1; self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame; forkInnerZoneWithAngularBehavior(self); } static isInAngularZone() { return Zone.current.get('isAngularZone') === true; } static assertInAngularZone() { if (!NgZone.isInAngularZone()) { throw new Error('Expected to be in Angular Zone, but it is not!'); } } static assertNotInAngularZone() { if (NgZone.isInAngularZone()) { throw new Error('Expected to not be in Angular Zone, but it is!'); } } /** * Executes the `fn` function synchronously within the Angular zone and returns value returned by * the function. * * Running functions via `run` allows you to reenter Angular zone from a task that was executed * outside of the Angular zone (typically started via {@link #runOutsideAngular}). * * Any future tasks or microtasks scheduled from within this function will continue executing from * within the Angular zone. * * If a synchronous error happens it will be rethrown and not reported via `onError`. */ run(fn, applyThis, applyArgs) { return this._inner.run(fn, applyThis, applyArgs); } /** * Executes the `fn` function synchronously within the Angular zone as a task and returns value * returned by the function. * * Running functions via `run` allows you to reenter Angular zone from a task that was executed * outside of the Angular zone (typically started via {@link #runOutsideAngular}). * * Any future tasks or microtasks scheduled from within this function will continue executing from * within the Angular zone. * * If a synchronous error happens it will be rethrown and not reported via `onError`. */ runTask(fn, applyThis, applyArgs, name) { const zone = this._inner; const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop); try { return zone.runTask(task, applyThis, applyArgs); } finally { zone.cancelTask(task); } } /** * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not * rethrown. */ runGuarded(fn, applyThis, applyArgs) { return this._inner.runGuarded(fn, applyThis, applyArgs); } /** * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by * the function. * * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do * work that * doesn't trigger Angular change-detection or is subject to Angular's error handling. * * Any future tasks or microtasks scheduled from within this function will continue executing from * outside of the Angular zone. * * Use {@link #run} to reenter the Angular zone and do work that updates the application model. */ runOutsideAngular(fn) { return this._outer.run(fn); } } const EMPTY_PAYLOAD = {}; function checkStable(zone) { if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) { try { zone._nesting++; zone.onMicrotaskEmpty.emit(null); } finally { zone._nesting--; if (!zone.hasPendingMicrotasks) { try { zone.runOutsideAngular(() => zone.onStable.emit(null)); } finally { zone.isStable = true; } } } } } function delayChangeDetectionForEvents(zone) { if (zone.lastRequestAnimationFrameId !== -1) { return; } zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, () => { // This is a work around for https://github.com/angular/angular/issues/36839. // The core issue is that when event coalescing is enabled it is possible for microtasks // to get flushed too early (As is the case with `Promise.then`) between the // coalescing eventTasks. // // To workaround this we schedule a "fake" eventTask before we process the // coalescing eventTasks. The benefit of this is that the "fake" container eventTask // will prevent the microtasks queue from getting drained in between the coalescing // eventTask execution. if (!zone.fakeTopEventTask) { zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => { zone.lastRequestAnimationFrameId = -1; updateMicroTaskStatus(zone); checkStable(zone); }, undefined, () => { }, () => { }); } zone.fakeTopEventTask.invoke(); }); updateMicroTaskStatus(zone); } function forkInnerZoneWithAngularBehavior(zone) { const delayChangeDetectionForEventsDelegate = () => { delayChangeDetectionForEvents(zone); }; zone._inner = zone._inner.fork({ name: 'angular', properties: { 'isAngularZone': true }, onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => { try { onEnter(zone); return delegate.invokeTask(target, task, applyThis, applyArgs); } finally { if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') || zone.shouldCoalesceRunChangeDetection) { delayChangeDetectionForEventsDelegate(); } onLeave(zone); } }, onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => { try { onEnter(zone); return delegate.invoke(target, callback, applyThis, applyArgs, source); } finally { if (zone.shouldCoalesceRunChangeDetection) { delayChangeDetectionForEventsDelegate(); } onLeave(zone); } }, onHasTask: (delegate, current, target, hasTaskState) => { delegate.hasTask(target, hasTaskState); if (current === target) { // We are only interested in hasTask events which originate from our zone // (A child hasTask event is not interesting to us) if (hasTaskState.change == 'microTask') { zone._hasPendingMicrotasks = hasTaskState.microTask; updateMicroTaskStatus(zone); checkStable(zone); } else if (hasTaskState.change == 'macroTask') { zone.hasPendingMacrotasks = hasTaskState.macroTask; } } }, onHandleError: (delegate, current, target, error) => { delegate.handleError(target, error); zone.runOutsideAngular(() => zone.onError.emit(error)); return false; } }); } function updateMicroTaskStatus(zone) { if (zone._hasPendingMicrotasks || ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) && zone.lastRequestAnimationFrameId !== -1)) { zone.hasPendingMicrotasks = true; } else { zone.hasPendingMicrotasks = false; } } function onEnter(zone) { zone._nesting++; if (zone.isStable) { zone.isStable = false; zone.onUnstable.emit(null); } } function onLeave(zone) { zone._nesting--; checkStable(zone); } /** * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls * to framework to perform rendering. */ class NoopNgZone { constructor() { this.hasPendingMicrotasks = false; this.hasPendingMacrotasks = false; this.isStable = true; this.onUnstable = new EventEmitter(); this.onMicrotaskEmpty = new EventEmitter(); this.onStable = new EventEmitter(); this.onError = new EventEmitter(); } run(fn, applyThis, applyArgs) { return fn.apply(applyThis, applyArgs); } runGuarded(fn, applyThis, applyArgs) { return fn.apply(applyThis, applyArgs); } runOutsideAngular(fn) { return fn(); } runTask(fn, applyThis, applyArgs, name) { return fn.apply(applyThis, applyArgs); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The Testability service provides testing hooks that can be accessed from * the browser and by services such as Protractor. Each bootstrapped Angular * application on the page will have an instance of Testability. * @publicApi */ class Testability { constructor(_ngZone) { this._ngZone = _ngZone; this._pendingCount = 0; this._isZoneStable = true; /** * Whether any work was done since the last 'whenStable' callback. This is * useful to detect if this could have potentially destabilized another * component while it is stabilizing. * @internal */ this._didWork = false; this._callbacks = []; this.taskTrackingZone = null; this._watchAngularEvents(); _ngZone.run(() => { this.taskTrackingZone = typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone'); }); } _watchAngularEvents() { this._ngZone.onUnstable.subscribe({ next: () => { this._didWork = true; this._isZoneStable = false; } }); this._ngZone.runOutsideAngular(() => { this._ngZone.onStable.subscribe({ next: () => { NgZone.assertNotInAngularZone(); scheduleMicroTask(() => { this._isZoneStable = true; this._runCallbacksIfReady(); }); } }); }); } /** * Increases the number of pending request * @deprecated pending requests are now tracked with zones. */ increasePendingRequestCount() { this._pendingCount += 1; this._didWork = true; return this._pendingCount; } /** * Decreases the number of pending request * @deprecated pending requests are now tracked with zones */ decreasePendingRequestCount() { this._pendingCount -= 1; if (this._pendingCount < 0) { throw new Error('pending async requests below zero'); } this._runCallbacksIfReady(); return this._pendingCount; } /** * Whether an associated application is stable */ isStable() { return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks; } _runCallbacksIfReady() { if (this.isStable()) { // Schedules the call backs in a new frame so that it is always async. scheduleMicroTask(() => { while (this._callbacks.length !== 0) { let cb = this._callbacks.pop(); clearTimeout(cb.timeoutId); cb.doneCb(this._didWork); } this._didWork = false; }); } else { // Still not stable, send updates. let pending = this.getPendingTasks(); this._callbacks = this._callbacks.filter((cb) => { if (cb.updateCb && cb.updateCb(pending)) { clearTimeout(cb.timeoutId); return false; } return true; }); this._didWork = true; } } getPendingTasks() { if (!this.taskTrackingZone) { return []; } // Copy the tasks data so that we don't leak tasks. return this.taskTrackingZone.macroTasks.map((t) => { return { source: t.source, // From TaskTrackingZone: // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40 creationLocation: t.creationLocation, data: t.data }; }); } addCallback(cb, timeout, updateCb) { let timeoutId = -1; if (timeout && timeout > 0) { timeoutId = setTimeout(() => { this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId); cb(this._didWork, this.getPendingTasks()); }, timeout); } this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb }); } /** * Wait for the application to be stable with a timeout. If the timeout is reached before that * happens, the callback receives a list of the macro tasks that were pending, otherwise null. * * @param doneCb The callback to invoke when Angular is stable or the timeout expires * whichever comes first. * @param timeout Optional. The maximum time to wait for Angular to become stable. If not * specified, whenStable() will wait forever. * @param updateCb Optional. If specified, this callback will be invoked whenever the set of * pending macrotasks changes. If this callback returns true doneCb will not be invoked * and no further updates will be issued. */ whenStable(doneCb, timeout, updateCb) { if (updateCb && !this.taskTrackingZone) { throw new Error('Task tracking zone is required when passing an update callback to ' + 'whenStable(). Is "zone.js/dist/task-tracking.js" loaded?'); } // These arguments are 'Function' above to keep the public API simple. this.addCallback(doneCb, timeout, updateCb); this._runCallbacksIfReady(); } /** * Get the number of pending requests * @deprecated pending requests are now tracked with zones */ getPendingRequestCount() { return this._pendingCount; } /** * Find providers by name * @param using The root element to search from * @param provider The name of binding variable * @param exactMatch Whether using exactMatch */ findProviders(using, provider, exactMatch) { // TODO(juliemr): implement. return []; } } Testability.ɵfac = function Testability_Factory(t) { return new (t || Testability)(ɵɵinject(NgZone)); }; Testability.ɵprov = ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac }); Testability.ctorParameters = () => [ { type: NgZone } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Testability, [{ type: Injectable }], function () { return [{ type: NgZone }]; }, null); })(); /** * A global registry of {@link Testability} instances for specific elements. * @publicApi */ class TestabilityRegistry { constructor() { /** @internal */ this._applications = new Map(); _testabilityGetter.addToWindow(this); } /** * Registers an application with a testability hook so that it can be tracked * @param token token of application, root element * @param testability Testability hook */ registerApplication(token, testability) { this._applications.set(token, testability); } /** * Unregisters an application. * @param token token of application, root element */ unregisterApplication(token) { this._applications.delete(token); } /** * Unregisters all applications */ unregisterAllApplications() { this._applications.clear(); } /** * Get a testability hook associated with the application * @param elem root element */ getTestability(elem) { return this._applications.get(elem) || null; } /** * Get all registered testabilities */ getAllTestabilities() { return Array.from(this._applications.values()); } /** * Get all registered applications(root elements) */ getAllRootElements() { return Array.from(this._applications.keys()); } /** * Find testability of a node in the Tree * @param elem node * @param findInAncestors whether finding testability in ancestors if testability was not found in * current node */ findTestabilityInTree(elem, findInAncestors = true) { return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors); } } TestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); }; TestabilityRegistry.ɵprov = ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac }); TestabilityRegistry.ctorParameters = () => []; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{ type: Injectable }], function () { return []; }, null); })(); class _NoopGetTestability { addToWindow(registry) { } findTestabilityInTree(registry, elem, findInAncestors) { return null; } } /** * Set the {@link GetTestability} implementation used by the Angular testing framework. * @publicApi */ function setTestabilityGetter(getter) { _testabilityGetter = getter; } let _testabilityGetter = new _NoopGetTestability(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`. * * For more information on how to run and debug tests with either Ivy or View Engine (legacy), * please see [BAZEL.md](./docs/BAZEL.md). */ let _devMode = true; let _runModeLocked = false; /** * Returns whether Angular is in development mode. After called once, * the value is locked and won't change any more. * * By default, this is true, unless a user calls `enableProdMode` before calling this. * * @publicApi */ function isDevMode() { _runModeLocked = true; return _devMode; } /** * Disable Angular's development mode, which turns off assertions and other * checks within the framework. * * One important assertion this disables verifies that a change detection pass * does not result in additional changes to any bindings (also known as * unidirectional data flow). * * @publicApi */ function enableProdMode() { if (_runModeLocked) { throw new Error('Cannot enable prod mode after platform setup.'); } // The below check is there so when ngDevMode is set via terser // `global['ngDevMode'] = false;` is also dropped. if (typeof ngDevMode === undefined || !!ngDevMode) { _global['ngDevMode'] = false; } _devMode = false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _platform; let compileNgModuleFactory = compileNgModuleFactory__POST_R3__; function compileNgModuleFactory__PRE_R3__(injector, options, moduleType) { const compilerFactory = injector.get(CompilerFactory); const compiler = compilerFactory.createCompiler([options]); return compiler.compileModuleAsync(moduleType); } function compileNgModuleFactory__POST_R3__(injector, options, moduleType) { ngDevMode && assertNgModuleType(moduleType); const moduleFactory = new NgModuleFactory$1(moduleType); // All of the logic below is irrelevant for AOT-compiled code. if (typeof ngJitMode !== 'undefined' && !ngJitMode) { return Promise.resolve(moduleFactory); } const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options); // Configure the compiler to use the provided options. This call may fail when multiple modules // are bootstrapped with incompatible options, as a component can only be compiled according to // a single set of options. setJitOptions({ defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)), preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)), }); if (isComponentResourceResolutionQueueEmpty()) { return Promise.resolve(moduleFactory); } const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers)); // In case there are no compiler providers, we just return the module factory as // there won't be any resource loader. This can happen with Ivy, because AOT compiled // modules can be still passed through "bootstrapModule". In that case we shouldn't // unnecessarily require the JIT compiler. if (compilerProviders.length === 0) { return Promise.resolve(moduleFactory); } const compiler = getCompilerFacade(); const compilerInjector = Injector.create({ providers: compilerProviders }); const resourceLoader = compilerInjector.get(compiler.ResourceLoader); // The resource loader can also return a string while the "resolveComponentResources" // always expects a promise. Therefore we need to wrap the returned value in a promise. return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))) .then(() => moduleFactory); } // the `window.ng` global utilities are only available in non-VE versions of // Angular. The function switch below will make sure that the code is not // included into Angular when PRE mode is active. function publishDefaultGlobalUtils__PRE_R3__() { } function publishDefaultGlobalUtils__POST_R3__() { ngDevMode && publishDefaultGlobalUtils(); } let publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__POST_R3__; let isBoundToModule = isBoundToModule__POST_R3__; function isBoundToModule__PRE_R3__(cf) { return cf instanceof ComponentFactoryBoundToModule; } function isBoundToModule__POST_R3__(cf) { return cf.isBoundToModule; } const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken'); /** * A token for third-party components that can register themselves with NgProbe. * * @publicApi */ class NgProbeToken { constructor(name, token) { this.name = name; this.token = token; } } /** * Creates a platform. * Platforms must be created on launch using this function. * * @publicApi */ function createPlatform(injector) { if (_platform && !_platform.destroyed && !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) { throw new Error('There can be only one platform. Destroy the previous one to create a new one.'); } publishDefaultGlobalUtils$1(); _platform = injector.get(PlatformRef); const inits = injector.get(PLATFORM_INITIALIZER, null); if (inits) inits.forEach((init) => init()); return _platform; } /** * Creates a factory for a platform. Can be used to provide or override `Providers` specific to * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`. * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories * to build up configurations that might be required by different libraries or parts of the * application. * @param name Identifies the new platform factory. * @param providers A set of dependency providers for platforms created with the new factory. * * @publicApi */ function createPlatformFactory(parentPlatformFactory, name, providers = []) { const desc = `Platform: ${name}`; const marker = new InjectionToken(desc); return (extraProviders = []) => { let platform = getPlatform(); if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) { if (parentPlatformFactory) { parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true })); } else { const injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true }, { provide: INJECTOR_SCOPE, useValue: 'platform' }); createPlatform(Injector.create({ providers: injectedProviders, name: desc })); } } return assertPlatform(marker); }; } /** * Checks that there is currently a platform that contains the given token as a provider. * * @publicApi */ function assertPlatform(requiredToken) { const platform = getPlatform(); if (!platform) { throw new Error('No platform exists!'); } if (!platform.injector.get(requiredToken, null)) { throw new Error('A platform with a different configuration has been created. Please destroy it first.'); } return platform; } /** * Destroys the current Angular platform and all Angular applications on the page. * Destroys all modules and listeners registered with the platform. * * @publicApi */ function destroyPlatform() { if (_platform && !_platform.destroyed) { _platform.destroy(); } } /** * Returns the current platform. * * @publicApi */ function getPlatform() { return _platform && !_platform.destroyed ? _platform : null; } /** * The Angular platform is the entry point for Angular on a web page. * Each page has exactly one platform. Services (such as reflection) which are common * to every Angular application running on the page are bound in its scope. * A page's platform is initialized implicitly when a platform is created using a platform * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function. * * @publicApi */ class PlatformRef { /** @internal */ constructor(_injector) { this._injector = _injector; this._modules = []; this._destroyListeners = []; this._destroyed = false; } /** * Creates an instance of an `@NgModule` for the given platform for offline compilation. * * @usageNotes * * The following example creates the NgModule for a browser platform. * * ```typescript * my_module.ts: * * @NgModule({ * imports: [BrowserModule] * }) * class MyModule {} * * main.ts: * import {MyModuleNgFactory} from './my_module.ngfactory'; * import {platformBrowser} from '@angular/platform-browser'; * * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory); * ``` */ bootstrapModuleFactory(moduleFactory, options) { // Note: We need to create the NgZone _before_ we instantiate the module, // as instantiating the module creates some providers eagerly. // So we create a mini parent injector that just contains the new NgZone and // pass that as parent to the NgModuleFactory. const ngZoneOption = options ? options.ngZone : undefined; const ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false; const ngZoneRunCoalescing = (options && options.ngZoneRunCoalescing) || false; const ngZone = getNgZone(ngZoneOption, { ngZoneEventCoalescing, ngZoneRunCoalescing }); const providers = [{ provide: NgZone, useValue: ngZone }]; // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are // created within the Angular zone // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be // created outside of the Angular zone. return ngZone.run(() => { const ngZoneInjector = Injector.create({ providers: providers, parent: this.injector, name: moduleFactory.moduleType.name }); const moduleRef = moduleFactory.create(ngZoneInjector); const exceptionHandler = moduleRef.injector.get(ErrorHandler, null); if (!exceptionHandler) { throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?'); } ngZone.runOutsideAngular(() => { const subscription = ngZone.onError.subscribe({ next: (error) => { exceptionHandler.handleError(error); } }); moduleRef.onDestroy(() => { remove(this._modules, moduleRef); subscription.unsubscribe(); }); }); return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => { const initStatus = moduleRef.injector.get(ApplicationInitStatus); initStatus.runInitializers(); return initStatus.donePromise.then(() => { if (ivyEnabled) { // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy const localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID); setLocaleId(localeId || DEFAULT_LOCALE_ID); } this._moduleDoBootstrap(moduleRef); return moduleRef; }); }); }); } /** * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler. * * @usageNotes * ### Simple Example * * ```typescript * @NgModule({ * imports: [BrowserModule] * }) * class MyModule {} * * let moduleRef = platformBrowser().bootstrapModule(MyModule); * ``` * */ bootstrapModule(moduleType, compilerOptions = []) { const options = optionsReducer({}, compilerOptions); return compileNgModuleFactory(this.injector, options, moduleType) .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options)); } _moduleDoBootstrap(moduleRef) { const appRef = moduleRef.injector.get(ApplicationRef); if (moduleRef._bootstrapComponents.length > 0) { moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f)); } else if (moduleRef.instance.ngDoBootstrap) { moduleRef.instance.ngDoBootstrap(appRef); } else { throw new Error(`The module ${stringify(moduleRef.instance .constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ` + `Please define one of these.`); } this._modules.push(moduleRef); } /** * Registers a listener to be called when the platform is destroyed. */ onDestroy(callback) { this._destroyListeners.push(callback); } /** * Retrieves the platform {@link Injector}, which is the parent injector for * every Angular application on the page and provides singleton providers. */ get injector() { return this._injector; } /** * Destroys the current Angular platform and all Angular applications on the page. * Destroys all modules and listeners registered with the platform. */ destroy() { if (this._destroyed) { throw new Error('The platform has already been destroyed!'); } this._modules.slice().forEach(module => module.destroy()); this._destroyListeners.forEach(listener => listener()); this._destroyed = true; } get destroyed() { return this._destroyed; } } PlatformRef.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); }; PlatformRef.ɵprov = ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac }); PlatformRef.ctorParameters = () => [ { type: Injector } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{ type: Injectable }], function () { return [{ type: Injector }]; }, null); })(); function getNgZone(ngZoneOption, extra) { let ngZone; if (ngZoneOption === 'noop') { ngZone = new NoopNgZone(); } else { ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({ enableLongStackTrace: isDevMode(), shouldCoalesceEventChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneEventCoalescing), shouldCoalesceRunChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneRunCoalescing) }); } return ngZone; } function _callAndReportToErrorHandler(errorHandler, ngZone, callback) { try { const result = callback(); if (isPromise(result)) { return result.catch((e) => { ngZone.runOutsideAngular(() => errorHandler.handleError(e)); // rethrow as the exception handler might not do it throw e; }); } return result; } catch (e) { ngZone.runOutsideAngular(() => errorHandler.handleError(e)); // rethrow as the exception handler might not do it throw e; } } function optionsReducer(dst, objs) { if (Array.isArray(objs)) { dst = objs.reduce(optionsReducer, dst); } else { dst = Object.assign(Object.assign({}, dst), objs); } return dst; } /** * A reference to an Angular application running on a page. * * @usageNotes * * {@a is-stable-examples} * ### isStable examples and caveats * * Note two important points about `isStable`, demonstrated in the examples below: * - the application will never be stable if you start any kind * of recurrent asynchronous task when the application starts * (for example for a polling process, started with a `setInterval`, a `setTimeout` * or using RxJS operators like `interval`); * - the `isStable` Observable runs outside of the Angular zone. * * Let's imagine that you start a recurrent task * (here incrementing a counter, using RxJS `interval`), * and at the same time subscribe to `isStable`. * * ``` * constructor(appRef: ApplicationRef) { * appRef.isStable.pipe( * filter(stable => stable) * ).subscribe(() => console.log('App is stable now'); * interval(1000).subscribe(counter => console.log(counter)); * } * ``` * In this example, `isStable` will never emit `true`, * and the trace "App is stable now" will never get logged. * * If you want to execute something when the app is stable, * you have to wait for the application to be stable * before starting your polling process. * * ``` * constructor(appRef: ApplicationRef) { * appRef.isStable.pipe( * first(stable => stable), * tap(stable => console.log('App is stable now')), * switchMap(() => interval(1000)) * ).subscribe(counter => console.log(counter)); * } * ``` * In this example, the trace "App is stable now" will be logged * and then the counter starts incrementing every second. * * Note also that this Observable runs outside of the Angular zone, * which means that the code in the subscription * to this Observable will not trigger the change detection. * * Let's imagine that instead of logging the counter value, * you update a field of your component * and display it in its template. * * ``` * constructor(appRef: ApplicationRef) { * appRef.isStable.pipe( * first(stable => stable), * switchMap(() => interval(1000)) * ).subscribe(counter => this.value = counter); * } * ``` * As the `isStable` Observable runs outside the zone, * the `value` field will be updated properly, * but the template will not be refreshed! * * You'll have to manually trigger the change detection to update the template. * * ``` * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) { * appRef.isStable.pipe( * first(stable => stable), * switchMap(() => interval(1000)) * ).subscribe(counter => { * this.value = counter; * cd.detectChanges(); * }); * } * ``` * * Or make the subscription callback run inside the zone. * * ``` * constructor(appRef: ApplicationRef, zone: NgZone) { * appRef.isStable.pipe( * first(stable => stable), * switchMap(() => interval(1000)) * ).subscribe(counter => zone.run(() => this.value = counter)); * } * ``` * * @publicApi */ class ApplicationRef { /** @internal */ constructor(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) { this._zone = _zone; this._injector = _injector; this._exceptionHandler = _exceptionHandler; this._componentFactoryResolver = _componentFactoryResolver; this._initStatus = _initStatus; /** @internal */ this._bootstrapListeners = []; this._views = []; this._runningTick = false; this._stable = true; /** * Get a list of component types registered to this application. * This list is populated even before the component is created. */ this.componentTypes = []; /** * Get a list of components registered to this application. */ this.components = []; this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({ next: () => { this._zone.run(() => { this.tick(); }); } }); const isCurrentlyStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"]((observer) => { this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks && !this._zone.hasPendingMicrotasks; this._zone.runOutsideAngular(() => { observer.next(this._stable); observer.complete(); }); }); const isStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"]((observer) => { // Create the subscription to onStable outside the Angular Zone so that // the callback is run outside the Angular Zone. let stableSub; this._zone.runOutsideAngular(() => { stableSub = this._zone.onStable.subscribe(() => { NgZone.assertNotInAngularZone(); // Check whether there are no pending macro/micro tasks in the next tick // to allow for NgZone to update the state. scheduleMicroTask(() => { if (!this._stable && !this._zone.hasPendingMacrotasks && !this._zone.hasPendingMicrotasks) { this._stable = true; observer.next(true); } }); }); }); const unstableSub = this._zone.onUnstable.subscribe(() => { NgZone.assertInAngularZone(); if (this._stable) { this._stable = false; this._zone.runOutsideAngular(() => { observer.next(false); }); } }); return () => { stableSub.unsubscribe(); unstableSub.unsubscribe(); }; }); this.isStable = Object(rxjs__WEBPACK_IMPORTED_MODULE_0__["merge"])(isCurrentlyStable, isStable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["share"])())); } /** * Bootstrap a new component at the root level of the application. * * @usageNotes * ### Bootstrap process * * When bootstrapping a new root component into an application, Angular mounts the * specified application component onto DOM elements identified by the componentType's * selector and kicks off automatic change detection to finish initializing the component. * * Optionally, a component can be mounted onto a DOM element that does not match the * componentType's selector. * * ### Example * {@example core/ts/platform/platform.ts region='longform'} */ bootstrap(componentOrFactory, rootSelectorOrNode) { if (!this._initStatus.done) { throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.'); } let componentFactory; if (componentOrFactory instanceof ComponentFactory) { componentFactory = componentOrFactory; } else { componentFactory = this._componentFactoryResolver.resolveComponentFactory(componentOrFactory); } this.componentTypes.push(componentFactory.componentType); // Create a factory associated with the current module if it's not bound to some other const ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef); const selectorOrNode = rootSelectorOrNode || componentFactory.selector; const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule); const nativeElement = compRef.location.nativeElement; const testability = compRef.injector.get(Testability, null); const testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry); if (testability && testabilityRegistry) { testabilityRegistry.registerApplication(nativeElement, testability); } compRef.onDestroy(() => { this.detachView(compRef.hostView); remove(this.components, compRef); if (testabilityRegistry) { testabilityRegistry.unregisterApplication(nativeElement); } }); this._loadComponent(compRef); // Note that we have still left the `isDevMode()` condition in order to avoid // creating a breaking change for projects that still use the View Engine. if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) { const _console = this._injector.get(Console); _console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`); } return compRef; } /** * Invoke this method to explicitly process change detection and its side-effects. * * In development mode, `tick()` also performs a second change detection cycle to ensure that no * further changes are detected. If additional changes are picked up during this second cycle, * bindings in the app have side-effects that cannot be resolved in a single change detection * pass. * In this case, Angular throws an error, since an Angular application can only have one change * detection pass during which all change detection must complete. */ tick() { if (this._runningTick) { throw new Error('ApplicationRef.tick is called recursively'); } try { this._runningTick = true; for (let view of this._views) { view.detectChanges(); } // Note that we have still left the `isDevMode()` condition in order to avoid // creating a breaking change for projects that still use the View Engine. if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) { for (let view of this._views) { view.checkNoChanges(); } } } catch (e) { // Attention: Don't rethrow as it could cancel subscriptions to Observables! this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e)); } finally { this._runningTick = false; } } /** * Attaches a view so that it will be dirty checked. * The view will be automatically detached when it is destroyed. * This will throw if the view is already attached to a ViewContainer. */ attachView(viewRef) { const view = viewRef; this._views.push(view); view.attachToAppRef(this); } /** * Detaches a view from dirty checking again. */ detachView(viewRef) { const view = viewRef; remove(this._views, view); view.detachFromAppRef(); } _loadComponent(componentRef) { this.attachView(componentRef.hostView); this.tick(); this.components.push(componentRef); // Get the listeners lazily to prevent DI cycles. const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners); listeners.forEach((listener) => listener(componentRef)); } /** @internal */ ngOnDestroy() { this._views.slice().forEach((view) => view.destroy()); this._onMicrotaskEmptySubscription.unsubscribe(); } /** * Returns the number of attached views. */ get viewCount() { return this._views.length; } } ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationInitStatus)); }; ApplicationRef.ɵprov = ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac }); ApplicationRef.ctorParameters = () => [ { type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver }, { type: ApplicationInitStatus } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{ type: Injectable }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver }, { type: ApplicationInitStatus }]; }, null); })(); function remove(list, el) { const index = list.indexOf(el); if (index > -1) { list.splice(index, 1); } } function _lastDefined(args) { for (let i = args.length - 1; i >= 0; i--) { if (args[i] !== undefined) { return args[i]; } } return undefined; } function _mergeArrays(parts) { const result = []; parts.forEach((part) => part && result.push(...part)); return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Used to load ng module factories. * * @publicApi * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is * part of its implementation. See `LoadChildren` for more details. */ class NgModuleFactoryLoader { } function getModuleFactory__PRE_R3__(id) { const factory = getRegisteredNgModuleType(id); if (!factory) throw noModuleError(id); return factory; } function getModuleFactory__POST_R3__(id) { const type = getRegisteredNgModuleType(id); if (!type) throw noModuleError(id); return new NgModuleFactory$1(type); } /** * Returns the NgModuleFactory with the given id, if it exists and has been loaded. * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module * cannot be found. * @publicApi */ const getModuleFactory = getModuleFactory__POST_R3__; function noModuleError(id) { return new Error(`No module with ID ${id} loaded`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _SEPARATOR = '#'; const FACTORY_CLASS_SUFFIX = 'NgFactory'; /** * Configuration for SystemJsNgModuleLoader. * token. * * @publicApi * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig` * is part of its implementation. See `LoadChildren` for more details. */ class SystemJsNgModuleLoaderConfig { } const DEFAULT_CONFIG = { factoryPathPrefix: '', factoryPathSuffix: '.ngfactory', }; /** * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory * @publicApi * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is * part of its implementation. See `LoadChildren` for more details. */ class SystemJsNgModuleLoader { constructor(_compiler, config) { this._compiler = _compiler; this._config = config || DEFAULT_CONFIG; } load(path) { const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler; return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path); } loadAndCompile(path) { let [module, exportName] = path.split(_SEPARATOR); if (exportName === undefined) { exportName = 'default'; } return __webpack_require__("zn8P")(module) .then((module) => module[exportName]) .then((type) => checkNotEmpty(type, module, exportName)) .then((type) => this._compiler.compileModuleAsync(type)); } loadFactory(path) { let [module, exportName] = path.split(_SEPARATOR); let factoryClassSuffix = FACTORY_CLASS_SUFFIX; if (exportName === undefined) { exportName = 'default'; factoryClassSuffix = ''; } return __webpack_require__("zn8P")(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix) .then((module) => module[exportName + factoryClassSuffix]) .then((factory) => checkNotEmpty(factory, module, exportName)); } } SystemJsNgModuleLoader.ɵfac = function SystemJsNgModuleLoader_Factory(t) { return new (t || SystemJsNgModuleLoader)(ɵɵinject(Compiler), ɵɵinject(SystemJsNgModuleLoaderConfig, 8)); }; SystemJsNgModuleLoader.ɵprov = ɵɵdefineInjectable({ token: SystemJsNgModuleLoader, factory: SystemJsNgModuleLoader.ɵfac }); SystemJsNgModuleLoader.ctorParameters = () => [ { type: Compiler }, { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(SystemJsNgModuleLoader, [{ type: Injectable }], function () { return [{ type: Compiler }, { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] }]; }, null); })(); function checkNotEmpty(value, modulePath, exportName) { if (!value) { throw new Error(`Cannot find '${exportName}' in '${modulePath}'`); } return value; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents an Angular [view](guide/glossary#view "Definition"). * * @see {@link ChangeDetectorRef#usage-notes Change detection usage} * * @publicApi */ class ViewRef$1 extends ChangeDetectorRef { } /** * Represents an Angular [view](guide/glossary#view) in a view container. * An [embedded view](guide/glossary#view-tree) can be referenced from a component * other than the hosting component whose template defines it, or it can be defined * independently by a `TemplateRef`. * * Properties of elements in a view can change, but the structure (number and order) of elements in * a view cannot. Change the structure of elements by inserting, moving, or * removing nested views in a view container. * * @see `ViewContainerRef` * * @usageNotes * * The following template breaks down into two separate `TemplateRef` instances, * an outer one and an inner one. * * ``` * Count: {{items.length}} * <ul> * <li *ngFor="let item of items">{{item}}</li> * </ul> * ``` * * This is the outer `TemplateRef`: * * ``` * Count: {{items.length}} * <ul> * <ng-template ngFor let-item [ngForOf]="items"></ng-template> * </ul> * ``` * * This is the inner `TemplateRef`: * * ``` * <li>{{item}}</li> * ``` * * The outer and inner `TemplateRef` instances are assembled into views as follows: * * ``` * <!-- ViewRef: outer-0 --> * Count: 2 * <ul> * <ng-template view-container-ref></ng-template> * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 --> * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 --> * </ul> * <!-- /ViewRef: outer-0 --> * ``` * @publicApi */ class EmbeddedViewRef extends ViewRef$1 { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ class DebugEventListener { constructor(name, callback) { this.name = name; this.callback = callback; } } class DebugNode__PRE_R3__ { constructor(nativeNode, parent, _debugContext) { this.listeners = []; this.parent = null; this._debugContext = _debugContext; this.nativeNode = nativeNode; if (parent && parent instanceof DebugElement__PRE_R3__) { parent.addChild(this); } } get injector() { return this._debugContext.injector; } get componentInstance() { return this._debugContext.component; } get context() { return this._debugContext.context; } get references() { return this._debugContext.references; } get providerTokens() { return this._debugContext.providerTokens; } } class DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ { constructor(nativeNode, parent, _debugContext) { super(nativeNode, parent, _debugContext); this.properties = {}; this.attributes = {}; this.classes = {}; this.styles = {}; this.childNodes = []; this.nativeElement = nativeNode; } addChild(child) { if (child) { this.childNodes.push(child); child.parent = this; } } removeChild(child) { const childIndex = this.childNodes.indexOf(child); if (childIndex !== -1) { child.parent = null; this.childNodes.splice(childIndex, 1); } } insertChildrenAfter(child, newChildren) { const siblingIndex = this.childNodes.indexOf(child); if (siblingIndex !== -1) { this.childNodes.splice(siblingIndex + 1, 0, ...newChildren); newChildren.forEach(c => { if (c.parent) { c.parent.removeChild(c); } child.parent = this; }); } } insertBefore(refChild, newChild) { const refIndex = this.childNodes.indexOf(refChild); if (refIndex === -1) { this.addChild(newChild); } else { if (newChild.parent) { newChild.parent.removeChild(newChild); } newChild.parent = this; this.childNodes.splice(refIndex, 0, newChild); } } query(predicate) { const results = this.queryAll(predicate); return results[0] || null; } queryAll(predicate) { const matches = []; _queryElementChildren(this, predicate, matches); return matches; } queryAllNodes(predicate) { const matches = []; _queryNodeChildren(this, predicate, matches); return matches; } get children() { return this.childNodes // .filter((node) => node instanceof DebugElement__PRE_R3__); } triggerEventHandler(eventName, eventObj) { this.listeners.forEach((listener) => { if (listener.name == eventName) { listener.callback(eventObj); } }); } } /** * @publicApi */ function asNativeElements(debugEls) { return debugEls.map((el) => el.nativeElement); } function _queryElementChildren(element, predicate, matches) { element.childNodes.forEach(node => { if (node instanceof DebugElement__PRE_R3__) { if (predicate(node)) { matches.push(node); } _queryElementChildren(node, predicate, matches); } }); } function _queryNodeChildren(parentNode, predicate, matches) { if (parentNode instanceof DebugElement__PRE_R3__) { parentNode.childNodes.forEach(node => { if (predicate(node)) { matches.push(node); } if (node instanceof DebugElement__PRE_R3__) { _queryNodeChildren(node, predicate, matches); } }); } } class DebugNode__POST_R3__ { constructor(nativeNode) { this.nativeNode = nativeNode; } get parent() { const parent = this.nativeNode.parentNode; return parent ? new DebugElement__POST_R3__(parent) : null; } get injector() { return getInjector(this.nativeNode); } get componentInstance() { const nativeElement = this.nativeNode; return nativeElement && (getComponent(nativeElement) || getOwningComponent(nativeElement)); } get context() { return getComponent(this.nativeNode) || getContext(this.nativeNode); } get listeners() { return getListeners(this.nativeNode).filter(listener => listener.type === 'dom'); } get references() { return getLocalRefs(this.nativeNode); } get providerTokens() { return getInjectionTokens(this.nativeNode); } } class DebugElement__POST_R3__ extends DebugNode__POST_R3__ { constructor(nativeNode) { ngDevMode && assertDomNode(nativeNode); super(nativeNode); } get nativeElement() { return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null; } get name() { try { const context = loadLContext(this.nativeNode); const lView = context.lView; const tData = lView[TVIEW].data; const tNode = tData[context.nodeIndex]; return tNode.value; } catch (e) { return this.nativeNode.nodeName; } } /** * Gets a map of property names to property values for an element. * * This map includes: * - Regular property bindings (e.g. `[id]="id"`) * - Host property bindings (e.g. `host: { '[id]': "id" }`) * - Interpolated property bindings (e.g. `id="{{ value }}") * * It does not include: * - input property bindings (e.g. `[myCustomInput]="value"`) * - attribute bindings (e.g. `[attr.role]="menu"`) */ get properties() { const context = loadLContext(this.nativeNode, false); if (context == null) { return {}; } const lView = context.lView; const tData = lView[TVIEW].data; const tNode = tData[context.nodeIndex]; const properties = {}; // Collect properties from the DOM. copyDomProperties(this.nativeElement, properties); // Collect properties from the bindings. This is needed for animation renderer which has // synthetic properties which don't get reflected into the DOM. collectPropertyBindings(properties, tNode, lView, tData); return properties; } get attributes() { const attributes = {}; const element = this.nativeElement; if (!element) { return attributes; } const context = loadLContext(element, false); if (context == null) { return {}; } const lView = context.lView; const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs; const lowercaseTNodeAttrs = []; // For debug nodes we take the element's attribute directly from the DOM since it allows us // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones // that are set through `Renderer2`). The problem is that the browser will lowercase all names, // however since we have the attributes already on the TNode, we can preserve the case by going // through them once, adding them to the `attributes` map and putting their lower-cased name // into an array. Afterwards when we're going through the native DOM attributes, we can check // whether we haven't run into an attribute already through the TNode. if (tNodeAttrs) { let i = 0; while (i < tNodeAttrs.length) { const attrName = tNodeAttrs[i]; // Stop as soon as we hit a marker. We only care about the regular attributes. Everything // else will be handled below when we read the final attributes off the DOM. if (typeof attrName !== 'string') break; const attrValue = tNodeAttrs[i + 1]; attributes[attrName] = attrValue; lowercaseTNodeAttrs.push(attrName.toLowerCase()); i += 2; } } const eAttrs = element.attributes; for (let i = 0; i < eAttrs.length; i++) { const attr = eAttrs[i]; const lowercaseName = attr.name.toLowerCase(); // Make sure that we don't assign the same attribute both in its // case-sensitive form and the lower-cased one from the browser. if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) { // Save the lowercase name to align the behavior between browsers. // IE preserves the case, while all other browser convert it to lower case. attributes[lowercaseName] = attr.value; } } return attributes; } get styles() { if (this.nativeElement && this.nativeElement.style) { return this.nativeElement.style; } return {}; } get classes() { const result = {}; const element = this.nativeElement; // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`. const className = element.className; const classes = className && typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' '); classes.forEach((value) => result[value] = true); return result; } get childNodes() { const childNodes = this.nativeNode.childNodes; const children = []; for (let i = 0; i < childNodes.length; i++) { const element = childNodes[i]; children.push(getDebugNode__POST_R3__(element)); } return children; } get children() { const nativeElement = this.nativeElement; if (!nativeElement) return []; const childNodes = nativeElement.children; const children = []; for (let i = 0; i < childNodes.length; i++) { const element = childNodes[i]; children.push(getDebugNode__POST_R3__(element)); } return children; } query(predicate) { const results = this.queryAll(predicate); return results[0] || null; } queryAll(predicate) { const matches = []; _queryAllR3(this, predicate, matches, true); return matches; } queryAllNodes(predicate) { const matches = []; _queryAllR3(this, predicate, matches, false); return matches; } triggerEventHandler(eventName, eventObj) { const node = this.nativeNode; const invokedListeners = []; this.listeners.forEach(listener => { if (listener.name === eventName) { const callback = listener.callback; callback.call(node, eventObj); invokedListeners.push(callback); } }); // We need to check whether `eventListeners` exists, because it's something // that Zone.js only adds to `EventTarget` in browser environments. if (typeof node.eventListeners === 'function') { // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event // listener. node.eventListeners(eventName).forEach((listener) => { // In order to ensure that we can detect the special __ngUnwrap__ token described above, we // use `toString` on the listener and see if it contains the token. We use this approach to // ensure that it still worked with compiled code since it cannot remove or rename string // literals. We also considered using a special function name (i.e. if(listener.name === // special)) but that was more cumbersome and we were also concerned the compiled code could // strip the name, turning the condition in to ("" === "") and always returning true. if (listener.toString().indexOf('__ngUnwrap__') !== -1) { const unwrappedListener = listener('__ngUnwrap__'); return invokedListeners.indexOf(unwrappedListener) === -1 && unwrappedListener.call(node, eventObj); } }); } } } function copyDomProperties(element, properties) { if (element) { // Skip own properties (as those are patched) let obj = Object.getPrototypeOf(element); const NodePrototype = Node.prototype; while (obj !== null && obj !== NodePrototype) { const descriptors = Object.getOwnPropertyDescriptors(obj); for (let key in descriptors) { if (!key.startsWith('__') && !key.startsWith('on')) { // don't include properties starting with `__` and `on`. // `__` are patched values which should not be included. // `on` are listeners which also should not be included. const value = element[key]; if (isPrimitiveValue(value)) { properties[key] = value; } } } obj = Object.getPrototypeOf(obj); } } } function isPrimitiveValue(value) { return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' || value === null; } function _queryAllR3(parentElement, predicate, matches, elementsOnly) { const context = loadLContext(parentElement.nativeNode, false); if (context !== null) { const parentTNode = context.lView[TVIEW].data[context.nodeIndex]; _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode); } else { // If the context is null, then `parentElement` was either created with Renderer2 or native DOM // APIs. _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly); } } /** * Recursively match the current TNode against the predicate, and goes on with the next ones. * * @param tNode the current TNode * @param lView the LView of this TNode * @param predicate the predicate to match * @param matches the list of positive matches * @param elementsOnly whether only elements should be searched * @param rootNativeNode the root native node on which predicate should not be matched */ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) { ngDevMode && assertTNodeForLView(tNode, lView); const nativeNode = getNativeByTNodeOrNull(tNode, lView); // For each type of TNode, specific logic is executed. if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) { // Case 1: the TNode is an element // The native node has to be checked. _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode); if (isComponentHost(tNode)) { // If the element is the host of a component, then all nodes in its view have to be processed. // Note: the component's content (tNode.child) will be processed from the insertion points. const componentView = getComponentLViewByIndex(tNode.index, lView); if (componentView && componentView[TVIEW].firstChild) { _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode); } } else { if (tNode.child) { // Otherwise, its children have to be processed. _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode); } // We also have to query the DOM directly in order to catch elements inserted through // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple // times. ViewEngine could do it more efficiently, because all the insertions go through // Renderer2, however that's not the case in Ivy. This approach is being used because: // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine. // 2. We would have to make `Renderer3` "know" about debug nodes. // 3. It allows us to capture nodes that were inserted directly via the DOM. nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly); } // In all cases, if a dynamic container exists for this node, each view inside it has to be // processed. const nodeOrContainer = lView[tNode.index]; if (isLContainer(nodeOrContainer)) { _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode); } } else if (tNode.type & 4 /* Container */) { // Case 2: the TNode is a container // The native node has to be checked. const lContainer = lView[tNode.index]; _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode); // Each view inside the container has to be processed. _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode); } else if (tNode.type & 16 /* Projection */) { // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>). // The nodes projected at this location all need to be processed. const componentView = lView[DECLARATION_COMPONENT_VIEW]; const componentHost = componentView[T_HOST]; const head = componentHost.projection[tNode.projection]; if (Array.isArray(head)) { for (let nativeNode of head) { _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode); } } else if (head) { const nextLView = componentView[PARENT]; const nextTNode = nextLView[TVIEW].data[head.index]; _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode); } } else if (tNode.child) { // Case 4: the TNode is a view. _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode); } // We don't want to go to the next sibling of the root node. if (rootNativeNode !== nativeNode) { // To determine the next node to be processed, we need to use the next or the projectionNext // link, depending on whether the current node has been projected. const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next; if (nextTNode) { _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode); } } } /** * Process all TNodes in a given container. * * @param lContainer the container to be processed * @param predicate the predicate to match * @param matches the list of positive matches * @param elementsOnly whether only elements should be searched * @param rootNativeNode the root native node on which predicate should not be matched */ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const childView = lContainer[i]; const firstChild = childView[TVIEW].firstChild; if (firstChild) { _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode); } } } /** * Match the current native node against the predicate. * * @param nativeNode the current native node * @param predicate the predicate to match * @param matches the list of positive matches * @param elementsOnly whether only elements should be searched * @param rootNativeNode the root native node on which predicate should not be matched */ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) { if (rootNativeNode !== nativeNode) { const debugNode = getDebugNode$1(nativeNode); if (!debugNode) { return; } // Type of the "predicate and "matches" array are set based on the value of // the "elementsOnly" parameter. TypeScript is not able to properly infer these // types with generics, so we manually cast the parameters accordingly. if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } } } /** * Match all the descendants of a DOM node against a predicate. * * @param nativeNode the current native node * @param predicate the predicate to match * @param matches the list where matches are stored * @param elementsOnly whether only elements should be searched */ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) { const nodes = parentNode.childNodes; const length = nodes.length; for (let i = 0; i < length; i++) { const node = nodes[i]; const debugNode = getDebugNode$1(node); if (debugNode) { if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } _queryNativeNodeDescendants(node, predicate, matches, elementsOnly); } } } /** * Iterates through the property bindings for a given node and generates * a map of property names to values. This map only contains property bindings * defined in templates, not in host bindings. */ function collectPropertyBindings(properties, tNode, lView, tData) { let bindingIndexes = tNode.propertyBindings; if (bindingIndexes !== null) { for (let i = 0; i < bindingIndexes.length; i++) { const bindingIndex = bindingIndexes[i]; const propMetadata = tData[bindingIndex]; const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER); const propertyName = metadataParts[0]; if (metadataParts.length > 1) { let value = metadataParts[1]; for (let j = 1; j < metadataParts.length - 1; j++) { value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1]; } properties[propertyName] = value; } else { properties[propertyName] = lView[bindingIndex]; } } } } // Need to keep the nodes in a global Map so that multiple angular apps are supported. const _nativeNodeToDebugNode = new Map(); function getDebugNode__PRE_R3__(nativeNode) { return _nativeNodeToDebugNode.get(nativeNode) || null; } const NG_DEBUG_PROPERTY = '__ng_debug__'; function getDebugNode__POST_R3__(nativeNode) { if (nativeNode instanceof Node) { if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) { nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ? new DebugElement__POST_R3__(nativeNode) : new DebugNode__POST_R3__(nativeNode); } return nativeNode[NG_DEBUG_PROPERTY]; } return null; } /** * @publicApi */ const getDebugNode$1 = getDebugNode__POST_R3__; function getDebugNodeR2__PRE_R3__(nativeNode) { return getDebugNode__PRE_R3__(nativeNode); } function getDebugNodeR2__POST_R3__(_nativeNode) { return null; } const getDebugNodeR2 = getDebugNodeR2__POST_R3__; function getAllDebugNodes() { return Array.from(_nativeNodeToDebugNode.values()); } function indexDebugNode(node) { _nativeNodeToDebugNode.set(node.nativeNode, node); } function removeDebugNodeFromIndex(node) { _nativeNodeToDebugNode.delete(node.nativeNode); } /** * @publicApi */ const DebugNode = DebugNode__POST_R3__; /** * @publicApi */ const DebugElement = DebugElement__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _CORE_PLATFORM_PROVIDERS = [ // Set a default platform name for platforms that don't set it explicitly. { provide: PLATFORM_ID, useValue: 'unknown' }, { provide: PlatformRef, deps: [Injector] }, { provide: TestabilityRegistry, deps: [] }, { provide: Console, deps: [] }, ]; /** * This platform has to be included in any other platform * * @publicApi */ const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function _iterableDiffersFactory() { return defaultIterableDiffers; } function _keyValueDiffersFactory() { return defaultKeyValueDiffers; } function _localeFactory(locale) { locale = locale || getGlobalLocale(); if (ivyEnabled) { setLocaleId(locale); } return locale; } /** * Work out the locale from the potential global properties. * * * Closure Compiler: use `goog.LOCALE`. * * Ivy enabled: use `$localize.locale` */ function getGlobalLocale() { if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode && typeof goog !== 'undefined' && goog.LOCALE !== 'en') { // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`. // * In order to preserve backwards compatibility, we use Angular default value over // Closure Compiler's one. return goog.LOCALE; } else { // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE // COMPILE-TIME INLINER. // // * During compile time inlining of translations the expression will be replaced // with a string literal that is the current locale. Other forms of this expression are not // guaranteed to be replaced. // // * During runtime translation evaluation, the developer is required to set `$localize.locale` // if required, or just to provide their own `LOCALE_ID` provider. return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID; } } const ɵ0$f = USD_CURRENCY_CODE; /** * A built-in [dependency injection token](guide/glossary#di-token) * that is used to configure the root injector for bootstrapping. */ const APPLICATION_MODULE_PROVIDERS = [ { provide: ApplicationRef, useClass: ApplicationRef, deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus] }, { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory }, { provide: ApplicationInitStatus, useClass: ApplicationInitStatus, deps: [[new Optional(), APP_INITIALIZER]] }, { provide: Compiler, useClass: Compiler, deps: [] }, APP_ID_RANDOM_PROVIDER, { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] }, { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] }, { provide: LOCALE_ID$1, useFactory: _localeFactory, deps: [[new Inject(LOCALE_ID$1), new Optional(), new SkipSelf()]] }, { provide: DEFAULT_CURRENCY_CODE, useValue: ɵ0$f }, ]; /** * Schedule work at next available slot. * * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism. * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`. * * @param ngZone NgZone to use for scheduling. */ function zoneSchedulerFactory(ngZone) { let queue = []; ngZone.onStable.subscribe(() => { while (queue.length) { queue.pop()(); } }); return function (fn) { queue.push(fn); }; } /** * Configures the root injector for an app with * providers of `@angular/core` dependencies that `ApplicationRef` needs * to bootstrap components. * * Re-exported by `BrowserModule`, which is included automatically in the root * `AppModule` when you create a new app with the CLI `new` command. * * @publicApi */ class ApplicationModule { // Inject ApplicationRef to make it eager... constructor(appRef) { } } ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); }; ApplicationModule.ɵmod = ɵɵdefineNgModule({ type: ApplicationModule }); ApplicationModule.ɵinj = ɵɵdefineInjector({ providers: APPLICATION_MODULE_PROVIDERS }); ApplicationModule.ctorParameters = () => [ { type: ApplicationRef } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{ type: NgModule, args: [{ providers: APPLICATION_MODULE_PROVIDERS }] }], function () { return [{ type: ApplicationRef }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) { flags |= 1 /* TypeElement */; const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl); const template = templateFactory ? resolveDefinition(templateFactory) : null; return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values flags, checkIndex: -1, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount, bindings: [], bindingFlags: 0, outputs: [], element: { ns: null, name: null, attrs: null, template, componentProvider: null, componentView: null, componentRendererType: null, publicProviders: null, allProviders: null, handleEvent: handleEvent || NOOP }, provider: null, text: null, query: null, ngContent: null }; } function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs = [], bindings, outputs, handleEvent, componentView, componentRendererType) { if (!handleEvent) { handleEvent = NOOP; } const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl); let ns = null; let name = null; if (namespaceAndName) { [ns, name] = splitNamespace(namespaceAndName); } bindings = bindings || []; const bindingDefs = []; for (let i = 0; i < bindings.length; i++) { const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i]; const [ns, name] = splitNamespace(namespaceAndName); let securityContext = undefined; let suffix = undefined; switch (bindingFlags & 15 /* Types */) { case 4 /* TypeElementStyle */: suffix = suffixOrSecurityContext; break; case 1 /* TypeElementAttribute */: case 8 /* TypeProperty */: securityContext = suffixOrSecurityContext; break; } bindingDefs[i] = { flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix }; } outputs = outputs || []; const outputDefs = []; for (let i = 0; i < outputs.length; i++) { const [target, eventName] = outputs[i]; outputDefs[i] = { type: 0 /* ElementOutput */, target: target, eventName, propName: null }; } fixedAttrs = fixedAttrs || []; const attrs = fixedAttrs.map(([namespaceAndName, value]) => { const [ns, name] = splitNamespace(namespaceAndName); return [ns, name, value]; }); componentRendererType = resolveRendererType2(componentRendererType); if (componentView) { flags |= 33554432 /* ComponentView */; } flags |= 1 /* TypeElement */; return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount, bindings: bindingDefs, bindingFlags: calcBindingFlags(bindingDefs), outputs: outputDefs, element: { ns, name, attrs, template: null, // will bet set by the view definition componentProvider: null, componentView: componentView || null, componentRendererType: componentRendererType, publicProviders: null, allProviders: null, handleEvent: handleEvent || NOOP, }, provider: null, text: null, query: null, ngContent: null }; } function createElement(view, renderHost, def) { const elDef = def.element; const rootSelectorOrNode = view.root.selectorOrNode; const renderer = view.renderer; let el; if (view.parent || !rootSelectorOrNode) { if (elDef.name) { el = renderer.createElement(elDef.name, elDef.ns); } else { el = renderer.createComment(''); } const parentEl = getParentRenderElement(view, renderHost, def); if (parentEl) { renderer.appendChild(parentEl, el); } } else { // when using native Shadow DOM, do not clear the root element contents to allow slot projection const preserveContent = (!!elDef.componentRendererType && elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom); el = renderer.selectRootElement(rootSelectorOrNode, preserveContent); } if (elDef.attrs) { for (let i = 0; i < elDef.attrs.length; i++) { const [ns, name, value] = elDef.attrs[i]; renderer.setAttribute(el, name, value, ns); } } return el; } function listenToElementOutputs(view, compView, def, el) { for (let i = 0; i < def.outputs.length; i++) { const output = def.outputs[i]; const handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName)); let listenTarget = output.target; let listenerView = view; if (output.target === 'component') { listenTarget = null; listenerView = compView; } const disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure); view.disposables[def.outputIndex + i] = disposable; } } function renderEventHandlerClosure(view, index, eventName) { return (event) => dispatchEvent(view, index, eventName, event); } function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const bindLen = def.bindings.length; let changed = false; if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true; if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true; if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true; if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true; if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true; if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true; if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true; if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true; if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true; if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true; return changed; } function checkAndUpdateElementDynamic(view, def, values) { let changed = false; for (let i = 0; i < values.length; i++) { if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true; } return changed; } function checkAndUpdateElementValue(view, def, bindingIdx, value) { if (!checkAndUpdateBinding(view, def, bindingIdx, value)) { return false; } const binding = def.bindings[bindingIdx]; const elData = asElementData(view, def.nodeIndex); const renderNode = elData.renderElement; const name = binding.name; switch (binding.flags & 15 /* Types */) { case 1 /* TypeElementAttribute */: setElementAttribute$1(view, binding, renderNode, binding.ns, name, value); break; case 2 /* TypeElementClass */: setElementClass(view, renderNode, name, value); break; case 4 /* TypeElementStyle */: setElementStyle(view, binding, renderNode, name, value); break; case 8 /* TypeProperty */: const bindView = (def.flags & 33554432 /* ComponentView */ && binding.flags & 32 /* SyntheticHostProperty */) ? elData.componentView : view; setElementProperty(bindView, binding, renderNode, name, value); break; } return true; } function setElementAttribute$1(view, binding, renderNode, ns, name, value) { const securityContext = binding.securityContext; let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value; renderValue = renderValue != null ? renderValue.toString() : null; const renderer = view.renderer; if (value != null) { renderer.setAttribute(renderNode, name, renderValue, ns); } else { renderer.removeAttribute(renderNode, name, ns); } } function setElementClass(view, renderNode, name, value) { const renderer = view.renderer; if (value) { renderer.addClass(renderNode, name); } else { renderer.removeClass(renderNode, name); } } function setElementStyle(view, binding, renderNode, name, value) { let renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value); if (renderValue != null) { renderValue = renderValue.toString(); const unit = binding.suffix; if (unit != null) { renderValue = renderValue + unit; } } else { renderValue = null; } const renderer = view.renderer; if (renderValue != null) { renderer.setStyle(renderNode, name, renderValue); } else { renderer.removeStyle(renderNode, name); } } function setElementProperty(view, binding, renderNode, name, value) { const securityContext = binding.securityContext; let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value; view.renderer.setProperty(renderNode, name, renderValue); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function queryDef(flags, id, bindings) { let bindingDefs = []; for (let propName in bindings) { const bindingType = bindings[propName]; bindingDefs.push({ propName, bindingType }); } return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values // TODO(vicb): check checkIndex: -1, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, ngContentIndex: -1, matchedQueries: {}, matchedQueryIds: 0, references: {}, childCount: 0, bindings: [], bindingFlags: 0, outputs: [], element: null, provider: null, text: null, query: { id, filterId: filterQueryId(id), bindings: bindingDefs }, ngContent: null }; } function createQuery(emitDistinctChangesOnly) { return new QueryList(emitDistinctChangesOnly); } function dirtyParentQueries(view) { const queryIds = view.def.nodeMatchedQueries; while (view.parent && isEmbeddedView(view)) { let tplDef = view.parentNodeDef; view = view.parent; // content queries const end = tplDef.nodeIndex + tplDef.childCount; for (let i = 0; i <= end; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & 67108864 /* TypeContentQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */) && (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) { asQueryList(view, i).setDirty(); } if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) || !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) || !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) { // skip elements that don't contain the template element or no query. i += nodeDef.childCount; } } } // view queries if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) { for (let i = 0; i < view.def.nodes.length; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) { asQueryList(view, i).setDirty(); } // only visit the root nodes i += nodeDef.childCount; } } } function checkAndUpdateQuery(view, nodeDef) { const queryList = asQueryList(view, nodeDef.nodeIndex); if (!queryList.dirty) { return; } let directiveInstance; let newValues = undefined; if (nodeDef.flags & 67108864 /* TypeContentQuery */) { const elementDef = nodeDef.parent.parent; newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []); directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance; } else if (nodeDef.flags & 134217728 /* TypeViewQuery */) { newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []); directiveInstance = view.component; } queryList.reset(newValues, unwrapElementRef); const bindings = nodeDef.query.bindings; let notify = false; for (let i = 0; i < bindings.length; i++) { const binding = bindings[i]; let boundValue; switch (binding.bindingType) { case 0 /* First */: boundValue = queryList.first; break; case 1 /* All */: boundValue = queryList; notify = true; break; } directiveInstance[binding.propName] = boundValue; } if (notify) { queryList.notifyOnChanges(); } } function calcQueryValues(view, startIndex, endIndex, queryDef, values) { for (let i = startIndex; i <= endIndex; i++) { const nodeDef = view.def.nodes[i]; const valueType = nodeDef.matchedQueries[queryDef.id]; if (valueType != null) { values.push(getQueryValue(view, nodeDef, valueType)); } if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template && (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) === queryDef.filterId) { const elementData = asElementData(view, i); // check embedded views that were attached at the place of their template, // but process child nodes first if some match the query (see issue #16568) if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) { calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values); i += nodeDef.childCount; } if (nodeDef.flags & 16777216 /* EmbeddedViews */) { const embeddedViews = elementData.viewContainer._embeddedViews; for (let k = 0; k < embeddedViews.length; k++) { const embeddedView = embeddedViews[k]; const dvc = declaredViewContainer(embeddedView); if (dvc && dvc === elementData) { calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values); } } } const projectedViews = elementData.template._projectedViews; if (projectedViews) { for (let k = 0; k < projectedViews.length; k++) { const projectedView = projectedViews[k]; calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values); } } } if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) { // if no child matches the query, skip the children. i += nodeDef.childCount; } } return values; } function getQueryValue(view, nodeDef, queryValueType) { if (queryValueType != null) { // a match switch (queryValueType) { case 1 /* RenderElement */: return asElementData(view, nodeDef.nodeIndex).renderElement; case 0 /* ElementRef */: return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement); case 2 /* TemplateRef */: return asElementData(view, nodeDef.nodeIndex).template; case 3 /* ViewContainerRef */: return asElementData(view, nodeDef.nodeIndex).viewContainer; case 4 /* Provider */: return asProviderData(view, nodeDef.nodeIndex).instance; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function ngContentDef(ngContentIndex, index) { return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex: -1, flags: 8 /* TypeNgContent */, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: {}, matchedQueryIds: 0, references: {}, ngContentIndex, childCount: 0, bindings: [], bindingFlags: 0, outputs: [], element: null, provider: null, text: null, query: null, ngContent: { index } }; } function appendNgContent(view, renderHost, def) { const parentEl = getParentRenderElement(view, renderHost, def); if (!parentEl) { // Nothing to do if there is no parent element. return; } const ngContentIndex = def.ngContent.index; visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function purePipeDef(checkIndex, argCount) { // argCount + 1 to include the pipe as first arg return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, newArray(argCount + 1)); } function pureArrayDef(checkIndex, argCount) { return _pureExpressionDef(32 /* TypePureArray */, checkIndex, newArray(argCount)); } function pureObjectDef(checkIndex, propToIndex) { const keys = Object.keys(propToIndex); const nbKeys = keys.length; const propertyNames = []; for (let i = 0; i < nbKeys; i++) { const key = keys[i]; const index = propToIndex[key]; propertyNames.push(key); } return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames); } function _pureExpressionDef(flags, checkIndex, propertyNames) { const bindings = []; for (let i = 0; i < propertyNames.length; i++) { const prop = propertyNames[i]; bindings.push({ flags: 8 /* TypeProperty */, name: prop, ns: null, nonMinifiedName: prop, securityContext: null, suffix: null }); } return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: {}, matchedQueryIds: 0, references: {}, ngContentIndex: -1, childCount: 0, bindings, bindingFlags: calcBindingFlags(bindings), outputs: [], element: null, provider: null, text: null, query: null, ngContent: null }; } function createPureExpression(view, def) { return { value: undefined }; } function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const bindings = def.bindings; let changed = false; const bindLen = bindings.length; if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true; if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true; if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true; if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true; if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true; if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true; if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true; if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true; if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true; if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true; if (changed) { const data = asPureExpressionData(view, def.nodeIndex); let value; switch (def.flags & 201347067 /* Types */) { case 32 /* TypePureArray */: value = []; if (bindLen > 0) value.push(v0); if (bindLen > 1) value.push(v1); if (bindLen > 2) value.push(v2); if (bindLen > 3) value.push(v3); if (bindLen > 4) value.push(v4); if (bindLen > 5) value.push(v5); if (bindLen > 6) value.push(v6); if (bindLen > 7) value.push(v7); if (bindLen > 8) value.push(v8); if (bindLen > 9) value.push(v9); break; case 64 /* TypePureObject */: value = {}; if (bindLen > 0) value[bindings[0].name] = v0; if (bindLen > 1) value[bindings[1].name] = v1; if (bindLen > 2) value[bindings[2].name] = v2; if (bindLen > 3) value[bindings[3].name] = v3; if (bindLen > 4) value[bindings[4].name] = v4; if (bindLen > 5) value[bindings[5].name] = v5; if (bindLen > 6) value[bindings[6].name] = v6; if (bindLen > 7) value[bindings[7].name] = v7; if (bindLen > 8) value[bindings[8].name] = v8; if (bindLen > 9) value[bindings[9].name] = v9; break; case 128 /* TypePurePipe */: const pipe = v0; switch (bindLen) { case 1: value = pipe.transform(v0); break; case 2: value = pipe.transform(v1); break; case 3: value = pipe.transform(v1, v2); break; case 4: value = pipe.transform(v1, v2, v3); break; case 5: value = pipe.transform(v1, v2, v3, v4); break; case 6: value = pipe.transform(v1, v2, v3, v4, v5); break; case 7: value = pipe.transform(v1, v2, v3, v4, v5, v6); break; case 8: value = pipe.transform(v1, v2, v3, v4, v5, v6, v7); break; case 9: value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8); break; case 10: value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9); break; } break; } data.value = value; } return changed; } function checkAndUpdatePureExpressionDynamic(view, def, values) { const bindings = def.bindings; let changed = false; for (let i = 0; i < values.length; i++) { // Note: We need to loop over all values, so that // the old values are updates as well! if (checkAndUpdateBinding(view, def, i, values[i])) { changed = true; } } if (changed) { const data = asPureExpressionData(view, def.nodeIndex); let value; switch (def.flags & 201347067 /* Types */) { case 32 /* TypePureArray */: value = values; break; case 64 /* TypePureObject */: value = {}; for (let i = 0; i < values.length; i++) { value[bindings[i].name] = values[i]; } break; case 128 /* TypePurePipe */: const pipe = values[0]; const params = values.slice(1); value = pipe.transform(...params); break; } data.value = value; } return changed; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function textDef(checkIndex, ngContentIndex, staticText) { const bindings = []; for (let i = 1; i < staticText.length; i++) { bindings[i - 1] = { flags: 8 /* TypeProperty */, name: null, ns: null, nonMinifiedName: null, securityContext: null, suffix: staticText[i], }; } return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags: 2 /* TypeText */, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: {}, matchedQueryIds: 0, references: {}, ngContentIndex, childCount: 0, bindings, bindingFlags: 8 /* TypeProperty */, outputs: [], element: null, provider: null, text: { prefix: staticText[0] }, query: null, ngContent: null, }; } function createText(view, renderHost, def) { let renderNode; const renderer = view.renderer; renderNode = renderer.createText(def.text.prefix); const parentEl = getParentRenderElement(view, renderHost, def); if (parentEl) { renderer.appendChild(parentEl, renderNode); } return { renderText: renderNode }; } function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { let changed = false; const bindings = def.bindings; const bindLen = bindings.length; if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true; if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true; if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true; if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true; if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true; if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true; if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true; if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true; if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true; if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true; if (changed) { let value = def.text.prefix; if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]); if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]); if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]); if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]); if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]); if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]); if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]); if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]); if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]); if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]); const renderNode = asTextData(view, def.nodeIndex).renderText; view.renderer.setValue(renderNode, value); } return changed; } function checkAndUpdateTextDynamic(view, def, values) { const bindings = def.bindings; let changed = false; for (let i = 0; i < values.length; i++) { // Note: We need to loop over all values, so that // the old values are updates as well! if (checkAndUpdateBinding(view, def, i, values[i])) { changed = true; } } if (changed) { let value = ''; for (let i = 0; i < values.length; i++) { value = value + _addInterpolationPart(values[i], bindings[i]); } value = def.text.prefix + value; const renderNode = asTextData(view, def.nodeIndex).renderText; view.renderer.setValue(renderNode, value); } return changed; } function _addInterpolationPart(value, binding) { const valueStr = value != null ? value.toString() : ''; return valueStr + binding.suffix; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function viewDef(flags, nodes, updateDirectives, updateRenderer) { // clone nodes and set auto calculated values let viewBindingCount = 0; let viewDisposableCount = 0; let viewNodeFlags = 0; let viewRootNodeFlags = 0; let viewMatchedQueries = 0; let currentParent = null; let currentRenderParent = null; let currentElementHasPublicProviders = false; let currentElementHasPrivateProviders = false; let lastRenderRootNode = null; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; node.nodeIndex = i; node.parent = currentParent; node.bindingIndex = viewBindingCount; node.outputIndex = viewDisposableCount; node.renderParent = currentRenderParent; viewNodeFlags |= node.flags; viewMatchedQueries |= node.matchedQueryIds; if (node.element) { const elDef = node.element; elDef.publicProviders = currentParent ? currentParent.element.publicProviders : Object.create(null); elDef.allProviders = elDef.publicProviders; // Note: We assume that all providers of an element are before any child element! currentElementHasPublicProviders = false; currentElementHasPrivateProviders = false; if (node.element.template) { viewMatchedQueries |= node.element.template.nodeMatchedQueries; } } validateNode(currentParent, node, nodes.length); viewBindingCount += node.bindings.length; viewDisposableCount += node.outputs.length; if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) { lastRenderRootNode = node; } if (node.flags & 20224 /* CatProvider */) { if (!currentElementHasPublicProviders) { currentElementHasPublicProviders = true; // Use prototypical inheritance to not get O(n^2) complexity... currentParent.element.publicProviders = Object.create(currentParent.element.publicProviders); currentParent.element.allProviders = currentParent.element.publicProviders; } const isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0; const isComponent = (node.flags & 32768 /* Component */) !== 0; if (!isPrivateService || isComponent) { currentParent.element.publicProviders[tokenKey(node.provider.token)] = node; } else { if (!currentElementHasPrivateProviders) { currentElementHasPrivateProviders = true; // Use prototypical inheritance to not get O(n^2) complexity... currentParent.element.allProviders = Object.create(currentParent.element.publicProviders); } currentParent.element.allProviders[tokenKey(node.provider.token)] = node; } if (isComponent) { currentParent.element.componentProvider = node; } } if (currentParent) { currentParent.childFlags |= node.flags; currentParent.directChildFlags |= node.flags; currentParent.childMatchedQueries |= node.matchedQueryIds; if (node.element && node.element.template) { currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries; } } else { viewRootNodeFlags |= node.flags; } if (node.childCount > 0) { currentParent = node; if (!isNgContainer(node)) { currentRenderParent = node; } } else { // When the current node has no children, check if it is the last children of its parent. // When it is, propagate the flags up. // The loop is required because an element could be the last transitive children of several // elements. We loop to either the root or the highest opened element (= with remaining // children) while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) { const newParent = currentParent.parent; if (newParent) { newParent.childFlags |= currentParent.childFlags; newParent.childMatchedQueries |= currentParent.childMatchedQueries; } currentParent = newParent; // We also need to update the render parent & account for ng-container if (currentParent && isNgContainer(currentParent)) { currentRenderParent = currentParent.renderParent; } else { currentRenderParent = currentParent; } } } } const handleEvent = (view, nodeIndex, eventName, event) => nodes[nodeIndex].element.handleEvent(view, eventName, event); return { // Will be filled later... factory: null, nodeFlags: viewNodeFlags, rootNodeFlags: viewRootNodeFlags, nodeMatchedQueries: viewMatchedQueries, flags, nodes: nodes, updateDirectives: updateDirectives || NOOP, updateRenderer: updateRenderer || NOOP, handleEvent, bindingCount: viewBindingCount, outputCount: viewDisposableCount, lastRenderRootNode }; } function isNgContainer(node) { return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null; } function validateNode(parent, node, nodeCount) { const template = node.element && node.element.template; if (template) { if (!template.lastRenderRootNode) { throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`); } if (template.lastRenderRootNode && template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) { throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${node.nodeIndex}!`); } } if (node.flags & 20224 /* CatProvider */) { const parentFlags = parent ? parent.flags : 0; if ((parentFlags & 1 /* TypeElement */) === 0) { throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${node.nodeIndex}!`); } } if (node.query) { if (node.flags & 67108864 /* TypeContentQuery */ && (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) { throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${node.nodeIndex}!`); } if (node.flags & 134217728 /* TypeViewQuery */ && parent) { throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${node.nodeIndex}!`); } } if (node.childCount) { const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1; if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) { throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`); } } } function createEmbeddedView(parent, anchorDef, viewDef, context) { // embedded views are seen as siblings to the anchor, so we need // to get the parent of the anchor and use it as parentIndex. const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef); initView(view, parent.component, context); createViewNodes(view); return view; } function createRootView(root, def, context) { const view = createView(root, root.renderer, null, null, def); initView(view, context, context); createViewNodes(view); return view; } function createComponentView(parentView, nodeDef, viewDef, hostElement) { const rendererType = nodeDef.element.componentRendererType; let compRenderer; if (!rendererType) { compRenderer = parentView.root.renderer; } else { compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType); } return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef); } function createView(root, renderer, parent, parentNodeDef, def) { const nodes = new Array(def.nodes.length); const disposables = def.outputCount ? new Array(def.outputCount) : null; const view = { def, parent, viewContainerParent: null, parentNodeDef, context: null, component: null, nodes, state: 13 /* CatInit */, root, renderer, oldValues: new Array(def.bindingCount), disposables, initIndex: -1 }; return view; } function initView(view, component, context) { view.component = component; view.context = context; } function createViewNodes(view) { let renderHost; if (isComponentView(view)) { const hostDef = view.parentNodeDef; renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement; } const def = view.def; const nodes = view.nodes; for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; Services.setCurrentNode(view, i); let nodeData; switch (nodeDef.flags & 201347067 /* Types */) { case 1 /* TypeElement */: const el = createElement(view, renderHost, nodeDef); let componentView = undefined; if (nodeDef.flags & 33554432 /* ComponentView */) { const compViewDef = resolveDefinition(nodeDef.element.componentView); componentView = Services.createComponentView(view, nodeDef, compViewDef, el); } listenToElementOutputs(view, componentView, nodeDef, el); nodeData = { renderElement: el, componentView, viewContainer: null, template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined }; if (nodeDef.flags & 16777216 /* EmbeddedViews */) { nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData); } break; case 2 /* TypeText */: nodeData = createText(view, renderHost, nodeDef); break; case 512 /* TypeClassProvider */: case 1024 /* TypeFactoryProvider */: case 2048 /* TypeUseExistingProvider */: case 256 /* TypeValueProvider */: { nodeData = nodes[i]; if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) { const instance = createProviderInstance(view, nodeDef); nodeData = { instance }; } break; } case 16 /* TypePipe */: { const instance = createPipeInstance(view, nodeDef); nodeData = { instance }; break; } case 16384 /* TypeDirective */: { nodeData = nodes[i]; if (!nodeData) { const instance = createDirectiveInstance(view, nodeDef); nodeData = { instance }; } if (nodeDef.flags & 32768 /* Component */) { const compView = asElementData(view, nodeDef.parent.nodeIndex).componentView; initView(compView, nodeData.instance, nodeData.instance); } break; } case 32 /* TypePureArray */: case 64 /* TypePureObject */: case 128 /* TypePurePipe */: nodeData = createPureExpression(view, nodeDef); break; case 67108864 /* TypeContentQuery */: case 134217728 /* TypeViewQuery */: nodeData = createQuery((nodeDef.flags & -2147483648 /* EmitDistinctChangesOnly */) === -2147483648 /* EmitDistinctChangesOnly */); break; case 8 /* TypeNgContent */: appendNgContent(view, renderHost, nodeDef); // no runtime data needed for NgContent... nodeData = undefined; break; } nodes[i] = nodeData; } // Create the ViewData.nodes of component views after we created everything else, // so that e.g. ng-content works execComponentViewsAction(view, ViewAction.CreateViewNodes); // fill static content and view queries execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */); } function checkNoChangesView(view) { markProjectedViewsForCheck(view); Services.updateDirectives(view, 1 /* CheckNoChanges */); execEmbeddedViewsAction(view, ViewAction.CheckNoChanges); Services.updateRenderer(view, 1 /* CheckNoChanges */); execComponentViewsAction(view, ViewAction.CheckNoChanges); // Note: We don't check queries for changes as we didn't do this in v2.x. // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message. view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */); } function checkAndUpdateView(view) { if (view.state & 1 /* BeforeFirstCheck */) { view.state &= ~1 /* BeforeFirstCheck */; view.state |= 2 /* FirstCheck */; } else { view.state &= ~2 /* FirstCheck */; } shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */); markProjectedViewsForCheck(view); Services.updateDirectives(view, 0 /* CheckAndUpdate */); execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate); execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */); let callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */); callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0)); Services.updateRenderer(view, 0 /* CheckAndUpdate */); execComponentViewsAction(view, ViewAction.CheckAndUpdate); execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */); callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */); callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0)); if (view.def.flags & 2 /* OnPush */) { view.state &= ~8 /* ChecksEnabled */; } view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */); shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */); } function checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { if (argStyle === 0 /* Inline */) { return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); } else { return checkAndUpdateNodeDynamic(view, nodeDef, v0); } } function markProjectedViewsForCheck(view) { const def = view.def; if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) { return; } for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 4 /* ProjectedTemplate */) { const projectedViews = asElementData(view, i).template._projectedViews; if (projectedViews) { for (let i = 0; i < projectedViews.length; i++) { const projectedView = projectedViews[i]; projectedView.state |= 32 /* CheckProjectedView */; markParentViewsForCheckProjectedViews(projectedView, view); } } } else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) { // a parent with leafs // no child is a component, // then skip the children i += nodeDef.childCount; } } } function checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { switch (nodeDef.flags & 201347067 /* Types */) { case 1 /* TypeElement */: return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); case 2 /* TypeText */: return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); case 16384 /* TypeDirective */: return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); case 32 /* TypePureArray */: case 64 /* TypePureObject */: case 128 /* TypePurePipe */: return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); default: throw 'unreachable'; } } function checkAndUpdateNodeDynamic(view, nodeDef, values) { switch (nodeDef.flags & 201347067 /* Types */) { case 1 /* TypeElement */: return checkAndUpdateElementDynamic(view, nodeDef, values); case 2 /* TypeText */: return checkAndUpdateTextDynamic(view, nodeDef, values); case 16384 /* TypeDirective */: return checkAndUpdateDirectiveDynamic(view, nodeDef, values); case 32 /* TypePureArray */: case 64 /* TypePureObject */: case 128 /* TypePurePipe */: return checkAndUpdatePureExpressionDynamic(view, nodeDef, values); default: throw 'unreachable'; } } function checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { if (argStyle === 0 /* Inline */) { checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); } else { checkNoChangesNodeDynamic(view, nodeDef, v0); } // Returning false is ok here as we would have thrown in case of a change. return false; } function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const bindLen = nodeDef.bindings.length; if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0); if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1); if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2); if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3); if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4); if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5); if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6); if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7); if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8); if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9); } function checkNoChangesNodeDynamic(view, nodeDef, values) { for (let i = 0; i < values.length; i++) { checkBindingNoChanges(view, nodeDef, i, values[i]); } } /** * Workaround https://github.com/angular/tsickle/issues/497 * @suppress {misplacedTypeAnnotation} */ function checkNoChangesQuery(view, nodeDef) { const queryList = asQueryList(view, nodeDef.nodeIndex); if (queryList.dirty) { throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), `Query ${nodeDef.query.id} not dirty`, `Query ${nodeDef.query.id} dirty`, (view.state & 1 /* BeforeFirstCheck */) !== 0); } } function destroyView(view) { if (view.state & 128 /* Destroyed */) { return; } execEmbeddedViewsAction(view, ViewAction.Destroy); execComponentViewsAction(view, ViewAction.Destroy); callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */); if (view.disposables) { for (let i = 0; i < view.disposables.length; i++) { view.disposables[i](); } } detachProjectedView(view); if (view.renderer.destroyNode) { destroyViewNodes(view); } if (isComponentView(view)) { view.renderer.destroy(); } view.state |= 128 /* Destroyed */; } function destroyViewNodes(view) { const len = view.def.nodes.length; for (let i = 0; i < len; i++) { const def = view.def.nodes[i]; if (def.flags & 1 /* TypeElement */) { view.renderer.destroyNode(asElementData(view, i).renderElement); } else if (def.flags & 2 /* TypeText */) { view.renderer.destroyNode(asTextData(view, i).renderText); } else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) { asQueryList(view, i).destroy(); } } } var ViewAction; (function (ViewAction) { ViewAction[ViewAction["CreateViewNodes"] = 0] = "CreateViewNodes"; ViewAction[ViewAction["CheckNoChanges"] = 1] = "CheckNoChanges"; ViewAction[ViewAction["CheckNoChangesProjectedViews"] = 2] = "CheckNoChangesProjectedViews"; ViewAction[ViewAction["CheckAndUpdate"] = 3] = "CheckAndUpdate"; ViewAction[ViewAction["CheckAndUpdateProjectedViews"] = 4] = "CheckAndUpdateProjectedViews"; ViewAction[ViewAction["Destroy"] = 5] = "Destroy"; })(ViewAction || (ViewAction = {})); function execComponentViewsAction(view, action) { const def = view.def; if (!(def.nodeFlags & 33554432 /* ComponentView */)) { return; } for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 33554432 /* ComponentView */) { // a leaf callViewAction(asElementData(view, i).componentView, action); } else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) { // a parent with leafs // no child is a component, // then skip the children i += nodeDef.childCount; } } } function execEmbeddedViewsAction(view, action) { const def = view.def; if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) { return; } for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 16777216 /* EmbeddedViews */) { // a leaf const embeddedViews = asElementData(view, i).viewContainer._embeddedViews; for (let k = 0; k < embeddedViews.length; k++) { callViewAction(embeddedViews[k], action); } } else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) { // a parent with leafs // no child is a component, // then skip the children i += nodeDef.childCount; } } } function callViewAction(view, action) { const viewState = view.state; switch (action) { case ViewAction.CheckNoChanges: if ((viewState & 128 /* Destroyed */) === 0) { if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) { checkNoChangesView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews); } } break; case ViewAction.CheckNoChangesProjectedViews: if ((viewState & 128 /* Destroyed */) === 0) { if (viewState & 32 /* CheckProjectedView */) { checkNoChangesView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, action); } } break; case ViewAction.CheckAndUpdate: if ((viewState & 128 /* Destroyed */) === 0) { if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) { checkAndUpdateView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews); } } break; case ViewAction.CheckAndUpdateProjectedViews: if ((viewState & 128 /* Destroyed */) === 0) { if (viewState & 32 /* CheckProjectedView */) { checkAndUpdateView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, action); } } break; case ViewAction.Destroy: // Note: destroyView recurses over all views, // so we don't need to special case projected views here. destroyView(view); break; case ViewAction.CreateViewNodes: createViewNodes(view); break; } } function execProjectedViewsAction(view, action) { execEmbeddedViewsAction(view, action); execComponentViewsAction(view, action); } function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) { if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) { return; } const nodeCount = view.def.nodes.length; for (let i = 0; i < nodeCount; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) { Services.setCurrentNode(view, nodeDef.nodeIndex); switch (checkType) { case 0 /* CheckAndUpdate */: checkAndUpdateQuery(view, nodeDef); break; case 1 /* CheckNoChanges */: checkNoChangesQuery(view, nodeDef); break; } } if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) { // no child has a matching query // then skip the children i += nodeDef.childCount; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let initialized = false; function initServicesIfNeeded() { if (initialized) { return; } initialized = true; const services = isDevMode() ? createDebugServices() : createProdServices(); Services.setCurrentNode = services.setCurrentNode; Services.createRootView = services.createRootView; Services.createEmbeddedView = services.createEmbeddedView; Services.createComponentView = services.createComponentView; Services.createNgModuleRef = services.createNgModuleRef; Services.overrideProvider = services.overrideProvider; Services.overrideComponentView = services.overrideComponentView; Services.clearOverrides = services.clearOverrides; Services.checkAndUpdateView = services.checkAndUpdateView; Services.checkNoChangesView = services.checkNoChangesView; Services.destroyView = services.destroyView; Services.resolveDep = resolveDep; Services.createDebugContext = services.createDebugContext; Services.handleEvent = services.handleEvent; Services.updateDirectives = services.updateDirectives; Services.updateRenderer = services.updateRenderer; Services.dirtyParentQueries = dirtyParentQueries; } function createProdServices() { return { setCurrentNode: () => { }, createRootView: createProdRootView, createEmbeddedView: createEmbeddedView, createComponentView: createComponentView, createNgModuleRef: createNgModuleRef, overrideProvider: NOOP, overrideComponentView: NOOP, clearOverrides: NOOP, checkAndUpdateView: checkAndUpdateView, checkNoChangesView: checkNoChangesView, destroyView: destroyView, createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex), handleEvent: (view, nodeIndex, eventName, event) => view.def.handleEvent(view, nodeIndex, eventName, event), updateDirectives: (view, checkType) => view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view), updateRenderer: (view, checkType) => view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view), }; } function createDebugServices() { return { setCurrentNode: debugSetCurrentNode, createRootView: debugCreateRootView, createEmbeddedView: debugCreateEmbeddedView, createComponentView: debugCreateComponentView, createNgModuleRef: debugCreateNgModuleRef, overrideProvider: debugOverrideProvider, overrideComponentView: debugOverrideComponentView, clearOverrides: debugClearOverrides, checkAndUpdateView: debugCheckAndUpdateView, checkNoChangesView: debugCheckNoChangesView, destroyView: debugDestroyView, createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex), handleEvent: debugHandleEvent, updateDirectives: debugUpdateDirectives, updateRenderer: debugUpdateRenderer, }; } function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) { const rendererFactory = ngModule.injector.get(RendererFactory2); return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context); } function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) { const rendererFactory = ngModule.injector.get(RendererFactory2); const root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode); const defWithOverride = applyProviderOverridesToView(def); return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]); } function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) { const sanitizer = ngModule.injector.get(Sanitizer); const errorHandler = ngModule.injector.get(ErrorHandler); const renderer = rendererFactory.createRenderer(null, null); return { ngModule, injector: elInjector, projectableNodes, selectorOrNode: rootSelectorOrNode, sanitizer, rendererFactory, renderer, errorHandler }; } function debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) { const defWithOverride = applyProviderOverridesToView(viewDef); return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]); } function debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) { const overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token); if (overrideComponentView) { viewDef = overrideComponentView; } else { viewDef = applyProviderOverridesToView(viewDef); } return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]); } function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) { const defWithOverride = applyProviderOverridesToNgModule(def); return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride); } const providerOverrides = new Map(); const providerOverridesWithScope = new Map(); const viewDefOverrides = new Map(); function debugOverrideProvider(override) { providerOverrides.set(override.token, override); let injectableDef; if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) && typeof injectableDef.providedIn === 'function') { providerOverridesWithScope.set(override.token, override); } } function debugOverrideComponentView(comp, compFactory) { const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory)); const compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView); viewDefOverrides.set(comp, compViewDef); } function debugClearOverrides() { providerOverrides.clear(); providerOverridesWithScope.clear(); viewDefOverrides.clear(); } // Notes about the algorithm: // 1) Locate the providers of an element and check if one of them was overwritten // 2) Change the providers of that element // // We only create new datastructures if we need to, to keep perf impact // reasonable. function applyProviderOverridesToView(def) { if (providerOverrides.size === 0) { return def; } const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def); if (elementIndicesWithOverwrittenProviders.length === 0) { return def; } // clone the whole view definition, // as it maintains references between the nodes that are hard to update. def = def.factory(() => NOOP); for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) { applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]); } return def; function findElementIndicesWithOverwrittenProviders(def) { const elIndicesWithOverwrittenProviders = []; let lastElementDef = null; for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 1 /* TypeElement */) { lastElementDef = nodeDef; } if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ && providerOverrides.has(nodeDef.provider.token)) { elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex); lastElementDef = null; } } return elIndicesWithOverwrittenProviders; } function applyProviderOverridesToElement(viewDef, elIndex) { for (let i = elIndex + 1; i < viewDef.nodes.length; i++) { const nodeDef = viewDef.nodes[i]; if (nodeDef.flags & 1 /* TypeElement */) { // stop at the next element return; } if (nodeDef.flags & 3840 /* CatProviderNoDirective */) { const provider = nodeDef.provider; const override = providerOverrides.get(provider.token); if (override) { nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags; provider.deps = splitDepsDsl(override.deps); provider.value = override.value; } } } } } // Notes about the algorithm: // We only create new datastructures if we need to, to keep perf impact // reasonable. function applyProviderOverridesToNgModule(def) { const { hasOverrides, hasDeprecatedOverrides } = calcHasOverrides(def); if (!hasOverrides) { return def; } // clone the whole view definition, // as it maintains references between the nodes that are hard to update. def = def.factory(() => NOOP); applyProviderOverrides(def); return def; function calcHasOverrides(def) { let hasOverrides = false; let hasDeprecatedOverrides = false; if (providerOverrides.size === 0) { return { hasOverrides, hasDeprecatedOverrides }; } def.providers.forEach(node => { const override = providerOverrides.get(node.token); if ((node.flags & 3840 /* CatProviderNoDirective */) && override) { hasOverrides = true; hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior; } }); def.modules.forEach(module => { providerOverridesWithScope.forEach((override, token) => { if (getInjectableDef(token).providedIn === module) { hasOverrides = true; hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior; } }); }); return { hasOverrides, hasDeprecatedOverrides }; } function applyProviderOverrides(def) { for (let i = 0; i < def.providers.length; i++) { const provider = def.providers[i]; if (hasDeprecatedOverrides) { // We had a bug where me made // all providers lazy. Keep this logic behind a flag // for migrating existing users. provider.flags |= 4096 /* LazyProvider */; } const override = providerOverrides.get(provider.token); if (override) { provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags; provider.deps = splitDepsDsl(override.deps); provider.value = override.value; } } if (providerOverridesWithScope.size > 0) { let moduleSet = new Set(def.modules); providerOverridesWithScope.forEach((override, token) => { if (moduleSet.has(getInjectableDef(token).providedIn)) { let provider = { token: token, flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */), deps: splitDepsDsl(override.deps), value: override.value, index: def.providers.length, }; def.providers.push(provider); def.providersByKey[tokenKey(token)] = provider; } }); } } } function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const nodeDef = view.def.nodes[checkIndex]; checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, checkIndex).value : undefined; } function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const nodeDef = view.def.nodes[checkIndex]; checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, checkIndex).value : undefined; } function debugCheckAndUpdateView(view) { return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]); } function debugCheckNoChangesView(view) { return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]); } function debugDestroyView(view) { return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]); } var DebugAction; (function (DebugAction) { DebugAction[DebugAction["create"] = 0] = "create"; DebugAction[DebugAction["detectChanges"] = 1] = "detectChanges"; DebugAction[DebugAction["checkNoChanges"] = 2] = "checkNoChanges"; DebugAction[DebugAction["destroy"] = 3] = "destroy"; DebugAction[DebugAction["handleEvent"] = 4] = "handleEvent"; })(DebugAction || (DebugAction = {})); let _currentAction; let _currentView; let _currentNodeIndex; function debugSetCurrentNode(view, nodeIndex) { _currentView = view; _currentNodeIndex = nodeIndex; } function debugHandleEvent(view, nodeIndex, eventName, event) { debugSetCurrentNode(view, nodeIndex); return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]); } function debugUpdateDirectives(view, checkType) { if (view.state & 128 /* Destroyed */) { throw viewDestroyedError(DebugAction[_currentAction]); } debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0)); return view.def.updateDirectives(debugCheckDirectivesFn, view); function debugCheckDirectivesFn(view, nodeIndex, argStyle, ...values) { const nodeDef = view.def.nodes[nodeIndex]; if (checkType === 0 /* CheckAndUpdate */) { debugCheckAndUpdateNode(view, nodeDef, argStyle, values); } else { debugCheckNoChangesNode(view, nodeDef, argStyle, values); } if (nodeDef.flags & 16384 /* TypeDirective */) { debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex)); } return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined; } } function debugUpdateRenderer(view, checkType) { if (view.state & 128 /* Destroyed */) { throw viewDestroyedError(DebugAction[_currentAction]); } debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0)); return view.def.updateRenderer(debugCheckRenderNodeFn, view); function debugCheckRenderNodeFn(view, nodeIndex, argStyle, ...values) { const nodeDef = view.def.nodes[nodeIndex]; if (checkType === 0 /* CheckAndUpdate */) { debugCheckAndUpdateNode(view, nodeDef, argStyle, values); } else { debugCheckNoChangesNode(view, nodeDef, argStyle, values); } if (nodeDef.flags & 3 /* CatRenderNode */) { debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex)); } return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined; } } function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) { const changed = checkAndUpdateNode(view, nodeDef, argStyle, ...givenValues); if (changed) { const values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues; if (nodeDef.flags & 16384 /* TypeDirective */) { const bindingValues = {}; for (let i = 0; i < nodeDef.bindings.length; i++) { const binding = nodeDef.bindings[i]; const value = values[i]; if (binding.flags & 8 /* TypeProperty */) { bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] = normalizeDebugBindingValue(value); } } const elDef = nodeDef.parent; const el = asElementData(view, elDef.nodeIndex).renderElement; if (!elDef.element.name) { // a comment. view.renderer.setValue(el, escapeCommentText(`bindings=${JSON.stringify(bindingValues, null, 2)}`)); } else { // a regular element. for (let attr in bindingValues) { const value = bindingValues[attr]; if (value != null) { view.renderer.setAttribute(el, attr, value); } else { view.renderer.removeAttribute(el, attr); } } } } } } function debugCheckNoChangesNode(view, nodeDef, argStyle, values) { checkNoChangesNode(view, nodeDef, argStyle, ...values); } function nextDirectiveWithBinding(view, nodeIndex) { for (let i = nodeIndex; i < view.def.nodes.length; i++) { const nodeDef = view.def.nodes[i]; if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) { return i; } } return null; } function nextRenderNodeWithBinding(view, nodeIndex) { for (let i = nodeIndex; i < view.def.nodes.length; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) { return i; } } return null; } class DebugContext_ { constructor(view, nodeIndex) { this.view = view; this.nodeIndex = nodeIndex; if (nodeIndex == null) { this.nodeIndex = nodeIndex = 0; } this.nodeDef = view.def.nodes[nodeIndex]; let elDef = this.nodeDef; let elView = view; while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) { elDef = elDef.parent; } if (!elDef) { while (!elDef && elView) { elDef = viewParentEl(elView); elView = elView.parent; } } this.elDef = elDef; this.elView = elView; } get elOrCompView() { // Has to be done lazily as we use the DebugContext also during creation of elements... return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view; } get injector() { return createInjector$1(this.elView, this.elDef); } get component() { return this.elOrCompView.component; } get context() { return this.elOrCompView.context; } get providerTokens() { const tokens = []; if (this.elDef) { for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) { const childDef = this.elView.def.nodes[i]; if (childDef.flags & 20224 /* CatProvider */) { tokens.push(childDef.provider.token); } i += childDef.childCount; } } return tokens; } get references() { const references = {}; if (this.elDef) { collectReferences(this.elView, this.elDef, references); for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) { const childDef = this.elView.def.nodes[i]; if (childDef.flags & 20224 /* CatProvider */) { collectReferences(this.elView, childDef, references); } i += childDef.childCount; } } return references; } get componentRenderElement() { const elData = findHostElement(this.elOrCompView); return elData ? elData.renderElement : undefined; } get renderNode() { return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) : renderNode(this.elView, this.elDef); } logError(console, ...values) { let logViewDef; let logNodeIndex; if (this.nodeDef.flags & 2 /* TypeText */) { logViewDef = this.view.def; logNodeIndex = this.nodeDef.nodeIndex; } else { logViewDef = this.elView.def; logNodeIndex = this.elDef.nodeIndex; } // Note: we only generate a log function for text and element nodes // to make the generated code as small as possible. const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex); let currRenderNodeIndex = -1; let nodeLogger = () => { currRenderNodeIndex++; if (currRenderNodeIndex === renderNodeIndex) { return console.error.bind(console, ...values); } else { return NOOP; } }; logViewDef.factory(nodeLogger); if (currRenderNodeIndex < renderNodeIndex) { console.error('Illegal state: the ViewDefinitionFactory did not call the logger!'); console.error(...values); } } } function getRenderNodeIndex(viewDef, nodeIndex) { let renderNodeIndex = -1; for (let i = 0; i <= nodeIndex; i++) { const nodeDef = viewDef.nodes[i]; if (nodeDef.flags & 3 /* CatRenderNode */) { renderNodeIndex++; } } return renderNodeIndex; } function findHostElement(view) { while (view && !isComponentView(view)) { view = view.parent; } if (view.parent) { return asElementData(view.parent, viewParentEl(view).nodeIndex); } return null; } function collectReferences(view, nodeDef, references) { for (let refName in nodeDef.references) { references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]); } } function callWithDebugContext(action, fn, self, args) { const oldAction = _currentAction; const oldView = _currentView; const oldNodeIndex = _currentNodeIndex; try { _currentAction = action; const result = fn.apply(self, args); _currentView = oldView; _currentNodeIndex = oldNodeIndex; _currentAction = oldAction; return result; } catch (e) { if (isViewDebugError(e) || !_currentView) { throw e; } throw viewWrappedDebugError(e, getCurrentDebugContext()); } } function getCurrentDebugContext() { return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null; } class DebugRendererFactory2 { constructor(delegate) { this.delegate = delegate; } createRenderer(element, renderData) { return new DebugRenderer2(this.delegate.createRenderer(element, renderData)); } begin() { if (this.delegate.begin) { this.delegate.begin(); } } end() { if (this.delegate.end) { this.delegate.end(); } } whenRenderingDone() { if (this.delegate.whenRenderingDone) { return this.delegate.whenRenderingDone(); } return Promise.resolve(null); } } class DebugRenderer2 { constructor(delegate) { this.delegate = delegate; /** * Factory function used to create a `DebugContext` when a node is created. * * The `DebugContext` allows to retrieve information about the nodes that are useful in tests. * * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine * or a Render context. */ this.debugContextFactory = getCurrentDebugContext; this.data = this.delegate.data; } createDebugContext(nativeElement) { return this.debugContextFactory(nativeElement); } destroyNode(node) { const debugNode = getDebugNode$1(node); removeDebugNodeFromIndex(debugNode); if (debugNode instanceof DebugNode__PRE_R3__) { debugNode.listeners.length = 0; } if (this.delegate.destroyNode) { this.delegate.destroyNode(node); } } destroy() { this.delegate.destroy(); } createElement(name, namespace) { const el = this.delegate.createElement(name, namespace); const debugCtx = this.createDebugContext(el); if (debugCtx) { const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx); debugEl.name = name; indexDebugNode(debugEl); } return el; } createComment(value) { const comment = this.delegate.createComment(escapeCommentText(value)); const debugCtx = this.createDebugContext(comment); if (debugCtx) { indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx)); } return comment; } createText(value) { const text = this.delegate.createText(value); const debugCtx = this.createDebugContext(text); if (debugCtx) { indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx)); } return text; } appendChild(parent, newChild) { const debugEl = getDebugNode$1(parent); const debugChildEl = getDebugNode$1(newChild); if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.addChild(debugChildEl); } this.delegate.appendChild(parent, newChild); } insertBefore(parent, newChild, refChild, isMove) { const debugEl = getDebugNode$1(parent); const debugChildEl = getDebugNode$1(newChild); const debugRefEl = getDebugNode$1(refChild); if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.insertBefore(debugRefEl, debugChildEl); } this.delegate.insertBefore(parent, newChild, refChild, isMove); } removeChild(parent, oldChild) { const debugEl = getDebugNode$1(parent); const debugChildEl = getDebugNode$1(oldChild); if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.removeChild(debugChildEl); } this.delegate.removeChild(parent, oldChild); } selectRootElement(selectorOrNode, preserveContent) { const el = this.delegate.selectRootElement(selectorOrNode, preserveContent); const debugCtx = getCurrentDebugContext(); if (debugCtx) { indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx)); } return el; } setAttribute(el, name, value, namespace) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { const fullName = namespace ? namespace + ':' + name : name; debugEl.attributes[fullName] = value; } this.delegate.setAttribute(el, name, value, namespace); } removeAttribute(el, name, namespace) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { const fullName = namespace ? namespace + ':' + name : name; debugEl.attributes[fullName] = null; } this.delegate.removeAttribute(el, name, namespace); } addClass(el, name) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.classes[name] = true; } this.delegate.addClass(el, name); } removeClass(el, name) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.classes[name] = false; } this.delegate.removeClass(el, name); } setStyle(el, style, value, flags) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.styles[style] = value; } this.delegate.setStyle(el, style, value, flags); } removeStyle(el, style, flags) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.styles[style] = null; } this.delegate.removeStyle(el, style, flags); } setProperty(el, name, value) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.properties[name] = value; } this.delegate.setProperty(el, name, value); } listen(target, eventName, callback) { if (typeof target !== 'string') { const debugEl = getDebugNode$1(target); if (debugEl) { debugEl.listeners.push(new DebugEventListener(eventName, callback)); } } return this.delegate.listen(target, eventName, callback); } parentNode(node) { return this.delegate.parentNode(node); } nextSibling(node) { return this.delegate.nextSibling(node); } setValue(node, value) { return this.delegate.setValue(node, value); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function overrideProvider(override) { initServicesIfNeeded(); return Services.overrideProvider(override); } function overrideComponentView(comp, componentFactory) { initServicesIfNeeded(); return Services.overrideComponentView(comp, componentFactory); } function clearOverrides() { initServicesIfNeeded(); return Services.clearOverrides(); } // Attention: this function is called as top level function. // Putting any logic in here will destroy closure tree shaking! function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) { return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory); } function cloneNgModuleDefinition(def) { const providers = Array.from(def.providers); const modules = Array.from(def.modules); const providersByKey = {}; for (const key in def.providersByKey) { providersByKey[key] = def.providersByKey[key]; } return { factory: def.factory, scope: def.scope, providers, modules, providersByKey, }; } class NgModuleFactory_ extends NgModuleFactory { constructor(moduleType, _bootstrapComponents, _ngModuleDefFactory) { // Attention: this ctor is called as top level function. // Putting any logic in here will destroy closure tree shaking! super(); this.moduleType = moduleType; this._bootstrapComponents = _bootstrapComponents; this._ngModuleDefFactory = _ngModuleDefFactory; } create(parentInjector) { initServicesIfNeeded(); // Clone the NgModuleDefinition so that any tree shakeable provider definition // added to this instance of the NgModuleRef doesn't affect the cached copy. // See https://github.com/angular/angular/issues/25018. const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory)); return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Compiles a partial directive declaration object into a full directive definition object. * * @codeGenApi */ function ɵɵngDeclareDirective(decl) { const compiler = getCompilerFacade(); return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl); } /** * Compiles a partial component declaration object into a full component definition object. * * @codeGenApi */ function ɵɵngDeclareComponent(decl) { const compiler = getCompilerFacade(); return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl); } /** * Compiles a partial pipe declaration object into a full pipe definition object. * * @codeGenApi */ function ɵɵngDeclarePipe(decl) { const compiler = getCompilerFacade(); return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // clang-format on /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ if (typeof ngDevMode !== 'undefined' && ngDevMode) { // This helper is to give a reasonable error message to people upgrading to v9 that have not yet // installed `@angular/localize` in their app. // tslint:disable-next-line: no-toplevel-property-access _global.$localize = _global.$localize || function () { throw new Error('It looks like your application or one of its dependencies is using i18n.\n' + 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\n' + 'Please run `ng add @angular/localize` from the Angular CLI.\n' + '(For non-CLI projects, add `import \'@angular/localize/init\';` to your `polyfills.ts` file.\n' + 'For server-side rendering applications add the import to your `main.server.ts` file.)'); }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=core.js.map /***/ }), /***/ "fjNz": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/bounds.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "PSPu"); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian.js */ "YzSS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream.js */ "tepu"); var lambda0, phi0, lambda1, phi1, // bounds lambda2, // previous lambda-coordinate lambda00, phi00, // first point p0, // previous 3D point deltaSum, ranges, range; var boundsStream = { point: boundsPoint, lineStart: boundsLineStart, lineEnd: boundsLineEnd, polygonStart: function() { boundsStream.point = boundsRingPoint; boundsStream.lineStart = boundsRingStart; boundsStream.lineEnd = boundsRingEnd; deltaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonStart(); }, polygonEnd: function() { _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonEnd(); boundsStream.point = boundsPoint; boundsStream.lineStart = boundsLineStart; boundsStream.lineEnd = boundsLineEnd; if (_area_js__WEBPACK_IMPORTED_MODULE_1__["areaRingSum"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); else if (deltaSum > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi1 = 90; else if (deltaSum < -_math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi0 = -90; range[0] = lambda0, range[1] = lambda1; }, sphere: function() { lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); } }; function boundsPoint(lambda, phi) { ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); if (phi < phi0) phi0 = phi; if (phi > phi1) phi1 = phi; } function linePoint(lambda, phi) { var p = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesian"])([lambda * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"], phi * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"]]); if (p0) { var normal = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(p0, p), equatorial = [normal[1], -normal[0], 0], inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(equatorial, normal); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianNormalizeInPlace"])(inflection); inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["spherical"])(inflection); var delta = lambda - lambda2, sign = delta > 0 ? 1 : -1, lambdai = inflection[0] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"] * sign, phii, antimeridian = Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180; if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { phii = inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; if (phii > phi1) phi1 = phii; } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { phii = -inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; if (phii < phi0) phi0 = phii; } else { if (phi < phi0) phi0 = phi; if (phi > phi1) phi1 = phi; } if (antimeridian) { if (lambda < lambda2) { if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; } else { if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; } } else { if (lambda1 >= lambda0) { if (lambda < lambda0) lambda0 = lambda; if (lambda > lambda1) lambda1 = lambda; } else { if (lambda > lambda2) { if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; } else { if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; } } } } else { ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); } if (phi < phi0) phi0 = phi; if (phi > phi1) phi1 = phi; p0 = p, lambda2 = lambda; } function boundsLineStart() { boundsStream.point = linePoint; } function boundsLineEnd() { range[0] = lambda0, range[1] = lambda1; boundsStream.point = boundsPoint; p0 = null; } function boundsRingPoint(lambda, phi) { if (p0) { var delta = lambda - lambda2; deltaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta); } else { lambda00 = lambda, phi00 = phi; } _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].point(lambda, phi); linePoint(lambda, phi); } function boundsRingStart() { _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineStart(); } function boundsRingEnd() { boundsRingPoint(lambda00, phi00); _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineEnd(); if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(deltaSum) > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) lambda0 = -(lambda1 = 180); range[0] = lambda0, range[1] = lambda1; p0 = null; } // Finds the left-right distance between two longitudes. // This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want // the distance between ±180° to be 360°. function angle(lambda0, lambda1) { return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1; } function rangeCompare(a, b) { return a[0] - b[0]; } function rangeContains(range, x) { return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; } /* harmony default export */ __webpack_exports__["default"] = (function(feature) { var i, n, a, b, merged, deltaMax, delta; phi1 = lambda1 = -(lambda0 = phi0 = Infinity); ranges = []; Object(_stream_js__WEBPACK_IMPORTED_MODULE_4__["default"])(feature, boundsStream); // First, sort ranges by their minimum longitudes. if (n = ranges.length) { ranges.sort(rangeCompare); // Then, merge any ranges that overlap. for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) { b = ranges[i]; if (rangeContains(a, b[0]) || rangeContains(a, b[1])) { if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; } else { merged.push(a = b); } } // Finally, find the largest gap between the merged ranges. // The final bounding box will be the inverse of this gap. for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) { b = merged[i]; if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1]; } } ranges = range = null; return lambda0 === Infinity || phi0 === Infinity ? [[NaN, NaN], [NaN, NaN]] : [[lambda0, phi0], [lambda1, phi1]]; }); /***/ }), /***/ "fnXD": /*!***********************************************!*\ !*** ./node_modules/d3-geo/src/pointEqual.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[0] - b[0]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] && Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[1] - b[1]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; }); /***/ }), /***/ "gO8D": /*!***********************************************!*\ !*** ./node_modules/d3-quadtree/src/index.js ***! \***********************************************/ /*! exports provided: quadtree */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ "z6FA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /***/ }), /***/ "gRHU": /*!*********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Observer.js ***! \*********************************************************/ /*! exports provided: empty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config */ "2fFW"); /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/hostReportError */ "NJ4a"); const empty = { closed: true, next(value) { }, error(err) { if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) { throw err; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err); } }, complete() { } }; //# sourceMappingURL=Observer.js.map /***/ }), /***/ "gbBL": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Set2.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")); /***/ }), /***/ "gcYM": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/throttleTime.js ***! \***********************************************************************/ /*! exports provided: throttleTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./throttle */ "yuhW"); function throttleTime(duration, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"], config = _throttle__WEBPACK_IMPORTED_MODULE_2__["defaultThrottleConfig"]) { return (source) => source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); } class ThrottleTimeOperator { constructor(duration, scheduler, leading, trailing) { this.duration = duration; this.scheduler = scheduler; this.leading = leading; this.trailing = trailing; } call(subscriber, source) { return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing)); } } class ThrottleTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, duration, scheduler, leading, trailing) { super(destination); this.duration = duration; this.scheduler = scheduler; this.leading = leading; this.trailing = trailing; this._hasTrailingValue = false; this._trailingValue = null; } _next(value) { if (this.throttled) { if (this.trailing) { this._trailingValue = value; this._hasTrailingValue = true; } } else { this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this })); if (this.leading) { this.destination.next(value); } else if (this.trailing) { this._trailingValue = value; this._hasTrailingValue = true; } } } _complete() { if (this._hasTrailingValue) { this.destination.next(this._trailingValue); this.destination.complete(); } else { this.destination.complete(); } } clearThrottle() { const throttled = this.throttled; if (throttled) { if (this.trailing && this._hasTrailingValue) { this.destination.next(this._trailingValue); this._trailingValue = null; this._hasTrailingValue = false; } throttled.unsubscribe(); this.remove(throttled); this.throttled = null; } } } function dispatchNext(arg) { const { subscriber } = arg; subscriber.clearThrottle(); } //# sourceMappingURL=throttleTime.js.map /***/ }), /***/ "gj+k": /*!******************************************!*\ !*** ./node_modules/d3-array/src/max.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return max; }); function max(values, valueof) { let max; if (valueof === undefined) { for (const value of values) { if (value != null && (max < value || (max === undefined && value >= value))) { max = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (max < value || (max === undefined && value >= value))) { max = value; } } } return max; } /***/ }), /***/ "gqw6": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/array.js ***! \********************************************/ /*! exports provided: slice, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var slice = Array.prototype.slice; /* harmony default export */ __webpack_exports__["default"] = (function(x) { return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like : Array.from(x); // Map, Set, iterable, string, or anything else }); /***/ }), /***/ "gy+j": /*!*************************************************!*\ !*** ./node_modules/d3-contour/src/contours.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "mcvr"); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ascending.js */ "tOsU"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./area.js */ "xP+1"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ "DiG6"); /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contains.js */ "UnGF"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./noop.js */ "S2Xb"); var cases = [ [], [[[1.0, 1.5], [0.5, 1.0]]], [[[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [0.5, 1.0]]], [[[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 0.5], [1.0, 1.5]]], [[[1.0, 0.5], [0.5, 1.0]]], [[[0.5, 1.0], [1.0, 0.5]]], [[[1.0, 1.5], [1.0, 0.5]]], [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [1.0, 0.5]]], [[[0.5, 1.0], [1.5, 1.0]]], [[[1.0, 1.5], [1.5, 1.0]]], [[[0.5, 1.0], [1.0, 1.5]]], [] ]; /* harmony default export */ __webpack_exports__["default"] = (function() { var dx = 1, dy = 1, threshold = d3_array__WEBPACK_IMPORTED_MODULE_0__["thresholdSturges"], smooth = smoothLinear; function contours(values) { var tz = threshold(values); // Convert number of thresholds into uniform thresholds. if (!Array.isArray(tz)) { var domain = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["extent"])(values), start = domain[0], stop = domain[1]; tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, tz); tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz); } else { tz = tz.slice().sort(_ascending_js__WEBPACK_IMPORTED_MODULE_2__["default"]); } return tz.map(function(value) { return contour(values, value); }); } // Accumulate, smooth contour rings, assign holes to exterior rings. // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js function contour(values, value) { var polygons = [], holes = []; isorings(values, value, function(ring) { smooth(ring, values, value); if (Object(_area_js__WEBPACK_IMPORTED_MODULE_3__["default"])(ring) > 0) polygons.push([ring]); else holes.push(ring); }); holes.forEach(function(hole) { for (var i = 0, n = polygons.length, polygon; i < n; ++i) { if (Object(_contains_js__WEBPACK_IMPORTED_MODULE_5__["default"])((polygon = polygons[i])[0], hole) !== -1) { polygon.push(hole); return; } } }); return { type: "MultiPolygon", value: value, coordinates: polygons }; } // Marching squares with isolines stitched into rings. // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js function isorings(values, value, callback) { var fragmentByStart = new Array, fragmentByEnd = new Array, x, y, t0, t1, t2, t3; // Special case for the first row (y = -1, t2 = t3 = 0). x = y = -1; t1 = values[0] >= value; cases[t1 << 1].forEach(stitch); while (++x < dx - 1) { t0 = t1, t1 = values[x + 1] >= value; cases[t0 | t1 << 1].forEach(stitch); } cases[t1 << 0].forEach(stitch); // General case for the intermediate rows. while (++y < dy - 1) { x = -1; t1 = values[y * dx + dx] >= value; t2 = values[y * dx] >= value; cases[t1 << 1 | t2 << 2].forEach(stitch); while (++x < dx - 1) { t0 = t1, t1 = values[y * dx + dx + x + 1] >= value; t3 = t2, t2 = values[y * dx + x + 1] >= value; cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch); } cases[t1 | t2 << 3].forEach(stitch); } // Special case for the last row (y = dy - 1, t0 = t1 = 0). x = -1; t2 = values[y * dx] >= value; cases[t2 << 2].forEach(stitch); while (++x < dx - 1) { t3 = t2, t2 = values[y * dx + x + 1] >= value; cases[t2 << 2 | t3 << 3].forEach(stitch); } cases[t2 << 3].forEach(stitch); function stitch(line) { var start = [line[0][0] + x, line[0][1] + y], end = [line[1][0] + x, line[1][1] + y], startIndex = index(start), endIndex = index(end), f, g; if (f = fragmentByEnd[startIndex]) { if (g = fragmentByStart[endIndex]) { delete fragmentByEnd[f.end]; delete fragmentByStart[g.start]; if (f === g) { f.ring.push(end); callback(f.ring); } else { fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)}; } } else { delete fragmentByEnd[f.end]; f.ring.push(end); fragmentByEnd[f.end = endIndex] = f; } } else if (f = fragmentByStart[endIndex]) { if (g = fragmentByEnd[startIndex]) { delete fragmentByStart[f.start]; delete fragmentByEnd[g.end]; if (f === g) { f.ring.push(end); callback(f.ring); } else { fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)}; } } else { delete fragmentByStart[f.start]; f.ring.unshift(start); fragmentByStart[f.start = startIndex] = f; } } else { fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]}; } } } function index(point) { return point[0] * 2 + point[1] * (dx + 1) * 4; } function smoothLinear(ring, values, value) { ring.forEach(function(point) { var x = point[0], y = point[1], xt = x | 0, yt = y | 0, v0, v1 = values[yt * dx + xt]; if (x > 0 && x < dx && xt === x) { v0 = values[yt * dx + xt - 1]; point[0] = x + (value - v0) / (v1 - v0) - 0.5; } if (y > 0 && y < dy && yt === y) { v0 = values[(yt - 1) * dx + xt]; point[1] = y + (value - v0) / (v1 - v0) - 0.5; } }); } contours.contour = contour; contours.size = function(_) { if (!arguments.length) return [dx, dy]; var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]); if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); return dx = _0, dy = _1, contours; }; contours.thresholds = function(_) { return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), contours) : threshold; }; contours.smooth = function(_) { return arguments.length ? (smooth = _ ? smoothLinear : _noop_js__WEBPACK_IMPORTED_MODULE_6__["default"], contours) : smooth === smoothLinear; }; return contours; }); /***/ }), /***/ "h2xr": /*!*******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Accent.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")); /***/ }), /***/ "h8nK": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/bisect.js ***! \*********************************************/ /*! exports provided: bisectRight, bisectLeft, bisectCenter, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return bisectRight; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return bisectLeft; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return bisectCenter; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ "Ki0a"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ "CiDq"); const ascendingBisect = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]); const bisectRight = ascendingBisect.right; const bisectLeft = ascendingBisect.left; const bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_number_js__WEBPACK_IMPORTED_MODULE_2__["default"]).center; /* harmony default export */ __webpack_exports__["default"] = (bisectRight); /***/ }), /***/ "h9r8": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "deebf79ecae13182bd", "eff3ffbdd7e76baed62171b5", "eff3ffbdd7e76baed63182bd08519c", "eff3ffc6dbef9ecae16baed63182bd08519c", "eff3ffc6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "hKy8": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/pairs.js ***! \*****************************************************************/ /*! exports provided: pairs, dispatch */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function pairs(obj, scheduler) { if (!scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const keys = Object.keys(obj); for (let i = 0; i < keys.length && !subscriber.closed; i++) { const key = keys[i]; if (obj.hasOwnProperty(key)) { subscriber.next([key, obj[key]]); } } subscriber.complete(); }); } else { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const keys = Object.keys(obj); const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); subscription.add(scheduler.schedule(dispatch, 0, { keys, index: 0, subscriber, subscription, obj })); return subscription; }); } } function dispatch(state) { const { keys, index, subscriber, subscription, obj } = state; if (!subscriber.closed) { if (index < keys.length) { const key = keys[index]; subscriber.next([key, obj[key]]); subscription.add(this.schedule({ keys, index: index + 1, subscriber, subscription, obj })); } else { subscriber.complete(); } } } //# sourceMappingURL=pairs.js.map /***/ }), /***/ "hSnb": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/irwinHall.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomIrwinHall(source) { function randomIrwinHall(n) { if ((n = +n) <= 0) return () => 0; return function() { for (var sum = 0, i = n; i > 1; --i) sum += source(); return sum + i * source(); }; } randomIrwinHall.source = sourceRandomIrwinHall; return randomIrwinHall; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "hTZz": /*!********************************************!*\ !*** ./node_modules/d3-brush/src/brush.js ***! \********************************************/ /*! exports provided: brushSelection, brushX, brushY, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return brushSelection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return brushX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return brushY; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "q+nN"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "sQjb"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "qKDy"); /* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "X7tT"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent.js */ "oZiN"); var MODE_DRAG = {name: "drag"}, MODE_SPACE = {name: "space"}, MODE_HANDLE = {name: "handle"}, MODE_CENTER = {name: "center"}; const {abs, max, min} = Math; function number1(e) { return [+e[0], +e[1]]; } function number2(e) { return [number1(e[0]), number1(e[1])]; } var X = { name: "x", handles: ["w", "e"].map(type), input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; }, output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } }; var Y = { name: "y", handles: ["n", "s"].map(type), input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; }, output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } }; var XY = { name: "xy", handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), input: function(xy) { return xy == null ? null : number2(xy); }, output: function(xy) { return xy; } }; var cursors = { overlay: "crosshair", selection: "move", n: "ns-resize", e: "ew-resize", s: "ns-resize", w: "ew-resize", nw: "nwse-resize", ne: "nesw-resize", se: "nwse-resize", sw: "nesw-resize" }; var flipX = { e: "w", w: "e", nw: "ne", ne: "nw", se: "sw", sw: "se" }; var flipY = { n: "s", s: "n", nw: "sw", ne: "se", se: "ne", sw: "nw" }; var signsX = { overlay: +1, selection: +1, n: null, e: +1, s: null, w: -1, nw: -1, ne: +1, se: +1, sw: -1 }; var signsY = { overlay: +1, selection: +1, n: -1, e: null, s: +1, w: null, nw: -1, ne: -1, se: +1, sw: +1 }; function type(t) { return {type: t}; } // Ignore right-click, since that should open the context menu. function defaultFilter(event) { return !event.ctrlKey && !event.button; } function defaultExtent() { var svg = this.ownerSVGElement || this; if (svg.hasAttribute("viewBox")) { svg = svg.viewBox.baseVal; return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; } return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; } function defaultTouchable() { return navigator.maxTouchPoints || ("ontouchstart" in this); } // Like d3.local, but with the name “__brush” rather than auto-generated. function local(node) { while (!node.__brush) if (!(node = node.parentNode)) return; return node.__brush; } function empty(extent) { return extent[0][0] === extent[1][0] || extent[0][1] === extent[1][1]; } function brushSelection(node) { var state = node.__brush; return state ? state.dim.output(state.selection) : null; } function brushX() { return brush(X); } function brushY() { return brush(Y); } /* harmony default export */ __webpack_exports__["default"] = (function() { return brush(XY); }); function brush(dim) { var extent = defaultExtent, filter = defaultFilter, touchable = defaultTouchable, keys = true, listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "brush", "end"), handleSize = 6, touchending; function brush(group) { var overlay = group .property("__brush", initialize) .selectAll(".overlay") .data([type("overlay")]); overlay.enter().append("rect") .attr("class", "overlay") .attr("pointer-events", "all") .attr("cursor", cursors.overlay) .merge(overlay) .each(function() { var extent = local(this).extent; Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this) .attr("x", extent[0][0]) .attr("y", extent[0][1]) .attr("width", extent[1][0] - extent[0][0]) .attr("height", extent[1][1] - extent[0][1]); }); group.selectAll(".selection") .data([type("selection")]) .enter().append("rect") .attr("class", "selection") .attr("cursor", cursors.selection) .attr("fill", "#777") .attr("fill-opacity", 0.3) .attr("stroke", "#fff") .attr("shape-rendering", "crispEdges"); var handle = group.selectAll(".handle") .data(dim.handles, function(d) { return d.type; }); handle.exit().remove(); handle.enter().append("rect") .attr("class", function(d) { return "handle handle--" + d.type; }) .attr("cursor", function(d) { return cursors[d.type]; }); group .each(redraw) .attr("fill", "none") .attr("pointer-events", "all") .on("mousedown.brush", started) .filter(touchable) .on("touchstart.brush", started) .on("touchmove.brush", touchmoved) .on("touchend.brush touchcancel.brush", touchended) .style("touch-action", "none") .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } brush.move = function(group, selection) { if (group.tween) { group .on("start.brush", function(event) { emitter(this, arguments).beforestart().start(event); }) .on("interrupt.brush end.brush", function(event) { emitter(this, arguments).end(event); }) .tween("brush", function() { var that = this, state = that.__brush, emit = emitter(that, arguments), selection0 = state.selection, selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolate"])(selection0, selection1); function tween(t) { state.selection = t === 1 && selection1 === null ? null : i(t); redraw.call(that); emit.brush(); } return selection0 !== null && selection1 !== null ? tween : tween(1); }); } else { group .each(function() { var that = this, args = arguments, state = that.__brush, selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), emit = emitter(that, args).beforestart(); Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); state.selection = selection1 === null ? null : selection1; redraw.call(that); emit.start().brush().end(); }); } }; brush.clear = function(group) { brush.move(group, null); }; function redraw() { var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this), selection = local(this).selection; if (selection) { group.selectAll(".selection") .style("display", null) .attr("x", selection[0][0]) .attr("y", selection[0][1]) .attr("width", selection[1][0] - selection[0][0]) .attr("height", selection[1][1] - selection[0][1]); group.selectAll(".handle") .style("display", null) .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); } else { group.selectAll(".selection,.handle") .style("display", "none") .attr("x", null) .attr("y", null) .attr("width", null) .attr("height", null); } } function emitter(that, args, clean) { var emit = that.__brush.emitter; return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean); } function Emitter(that, args, clean) { this.that = that; this.args = args; this.state = that.__brush; this.active = 0; this.clean = clean; } Emitter.prototype = { beforestart: function() { if (++this.active === 1) this.state.emitter = this, this.starting = true; return this; }, start: function(event, mode) { if (this.starting) this.starting = false, this.emit("start", event, mode); else this.emit("brush", event); return this; }, brush: function(event, mode) { this.emit("brush", event, mode); return this; }, end: function(event, mode) { if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode); return this; }, emit: function(type, event, mode) { var d = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this.that).datum(); listeners.call( type, this.that, new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](type, { sourceEvent: event, target: brush, selection: dim.output(this.state.selection), mode, dispatch: listeners }), d ); } }; function started(event) { if (touchending && !event.touches) return; if (!filter.apply(this, arguments)) return; var that = this, type = event.target.__data__.type, mode = (keys && event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE), signX = dim === Y ? null : signsX[type], signY = dim === X ? null : signsY[type], state = local(that), extent = state.extent, selection = state.selection, W = extent[0][0], w0, w1, N = extent[0][1], n0, n1, E = extent[1][0], e0, e1, S = extent[1][1], s0, s1, dx = 0, dy = 0, moving, shifting = signX && signY && keys && event.shiftKey, lockX, lockY, points = Array.from(event.touches || [event], t => { const i = t.identifier; t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, that); t.point0 = t.slice(); t.identifier = i; return t; }); if (type === "overlay") { if (selection) moving = true; const pts = [points[0], points[1] || points[0]]; state.selection = selection = [[ w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), n0 = dim === X ? N : min(pts[0][1], pts[1][1]) ], [ e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), s0 = dim === X ? S : max(pts[0][1], pts[1][1]) ]]; if (points.length > 1) move(); } else { w0 = selection[0][0]; n0 = selection[0][1]; e0 = selection[1][0]; s0 = selection[1][1]; } w1 = w0; n1 = n0; e1 = e0; s1 = s0; var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(that) .attr("pointer-events", "none"); var overlay = group.selectAll(".overlay") .attr("cursor", cursors[type]); Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); var emit = emitter(that, arguments, true).beforestart(); if (event.touches) { emit.moved = moved; emit.ended = ended; } else { var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(event.view) .on("mousemove.brush", moved, true) .on("mouseup.brush", ended, true); if (keys) view .on("keydown.brush", keydowned, true) .on("keyup.brush", keyupped, true) Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(event.view); } redraw.call(that); emit.start(event, mode.name); function moved(event) { for (const p of event.changedTouches || [event]) { for (const d of points) if (d.identifier === p.identifier) d.cur = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(p, that); } if (shifting && !lockX && !lockY && points.length === 1) { const point = points[0]; if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) lockY = true; else lockX = true; } for (const point of points) if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1]; moving = true; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(event); move(event); } function move(event) { const point = points[0], point0 = point.point0; var t; dx = point[0] - point0[0]; dy = point[1] - point0[1]; switch (mode) { case MODE_SPACE: case MODE_DRAG: { if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; break; } case MODE_HANDLE: { if (points[1]) { if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1; if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1; } else { if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0; else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx; if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0; else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy; } break; } case MODE_CENTER: { if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX)); if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY)); break; } } if (e1 < w1) { signX *= -1; t = w0, w0 = e0, e0 = t; t = w1, w1 = e1, e1 = t; if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); } if (s1 < n1) { signY *= -1; t = n0, n0 = s0, s0 = t; t = n1, n1 = s1, s1 = t; if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); } if (state.selection) selection = state.selection; // May be set by brush.move! if (lockX) w1 = selection[0][0], e1 = selection[1][0]; if (lockY) n1 = selection[0][1], s1 = selection[1][1]; if (selection[0][0] !== w1 || selection[0][1] !== n1 || selection[1][0] !== e1 || selection[1][1] !== s1) { state.selection = [[w1, n1], [e1, s1]]; redraw.call(that); emit.brush(event, mode.name); } } function ended(event) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])(event); if (event.touches) { if (event.touches.length) return; if (touchending) clearTimeout(touchending); touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! } else { Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(event.view, moving); view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); } group.attr("pointer-events", "all"); overlay.attr("cursor", cursors.overlay); if (state.selection) selection = state.selection; // May be set by brush.move (on start)! if (empty(selection)) state.selection = null, redraw.call(that); emit.end(event, mode.name); } function keydowned(event) { switch (event.keyCode) { case 16: { // SHIFT shifting = signX && signY; break; } case 18: { // ALT if (mode === MODE_HANDLE) { if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; mode = MODE_CENTER; move(); } break; } case 32: { // SPACE; takes priority over ALT if (mode === MODE_HANDLE || mode === MODE_CENTER) { if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; mode = MODE_SPACE; overlay.attr("cursor", cursors.selection); move(); } break; } default: return; } Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(event); } function keyupped(event) { switch (event.keyCode) { case 16: { // SHIFT if (shifting) { lockX = lockY = shifting = false; move(); } break; } case 18: { // ALT if (mode === MODE_CENTER) { if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; mode = MODE_HANDLE; move(); } break; } case 32: { // SPACE if (mode === MODE_SPACE) { if (event.altKey) { if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; mode = MODE_CENTER; } else { if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; mode = MODE_HANDLE; } overlay.attr("cursor", cursors[type]); move(); } break; } default: return; } Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(event); } } function touchmoved(event) { emitter(this, arguments).moved(event); } function touchended(event) { emitter(this, arguments).ended(event); } function initialize() { var state = this.__brush || {selection: null}; state.extent = number2(extent.apply(this, arguments)); state.dim = dim; return state; } brush.extent = function(_) { return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(number2(_)), brush) : extent; }; brush.filter = function(_) { return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : filter; }; brush.touchable = function(_) { return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : touchable; }; brush.handleSize = function(_) { return arguments.length ? (handleSize = +_, brush) : handleSize; }; brush.keyModifiers = function(_) { return arguments.length ? (keys = !!_, brush) : keys; }; brush.on = function() { var value = listeners.on.apply(listeners, arguments); return value === listeners ? brush : value; }; return brush; } /***/ }), /***/ "hiel": /*!********************************************!*\ !*** ./node_modules/d3-array/src/count.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return count; }); function count(values, valueof) { let count = 0; if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { ++count; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { ++count; } } } return count; } /***/ }), /***/ "hjfa": /*!***********************************************!*\ !*** ./node_modules/d3-zoom/src/transform.js ***! \***********************************************/ /*! exports provided: Transform, identity, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transform", function() { return Transform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transform; }); function Transform(k, x, y) { this.k = k; this.x = x; this.y = y; } Transform.prototype = { constructor: Transform, scale: function(k) { return k === 1 ? this : new Transform(this.k * k, this.x, this.y); }, translate: function(x, y) { return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); }, apply: function(point) { return [point[0] * this.k + this.x, point[1] * this.k + this.y]; }, applyX: function(x) { return x * this.k + this.x; }, applyY: function(y) { return y * this.k + this.y; }, invert: function(location) { return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; }, invertX: function(x) { return (x - this.x) / this.k; }, invertY: function(y) { return (y - this.y) / this.k; }, rescaleX: function(x) { return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); }, rescaleY: function(y) { return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); }, toString: function() { return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; } }; var identity = new Transform(1, 0, 0); transform.prototype = Transform.prototype; function transform(node) { while (!node.__zoom) if (!(node = node.parentNode)) return identity; return node.__zoom; } /***/ }), /***/ "hkWm": /*!******************************************!*\ !*** ./node_modules/d3-zoom/src/zoom.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "q+nN"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "sQjb"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "lExN"); /* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "lhfN"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform.js */ "hjfa"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent.js */ "OSsQ"); // Ignore right-click, since that should open the context menu. // except for pinch-to-zoom, which is sent as a wheel+ctrlKey event function defaultFilter(event) { return (!event.ctrlKey || event.type === 'wheel') && !event.button; } function defaultExtent() { var e = this; if (e instanceof SVGElement) { e = e.ownerSVGElement || e; if (e.hasAttribute("viewBox")) { e = e.viewBox.baseVal; return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; } return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; } return [[0, 0], [e.clientWidth, e.clientHeight]]; } function defaultTransform() { return this.__zoom || _transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"]; } function defaultWheelDelta(event) { return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1); } function defaultTouchable() { return navigator.maxTouchPoints || ("ontouchstart" in this); } function defaultConstrain(transform, extent, translateExtent) { var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; return transform.translate( dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) ); } /* harmony default export */ __webpack_exports__["default"] = (function() { var filter = defaultFilter, extent = defaultExtent, constrain = defaultConstrain, wheelDelta = defaultWheelDelta, touchable = defaultTouchable, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolateZoom"], listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10; function zoom(selection) { selection .property("__zoom", defaultTransform) .on("wheel.zoom", wheeled) .on("mousedown.zoom", mousedowned) .on("dblclick.zoom", dblclicked) .filter(touchable) .on("touchstart.zoom", touchstarted) .on("touchmove.zoom", touchmoved) .on("touchend.zoom touchcancel.zoom", touchended) .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } zoom.transform = function(collection, transform, point, event) { var selection = collection.selection ? collection.selection() : collection; selection.property("__zoom", defaultTransform); if (collection !== selection) { schedule(collection, transform, point, event); } else { selection.interrupt().each(function() { gesture(this, arguments) .event(event) .start() .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) .end(); }); } }; zoom.scaleBy = function(selection, k, p, event) { zoom.scaleTo(selection, function() { var k0 = this.__zoom.k, k1 = typeof k === "function" ? k.apply(this, arguments) : k; return k0 * k1; }, p, event); }; zoom.scaleTo = function(selection, k, p, event) { zoom.transform(selection, function() { var e = extent.apply(this, arguments), t0 = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, p1 = t0.invert(p0), k1 = typeof k === "function" ? k.apply(this, arguments) : k; return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); }, p, event); }; zoom.translateBy = function(selection, x, y, event) { zoom.transform(selection, function() { return constrain(this.__zoom.translate( typeof x === "function" ? x.apply(this, arguments) : x, typeof y === "function" ? y.apply(this, arguments) : y ), extent.apply(this, arguments), translateExtent); }, null, event); }; zoom.translateTo = function(selection, x, y, p, event) { zoom.transform(selection, function() { var e = extent.apply(this, arguments), t = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; return constrain(_transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"].translate(p0[0], p0[1]).scale(t.k).translate( typeof x === "function" ? -x.apply(this, arguments) : -x, typeof y === "function" ? -y.apply(this, arguments) : -y ), e, translateExtent); }, p, event); }; function scale(transform, k) { k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); return k === transform.k ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, transform.x, transform.y); } function translate(transform, p0, p1) { var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; return x === transform.x && y === transform.y ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](transform.k, x, y); } function centroid(extent) { return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; } function schedule(transition, transform, point, event) { transition .on("start.zoom", function() { gesture(this, arguments).event(event).start(); }) .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).event(event).end(); }) .tween("zoom", function() { var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform === "function" ? transform.apply(that, args) : transform, i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); return function(t) { if (t === 1) t = b; // Avoid rounding error on end. else { var l = i(t), k = w / l[2]; t = new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, p[0] - l[0] * k, p[1] - l[1] * k); } g.zoom(null, t); }; }); } function gesture(that, args, clean) { return (!clean && that.__zooming) || new Gesture(that, args); } function Gesture(that, args) { this.that = that; this.args = args; this.active = 0; this.sourceEvent = null; this.extent = extent.apply(that, args); this.taps = 0; } Gesture.prototype = { event: function(event) { if (event) this.sourceEvent = event; return this; }, start: function() { if (++this.active === 1) { this.that.__zooming = this; this.emit("start"); } return this; }, zoom: function(key, transform) { if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); this.that.__zoom = transform; this.emit("zoom"); return this; }, end: function() { if (--this.active === 0) { delete this.that.__zooming; this.emit("end"); } return this; }, emit: function(type) { var d = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this.that).datum(); listeners.call( type, this.that, new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](type, { sourceEvent: this.sourceEvent, target: zoom, type, transform: this.that.__zoom, dispatch: listeners }), d ); } }; function wheeled(event, ...args) { if (!filter.apply(this, arguments)) return; var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event); // If the mouse is in the same location as before, reuse it. // If there were recent wheel events, reset the wheel idle timeout. if (g.wheel) { if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { g.mouse[1] = t.invert(g.mouse[0] = p); } clearTimeout(g.wheel); } // If this wheel event won’t trigger a transform change, ignore it. else if (t.k === k) return; // Otherwise, capture the mouse point and location at the start. else { g.mouse = [p, t.invert(p)]; Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); g.start(); } Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); g.wheel = setTimeout(wheelidled, wheelDelay); g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); function wheelidled() { g.wheel = null; g.end(); } } function mousedowned(event, ...args) { if (touchending || !filter.apply(this, arguments)) return; var g = gesture(this, args, true).event(event), v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event, currentTarget), currentTarget = event.currentTarget, x0 = event.clientX, y0 = event.clientY; Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(event.view); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(event); g.mouse = [p, this.__zoom.invert(p)]; Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); g.start(); function mousemoved(event) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); if (!g.moved) { var dx = event.clientX - x0, dy = event.clientY - y0; g.moved = dx * dx + dy * dy > clickDistance2; } g.event(event) .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event, currentTarget), g.mouse[1]), g.extent, translateExtent)); } function mouseupped(event) { v.on("mousemove.zoom mouseup.zoom", null); Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(event.view, g.moved); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); g.event(event).end(); } } function dblclicked(event, ...args) { if (!filter.apply(this, arguments)) return; var t0 = this.__zoom, p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).transition().duration(duration).call(schedule, t1, p0, event); else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).call(zoom.transform, t1, p0, event); } function touchstarted(event, ...args) { if (!filter.apply(this, arguments)) return; var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(event); for (i = 0; i < n; ++i) { t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, this); p = [p, this.__zoom.invert(p), t.identifier]; if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; } if (touchstarting) touchstarting = clearTimeout(touchstarting); if (started) { if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); g.start(); } } function touchmoved(event, ...args) { if (!this.__zooming) return; var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); for (i = 0; i < n; ++i) { t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, this); if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; } t = g.that.__zoom; if (g.touch1) { var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; t = scale(t, Math.sqrt(dp / dl)); p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; } else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; else return; g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); } function touchended(event, ...args) { if (!this.__zooming) return; var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(event); if (touchending) clearTimeout(touchending); touchending = setTimeout(function() { touchending = null; }, touchDelay); for (i = 0; i < n; ++i) { t = touches[i]; if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; } if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); else { g.end(); // If this was a dbltap, reroute to the (optional) dblclick.zoom handler. if (g.taps === 2) { t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, this); if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) { var p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).on("dblclick.zoom"); if (p) p.apply(this, arguments); } } } } zoom.wheelDelta = function(_) { return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(+_), zoom) : wheelDelta; }; zoom.filter = function(_) { return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : filter; }; zoom.touchable = function(_) { return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : touchable; }; zoom.extent = function(_) { return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; }; zoom.scaleExtent = function(_) { return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; }; zoom.translateExtent = function(_) { return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; }; zoom.constrain = function(_) { return arguments.length ? (constrain = _, zoom) : constrain; }; zoom.duration = function(_) { return arguments.length ? (duration = +_, zoom) : duration; }; zoom.interpolate = function(_) { return arguments.length ? (interpolate = _, zoom) : interpolate; }; zoom.on = function() { var value = listeners.on.apply(listeners, arguments); return value === listeners ? zoom : value; }; zoom.clickDistance = function(_) { return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); }; zoom.tapDistance = function(_) { return arguments.length ? (tapDistance = +_, zoom) : tapDistance; }; return zoom; }); /***/ }), /***/ "hl/D": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/delay.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function delayFunction(id, value) { return function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = +value.apply(this, arguments); }; } function delayConstant(id, value) { return value = +value, function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = value; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var id = this._id; return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).delay; }); /***/ }), /***/ "i202": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/identity.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x; }); /***/ }), /***/ "i3vF": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/merge.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(selection) { if (!(selection instanceof _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"])) throw new Error("invalid merge"); for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group0[i] || group1[i]) { merge[i] = node; } } } for (; j < m0; ++j) { merges[j] = groups0[j]; } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](merges, this._parents); }); /***/ }), /***/ "iBRH": /*!******************************************!*\ !*** ./node_modules/d3-axis/src/axis.js ***! \******************************************/ /*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return axisTop; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return axisRight; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return axisBottom; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return axisLeft; }); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "+s1I"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "kF1t"); var top = 1, right = 2, bottom = 3, left = 4, epsilon = 1e-6; function translateX(x) { return "translate(" + x + ",0)"; } function translateY(y) { return "translate(0," + y + ")"; } function number(scale) { return d => +scale(d); } function center(scale, offset) { offset = Math.max(0, scale.bandwidth() - offset * 2) / 2; if (scale.round()) offset = Math.round(offset); return d => +scale(d) + offset; } function entering() { return !this.__axis; } function axis(orient, scale) { var tickArguments = [], tickValues = null, tickFormat = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient === top || orient === left ? -1 : 1, x = orient === left || orient === right ? "x" : "y", transform = orient === top || orient === bottom ? translateX : translateY; function axis(context) { var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : tickFormat, spacing = Math.max(tickSizeInner, 0) + tickPadding, range = scale.range(), range0 = +range[0] + offset, range1 = +range[range.length - 1] + offset, position = (scale.bandwidth ? center : number)(scale.copy(), offset), selection = context.selection ? context.selection() : context, path = selection.selectAll(".domain").data([null]), tick = selection.selectAll(".tick").data(values, scale).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line = tick.select("line"), text = tick.select("text"); path = path.merge(path.enter().insert("path", ".tick") .attr("class", "domain") .attr("stroke", "currentColor")); tick = tick.merge(tickEnter); line = line.merge(tickEnter.append("line") .attr("stroke", "currentColor") .attr(x + "2", k * tickSizeInner)); text = text.merge(tickEnter.append("text") .attr("fill", "currentColor") .attr(x, k * spacing) .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); if (context !== selection) { path = path.transition(context); tick = tick.transition(context); line = line.transition(context); text = text.transition(context); tickExit = tickExit.transition(context) .attr("opacity", epsilon) .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute("transform"); }); tickEnter .attr("opacity", epsilon) .attr("transform", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); }); } tickExit.remove(); path .attr("d", orient === left || orient === right ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1) : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1)); tick .attr("opacity", 1) .attr("transform", function(d) { return transform(position(d) + offset); }); line .attr(x + "2", k * tickSizeInner); text .attr(x, k * spacing) .text(format); selection.filter(entering) .attr("fill", "none") .attr("font-size", 10) .attr("font-family", "sans-serif") .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); selection .each(function() { this.__axis = position; }); } axis.scale = function(_) { return arguments.length ? (scale = _, axis) : scale; }; axis.ticks = function() { return tickArguments = _array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments), axis; }; axis.tickArguments = function(_) { return arguments.length ? (tickArguments = _ == null ? [] : _array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickArguments.slice(); }; axis.tickValues = function(_) { return arguments.length ? (tickValues = _ == null ? null : _array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickValues && tickValues.slice(); }; axis.tickFormat = function(_) { return arguments.length ? (tickFormat = _, axis) : tickFormat; }; axis.tickSize = function(_) { return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; }; axis.tickSizeInner = function(_) { return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; }; axis.tickSizeOuter = function(_) { return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; }; axis.tickPadding = function(_) { return arguments.length ? (tickPadding = +_, axis) : tickPadding; }; axis.offset = function(_) { return arguments.length ? (offset = +_, axis) : offset; }; return axis; } function axisTop(scale) { return axis(top, scale); } function axisRight(scale) { return axis(right, scale); } function axisBottom(scale) { return axis(bottom, scale); } function axisLeft(scale) { return axis(left, scale); } /***/ }), /***/ "iEdP": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/descending.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; }); /***/ }), /***/ "iKkX": /*!*******************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/VirtualTimeScheduler.js ***! \*******************************************************************************/ /*! exports provided: VirtualTimeScheduler, VirtualAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class VirtualTimeScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"] { constructor(SchedulerAction = VirtualAction, maxFrames = Number.POSITIVE_INFINITY) { super(SchedulerAction, () => this.frame); this.maxFrames = maxFrames; this.frame = 0; this.index = -1; } flush() { const { actions, maxFrames } = this; let error, action; while ((action = actions[0]) && action.delay <= maxFrames) { actions.shift(); this.frame = action.delay; if (error = action.execute(action.state, action.delay)) { break; } } if (error) { while (action = actions.shift()) { action.unsubscribe(); } throw error; } } } VirtualTimeScheduler.frameTimeFactor = 10; class VirtualAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { constructor(scheduler, work, index = scheduler.index += 1) { super(scheduler, work); this.scheduler = scheduler; this.work = work; this.index = index; this.active = true; this.index = scheduler.index = index; } schedule(state, delay = 0) { if (!this.id) { return super.schedule(state, delay); } this.active = false; const action = new VirtualAction(this.scheduler, this.work); this.add(action); return action.schedule(state, delay); } requestAsyncId(scheduler, id, delay = 0) { this.delay = scheduler.frame + delay; const { actions } = scheduler; actions.push(this); actions.sort(VirtualAction.sortActions); return true; } recycleAsyncId(scheduler, id, delay = 0) { return undefined; } _execute(state, delay) { if (this.active === true) { return super._execute(state, delay); } } static sortActions(a, b) { if (a.delay === b.delay) { if (a.index === b.index) { return 0; } else if (a.index > b.index) { return 1; } else { return -1; } } else if (a.delay > b.delay) { return 1; } else { return -1; } } } //# sourceMappingURL=VirtualTimeScheduler.js.map /***/ }), /***/ "iPFw": /*!******************************************!*\ !*** ./node_modules/d3-shape/src/pie.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./descending.js */ "iEdP"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity.js */ "GQZn"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./math.js */ "CYYh"); /* harmony default export */ __webpack_exports__["default"] = (function() { var value = _identity_js__WEBPACK_IMPORTED_MODULE_3__["default"], sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_2__["default"], sort = null, startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_math_js__WEBPACK_IMPORTED_MODULE_4__["tau"]), padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0); function pie(data) { var i, n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data)).length, j, k, sum = 0, index = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_4__["tau"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_4__["tau"], endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), pa = p * (da < 0 ? -1 : 1), v; for (i = 0; i < n; ++i) { if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { sum += v; } } // Optionally sort the arcs by previously-computed values or by data. if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); // Compute the arcs! They are stored in the original data's order. for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { data: data[j], index: i, value: v, startAngle: a0, endAngle: a1, padAngle: p }; } return arcs; } pie.value = function(_) { return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : value; }; pie.sortValues = function(_) { return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; }; pie.sort = function(_) { return arguments.length ? (sort = _, sortValues = null, pie) : sort; }; pie.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : startAngle; }; pie.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : endAngle; }; pie.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : padAngle; }; return pie; }); /***/ }), /***/ "iQ9W": /*!**********************************************!*\ !*** ./node_modules/d3-force/src/collide.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-quadtree */ "gO8D"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jiggle.js */ "QupR"); function x(d) { return d.x + d.vx; } function y(d) { return d.y + d.vy; } /* harmony default export */ __webpack_exports__["default"] = (function(radius) { var nodes, radii, random, strength = 1, iterations = 1; if (typeof radius !== "function") radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(radius == null ? 1 : +radius); function force() { var i, n = nodes.length, tree, node, xi, yi, ri, ri2; for (var k = 0; k < iterations; ++k) { tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_0__["quadtree"])(nodes, x, y).visitAfter(prepare); for (i = 0; i < n; ++i) { node = nodes[i]; ri = radii[node.index], ri2 = ri * ri; xi = node.x + node.vx; yi = node.y + node.vy; tree.visit(apply); } } function apply(quad, x0, y0, x1, y1) { var data = quad.data, rj = quad.r, r = ri + rj; if (data) { if (data.index > node.index) { var x = xi - data.x - data.vx, y = yi - data.y - data.vy, l = x * x + y * y; if (l < r * r) { if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += x * x; if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += y * y; l = (r - (l = Math.sqrt(l))) / l * strength; node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); node.vy += (y *= l) * r; data.vx -= x * (r = 1 - r); data.vy -= y * r; } } return; } return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; } } function prepare(quad) { if (quad.data) return quad.r = radii[quad.data.index]; for (var i = quad.r = 0; i < 4; ++i) { if (quad[i] && quad[i].r > quad.r) { quad.r = quad[i].r; } } } function initialize() { if (!nodes) return; var i, n = nodes.length, node; radii = new Array(n); for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); } force.initialize = function(_nodes, _random) { nodes = _nodes; random = _random; initialize(); }; force.iterations = function(_) { return arguments.length ? (iterations = +_, force) : iterations; }; force.strength = function(_) { return arguments.length ? (strength = +_, force) : strength; }; force.radius = function(_) { return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), initialize(), force) : radius; }; return force; }); /***/ }), /***/ "iQWy": /*!******************************************************!*\ !*** ./node_modules/d3-geo/src/projection/albers.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea.js */ "nVu6"); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__["default"])() .parallels([29.5, 45.5]) .scale(1070) .translate([480, 250]) .rotate([96, 0]) .center([-0.6, 38.7]); }); /***/ }), /***/ "iSFD": /*!*******************************************!*\ !*** ./node_modules/d3-ease/src/cubic.js ***! \*******************************************/ /*! exports provided: cubicIn, cubicOut, cubicInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicIn", function() { return cubicIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicOut", function() { return cubicOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicInOut", function() { return cubicInOut; }); function cubicIn(t) { return t * t * t; } function cubicOut(t) { return --t * t * t + 1; } function cubicInOut(t) { return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; } /***/ }), /***/ "iUY2": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/back.js ***! \******************************************/ /*! exports provided: backIn, backOut, backInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backIn", function() { return backIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backOut", function() { return backOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backInOut", function() { return backInOut; }); var overshoot = 1.70158; var backIn = (function custom(s) { s = +s; function backIn(t) { return (t = +t) * t * (s * (t - 1) + t); } backIn.overshoot = custom; return backIn; })(overshoot); var backOut = (function custom(s) { s = +s; function backOut(t) { return --t * t * ((t + 1) * s + t) + 1; } backOut.overshoot = custom; return backOut; })(overshoot); var backInOut = (function custom(s) { s = +s; function backInOut(t) { return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; } backInOut.overshoot = custom; return backInOut; })(overshoot); /***/ }), /***/ "ikcO": /*!*************************************************!*\ !*** ./node_modules/d3-geo/src/path/context.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathContext; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "mPOO"); function PathContext(context) { this._context = context; } PathContext.prototype = { _radius: 4.5, pointRadius: function(_) { return this._radius = _, this; }, polygonStart: function() { this._line = 0; }, polygonEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line === 0) this._context.closePath(); this._point = NaN; }, point: function(x, y) { switch (this._point) { case 0: { this._context.moveTo(x, y); this._point = 1; break; } case 1: { this._context.lineTo(x, y); break; } default: { this._context.moveTo(x + this._radius, y); this._context.arc(x, y, this._radius, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); break; } } }, result: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"] }; /***/ }), /***/ "itXk": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js ***! \*************************************************************************/ /*! exports provided: combineLatest, CombineLatestOperator, CombineLatestSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; }); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fromArray */ "yCtX"); const NONE = {}; function combineLatest(...observables) { let resultSelector = undefined; let scheduler = undefined; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(observables[observables.length - 1])) { scheduler = observables.pop(); } if (typeof observables[observables.length - 1] === 'function') { resultSelector = observables.pop(); } if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) { observables = observables[0]; } return Object(_fromArray__WEBPACK_IMPORTED_MODULE_4__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector)); } class CombineLatestOperator { constructor(resultSelector) { this.resultSelector = resultSelector; } call(subscriber, source) { return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector)); } } class CombineLatestSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, resultSelector) { super(destination); this.resultSelector = resultSelector; this.active = 0; this.values = []; this.observables = []; } _next(observable) { this.values.push(NONE); this.observables.push(observable); } _complete() { const observables = this.observables; const len = observables.length; if (len === 0) { this.destination.complete(); } else { this.active = len; this.toRespond = len; for (let i = 0; i < len; i++) { const observable = observables[i]; this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, observable, undefined, i)); } } } notifyComplete(unused) { if ((this.active -= 1) === 0) { this.destination.complete(); } } notifyNext(_outerValue, innerValue, outerIndex) { const values = this.values; const oldVal = values[outerIndex]; const toRespond = !this.toRespond ? 0 : oldVal === NONE ? --this.toRespond : this.toRespond; values[outerIndex] = innerValue; if (toRespond === 0) { if (this.resultSelector) { this._tryResultSelector(values); } else { this.destination.next(values.slice()); } } } _tryResultSelector(values) { let result; try { result = this.resultSelector.apply(this, values); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } //# sourceMappingURL=combineLatest.js.map /***/ }), /***/ "ivMv": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/binary.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { var nodes = parent.children, i, n = nodes.length, sum, sums = new Array(n + 1); for (sums[0] = sum = i = 0; i < n; ++i) { sums[i + 1] = sum += nodes[i].value; } partition(0, n, parent.value, x0, y0, x1, y1); function partition(i, j, value, x0, y0, x1, y1) { if (i >= j - 1) { var node = nodes[i]; node.x0 = x0, node.y0 = y0; node.x1 = x1, node.y1 = y1; return; } var valueOffset = sums[i], valueTarget = (value / 2) + valueOffset, k = i + 1, hi = j - 1; while (k < hi) { var mid = k + hi >>> 1; if (sums[mid] < valueTarget) k = mid + 1; else hi = mid; } if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k; var valueLeft = sums[k] - valueOffset, valueRight = value - valueLeft; if ((x1 - x0) > (y1 - y0)) { var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1; partition(i, k, valueLeft, x0, y0, xk, y1); partition(k, j, valueRight, xk, y0, x1, y1); } else { var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1; partition(i, k, valueLeft, x0, y0, x1, yk); partition(k, j, valueRight, x0, yk, x1, y1); } } }); /***/ }), /***/ "j1BO": /*!************************************************!*\ !*** ./node_modules/d3-hierarchy/src/array.js ***! \************************************************/ /*! exports provided: default, shuffle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; }); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like : Array.from(x); // Map, Set, iterable, string, or anything else }); function shuffle(array) { var m = array.length, t, i; while (m) { i = Math.random() * m-- | 0; t = array[m]; array[m] = array[i]; array[i] = t; } return array; } /***/ }), /***/ "jICm": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/curve/basis.js ***! \**************************************************/ /*! exports provided: point, Basis, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Basis", function() { return Basis; }); function point(that, x, y) { that._context.bezierCurveTo( (2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6 ); } function Basis(context) { this._context = context; } Basis.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 3: point(this, this._x1, this._y1); // proceed case 2: this._context.lineTo(this._x1, this._y1); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed default: point(this, x, y); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Basis(context); }); /***/ }), /***/ "jIxI": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/subset.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subset; }); /* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superset.js */ "3O/B"); function subset(values, other) { return Object(_superset_js__WEBPACK_IMPORTED_MODULE_0__["default"])(other, values); } /***/ }), /***/ "jQWc": /*!*****************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/ramp.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony default export */ __webpack_exports__["default"] = (scheme => Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRgbBasis"])(scheme[scheme.length - 1])); /***/ }), /***/ "jTaA": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ffeda0feb24cf03b20", "ffffb2fecc5cfd8d3ce31a1c", "ffffb2fecc5cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "jZKg": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleArray.js ***! \************************************************************************/ /*! exports provided: scheduleArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function scheduleArray(input, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); let i = 0; sub.add(scheduler.schedule(function () { if (i === input.length) { subscriber.complete(); return; } subscriber.next(input[i++]); if (!subscriber.closed) { sub.add(this.schedule()); } })); return sub; }); } //# sourceMappingURL=scheduleArray.js.map /***/ }), /***/ "jhN1": /*!******************************************************************************************!*\ !*** ./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js ***! \******************************************************************************************/ /*! exports provided: ɵgetDOM, BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, Title, TransferState, VERSION, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, ɵBROWSER_SANITIZATION_PROVIDERS, ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__, ɵBrowserDomAdapter, ɵBrowserGetTestability, ɵDomEventsPlugin, ɵDomRendererFactory2, ɵDomSanitizerImpl, ɵDomSharedStylesHost, ɵELEMENT_PROBE_PROVIDERS, ɵELEMENT_PROBE_PROVIDERS__POST_R3__, ɵHAMMER_PROVIDERS__POST_R3__, ɵHammerGesturesPlugin, ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, ɵKeyEventsPlugin, ɵNAMESPACE_URIS, ɵSharedStylesHost, ɵTRANSITION_ID, ɵangular_packages_platform_browser_platform_browser_a, ɵangular_packages_platform_browser_platform_browser_b, ɵangular_packages_platform_browser_platform_browser_c, ɵangular_packages_platform_browser_platform_browser_d, ɵangular_packages_platform_browser_platform_browser_e, ɵangular_packages_platform_browser_platform_browser_f, ɵangular_packages_platform_browser_platform_browser_g, ɵangular_packages_platform_browser_platform_browser_h, ɵangular_packages_platform_browser_platform_browser_i, ɵangular_packages_platform_browser_platform_browser_j, ɵangular_packages_platform_browser_platform_browser_k, ɵangular_packages_platform_browser_platform_browser_l, ɵangular_packages_platform_browser_platform_browser_m, ɵangular_packages_platform_browser_platform_browser_n, ɵangular_packages_platform_browser_platform_browser_o, ɵescapeHtml, ɵflattenStyles, ɵinitDomAdapter, ɵshimContentAttribute, ɵshimHostAttribute */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserModule", function() { return BrowserModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserTransferStateModule", function() { return BrowserTransferStateModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "By", function() { return By; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomSanitizer", function() { return DomSanitizer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EVENT_MANAGER_PLUGINS", function() { return EVENT_MANAGER_PLUGINS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventManager", function() { return EventManager; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HAMMER_GESTURE_CONFIG", function() { return HAMMER_GESTURE_CONFIG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HAMMER_LOADER", function() { return HAMMER_LOADER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HammerGestureConfig", function() { return HammerGestureConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HammerModule", function() { return HammerModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Meta", function() { return Meta; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Title", function() { return Title; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransferState", function() { return TransferState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableDebugTools", function() { return disableDebugTools; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableDebugTools", function() { return enableDebugTools; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeStateKey", function() { return makeStateKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformBrowser", function() { return platformBrowser; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBROWSER_SANITIZATION_PROVIDERS", function() { return BROWSER_SANITIZATION_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__", function() { return BROWSER_SANITIZATION_PROVIDERS__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserDomAdapter", function() { return BrowserDomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserGetTestability", function() { return BrowserGetTestability; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomEventsPlugin", function() { return DomEventsPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomRendererFactory2", function() { return DomRendererFactory2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomSanitizerImpl", function() { return DomSanitizerImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomSharedStylesHost", function() { return DomSharedStylesHost; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵELEMENT_PROBE_PROVIDERS", function() { return ELEMENT_PROBE_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵELEMENT_PROBE_PROVIDERS__POST_R3__", function() { return ELEMENT_PROBE_PROVIDERS__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵHAMMER_PROVIDERS__POST_R3__", function() { return HAMMER_PROVIDERS__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵHammerGesturesPlugin", function() { return HammerGesturesPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS", function() { return INTERNAL_BROWSER_PLATFORM_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵKeyEventsPlugin", function() { return KeyEventsPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNAMESPACE_URIS", function() { return NAMESPACE_URIS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSharedStylesHost", function() { return SharedStylesHost; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵTRANSITION_ID", function() { return TRANSITION_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_a", function() { return errorHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_b", function() { return _document; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_c", function() { return BROWSER_MODULE_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_d", function() { return createMeta; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_e", function() { return createTitle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_f", function() { return initTransferState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_g", function() { return EventManagerPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_h", function() { return HAMMER_PROVIDERS__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_i", function() { return HAMMER_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_j", function() { return domSanitizerImplFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_k", function() { return appInitializerFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_l", function() { return SERVER_TRANSITION_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_m", function() { return _createNgProbeR2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_n", function() { return ELEMENT_PROBE_PROVIDERS__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_o", function() { return GenericBrowserDomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵescapeHtml", function() { return escapeHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflattenStyles", function() { return flattenStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinitDomAdapter", function() { return initDomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵshimContentAttribute", function() { return shimContentAttribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵshimHostAttribute", function() { return shimHostAttribute; }); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵgetDOM", function() { return _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"]; }); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides DOM operations in any browser environment. * * @security Tread carefully! Interacting with the DOM directly is dangerous and * can introduce XSS risks. */ class GenericBrowserDomAdapter extends _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵDomAdapter"] { constructor() { super(); } supportsDOMEvents() { return true; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0 = () => { if (_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node']) { return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node'].prototype.contains || function (node) { return !!(this.compareDocumentPosition(node) & 16); }; } return undefined; }; const nodeContains = (ɵ0)(); /** * A `DomAdapter` powered by full browser DOM APIs. * * @security Tread carefully! Interacting with the DOM directly is dangerous and * can introduce XSS risks. */ /* tslint:disable:requireParameterType no-console */ class BrowserDomAdapter extends GenericBrowserDomAdapter { static makeCurrent() { Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵsetRootDomAdapter"])(new BrowserDomAdapter()); } getProperty(el, name) { return el[name]; } log(error) { if (window.console) { window.console.log && window.console.log(error); } } logGroup(error) { if (window.console) { window.console.group && window.console.group(error); } } logGroupEnd() { if (window.console) { window.console.groupEnd && window.console.groupEnd(); } } onAndCancel(el, evt, listener) { el.addEventListener(evt, listener, false); // Needed to follow Dart's subscription semantic, until fix of // https://code.google.com/p/dart/issues/detail?id=17406 return () => { el.removeEventListener(evt, listener, false); }; } dispatchEvent(el, evt) { el.dispatchEvent(evt); } remove(node) { if (node.parentNode) { node.parentNode.removeChild(node); } return node; } getValue(el) { return el.value; } createElement(tagName, doc) { doc = doc || this.getDefaultDocument(); return doc.createElement(tagName); } createHtmlDocument() { return document.implementation.createHTMLDocument('fakeTitle'); } getDefaultDocument() { return document; } isElementNode(node) { return node.nodeType === Node.ELEMENT_NODE; } isShadowRoot(node) { return node instanceof DocumentFragment; } getGlobalEventTarget(doc, target) { if (target === 'window') { return window; } if (target === 'document') { return doc; } if (target === 'body') { return doc.body; } return null; } getHistory() { return window.history; } getLocation() { return window.location; } getBaseHref(doc) { const href = getBaseElementHref(); return href == null ? null : relativePath(href); } resetBaseElement() { baseElement = null; } getUserAgent() { return window.navigator.userAgent; } performanceNow() { // performance.now() is not available in all browsers, see // https://caniuse.com/high-resolution-time return window.performance && window.performance.now ? window.performance.now() : new Date().getTime(); } supportsCookies() { return true; } getCookie(name) { return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵparseCookieValue"])(document.cookie, name); } } let baseElement = null; function getBaseElementHref() { if (!baseElement) { baseElement = document.querySelector('base'); if (!baseElement) { return null; } } return baseElement.getAttribute('href'); } // based on urlUtils.js in AngularJS 1 let urlParsingNode; function relativePath(url) { if (!urlParsingNode) { urlParsingNode = document.createElement('a'); } urlParsingNode.setAttribute('href', url); return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname : '/' + urlParsingNode.pathname; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An id that identifies a particular application being bootstrapped, that should * match across the client/server boundary. */ const TRANSITION_ID = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('TRANSITION_ID'); function appInitializerFactory(transitionId, document, injector) { return () => { // Wait for all application initializers to be completed before removing the styles set by // the server. injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationInitStatus"]).donePromise.then(() => { const dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])(); const styles = Array.prototype.slice.apply(document.querySelectorAll(`style[ng-transition]`)); styles.filter(el => el.getAttribute('ng-transition') === transitionId) .forEach(el => dom.remove(el)); }); }; } const SERVER_TRANSITION_PROVIDERS = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"], useFactory: appInitializerFactory, deps: [TRANSITION_ID, _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]], multi: true }, ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class BrowserGetTestability { static init() { Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["setTestabilityGetter"])(new BrowserGetTestability()); } addToWindow(registry) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAngularTestability'] = (elem, findInAncestors = true) => { const testability = registry.findTestabilityInTree(elem, findInAncestors); if (testability == null) { throw new Error('Could not find testability for element.'); } return testability; }; _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities'] = () => registry.getAllTestabilities(); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularRootElements'] = () => registry.getAllRootElements(); const whenAllStable = (callback /** TODO #9100 */) => { const testabilities = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities'](); let count = testabilities.length; let didWork = false; const decrement = function (didWork_ /** TODO #9100 */) { didWork = didWork || didWork_; count--; if (count == 0) { callback(didWork); } }; testabilities.forEach(function (testability /** TODO #9100 */) { testability.whenStable(decrement); }); }; if (!_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers']) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'] = []; } _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'].push(whenAllStable); } findTestabilityInTree(registry, elem, findInAncestors) { if (elem == null) { return null; } const t = registry.getTestability(elem); if (t != null) { return t; } else if (!findInAncestors) { return null; } if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().isShadowRoot(elem)) { return this.findTestabilityInTree(registry, elem.host, true); } return this.findTestabilityInTree(registry, elem.parentElement, true); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const CAMEL_CASE_REGEXP = /([A-Z])/g; const DASH_CASE_REGEXP = /-([a-z])/g; function camelCaseToDashCase(input) { return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase()); } function dashCaseToCamelCase(input) { return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase()); } /** * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if * `name` is `'probe'`. * @param name Name under which it will be exported. Keep in mind this will be a property of the * global `ng` object. * @param value The value to export. */ function exportNgVar(name, value) { if (typeof COMPILED === 'undefined' || !COMPILED) { // Note: we can't export `ng` when using closure enhanced optimization as: // - closure declares globals itself for minified names, which sometimes clobber our `ng` global // - we can't declare a closure extern as the namespace `ng` is already used within Google // for typings for angularJS (via `goog.provide('ng....')`). const ng = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] || {}; ng[name] = value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$1 = () => ({ 'ApplicationRef': _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"], 'NgZone': _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], }); const CORE_TOKENS = (ɵ0$1)(); const INSPECT_GLOBAL_NAME = 'probe'; const CORE_TOKENS_GLOBAL_NAME = 'coreTokens'; /** * Returns a {@link DebugElement} for the given native DOM element, or * null if the given native element does not have an Angular view associated * with it. */ function inspectNativeElementR2(element) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵgetDebugNodeR2"])(element); } function _createNgProbeR2(coreTokens) { exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2); exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object.assign(Object.assign({}, CORE_TOKENS), _ngProbeTokensToMap(coreTokens || []))); return () => inspectNativeElementR2; } function _ngProbeTokensToMap(tokens) { return tokens.reduce((prev, t) => (prev[t.name] = t.token, prev), {}); } /** * In Ivy, we don't support NgProbe because we have our own set of testing utilities * with more robust functionality. * * We shouldn't bring in NgProbe because it prevents DebugNode and friends from * tree-shaking properly. */ const ELEMENT_PROBE_PROVIDERS__POST_R3__ = []; /** * Providers which support debugging Angular applications (e.g. via `ng.probe`). */ const ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"], useFactory: _createNgProbeR2, deps: [ [_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], ], multi: true, }, ]; const ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The injection token for the event-manager plug-in service. * * @publicApi */ const EVENT_MANAGER_PLUGINS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('EventManagerPlugins'); /** * An injectable service that provides event management for Angular * through a browser plug-in. * * @publicApi */ class EventManager { /** * Initializes an instance of the event-manager service. */ constructor(plugins, _zone) { this._zone = _zone; this._eventNameToPlugin = new Map(); plugins.forEach(p => p.manager = this); this._plugins = plugins.slice().reverse(); } /** * Registers a handler for a specific element and event. * * @param element The HTML element to receive event notifications. * @param eventName The name of the event to listen for. * @param handler A function to call when the notification occurs. Receives the * event object as an argument. * @returns A callback function that can be used to remove the handler. */ addEventListener(element, eventName, handler) { const plugin = this._findPluginFor(eventName); return plugin.addEventListener(element, eventName, handler); } /** * Registers a global handler for an event in a target view. * * @param target A target for global event notifications. One of "window", "document", or "body". * @param eventName The name of the event to listen for. * @param handler A function to call when the notification occurs. Receives the * event object as an argument. * @returns A callback function that can be used to remove the handler. */ addGlobalEventListener(target, eventName, handler) { const plugin = this._findPluginFor(eventName); return plugin.addGlobalEventListener(target, eventName, handler); } /** * Retrieves the compilation zone in which event listeners are registered. */ getZone() { return this._zone; } /** @internal */ _findPluginFor(eventName) { const plugin = this._eventNameToPlugin.get(eventName); if (plugin) { return plugin; } const plugins = this._plugins; for (let i = 0; i < plugins.length; i++) { const plugin = plugins[i]; if (plugin.supports(eventName)) { this._eventNameToPlugin.set(eventName, plugin); return plugin; } } throw new Error(`No event manager plugin found for event ${eventName}`); } } EventManager.ɵfac = function EventManager_Factory(t) { return new (t || EventManager)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](EVENT_MANAGER_PLUGINS), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"])); }; EventManager.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: EventManager, factory: EventManager.ɵfac }); EventManager.ctorParameters = () => [ { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [EVENT_MANAGER_PLUGINS,] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](EventManager, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [EVENT_MANAGER_PLUGINS] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"] }]; }, null); })(); class EventManagerPlugin { constructor(_doc) { this._doc = _doc; } addGlobalEventListener(element, eventName, handler) { const target = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().getGlobalEventTarget(this._doc, element); if (!target) { throw new Error(`Unsupported event target ${target} for event ${eventName}`); } return this.addEventListener(target, eventName, handler); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SharedStylesHost { constructor() { /** @internal */ this._stylesSet = new Set(); } addStyles(styles) { const additions = new Set(); styles.forEach(style => { if (!this._stylesSet.has(style)) { this._stylesSet.add(style); additions.add(style); } }); this.onStylesAdded(additions); } onStylesAdded(additions) { } getAllStyles() { return Array.from(this._stylesSet); } } SharedStylesHost.ɵfac = function SharedStylesHost_Factory(t) { return new (t || SharedStylesHost)(); }; SharedStylesHost.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: SharedStylesHost, factory: SharedStylesHost.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](SharedStylesHost, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return []; }, null); })(); class DomSharedStylesHost extends SharedStylesHost { constructor(_doc) { super(); this._doc = _doc; this._hostNodes = new Set(); this._styleNodes = new Set(); this._hostNodes.add(_doc.head); } _addStylesToHost(styles, host) { styles.forEach((style) => { const styleEl = this._doc.createElement('style'); styleEl.textContent = style; this._styleNodes.add(host.appendChild(styleEl)); }); } addHost(hostNode) { this._addStylesToHost(this._stylesSet, hostNode); this._hostNodes.add(hostNode); } removeHost(hostNode) { this._hostNodes.delete(hostNode); } onStylesAdded(additions) { this._hostNodes.forEach(hostNode => this._addStylesToHost(additions, hostNode)); } ngOnDestroy() { this._styleNodes.forEach(styleNode => Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().remove(styleNode)); } } DomSharedStylesHost.ɵfac = function DomSharedStylesHost_Factory(t) { return new (t || DomSharedStylesHost)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; DomSharedStylesHost.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: DomSharedStylesHost, factory: DomSharedStylesHost.ɵfac }); DomSharedStylesHost.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSharedStylesHost, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NAMESPACE_URIS = { 'svg': 'http://www.w3.org/2000/svg', 'xhtml': 'http://www.w3.org/1999/xhtml', 'xlink': 'http://www.w3.org/1999/xlink', 'xml': 'http://www.w3.org/XML/1998/namespace', 'xmlns': 'http://www.w3.org/2000/xmlns/', }; const COMPONENT_REGEX = /%COMP%/g; const NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode; const COMPONENT_VARIABLE = '%COMP%'; const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`; const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`; function shimContentAttribute(componentShortId) { return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId); } function shimHostAttribute(componentShortId) { return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId); } function flattenStyles(compId, styles, target) { for (let i = 0; i < styles.length; i++) { let style = styles[i]; if (Array.isArray(style)) { flattenStyles(compId, style, target); } else { style = style.replace(COMPONENT_REGEX, compId); target.push(style); } } return target; } function decoratePreventDefault(eventHandler) { // `DebugNode.triggerEventHandler` needs to know if the listener was created with // decoratePreventDefault or is a listener added outside the Angular context so it can handle the // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap // the listener (see below). return (event) => { // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node // can inspect the listener toString contents for the existence of this special token. Because // the token is a string literal, it is ensured to not be modified by compiled code. if (event === '__ngUnwrap__') { return eventHandler; } const allowDefaultBehavior = eventHandler(event); if (allowDefaultBehavior === false) { // TODO(tbosch): move preventDefault into event plugins... event.preventDefault(); event.returnValue = false; } return undefined; }; } let hasLoggedNativeEncapsulationWarning = false; class DomRendererFactory2 { constructor(eventManager, sharedStylesHost, appId) { this.eventManager = eventManager; this.sharedStylesHost = sharedStylesHost; this.appId = appId; this.rendererByCompId = new Map(); this.defaultRenderer = new DefaultDomRenderer2(eventManager); } createRenderer(element, type) { if (!element || !type) { return this.defaultRenderer; } switch (type.encapsulation) { case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Emulated: { let renderer = this.rendererByCompId.get(type.id); if (!renderer) { renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId); this.rendererByCompId.set(type.id, renderer); } renderer.applyToHost(element); return renderer; } case 1: case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].ShadowDom: // TODO(FW-2290): remove the `case 1:` fallback logic and the warning in v12. if ((typeof ngDevMode === 'undefined' || ngDevMode) && !hasLoggedNativeEncapsulationWarning && type.encapsulation === 1) { hasLoggedNativeEncapsulationWarning = true; console.warn('ViewEncapsulation.Native is no longer supported. Falling back to ViewEncapsulation.ShadowDom. The fallback will be removed in v12.'); } return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type); default: { if (!this.rendererByCompId.has(type.id)) { const styles = flattenStyles(type.id, type.styles, []); this.sharedStylesHost.addStyles(styles); this.rendererByCompId.set(type.id, this.defaultRenderer); } return this.defaultRenderer; } } } begin() { } end() { } } DomRendererFactory2.ɵfac = function DomRendererFactory2_Factory(t) { return new (t || DomRendererFactory2)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](EventManager), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](DomSharedStylesHost), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"])); }; DomRendererFactory2.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: DomRendererFactory2, factory: DomRendererFactory2.ɵfac }); DomRendererFactory2.ctorParameters = () => [ { type: EventManager }, { type: DomSharedStylesHost }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomRendererFactory2, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }] }]; }, null); })(); class DefaultDomRenderer2 { constructor(eventManager) { this.eventManager = eventManager; this.data = Object.create(null); } destroy() { } createElement(name, namespace) { if (namespace) { // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key // will result in undefined, so we just return the namespace here. return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name); } return document.createElement(name); } createComment(value) { return document.createComment(value); } createText(value) { return document.createTextNode(value); } appendChild(parent, newChild) { parent.appendChild(newChild); } insertBefore(parent, newChild, refChild) { if (parent) { parent.insertBefore(newChild, refChild); } } removeChild(parent, oldChild) { if (parent) { parent.removeChild(oldChild); } } selectRootElement(selectorOrNode, preserveContent) { let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) : selectorOrNode; if (!el) { throw new Error(`The selector "${selectorOrNode}" did not match any elements`); } if (!preserveContent) { el.textContent = ''; } return el; } parentNode(node) { return node.parentNode; } nextSibling(node) { return node.nextSibling; } setAttribute(el, name, value, namespace) { if (namespace) { name = namespace + ':' + name; // TODO(FW-811): Ivy may cause issues here because it's passing around // full URIs for namespaces, therefore this lookup will fail. const namespaceUri = NAMESPACE_URIS[namespace]; if (namespaceUri) { el.setAttributeNS(namespaceUri, name, value); } else { el.setAttribute(name, value); } } else { el.setAttribute(name, value); } } removeAttribute(el, name, namespace) { if (namespace) { // TODO(FW-811): Ivy may cause issues here because it's passing around // full URIs for namespaces, therefore this lookup will fail. const namespaceUri = NAMESPACE_URIS[namespace]; if (namespaceUri) { el.removeAttributeNS(namespaceUri, name); } else { // TODO(FW-811): Since ivy is passing around full URIs for namespaces // this could result in properties like `http://www.w3.org/2000/svg:cx="123"`, // which is wrong. el.removeAttribute(`${namespace}:${name}`); } } else { el.removeAttribute(name); } } addClass(el, name) { el.classList.add(name); } removeClass(el, name) { el.classList.remove(name); } setStyle(el, style, value, flags) { if (flags & (_angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase | _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important)) { el.style.setProperty(style, value, flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important ? 'important' : ''); } else { el.style[style] = value; } } removeStyle(el, style, flags) { if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase) { el.style.removeProperty(style); } else { // IE requires '' instead of null // see https://github.com/angular/angular/issues/7916 el.style[style] = ''; } } setProperty(el, name, value) { NG_DEV_MODE && checkNoSyntheticProp(name, 'property'); el[name] = value; } setValue(node, value) { node.nodeValue = value; } listen(target, event, callback) { NG_DEV_MODE && checkNoSyntheticProp(event, 'listener'); if (typeof target === 'string') { return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback)); } return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback)); } } const ɵ0$2 = () => '@'.charCodeAt(0); const AT_CHARCODE = (ɵ0$2)(); function checkNoSyntheticProp(name, nameKind) { if (name.charCodeAt(0) === AT_CHARCODE) { throw new Error(`Found the synthetic ${nameKind} ${name}. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.`); } } class EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 { constructor(eventManager, sharedStylesHost, component, appId) { super(eventManager); this.component = component; const styles = flattenStyles(appId + '-' + component.id, component.styles, []); sharedStylesHost.addStyles(styles); this.contentAttr = shimContentAttribute(appId + '-' + component.id); this.hostAttr = shimHostAttribute(appId + '-' + component.id); } applyToHost(element) { super.setAttribute(element, this.hostAttr, ''); } createElement(parent, name) { const el = super.createElement(parent, name); super.setAttribute(el, this.contentAttr, ''); return el; } } class ShadowDomRenderer extends DefaultDomRenderer2 { constructor(eventManager, sharedStylesHost, hostEl, component) { super(eventManager); this.sharedStylesHost = sharedStylesHost; this.hostEl = hostEl; this.shadowRoot = hostEl.attachShadow({ mode: 'open' }); this.sharedStylesHost.addHost(this.shadowRoot); const styles = flattenStyles(component.id, component.styles, []); for (let i = 0; i < styles.length; i++) { const styleEl = document.createElement('style'); styleEl.textContent = styles[i]; this.shadowRoot.appendChild(styleEl); } } nodeOrShadowRoot(node) { return node === this.hostEl ? this.shadowRoot : node; } destroy() { this.sharedStylesHost.removeHost(this.shadowRoot); } appendChild(parent, newChild) { return super.appendChild(this.nodeOrShadowRoot(parent), newChild); } insertBefore(parent, newChild, refChild) { return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild); } removeChild(parent, oldChild) { return super.removeChild(this.nodeOrShadowRoot(parent), oldChild); } parentNode(node) { return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node))); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class DomEventsPlugin extends EventManagerPlugin { constructor(doc) { super(doc); } // This plugin should come last in the list of plugins, because it accepts all // events. supports(eventName) { return true; } addEventListener(element, eventName, handler) { element.addEventListener(eventName, handler, false); return () => this.removeEventListener(element, eventName, handler); } removeEventListener(target, eventName, callback) { return target.removeEventListener(eventName, callback); } } DomEventsPlugin.ɵfac = function DomEventsPlugin_Factory(t) { return new (t || DomEventsPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; DomEventsPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: DomEventsPlugin, factory: DomEventsPlugin.ɵfac }); DomEventsPlugin.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomEventsPlugin, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Supported HammerJS recognizer event names. */ const EVENT_NAMES = { // pan 'pan': true, 'panstart': true, 'panmove': true, 'panend': true, 'pancancel': true, 'panleft': true, 'panright': true, 'panup': true, 'pandown': true, // pinch 'pinch': true, 'pinchstart': true, 'pinchmove': true, 'pinchend': true, 'pinchcancel': true, 'pinchin': true, 'pinchout': true, // press 'press': true, 'pressup': true, // rotate 'rotate': true, 'rotatestart': true, 'rotatemove': true, 'rotateend': true, 'rotatecancel': true, // swipe 'swipe': true, 'swipeleft': true, 'swiperight': true, 'swipeup': true, 'swipedown': true, // tap 'tap': true, 'doubletap': true }; /** * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular. * @see `HammerGestureConfig` * * @ngModule HammerModule * @publicApi */ const HAMMER_GESTURE_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerGestureConfig'); /** * Injection token used to provide a {@link HammerLoader} to Angular. * * @publicApi */ const HAMMER_LOADER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerLoader'); /** * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) * for gesture recognition. Configures specific event recognition. * @publicApi */ class HammerGestureConfig { constructor() { /** * A set of supported event names for gestures to be used in Angular. * Angular supports all built-in recognizers, as listed in * [HammerJS documentation](https://hammerjs.github.io/). */ this.events = []; /** * Maps gesture event names to a set of configuration options * that specify overrides to the default values for specific properties. * * The key is a supported event name to be configured, * and the options object contains a set of properties, with override values * to be applied to the named recognizer event. * For example, to disable recognition of the rotate event, specify * `{"rotate": {"enable": false}}`. * * Properties that are not present take the HammerJS default values. * For information about which properties are supported for which events, * and their allowed and default values, see * [HammerJS documentation](https://hammerjs.github.io/). * */ this.overrides = {}; } /** * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) * and attaches it to a given HTML element. * @param element The element that will recognize gestures. * @returns A HammerJS event-manager object. */ buildHammer(element) { const mc = new Hammer(element, this.options); mc.get('pinch').set({ enable: true }); mc.get('rotate').set({ enable: true }); for (const eventName in this.overrides) { mc.get(eventName).set(this.overrides[eventName]); } return mc; } } HammerGestureConfig.ɵfac = function HammerGestureConfig_Factory(t) { return new (t || HammerGestureConfig)(); }; HammerGestureConfig.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: HammerGestureConfig, factory: HammerGestureConfig.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerGestureConfig, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return []; }, null); })(); /** * Event plugin that adds Hammer support to an application. * * @ngModule HammerModule */ class HammerGesturesPlugin extends EventManagerPlugin { constructor(doc, _config, console, loader) { super(doc); this._config = _config; this.console = console; this.loader = loader; this._loaderPromise = null; } supports(eventName) { if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) { return false; } if (!window.Hammer && !this.loader) { if (typeof ngDevMode === 'undefined' || ngDevMode) { this.console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not ` + `loaded and no custom loader has been specified.`); } return false; } return true; } addEventListener(element, eventName, handler) { const zone = this.manager.getZone(); eventName = eventName.toLowerCase(); // If Hammer is not present but a loader is specified, we defer adding the event listener // until Hammer is loaded. if (!window.Hammer && this.loader) { this._loaderPromise = this._loaderPromise || this.loader(); // This `addEventListener` method returns a function to remove the added listener. // Until Hammer is loaded, the returned function needs to *cancel* the registration rather // than remove anything. let cancelRegistration = false; let deregister = () => { cancelRegistration = true; }; this._loaderPromise .then(() => { // If Hammer isn't actually loaded when the custom loader resolves, give up. if (!window.Hammer) { if (typeof ngDevMode === 'undefined' || ngDevMode) { this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`); } deregister = () => { }; return; } if (!cancelRegistration) { // Now that Hammer is loaded and the listener is being loaded for real, // the deregistration function changes from canceling registration to removal. deregister = this.addEventListener(element, eventName, handler); } }) .catch(() => { if (typeof ngDevMode === 'undefined' || ngDevMode) { this.console.warn(`The "${eventName}" event cannot be bound because the custom ` + `Hammer.JS loader failed.`); } deregister = () => { }; }); // Return a function that *executes* `deregister` (and not `deregister` itself) so that we // can change the behavior of `deregister` once the listener is added. Using a closure in // this way allows us to avoid any additional data structures to track listener removal. return () => { deregister(); }; } return zone.runOutsideAngular(() => { // Creating the manager bind events, must be done outside of angular const mc = this._config.buildHammer(element); const callback = function (eventObj) { zone.runGuarded(function () { handler(eventObj); }); }; mc.on(eventName, callback); return () => { mc.off(eventName, callback); // destroy mc to prevent memory leak if (typeof mc.destroy === 'function') { mc.destroy(); } }; }); } isCustomEvent(eventName) { return this._config.events.indexOf(eventName) > -1; } } HammerGesturesPlugin.ɵfac = function HammerGesturesPlugin_Factory(t) { return new (t || HammerGesturesPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](HAMMER_GESTURE_CONFIG), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](HAMMER_LOADER, 8)); }; HammerGesturesPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: HammerGesturesPlugin, factory: HammerGesturesPlugin.ɵfac }); HammerGesturesPlugin.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] }, { type: HammerGestureConfig, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_GESTURE_CONFIG,] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"] }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_LOADER,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerGesturesPlugin, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }, { type: HammerGestureConfig, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_GESTURE_CONFIG] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"] }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_LOADER] }] }]; }, null); })(); /** * In Ivy, support for Hammer gestures is optional, so applications must * import the `HammerModule` at root to turn on support. This means that * Hammer-specific code can be tree-shaken away if not needed. */ const HAMMER_PROVIDERS__POST_R3__ = []; /** * In View Engine, support for Hammer gestures is built-in by default. */ const HAMMER_PROVIDERS__PRE_R3__ = [ { provide: EVENT_MANAGER_PLUGINS, useClass: HammerGesturesPlugin, multi: true, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], HAMMER_GESTURE_CONFIG, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), HAMMER_LOADER]] }, { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] }, ]; const HAMMER_PROVIDERS = HAMMER_PROVIDERS__POST_R3__; /** * Adds support for HammerJS. * * Import this module at the root of your application so that Angular can work with * HammerJS to detect gesture events. * * Note that applications still need to include the HammerJS script itself. This module * simply sets up the coordination layer between HammerJS and Angular's EventManager. * * @publicApi */ class HammerModule { } HammerModule.ɵfac = function HammerModule_Factory(t) { return new (t || HammerModule)(); }; HammerModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: HammerModule }); HammerModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ providers: HAMMER_PROVIDERS__PRE_R3__ }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ providers: HAMMER_PROVIDERS__PRE_R3__ }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines supported modifiers for key events. */ const MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift']; const DOM_KEY_LOCATION_NUMPAD = 3; // Map to convert some key or keyIdentifier values to what will be returned by getEventKey const _keyMap = { // The following values are here for cross-browser compatibility and to match the W3C standard // cf https://www.w3.org/TR/DOM-Level-3-Events-key/ '\b': 'Backspace', '\t': 'Tab', '\x7F': 'Delete', '\x1B': 'Escape', 'Del': 'Delete', 'Esc': 'Escape', 'Left': 'ArrowLeft', 'Right': 'ArrowRight', 'Up': 'ArrowUp', 'Down': 'ArrowDown', 'Menu': 'ContextMenu', 'Scroll': 'ScrollLock', 'Win': 'OS' }; // There is a bug in Chrome for numeric keypad keys: // https://code.google.com/p/chromium/issues/detail?id=155654 // 1, 2, 3 ... are reported as A, B, C ... const _chromeNumKeyPadMap = { 'A': '1', 'B': '2', 'C': '3', 'D': '4', 'E': '5', 'F': '6', 'G': '7', 'H': '8', 'I': '9', 'J': '*', 'K': '+', 'M': '-', 'N': '.', 'O': '/', '\x60': '0', '\x90': 'NumLock' }; const ɵ0$3 = (event) => event.altKey, ɵ1 = (event) => event.ctrlKey, ɵ2 = (event) => event.metaKey, ɵ3 = (event) => event.shiftKey; /** * Retrieves modifiers from key-event objects. */ const MODIFIER_KEY_GETTERS = { 'alt': ɵ0$3, 'control': ɵ1, 'meta': ɵ2, 'shift': ɵ3 }; /** * @publicApi * A browser plug-in that provides support for handling of key events in Angular. */ class KeyEventsPlugin extends EventManagerPlugin { /** * Initializes an instance of the browser plug-in. * @param doc The document in which key events will be detected. */ constructor(doc) { super(doc); } /** * Reports whether a named key event is supported. * @param eventName The event name to query. * @return True if the named key event is supported. */ supports(eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; } /** * Registers a handler for a specific element and key event. * @param element The HTML element to receive event notifications. * @param eventName The name of the key event to listen for. * @param handler A function to call when the notification occurs. Receives the * event object as an argument. * @returns The key event that was registered. */ addEventListener(element, eventName, handler) { const parsedEvent = KeyEventsPlugin.parseEventName(eventName); const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone()); return this.manager.getZone().runOutsideAngular(() => { return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().onAndCancel(element, parsedEvent['domEventName'], outsideHandler); }); } static parseEventName(eventName) { const parts = eventName.toLowerCase().split('.'); const domEventName = parts.shift(); if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) { return null; } const key = KeyEventsPlugin._normalizeKey(parts.pop()); let fullKey = ''; MODIFIER_KEYS.forEach(modifierName => { const index = parts.indexOf(modifierName); if (index > -1) { parts.splice(index, 1); fullKey += modifierName + '.'; } }); fullKey += key; if (parts.length != 0 || key.length === 0) { // returning null instead of throwing to let another plugin process the event return null; } // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming. // The code must remain in the `result['domEventName']` form. // return {domEventName, fullKey}; const result = {}; result['domEventName'] = domEventName; result['fullKey'] = fullKey; return result; } static getEventFullKey(event) { let fullKey = ''; let key = getEventKey(event); key = key.toLowerCase(); if (key === ' ') { key = 'space'; // for readability } else if (key === '.') { key = 'dot'; // because '.' is used as a separator in event names } MODIFIER_KEYS.forEach(modifierName => { if (modifierName != key) { const modifierGetter = MODIFIER_KEY_GETTERS[modifierName]; if (modifierGetter(event)) { fullKey += modifierName + '.'; } } }); fullKey += key; return fullKey; } /** * Configures a handler callback for a key event. * @param fullKey The event name that combines all simultaneous keystrokes. * @param handler The function that responds to the key event. * @param zone The zone in which the event occurred. * @returns A callback function. */ static eventCallback(fullKey, handler, zone) { return (event /** TODO #9100 */) => { if (KeyEventsPlugin.getEventFullKey(event) === fullKey) { zone.runGuarded(() => handler(event)); } }; } /** @internal */ static _normalizeKey(keyName) { // TODO: switch to a Map if the mapping grows too much switch (keyName) { case 'esc': return 'escape'; default: return keyName; } } } KeyEventsPlugin.ɵfac = function KeyEventsPlugin_Factory(t) { return new (t || KeyEventsPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; KeyEventsPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: KeyEventsPlugin, factory: KeyEventsPlugin.ɵfac }); KeyEventsPlugin.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](KeyEventsPlugin, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); function getEventKey(event) { let key = event.key; if (key == null) { key = event.keyIdentifier; // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and // Safari cf // https://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces if (key == null) { return 'Unidentified'; } if (key.startsWith('U+')) { key = String.fromCharCode(parseInt(key.substring(2), 16)); if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) { // There is a bug in Chrome for numeric keypad keys: // https://code.google.com/p/chromium/issues/detail?id=155654 // 1, 2, 3 ... are reported as A, B, C ... key = _chromeNumKeyPadMap[key]; } } } return _keyMap[key] || key; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing * values to be safe to use in the different DOM contexts. * * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on * the website. * * In specific situations, it might be necessary to disable sanitization, for example if the * application genuinely needs to produce a `javascript:` style link with a dynamic value in it. * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...` * methods, and then binding to that value from the template. * * These situations should be very rare, and extraordinary care must be taken to avoid creating a * Cross Site Scripting (XSS) security bug! * * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as * close as possible to the source of the value, to make it easy to verify no security bug is * created by its use. * * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous * code. The sanitizer leaves safe values intact. * * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in * sanitization for the value passed in. Carefully check and audit all values and code paths going * into this call. Make sure any user data is appropriately escaped for this security context. * For more detail, see the [Security Guide](https://g.co/ng/security). * * @publicApi */ class DomSanitizer { } DomSanitizer.ɵfac = function DomSanitizer_Factory(t) { return new (t || DomSanitizer)(); }; DomSanitizer.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: function DomSanitizer_Factory() { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(DomSanitizerImpl); }, token: DomSanitizer, providedIn: "root" }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSanitizer, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(() => DomSanitizerImpl) }] }], null, null); })(); function domSanitizerImplFactory(injector) { return new DomSanitizerImpl(injector.get(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); } class DomSanitizerImpl extends DomSanitizer { constructor(_doc) { super(); this._doc = _doc; } sanitize(ctx, value) { if (value == null) return null; switch (ctx) { case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].NONE: return value; case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].HTML: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "HTML" /* Html */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeHtml"])(this._doc, String(value)).toString(); case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].STYLE: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "Style" /* Style */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } return value; case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].SCRIPT: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "Script" /* Script */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } throw new Error('unsafe value used in a script context'); case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].URL: const type = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵgetSanitizationBypassType"])(value); if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "URL" /* Url */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeUrl"])(String(value)); case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].RESOURCE_URL: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "ResourceURL" /* ResourceUrl */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)'); default: throw new Error(`Unexpected SecurityContext ${ctx} (see https://g.co/ng/security#xss)`); } } bypassSecurityTrustHtml(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustHtml"])(value); } bypassSecurityTrustStyle(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustStyle"])(value); } bypassSecurityTrustScript(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustScript"])(value); } bypassSecurityTrustUrl(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustUrl"])(value); } bypassSecurityTrustResourceUrl(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustResourceUrl"])(value); } } DomSanitizerImpl.ɵfac = function DomSanitizerImpl_Factory(t) { return new (t || DomSanitizerImpl)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; DomSanitizerImpl.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: function DomSanitizerImpl_Factory() { return domSanitizerImplFactory(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["INJECTOR"])); }, token: DomSanitizerImpl, providedIn: "root" }); DomSanitizerImpl.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSanitizerImpl, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function initDomAdapter() { BrowserDomAdapter.makeCurrent(); BrowserGetTestability.init(); } function errorHandler() { return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"](); } function _document() { // Tell ivy about the global document Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetDocument"])(document); return document; } const ɵ0$4 = _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵPLATFORM_BROWSER_ID"]; const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"], useValue: ɵ0$4 }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_INITIALIZER"], useValue: initDomAdapter, multi: true }, { provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], useFactory: _document, deps: [] }, ]; const BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Sanitizer"], useExisting: DomSanitizer }, { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }, ]; const BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = []; /** * @security Replacing built-in sanitization providers exposes the application to XSS risks. * Attacker-controlled data introduced by an unsanitized provider could expose your * application to XSS risks. For more detail, see the [Security Guide](https://g.co/ng/security). * @publicApi */ const BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__POST_R3__; /** * A factory function that returns a `PlatformRef` instance associated with browser service * providers. * * @publicApi */ const platformBrowser = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS); const BROWSER_MODULE_PROVIDERS = [ BROWSER_SANITIZATION_PROVIDERS, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵINJECTOR_SCOPE"], useValue: 'root' }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"], useFactory: errorHandler, deps: [] }, { provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"]] }, { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }, HAMMER_PROVIDERS, { provide: DomRendererFactory2, useClass: DomRendererFactory2, deps: [EventManager, DomSharedStylesHost, _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory2"], useExisting: DomRendererFactory2 }, { provide: SharedStylesHost, useExisting: DomSharedStylesHost }, { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Testability"], useClass: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Testability"], deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]] }, { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]] }, ELEMENT_PROBE_PROVIDERS, ]; /** * Exports required infrastructure for all Angular apps. * Included by default in all Angular apps created with the CLI * `new` command. * Re-exports `CommonModule` and `ApplicationModule`, making their * exports and providers available to all apps. * * @publicApi */ class BrowserModule { constructor(parentModule) { if (parentModule) { throw new Error(`BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`); } } /** * Configures a browser-based app to transition from a server-rendered app, if * one is present on the page. * * @param params An object containing an identifier for the app to transition. * The ID must match between the client and server versions of the app. * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`. */ static withServerTransition(params) { return { ngModule: BrowserModule, providers: [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"], useValue: params.appId }, { provide: TRANSITION_ID, useExisting: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"] }, SERVER_TRANSITION_PROVIDERS, ], }; } } BrowserModule.ɵfac = function BrowserModule_Factory(t) { return new (t || BrowserModule)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](BrowserModule, 12)); }; BrowserModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: BrowserModule }); BrowserModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ providers: BROWSER_MODULE_PROVIDERS, imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]] }); BrowserModule.ctorParameters = () => [ { type: BrowserModule, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [BrowserModule,] }] } ]; (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](BrowserModule, { exports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]]; } }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](BrowserModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ providers: BROWSER_MODULE_PROVIDERS, exports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]] }] }], function () { return [{ type: BrowserModule, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [BrowserModule] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Factory to create a `Meta` service instance for the current DOM document. */ function createMeta() { return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); } /** * A service for managing HTML `<meta>` tags. * * Properties of the `MetaDefinition` object match the attributes of the * HTML `<meta>` tag. These tags define document metadata that is important for * things like configuring a Content Security Policy, defining browser compatibility * and security settings, setting HTTP Headers, defining rich content for social sharing, * and Search Engine Optimization (SEO). * * To identify specific `<meta>` tags in a document, use an attribute selection * string in the format `"tag_attribute='value string'"`. * For example, an `attrSelector` value of `"name='description'"` matches a tag * whose `name` attribute has the value `"description"`. * Selectors are used with the `querySelector()` Document method, * in the format `meta[{attrSelector}]`. * * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta) * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector) * * * @publicApi */ class Meta { constructor(_doc) { this._doc = _doc; this._dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])(); } /** * Retrieves or creates a specific `<meta>` tag element in the current HTML document. * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute * values in the provided tag definition, and verifies that all other attribute values are equal. * If an existing element is found, it is returned and is not modified in any way. * @param tag The definition of a `<meta>` element to match or create. * @param forceCreation True to create a new element without checking whether one already exists. * @returns The existing element with the same attributes and values if found, * the new element if no match is found, or `null` if the tag parameter is not defined. */ addTag(tag, forceCreation = false) { if (!tag) return null; return this._getOrCreateElement(tag, forceCreation); } /** * Retrieves or creates a set of `<meta>` tag elements in the current HTML document. * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute * values in the provided tag definition, and verifies that all other attribute values are equal. * @param tags An array of tag definitions to match or create. * @param forceCreation True to create new elements without checking whether they already exist. * @returns The matching elements if found, or the new elements. */ addTags(tags, forceCreation = false) { if (!tags) return []; return tags.reduce((result, tag) => { if (tag) { result.push(this._getOrCreateElement(tag, forceCreation)); } return result; }, []); } /** * Retrieves a `<meta>` tag element in the current HTML document. * @param attrSelector The tag attribute and value to match against, in the format * `"tag_attribute='value string'"`. * @returns The matching element, if any. */ getTag(attrSelector) { if (!attrSelector) return null; return this._doc.querySelector(`meta[${attrSelector}]`) || null; } /** * Retrieves a set of `<meta>` tag elements in the current HTML document. * @param attrSelector The tag attribute and value to match against, in the format * `"tag_attribute='value string'"`. * @returns The matching elements, if any. */ getTags(attrSelector) { if (!attrSelector) return []; const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`); return list ? [].slice.call(list) : []; } /** * Modifies an existing `<meta>` tag element in the current HTML document. * @param tag The tag description with which to replace the existing tag content. * @param selector A tag attribute and value to match against, to identify * an existing tag. A string in the format `"tag_attribute=`value string`"`. * If not supplied, matches a tag with the same `name` or `property` attribute value as the * replacement tag. * @return The modified element. */ updateTag(tag, selector) { if (!tag) return null; selector = selector || this._parseSelector(tag); const meta = this.getTag(selector); if (meta) { return this._setMetaElementAttributes(tag, meta); } return this._getOrCreateElement(tag, true); } /** * Removes an existing `<meta>` tag element from the current HTML document. * @param attrSelector A tag attribute and value to match against, to identify * an existing tag. A string in the format `"tag_attribute=`value string`"`. */ removeTag(attrSelector) { this.removeTagElement(this.getTag(attrSelector)); } /** * Removes an existing `<meta>` tag element from the current HTML document. * @param meta The tag definition to match against to identify an existing tag. */ removeTagElement(meta) { if (meta) { this._dom.remove(meta); } } _getOrCreateElement(meta, forceCreation = false) { if (!forceCreation) { const selector = this._parseSelector(meta); const elem = this.getTag(selector); // It's allowed to have multiple elements with the same name so it's not enough to // just check that element with the same name already present on the page. We also need to // check if element has tag attributes if (elem && this._containsAttributes(meta, elem)) return elem; } const element = this._dom.createElement('meta'); this._setMetaElementAttributes(meta, element); const head = this._doc.getElementsByTagName('head')[0]; head.appendChild(element); return element; } _setMetaElementAttributes(tag, el) { Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop])); return el; } _parseSelector(tag) { const attr = tag.name ? 'name' : 'property'; return `${attr}="${tag[attr]}"`; } _containsAttributes(tag, elem) { return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]); } _getMetaKeyMap(prop) { return META_KEYS_MAP[prop] || prop; } } Meta.ɵfac = function Meta_Factory(t) { return new (t || Meta)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; Meta.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: createMeta, token: Meta, providedIn: "root" }); Meta.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Meta, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * Mapping for MetaDefinition properties with their correct meta attribute names */ const META_KEYS_MAP = { httpEquiv: 'http-equiv' }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Factory to create Title service. */ function createTitle() { return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); } /** * A service that can be used to get and set the title of a current HTML document. * * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag) * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements * (representing the `<title>` tag). Instead, this service can be used to set and get the current * title value. * * @publicApi */ class Title { constructor(_doc) { this._doc = _doc; } /** * Get the title of the current HTML document. */ getTitle() { return this._doc.title; } /** * Set the title of the current HTML document. * @param newTitle */ setTitle(newTitle) { this._doc.title = newTitle || ''; } } Title.ɵfac = function Title_Factory(t) { return new (t || Title)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; Title.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: createTitle, token: Title, providedIn: "root" }); Title.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Title, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const win = typeof window !== 'undefined' && window || {}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class ChangeDetectionPerfRecord { constructor(msPerTick, numTicks) { this.msPerTick = msPerTick; this.numTicks = numTicks; } } /** * Entry point for all Angular profiling-related debug tools. This object * corresponds to the `ng.profiler` in the dev console. */ class AngularProfiler { constructor(ref) { this.appRef = ref.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]); } // tslint:disable:no-console /** * Exercises change detection in a loop and then prints the average amount of * time in milliseconds how long a single round of change detection takes for * the current state of the UI. It runs a minimum of 5 rounds for a minimum * of 500 milliseconds. * * Optionally, a user may pass a `config` parameter containing a map of * options. Supported options are: * * `record` (boolean) - causes the profiler to record a CPU profile while * it exercises the change detector. Example: * * ``` * ng.profiler.timeChangeDetection({record: true}) * ``` */ timeChangeDetection(config) { const record = config && config['record']; const profileName = 'Change Detection'; // Profiler is not available in Android browsers without dev tools opened const isProfilerAvailable = win.console.profile != null; if (record && isProfilerAvailable) { win.console.profile(profileName); } const start = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow(); let numTicks = 0; while (numTicks < 5 || (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow() - start) < 500) { this.appRef.tick(); numTicks++; } const end = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow(); if (record && isProfilerAvailable) { win.console.profileEnd(profileName); } const msPerTick = (end - start) / numTicks; win.console.log(`ran ${numTicks} change detection cycles`); win.console.log(`${msPerTick.toFixed(2)} ms per check`); return new ChangeDetectionPerfRecord(msPerTick, numTicks); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const PROFILER_GLOBAL_NAME = 'profiler'; /** * Enabled Angular debug tools that are accessible via your browser's * developer console. * * Usage: * * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j) * 1. Type `ng.` (usually the console will show auto-complete suggestion) * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()` * then hit Enter. * * @publicApi */ function enableDebugTools(ref) { exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref)); return ref; } /** * Disables Angular tools. * * @publicApi */ function disableDebugTools() { exportNgVar(PROFILER_GLOBAL_NAME, null); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function escapeHtml(text) { const escapedText = { '&': '&a;', '"': '&q;', '\'': '&s;', '<': '&l;', '>': '&g;', }; return text.replace(/[&"'<>]/g, s => escapedText[s]); } function unescapeHtml(text) { const unescapedText = { '&a;': '&', '&q;': '"', '&s;': '\'', '&l;': '<', '&g;': '>', }; return text.replace(/&[^;]+;/g, s => unescapedText[s]); } /** * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`. * * Example: * * ``` * const COUNTER_KEY = makeStateKey<number>('counter'); * let value = 10; * * transferState.set(COUNTER_KEY, value); * ``` * * @publicApi */ function makeStateKey(key) { return key; } /** * A key value store that is transferred from the application on the server side to the application * on the client side. * * `TransferState` will be available as an injectable token. To use it import * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client. * * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only * boolean, number, string, null and non-class objects will be serialized and deserialized in a * non-lossy manner. * * @publicApi */ class TransferState { constructor() { this.store = {}; this.onSerializeCallbacks = {}; } /** @internal */ static init(initState) { const transferState = new TransferState(); transferState.store = initState; return transferState; } /** * Get the value corresponding to a key. Return `defaultValue` if key is not found. */ get(key, defaultValue) { return this.store[key] !== undefined ? this.store[key] : defaultValue; } /** * Set the value corresponding to a key. */ set(key, value) { this.store[key] = value; } /** * Remove a key from the store. */ remove(key) { delete this.store[key]; } /** * Test whether a key exists in the store. */ hasKey(key) { return this.store.hasOwnProperty(key); } /** * Register a callback to provide the value for a key when `toJson` is called. */ onSerialize(key, callback) { this.onSerializeCallbacks[key] = callback; } /** * Serialize the current state of the store to JSON. */ toJson() { // Call the onSerialize callbacks and put those values into the store. for (const key in this.onSerializeCallbacks) { if (this.onSerializeCallbacks.hasOwnProperty(key)) { try { this.store[key] = this.onSerializeCallbacks[key](); } catch (e) { console.warn('Exception in onSerialize callback: ', e); } } } return JSON.stringify(this.store); } } TransferState.ɵfac = function TransferState_Factory(t) { return new (t || TransferState)(); }; TransferState.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: TransferState, factory: TransferState.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](TransferState, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return []; }, null); })(); function initTransferState(doc, appId) { // Locate the script tag with the JSON data transferred from the server. // The id of the script tag is set to the Angular appId + 'state'. const script = doc.getElementById(appId + '-state'); let initialState = {}; if (script && script.textContent) { try { // Avoid using any here as it triggers lint errors in google3 (any is not allowed). initialState = JSON.parse(unescapeHtml(script.textContent)); } catch (e) { console.warn('Exception while restoring TransferState for app ' + appId, e); } } return TransferState.init(initialState); } /** * NgModule to install on the client side while using the `TransferState` to transfer state from * server to client. * * @publicApi */ class BrowserTransferStateModule { } BrowserTransferStateModule.ɵfac = function BrowserTransferStateModule_Factory(t) { return new (t || BrowserTransferStateModule)(); }; BrowserTransferStateModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: BrowserTransferStateModule }); BrowserTransferStateModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ providers: [{ provide: TransferState, useFactory: initTransferState, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](BrowserTransferStateModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ providers: [{ provide: TransferState, useFactory: initTransferState, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }] }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Predicates for use with {@link DebugElement}'s query functions. * * @publicApi */ class By { /** * Match all nodes. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'} */ static all() { return () => true; } /** * Match elements by the given CSS selector. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'} */ static css(selector) { return (debugElement) => { return debugElement.nativeElement != null ? elementMatches(debugElement.nativeElement, selector) : false; }; } /** * Match nodes that have the given directive present. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'} */ static directive(type) { return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1; } } function elementMatches(n, selector) { if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().isElementNode(n)) { return n.matches && n.matches(selector) || n.msMatchesSelector && n.msMatchesSelector(selector) || n.webkitMatchesSelector && n.webkitMatchesSelector(selector); } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=platform-browser.js.map /***/ }), /***/ "jqAh": /*!******************************************!*\ !*** ./node_modules/delaunator/index.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Delaunator; }); const EPSILON = Math.pow(2, -52); const EDGE_STACK = new Uint32Array(512); class Delaunator { static from(points, getX = defaultGetX, getY = defaultGetY) { const n = points.length; const coords = new Float64Array(n * 2); for (let i = 0; i < n; i++) { const p = points[i]; coords[2 * i] = getX(p); coords[2 * i + 1] = getY(p); } return new Delaunator(coords); } constructor(coords) { const n = coords.length >> 1; if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.'); this.coords = coords; // arrays that will store the triangulation graph const maxTriangles = Math.max(2 * n - 5, 0); this._triangles = new Uint32Array(maxTriangles * 3); this._halfedges = new Int32Array(maxTriangles * 3); // temporary arrays for tracking the edges of the advancing convex hull this._hashSize = Math.ceil(Math.sqrt(n)); this._hullPrev = new Uint32Array(n); // edge to prev edge this._hullNext = new Uint32Array(n); // edge to next edge this._hullTri = new Uint32Array(n); // edge to adjacent triangle this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash // temporary arrays for sorting points this._ids = new Uint32Array(n); this._dists = new Float64Array(n); this.update(); } update() { const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this; const n = coords.length >> 1; // populate an array of point indices; calculate input data bbox let minX = Infinity; let minY = Infinity; let maxX = -Infinity; let maxY = -Infinity; for (let i = 0; i < n; i++) { const x = coords[2 * i]; const y = coords[2 * i + 1]; if (x < minX) minX = x; if (y < minY) minY = y; if (x > maxX) maxX = x; if (y > maxY) maxY = y; this._ids[i] = i; } const cx = (minX + maxX) / 2; const cy = (minY + maxY) / 2; let minDist = Infinity; let i0, i1, i2; // pick a seed point close to the center for (let i = 0; i < n; i++) { const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]); if (d < minDist) { i0 = i; minDist = d; } } const i0x = coords[2 * i0]; const i0y = coords[2 * i0 + 1]; minDist = Infinity; // find the point closest to the seed for (let i = 0; i < n; i++) { if (i === i0) continue; const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]); if (d < minDist && d > 0) { i1 = i; minDist = d; } } let i1x = coords[2 * i1]; let i1y = coords[2 * i1 + 1]; let minRadius = Infinity; // find the third point which forms the smallest circumcircle with the first two for (let i = 0; i < n; i++) { if (i === i0 || i === i1) continue; const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]); if (r < minRadius) { i2 = i; minRadius = r; } } let i2x = coords[2 * i2]; let i2y = coords[2 * i2 + 1]; if (minRadius === Infinity) { // order collinear points by dx (or dy if all x are identical) // and return the list as a hull for (let i = 0; i < n; i++) { this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]); } quicksort(this._ids, this._dists, 0, n - 1); const hull = new Uint32Array(n); let j = 0; for (let i = 0, d0 = -Infinity; i < n; i++) { const id = this._ids[i]; if (this._dists[id] > d0) { hull[j++] = id; d0 = this._dists[id]; } } this.hull = hull.subarray(0, j); this.triangles = new Uint32Array(0); this.halfedges = new Uint32Array(0); return; } // swap the order of the seed points for counter-clockwise orientation if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) { const i = i1; const x = i1x; const y = i1y; i1 = i2; i1x = i2x; i1y = i2y; i2 = i; i2x = x; i2y = y; } const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); this._cx = center.x; this._cy = center.y; for (let i = 0; i < n; i++) { this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y); } // sort the points by distance from the seed triangle circumcenter quicksort(this._ids, this._dists, 0, n - 1); // set up the seed triangle as the starting hull this._hullStart = i0; let hullSize = 3; hullNext[i0] = hullPrev[i2] = i1; hullNext[i1] = hullPrev[i0] = i2; hullNext[i2] = hullPrev[i1] = i0; hullTri[i0] = 0; hullTri[i1] = 1; hullTri[i2] = 2; hullHash.fill(-1); hullHash[this._hashKey(i0x, i0y)] = i0; hullHash[this._hashKey(i1x, i1y)] = i1; hullHash[this._hashKey(i2x, i2y)] = i2; this.trianglesLen = 0; this._addTriangle(i0, i1, i2, -1, -1, -1); for (let k = 0, xp, yp; k < this._ids.length; k++) { const i = this._ids[k]; const x = coords[2 * i]; const y = coords[2 * i + 1]; // skip near-duplicate points if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue; xp = x; yp = y; // skip seed triangle points if (i === i0 || i === i1 || i === i2) continue; // find a visible edge on the convex hull using edge hash let start = 0; for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) { start = hullHash[(key + j) % this._hashSize]; if (start !== -1 && start !== hullNext[start]) break; } start = hullPrev[start]; let e = start, q; while (q = hullNext[e], !orient(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) { e = q; if (e === start) { e = -1; break; } } if (e === -1) continue; // likely a near-duplicate point; skip it // add the first triangle from the point let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]); // recursively flip triangles from the point until they satisfy the Delaunay condition hullTri[i] = this._legalize(t + 2); hullTri[e] = t; // keep track of boundary triangles on the hull hullSize++; // walk forward through the hull, adding more triangles and flipping recursively let n = hullNext[e]; while (q = hullNext[n], orient(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1])) { t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]); hullTri[i] = this._legalize(t + 2); hullNext[n] = n; // mark as removed hullSize--; n = q; } // walk backward from the other side, adding more triangles and flipping if (e === start) { while (q = hullPrev[e], orient(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) { t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]); this._legalize(t + 2); hullTri[q] = t; hullNext[e] = e; // mark as removed hullSize--; e = q; } } // update the hull indices this._hullStart = hullPrev[i] = e; hullNext[e] = hullPrev[n] = i; hullNext[i] = n; // save the two new edges in the hash table hullHash[this._hashKey(x, y)] = i; hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; } this.hull = new Uint32Array(hullSize); for (let i = 0, e = this._hullStart; i < hullSize; i++) { this.hull[i] = e; e = hullNext[e]; } // trim typed triangle mesh arrays this.triangles = this._triangles.subarray(0, this.trianglesLen); this.halfedges = this._halfedges.subarray(0, this.trianglesLen); } _hashKey(x, y) { return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; } _legalize(a) { const {_triangles: triangles, _halfedges: halfedges, coords} = this; let i = 0; let ar = 0; // recursion eliminated with a fixed-size stack while (true) { const b = halfedges[a]; /* if the pair of triangles doesn't satisfy the Delaunay condition * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, * then do the same check/flip recursively for the new pair of triangles * * pl pl * /||\ / \ * al/ || \bl al/ \a * / || \ / \ * / a||b \ flip /___ar___\ * p0\ || /p1 => p0\---bl---/p1 * \ || / \ / * ar\ || /br b\ /br * \||/ \ / * pr pr */ const a0 = a - a % 3; ar = a0 + (a + 2) % 3; if (b === -1) { // convex hull edge if (i === 0) break; a = EDGE_STACK[--i]; continue; } const b0 = b - b % 3; const al = a0 + (a + 1) % 3; const bl = b0 + (b + 2) % 3; const p0 = triangles[ar]; const pr = triangles[a]; const pl = triangles[al]; const p1 = triangles[bl]; const illegal = inCircle( coords[2 * p0], coords[2 * p0 + 1], coords[2 * pr], coords[2 * pr + 1], coords[2 * pl], coords[2 * pl + 1], coords[2 * p1], coords[2 * p1 + 1]); if (illegal) { triangles[a] = p1; triangles[b] = p0; const hbl = halfedges[bl]; // edge swapped on the other side of the hull (rare); fix the halfedge reference if (hbl === -1) { let e = this._hullStart; do { if (this._hullTri[e] === bl) { this._hullTri[e] = a; break; } e = this._hullPrev[e]; } while (e !== this._hullStart); } this._link(a, hbl); this._link(b, halfedges[ar]); this._link(ar, bl); const br = b0 + (b + 1) % 3; // don't worry about hitting the cap: it can only happen on extremely degenerate input if (i < EDGE_STACK.length) { EDGE_STACK[i++] = br; } } else { if (i === 0) break; a = EDGE_STACK[--i]; } } return ar; } _link(a, b) { this._halfedges[a] = b; if (b !== -1) this._halfedges[b] = a; } // add a new triangle given vertex indices and adjacent half-edge ids _addTriangle(i0, i1, i2, a, b, c) { const t = this.trianglesLen; this._triangles[t] = i0; this._triangles[t + 1] = i1; this._triangles[t + 2] = i2; this._link(t, a); this._link(t + 1, b); this._link(t + 2, c); this.trianglesLen += 3; return t; } } // monotonically increases with real angle, but doesn't need expensive trigonometry function pseudoAngle(dx, dy) { const p = dx / (Math.abs(dx) + Math.abs(dy)); return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] } function dist(ax, ay, bx, by) { const dx = ax - bx; const dy = ay - by; return dx * dx + dy * dy; } // return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check function orientIfSure(px, py, rx, ry, qx, qy) { const l = (ry - py) * (qx - px); const r = (rx - px) * (qy - py); return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0; } // a more robust orientation test that's stable in a given triangle (to fix robustness issues) function orient(rx, ry, qx, qy, px, py) { const sign = orientIfSure(px, py, rx, ry, qx, qy) || orientIfSure(rx, ry, qx, qy, px, py) || orientIfSure(qx, qy, px, py, rx, ry); return sign < 0; } function inCircle(ax, ay, bx, by, cx, cy, px, py) { const dx = ax - px; const dy = ay - py; const ex = bx - px; const ey = by - py; const fx = cx - px; const fy = cy - py; const ap = dx * dx + dy * dy; const bp = ex * ex + ey * ey; const cp = fx * fx + fy * fy; return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0; } function circumradius(ax, ay, bx, by, cx, cy) { const dx = bx - ax; const dy = by - ay; const ex = cx - ax; const ey = cy - ay; const bl = dx * dx + dy * dy; const cl = ex * ex + ey * ey; const d = 0.5 / (dx * ey - dy * ex); const x = (ey * bl - dy * cl) * d; const y = (dx * cl - ex * bl) * d; return x * x + y * y; } function circumcenter(ax, ay, bx, by, cx, cy) { const dx = bx - ax; const dy = by - ay; const ex = cx - ax; const ey = cy - ay; const bl = dx * dx + dy * dy; const cl = ex * ex + ey * ey; const d = 0.5 / (dx * ey - dy * ex); const x = ax + (ey * bl - dy * cl) * d; const y = ay + (dx * cl - ex * bl) * d; return {x, y}; } function quicksort(ids, dists, left, right) { if (right - left <= 20) { for (let i = left + 1; i <= right; i++) { const temp = ids[i]; const tempDist = dists[temp]; let j = i - 1; while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--]; ids[j + 1] = temp; } } else { const median = (left + right) >> 1; let i = left + 1; let j = right; swap(ids, median, i); if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right); if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right); if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i); const temp = ids[i]; const tempDist = dists[temp]; while (true) { do i++; while (dists[ids[i]] < tempDist); do j--; while (dists[ids[j]] > tempDist); if (j < i) break; swap(ids, i, j); } ids[left + 1] = ids[j]; ids[j] = temp; if (right - i + 1 >= j - left) { quicksort(ids, dists, i, right); quicksort(ids, dists, left, j - 1); } else { quicksort(ids, dists, left, j - 1); quicksort(ids, dists, i, right); } } } function swap(arr, i, j) { const tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; } function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } /***/ }), /***/ "jtHE": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/ReplaySubject.js ***! \**************************************************************/ /*! exports provided: ReplaySubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); /* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scheduler/queue */ "qgXg"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); /* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./operators/observeOn */ "pxpQ"); /* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); /* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SubjectSubscription */ "Ylt2"); class ReplaySubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor(bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, scheduler) { super(); this.scheduler = scheduler; this._events = []; this._infiniteTimeWindow = false; this._bufferSize = bufferSize < 1 ? 1 : bufferSize; this._windowTime = windowTime < 1 ? 1 : windowTime; if (windowTime === Number.POSITIVE_INFINITY) { this._infiniteTimeWindow = true; this.next = this.nextInfiniteTimeWindow; } else { this.next = this.nextTimeWindow; } } nextInfiniteTimeWindow(value) { if (!this.isStopped) { const _events = this._events; _events.push(value); if (_events.length > this._bufferSize) { _events.shift(); } } super.next(value); } nextTimeWindow(value) { if (!this.isStopped) { this._events.push(new ReplayEvent(this._getNow(), value)); this._trimBufferThenGetEvents(); } super.next(value); } _subscribe(subscriber) { const _infiniteTimeWindow = this._infiniteTimeWindow; const _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents(); const scheduler = this.scheduler; const len = _events.length; let subscription; if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"](); } else if (this.isStopped || this.hasError) { subscription = _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } else { this.observers.push(subscriber); subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber); } if (scheduler) { subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_3__["ObserveOnSubscriber"](subscriber, scheduler)); } if (_infiniteTimeWindow) { for (let i = 0; i < len && !subscriber.closed; i++) { subscriber.next(_events[i]); } } else { for (let i = 0; i < len && !subscriber.closed; i++) { subscriber.next(_events[i].value); } } if (this.hasError) { subscriber.error(this.thrownError); } else if (this.isStopped) { subscriber.complete(); } return subscription; } _getNow() { return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_1__["queue"]).now(); } _trimBufferThenGetEvents() { const now = this._getNow(); const _bufferSize = this._bufferSize; const _windowTime = this._windowTime; const _events = this._events; const eventsCount = _events.length; let spliceCount = 0; while (spliceCount < eventsCount) { if ((now - _events[spliceCount].time) < _windowTime) { break; } spliceCount++; } if (eventsCount > _bufferSize) { spliceCount = Math.max(spliceCount, eventsCount - _bufferSize); } if (spliceCount > 0) { _events.splice(0, spliceCount); } return _events; } } class ReplayEvent { constructor(time, value) { this.time = time; this.value = value; } } //# sourceMappingURL=ReplaySubject.js.map /***/ }), /***/ "kF1t": /*!**********************************************!*\ !*** ./node_modules/d3-axis/src/identity.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x; }); /***/ }), /***/ "kJWO": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/symbol/observable.js ***! \******************************************************************/ /*! exports provided: observable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; }); const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')(); //# sourceMappingURL=observable.js.map /***/ }), /***/ "kO9b": /*!***************************************************!*\ !*** ./node_modules/d3-interpolate/src/string.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ "4xfg"); var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g"); function zero(b) { return function() { return b; }; } function one(b) { return function(t) { return b(t) + ""; }; } /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b am, // current match in a bm, // current match in b bs, // string preceding current number in b, if any i = -1, // index in s s = [], // string constants and placeholders q = []; // number interpolators // Coerce inputs to strings. a = a + "", b = b + ""; // Interpolate pairs of numbers in a & b. while ((am = reA.exec(a)) && (bm = reB.exec(b))) { if ((bs = bm.index) > bi) { // a string precedes the next number in b bs = b.slice(bi, bs); if (s[i]) s[i] += bs; // coalesce with previous string else s[++i] = bs; } if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match if (s[i]) s[i] += bm; // coalesce with previous string else s[++i] = bm; } else { // interpolate non-matching numbers s[++i] = null; q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(am, bm)}); } bi = reB.lastIndex; } // Add remains of b. if (bi < b.length) { bs = b.slice(bi); if (s[i]) s[i] += bs; // coalesce with previous string else s[++i] = bs; } // Special optimization for only a single match. // Otherwise, interpolate each of the numbers and rejoin the string. return s.length < 2 ? (q[0] ? one(q[0].x) : zero(b)) : (b = q.length, function(t) { for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); return s.join(""); }); }); /***/ }), /***/ "kU1M": /*!*******************************************************!*\ !*** ./node_modules/rxjs/_esm2015/operators/index.js ***! \*******************************************************/ /*! exports provided: audit, auditTime, buffer, bufferCount, bufferTime, bufferToggle, bufferWhen, catchError, combineAll, combineLatest, concat, concatAll, concatMap, concatMapTo, count, debounce, debounceTime, defaultIfEmpty, delay, delayWhen, dematerialize, distinct, distinctUntilChanged, distinctUntilKeyChanged, elementAt, endWith, every, exhaust, exhaustMap, expand, filter, finalize, find, findIndex, first, groupBy, ignoreElements, isEmpty, last, map, mapTo, materialize, max, merge, mergeAll, mergeMap, flatMap, mergeMapTo, mergeScan, min, multicast, observeOn, onErrorResumeNext, pairwise, partition, pluck, publish, publishBehavior, publishLast, publishReplay, race, reduce, repeat, repeatWhen, retry, retryWhen, refCount, sample, sampleTime, scan, sequenceEqual, share, shareReplay, single, skip, skipLast, skipUntil, skipWhile, startWith, subscribeOn, switchAll, switchMap, switchMapTo, take, takeLast, takeUntil, takeWhile, tap, throttle, throttleTime, throwIfEmpty, timeInterval, timeout, timeoutWith, timestamp, toArray, window, windowCount, windowTime, windowToggle, windowWhen, withLatestFrom, zip, zipAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/operators/audit */ "tnsW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; }); /* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/operators/auditTime */ "3UWI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; }); /* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal/operators/buffer */ "p9/F"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; }); /* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/operators/bufferCount */ "9M8c"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; }); /* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/operators/bufferTime */ "OsX3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; }); /* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/operators/bufferToggle */ "FD9M"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; }); /* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/operators/bufferWhen */ "PfrF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; }); /* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../internal/operators/catchError */ "JIr8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; }); /* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../internal/operators/combineAll */ "7wxJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; }); /* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../internal/operators/combineLatest */ "fFD9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; }); /* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../internal/operators/concat */ "f29J"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; }); /* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../internal/operators/concatAll */ "0EUg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; }); /* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../internal/operators/concatMap */ "bOdf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; }); /* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../internal/operators/concatMapTo */ "q7zd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; }); /* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../internal/operators/count */ "HrJb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; }); /* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../internal/operators/debounce */ "6eBy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; }); /* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../internal/operators/debounceTime */ "Kj3r"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; }); /* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../internal/operators/defaultIfEmpty */ "xbPD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; }); /* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../internal/operators/delay */ "3E0/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; }); /* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../internal/operators/delayWhen */ "coGc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; }); /* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../internal/operators/dematerialize */ "kgNN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; }); /* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../internal/operators/distinct */ "02Lk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; }); /* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../internal/operators/distinctUntilChanged */ "/uUt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; }); /* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../internal/operators/distinctUntilKeyChanged */ "PZkE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; }); /* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../internal/operators/elementAt */ "9ihq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; }); /* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../internal/operators/endWith */ "0Pi8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; }); /* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../internal/operators/every */ "Gi4w"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; }); /* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../internal/operators/exhaust */ "zt7V"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; }); /* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../internal/operators/exhaustMap */ "XqQ8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; }); /* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../internal/operators/expand */ "FQpF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; }); /* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../internal/operators/filter */ "pLZG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; }); /* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../internal/operators/finalize */ "nYR2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; }); /* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../internal/operators/find */ "cBqT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; }); /* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../internal/operators/findIndex */ "K7De"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; }); /* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../internal/operators/first */ "SxV6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; }); /* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../internal/operators/groupBy */ "OQgR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; }); /* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../internal/operators/ignoreElements */ "4A3s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; }); /* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../internal/operators/isEmpty */ "m2j4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; }); /* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../internal/operators/last */ "NJ9Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; }); /* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../internal/operators/map */ "lJxs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; }); /* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../internal/operators/mapTo */ "CqXF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; }); /* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../internal/operators/materialize */ "dkDA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; }); /* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../internal/operators/max */ "yI9Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; }); /* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../internal/operators/merge */ "q92s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; }); /* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../internal/operators/mergeAll */ "bHdf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; }); /* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../internal/operators/mergeMap */ "5+tZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["flatMap"]; }); /* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../internal/operators/mergeMapTo */ "UXbc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; }); /* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../internal/operators/mergeScan */ "51Bx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; }); /* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../internal/operators/min */ "FZB8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; }); /* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../internal/operators/multicast */ "oB13"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; }); /* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../internal/operators/observeOn */ "pxpQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; }); /* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../internal/operators/onErrorResumeNext */ "uTdr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; }); /* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../internal/operators/pairwise */ "Zy1z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; }); /* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../internal/operators/partition */ "A3iJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; }); /* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../internal/operators/pluck */ "wO+i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; }); /* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../internal/operators/publish */ "NfdI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; }); /* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../internal/operators/publishBehavior */ "UGaM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; }); /* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../internal/operators/publishLast */ "qZ0a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; }); /* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../internal/operators/publishReplay */ "05l1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; }); /* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../internal/operators/race */ "4f8F"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; }); /* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../internal/operators/reduce */ "128B"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; }); /* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../internal/operators/repeat */ "/d8p"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; }); /* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../internal/operators/repeatWhen */ "Gqsl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; }); /* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../internal/operators/retry */ "un/a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; }); /* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../internal/operators/retryWhen */ "MtjB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; }); /* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../internal/operators/refCount */ "x+ZX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; }); /* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../internal/operators/sample */ "c6ID"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; }); /* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../internal/operators/sampleTime */ "1Ykd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; }); /* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../internal/operators/scan */ "Kqap"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; }); /* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../internal/operators/sequenceEqual */ "Zyez"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; }); /* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../internal/operators/share */ "w1tV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; }); /* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../internal/operators/shareReplay */ "UXun"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; }); /* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../internal/operators/single */ "cx9U"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; }); /* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../internal/operators/skip */ "zP0r"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; }); /* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../internal/operators/skipLast */ "kagm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; }); /* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../internal/operators/skipUntil */ "vqkR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; }); /* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../internal/operators/skipWhile */ "32Ea"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; }); /* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../internal/operators/startWith */ "JX91"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; }); /* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../internal/operators/subscribeOn */ "tf+s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; }); /* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../internal/operators/switchAll */ "Y6wi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; }); /* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../internal/operators/switchMap */ "eIep"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; }); /* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ../internal/operators/switchMapTo */ "aGrj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; }); /* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ../internal/operators/take */ "IzEk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; }); /* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ../internal/operators/takeLast */ "BFxc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; }); /* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ../internal/operators/takeUntil */ "1G5W"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; }); /* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ../internal/operators/takeWhile */ "GJmQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; }); /* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ../internal/operators/tap */ "vkgz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; }); /* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ../internal/operators/throttle */ "yuhW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; }); /* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ../internal/operators/throttleTime */ "gcYM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; }); /* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ../internal/operators/throwIfEmpty */ "XDbj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; }); /* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ../internal/operators/timeInterval */ "4hIw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; }); /* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ../internal/operators/timeout */ "tS1D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; }); /* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ../internal/operators/timeoutWith */ "syX2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; }); /* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ../internal/operators/timestamp */ "r0WS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; }); /* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ../internal/operators/toArray */ "IAdc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; }); /* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ../internal/operators/window */ "mk5/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; }); /* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ../internal/operators/windowCount */ "lpKW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; }); /* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ../internal/operators/windowTime */ "UHp3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; }); /* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ../internal/operators/windowToggle */ "sTY7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; }); /* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ../internal/operators/windowWhen */ "pXlZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; }); /* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ../internal/operators/withLatestFrom */ "zp1y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; }); /* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ../internal/operators/zip */ "GjHo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; }); /* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ../internal/operators/zipAll */ "JmF6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; }); //# sourceMappingURL=index.js.map /***/ }), /***/ "kVCJ": /*!*********************************************!*\ !*** ./node_modules/d3-shape/src/symbol.js ***! \*********************************************/ /*! exports provided: symbols, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return symbols; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ "GvAG"); /* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ "oKyY"); /* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ "ms7Z"); /* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ "CAOx"); /* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ "1afE"); /* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ "rkAg"); /* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ "xJQu"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ "2K37"); var symbols = [ _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"], _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__["default"], _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__["default"], _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__["default"], _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__["default"], _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__["default"], _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__["default"] ]; /* harmony default export */ __webpack_exports__["default"] = (function(type, size) { var context = null; type = typeof type === "function" ? type : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(type || _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"]); size = typeof size === "function" ? size : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(size === undefined ? 64 : +size); function symbol() { var buffer; if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); type.apply(this, arguments).draw(context, +size.apply(this, arguments)); if (buffer) return context = null, buffer + "" || null; } symbol.type = function(_) { return arguments.length ? (type = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_), symbol) : type; }; symbol.size = function(_) { return arguments.length ? (size = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(+_), symbol) : size; }; symbol.context = function(_) { return arguments.length ? (context = _ == null ? null : _, symbol) : context; }; return symbol; }); /***/ }), /***/ "kagm": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skipLast.js ***! \*******************************************************************/ /*! exports provided: skipLast */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); function skipLast(count) { return (source) => source.lift(new SkipLastOperator(count)); } class SkipLastOperator { constructor(_skipCount) { this._skipCount = _skipCount; if (this._skipCount < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; } } call(subscriber, source) { if (this._skipCount === 0) { return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](subscriber)); } else { return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount)); } } } class SkipLastSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, _skipCount) { super(destination); this._skipCount = _skipCount; this._count = 0; this._ring = new Array(_skipCount); } _next(value) { const skipCount = this._skipCount; const count = this._count++; if (count < skipCount) { this._ring[count] = value; } else { const currentIndex = count % skipCount; const ring = this._ring; const oldValue = ring[currentIndex]; ring[currentIndex] = value; this.destination.next(oldValue); } } } //# sourceMappingURL=skipLast.js.map /***/ }), /***/ "kds9": /*!**************************************************!*\ !*** ./node_modules/d3-format/src/formatTrim.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. /* harmony default export */ __webpack_exports__["default"] = (function(s) { out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { switch (s[i]) { case ".": i0 = i1 = i; break; case "0": if (i0 === 0) i0 = i; i1 = i; break; default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break; } } return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; }); /***/ }), /***/ "kgNN": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/dematerialize.js ***! \************************************************************************/ /*! exports provided: dematerialize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function dematerialize() { return function dematerializeOperatorFunction(source) { return source.lift(new DeMaterializeOperator()); }; } class DeMaterializeOperator { call(subscriber, source) { return source.subscribe(new DeMaterializeSubscriber(subscriber)); } } class DeMaterializeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); } _next(value) { value.observe(this.destination); } } //# sourceMappingURL=dematerialize.js.map /***/ }), /***/ "kgU0": /*!*******************************************!*\ !*** ./node_modules/d3-fetch/src/blob.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseBlob(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); return response.blob(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseBlob); }); /***/ }), /***/ "l5mm": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/interval.js ***! \********************************************************************/ /*! exports provided: interval */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); function interval(period = 0, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) { period = 0; } if (!scheduler || typeof scheduler.schedule !== 'function') { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { subscriber.add(scheduler.schedule(dispatch, period, { subscriber, counter: 0, period })); return subscriber; }); } function dispatch(state) { const { subscriber, counter, period } = state; subscriber.next(counter); this.schedule({ subscriber, counter: counter + 1, period }, period); } //# sourceMappingURL=interval.js.map /***/ }), /***/ "l7GE": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js ***! \****************************************************************/ /*! exports provided: OuterSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); class OuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) { this.destination.next(innerValue); } notifyError(error, innerSub) { this.destination.error(error); } notifyComplete(innerSub) { this.destination.complete(); } } //# sourceMappingURL=OuterSubscriber.js.map /***/ }), /***/ "lExN": /*!**********************************************!*\ !*** ./node_modules/d3-zoom/src/constant.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "lJxs": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/map.js ***! \**************************************************************/ /*! exports provided: map, MapOperator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function map(project, thisArg) { return function mapOperation(source) { if (typeof project !== 'function') { throw new TypeError('argument is not a function. Are you looking for `mapTo()`?'); } return source.lift(new MapOperator(project, thisArg)); }; } class MapOperator { constructor(project, thisArg) { this.project = project; this.thisArg = thisArg; } call(subscriber, source) { return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg)); } } class MapSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, project, thisArg) { super(destination); this.project = project; this.count = 0; this.thisArg = thisArg || this; } _next(value) { let result; try { result = this.project.call(this.thisArg, value, this.count++); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } //# sourceMappingURL=map.js.map /***/ }), /***/ "lgMH": /*!*******************************************!*\ !*** ./node_modules/d3-time/src/month.js ***! \*******************************************/ /*! exports provided: default, months */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "months", function() { return months; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setDate(1); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setMonth(date.getMonth() + step); }, function(start, end) { return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; }, function(date) { return date.getMonth(); }); /* harmony default export */ __webpack_exports__["default"] = (month); var months = month.range; /***/ }), /***/ "lhfN": /*!*******************************************!*\ !*** ./node_modules/d3-zoom/src/event.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ZoomEvent; }); function ZoomEvent(type, { sourceEvent, target, transform, dispatch }) { Object.defineProperties(this, { type: {value: type, enumerable: true, configurable: true}, sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, target: {value: target, enumerable: true, configurable: true}, transform: {value: transform, enumerable: true, configurable: true}, _: {value: dispatch} }); } /***/ }), /***/ "lpKW": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowCount.js ***! \**********************************************************************/ /*! exports provided: windowCount */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "XNiG"); function windowCount(windowSize, startWindowEvery = 0) { return function windowCountOperatorFunction(source) { return source.lift(new WindowCountOperator(windowSize, startWindowEvery)); }; } class WindowCountOperator { constructor(windowSize, startWindowEvery) { this.windowSize = windowSize; this.startWindowEvery = startWindowEvery; } call(subscriber, source) { return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery)); } } class WindowCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, windowSize, startWindowEvery) { super(destination); this.destination = destination; this.windowSize = windowSize; this.startWindowEvery = startWindowEvery; this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]()]; this.count = 0; destination.next(this.windows[0]); } _next(value) { const startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize; const destination = this.destination; const windowSize = this.windowSize; const windows = this.windows; const len = windows.length; for (let i = 0; i < len && !this.closed; i++) { windows[i].next(value); } const c = this.count - windowSize + 1; if (c >= 0 && c % startWindowEvery === 0 && !this.closed) { windows.shift().complete(); } if (++this.count % startWindowEvery === 0 && !this.closed) { const window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"](); windows.push(window); destination.next(window); } } _error(err) { const windows = this.windows; if (windows) { while (windows.length > 0 && !this.closed) { windows.shift().error(err); } } this.destination.error(err); } _complete() { const windows = this.windows; if (windows) { while (windows.length > 0 && !this.closed) { windows.shift().complete(); } } this.destination.complete(); } _unsubscribe() { this.count = 0; this.windows = null; } } //# sourceMappingURL=windowCount.js.map /***/ }), /***/ "luAU": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/node.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { var node = group[i]; if (node) return node; } } return null; }); /***/ }), /***/ "m+hS": /*!*******************************************!*\ !*** ./node_modules/d3-random/src/int.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomInt(source) { function randomInt(min, max) { if (arguments.length < 2) max = min, min = 0; min = Math.floor(min); max = Math.floor(max) - min; return function() { return Math.floor(source() * max + min); }; } randomInt.source = sourceRandomInt; return randomInt; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "m2j4": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/isEmpty.js ***! \******************************************************************/ /*! exports provided: isEmpty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function isEmpty() { return (source) => source.lift(new IsEmptyOperator()); } class IsEmptyOperator { call(observer, source) { return source.subscribe(new IsEmptySubscriber(observer)); } } class IsEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); } notifyComplete(isEmpty) { const destination = this.destination; destination.next(isEmpty); destination.complete(); } _next(value) { this.notifyComplete(false); } _complete() { this.notifyComplete(true); } } //# sourceMappingURL=isEmpty.js.map /***/ }), /***/ "m7tx": /*!*******************************************!*\ !*** ./node_modules/d3-quadtree/src/x.js ***! \*******************************************/ /*! exports provided: defaultX, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultX", function() { return defaultX; }); function defaultX(d) { return d[0]; } /* harmony default export */ __webpack_exports__["default"] = (function(_) { return arguments.length ? (this._x = _, this) : this._x; }); /***/ }), /***/ "mCNh": /*!**********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/pipe.js ***! \**********************************************************/ /*! exports provided: pipe, pipeFromArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; }); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity */ "SpAZ"); function pipe(...fns) { return pipeFromArray(fns); } function pipeFromArray(fns) { if (fns.length === 0) { return _identity__WEBPACK_IMPORTED_MODULE_0__["identity"]; } if (fns.length === 1) { return fns[0]; } return function piped(input) { return fns.reduce((prev, fn) => fn(prev), input); }; } //# sourceMappingURL=pipe.js.map /***/ }), /***/ "mHFb": /*!***************************************************!*\ !*** ./node_modules/d3-format/src/formatGroup.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(grouping, thousands) { return function(value, width) { var i = value.length, t = [], j = 0, g = grouping[0], length = 0; while (i > 0 && g > 0) { if (length + g + 1 > width) g = Math.max(1, width - length); t.push(value.substring(i -= g, i + g)); if ((length += g + 1) > width) break; g = grouping[j = (j + 1) % grouping.length]; } return t.reverse().join(thousands); }; }); /***/ }), /***/ "mJZf": /*!*******************************************!*\ !*** ./node_modules/d3-chord/src/math.js ***! \*******************************************/ /*! exports provided: abs, cos, sin, pi, halfPi, tau, max, epsilon */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); var abs = Math.abs; var cos = Math.cos; var sin = Math.sin; var pi = Math.PI; var halfPi = pi / 2; var tau = pi * 2; var max = Math.max; var epsilon = 1e-12; /***/ }), /***/ "mKzq": /*!**********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/end.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function() { var on0, on1, that = this, id = that._id, size = that.size(); return new Promise(function(resolve, reject) { var cancel = {value: reject}, end = {value: function() { if (--size === 0) resolve(); }}; that.each(function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), on = schedule.on; // If this node shared a dispatch with the previous node, // just assign the updated shared dispatch and we’re done! // Otherwise, copy-on-write. if (on !== on0) { on1 = (on0 = on).copy(); on1._.cancel.push(cancel); on1._.interrupt.push(cancel); on1._.end.push(end); } schedule.on = on1; }); // The selection was empty, resolve end immediately if (size === 0) resolve(); }); }); /***/ }), /***/ "mLZp": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e5f5f999d8c92ca25f", "edf8fbb2e2e266c2a4238b45", "edf8fbb2e2e266c2a42ca25f006d2c", "edf8fbccece699d8c966c2a42ca25f006d2c", "edf8fbccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "mLep": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/path/string.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathString; }); function PathString() { this._string = []; } PathString.prototype = { _radius: 4.5, _circle: circle(4.5), pointRadius: function(_) { if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; return this; }, polygonStart: function() { this._line = 0; }, polygonEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line === 0) this._string.push("Z"); this._point = NaN; }, point: function(x, y) { switch (this._point) { case 0: { this._string.push("M", x, ",", y); this._point = 1; break; } case 1: { this._string.push("L", x, ",", y); break; } default: { if (this._circle == null) this._circle = circle(this._radius); this._string.push("M", x, ",", y, this._circle); break; } } }, result: function() { if (this._string.length) { var result = this._string.join(""); this._string = []; return result; } else { return null; } } }; function circle(radius) { return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z"; } /***/ }), /***/ "mPOO": /*!*****************************************!*\ !*** ./node_modules/d3-geo/src/noop.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return noop; }); function noop() {} /***/ }), /***/ "mcvr": /*!**********************************************!*\ !*** ./node_modules/d3-contour/src/array.js ***! \**********************************************/ /*! exports provided: slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var array = Array.prototype; var slice = array.slice; /***/ }), /***/ "mfBI": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/find.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { let index = -1; for (const node of this) { if (callback.call(that, node, ++index, this)) { return node; } } }); /***/ }), /***/ "mk5/": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/window.js ***! \*****************************************************************/ /*! exports provided: window */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function window(windowBoundaries) { return function windowOperatorFunction(source) { return source.lift(new WindowOperator(windowBoundaries)); }; } class WindowOperator { constructor(windowBoundaries) { this.windowBoundaries = windowBoundaries; } call(subscriber, source) { const windowSubscriber = new WindowSubscriber(subscriber); const sourceSubscription = source.subscribe(windowSubscriber); if (!sourceSubscription.closed) { windowSubscriber.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(this.windowBoundaries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](windowSubscriber))); } return sourceSubscription; } } class WindowSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination) { super(destination); this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); destination.next(this.window); } notifyNext() { this.openWindow(); } notifyError(error) { this._error(error); } notifyComplete() { this._complete(); } _next(value) { this.window.next(value); } _error(err) { this.window.error(err); this.destination.error(err); } _complete() { this.window.complete(); this.destination.complete(); } _unsubscribe() { this.window = null; } openWindow() { const prevWindow = this.window; if (prevWindow) { prevWindow.complete(); } const destination = this.destination; const newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); destination.next(newWindow); } } //# sourceMappingURL=window.js.map /***/ }), /***/ "mlxB": /*!************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isDate.js ***! \************************************************************/ /*! exports provided: isDate */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; }); function isDate(value) { return value instanceof Date && !isNaN(+value); } //# sourceMappingURL=isDate.js.map /***/ }), /***/ "mrS5": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/size.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { let size = 0; for (const node of this) ++size; // eslint-disable-line no-unused-vars return size; }); /***/ }), /***/ "mrVq": /*!******************************************!*\ !*** ./node_modules/d3-array/src/min.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return min; }); function min(values, valueof) { let min; if (valueof === undefined) { for (const value of values) { if (value != null && (min > value || (min === undefined && value >= value))) { min = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (min > value || (min === undefined && value >= value))) { min = value; } } } return min; } /***/ }), /***/ "ms7Z": /*!*****************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/diamond.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var tan30 = Math.sqrt(1 / 3), tan30_2 = tan30 * 2; /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var y = Math.sqrt(size / tan30_2), x = y * tan30; context.moveTo(0, -y); context.lineTo(x, 0); context.lineTo(0, y); context.lineTo(-x, 0); context.closePath(); } }); /***/ }), /***/ "muaG": /*!********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/basisClosed.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "0K5P"); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "jICm"); function BasisClosed(context) { this._context = context; } BasisClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x2, this._y2); this._context.closePath(); break; } case 2: { this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); this._context.closePath(); break; } case 3: { this.point(this._x2, this._y2); this.point(this._x3, this._y3); this.point(this._x4, this._y4); break; } } }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._x2 = x, this._y2 = y; break; case 1: this._point = 2; this._x3 = x, this._y3 = y; break; case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new BasisClosed(context); }); /***/ }), /***/ "mwYI": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/nodes.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return Array.from(this); }); /***/ }), /***/ "n+Lp": /*!*********************************************!*\ !*** ./node_modules/d3-polygon/src/area.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon) { var i = -1, n = polygon.length, a, b = polygon[n - 1], area = 0; while (++i < n) { a = b; b = polygon[i]; area += a[1] * b[0] - a[0] * b[1]; } return area / 2; }); /***/ }), /***/ "n0hd": /*!******************************************!*\ !*** ./node_modules/d3-scale/src/log.js ***! \******************************************/ /*! exports provided: loggish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loggish", function() { return loggish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return log; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "rWgG"); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nice.js */ "bcaG"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function transformLog(x) { return Math.log(x); } function transformExp(x) { return Math.exp(x); } function transformLogn(x) { return -Math.log(-x); } function transformExpn(x) { return -Math.exp(-x); } function pow10(x) { return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; } function powp(base) { return base === 10 ? pow10 : base === Math.E ? Math.exp : function(x) { return Math.pow(base, x); }; } function logp(base) { return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function(x) { return Math.log(x) / base; }); } function reflect(f) { return function(x) { return -f(-x); }; } function loggish(transform) { var scale = transform(transformLog, transformExp), domain = scale.domain, base = 10, logs, pows; function rescale() { logs = logp(base), pows = powp(base); if (domain()[0] < 0) { logs = reflect(logs), pows = reflect(pows); transform(transformLogn, transformExpn); } else { transform(transformLog, transformExp); } return scale; } scale.base = function(_) { return arguments.length ? (base = +_, rescale()) : base; }; scale.domain = function(_) { return arguments.length ? (domain(_), rescale()) : domain(); }; scale.ticks = function(count) { var d = domain(), u = d[0], v = d[d.length - 1], r; if (r = v < u) i = u, u = v, v = i; var i = logs(u), j = logs(v), p, k, t, n = count == null ? 10 : +count, z = []; if (!(base % 1) && j - i < n) { i = Math.floor(i), j = Math.ceil(j); if (u > 0) for (; i <= j; ++i) { for (k = 1, p = pows(i); k < base; ++k) { t = p * k; if (t < u) continue; if (t > v) break; z.push(t); } } else for (; i <= j; ++i) { for (k = base - 1, p = pows(i); k >= 1; --k) { t = p * k; if (t < u) continue; if (t > v) break; z.push(t); } } if (z.length * 2 < n) z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(u, v, n); } else { z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(i, j, Math.min(j - i, n)).map(pows); } return r ? z.reverse() : z; }; scale.tickFormat = function(count, specifier) { if (specifier == null) specifier = base === 10 ? ".0e" : ","; if (typeof specifier !== "function") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); if (count === Infinity) return specifier; if (count == null) count = 10; var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? return function(d) { var i = d / pows(Math.round(logs(d))); if (i * base < base - 0.5) i *= base; return i <= k ? specifier(d) : ""; }; }; scale.nice = function() { return domain(Object(_nice_js__WEBPACK_IMPORTED_MODULE_2__["default"])(domain(), { floor: function(x) { return pows(Math.floor(logs(x))); }, ceil: function(x) { return pows(Math.ceil(logs(x))); } })); }; return scale; } function log() { var scale = loggish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["transformer"])()).domain([1, 10]); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["copy"])(scale, log()).base(scale.base()); }; _init_js__WEBPACK_IMPORTED_MODULE_4__["initRange"].apply(scale, arguments); return scale; } /***/ }), /***/ "n6bG": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isFunction.js ***! \****************************************************************/ /*! exports provided: isFunction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; }); function isFunction(x) { return typeof x === 'function'; } //# sourceMappingURL=isFunction.js.map /***/ }), /***/ "n8A4": /*!******************************************!*\ !*** ./node_modules/d3-geo/src/index.js ***! \******************************************/ /*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "PSPu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds.js */ "fjNz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return _bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./centroid.js */ "p5SD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle.js */ "vNJl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./clip/antimeridian.js */ "9ZWv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./clip/circle.js */ "PQSO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clip/extent.js */ "5/wc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clip/rectangle.js */ "F2eR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contains.js */ "Hd9g"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./distance.js */ "rgrl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return _distance_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _graticule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./graticule.js */ "rdqn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["graticule10"]; }); /* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interpolate.js */ "prbS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return _interpolate_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./length.js */ "zz/+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _path_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./path/index.js */ "vHEj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return _path_index_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./projection/albers.js */ "iQWy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./projection/albersUsa.js */ "aj5g"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./projection/azimuthalEqualArea.js */ "P6wR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["azimuthalEqualAreaRaw"]; }); /* harmony import */ var _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./projection/azimuthalEquidistant.js */ "Cuxv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["azimuthalEquidistantRaw"]; }); /* harmony import */ var _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./projection/conicConformal.js */ "4jfb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["conicConformalRaw"]; }); /* harmony import */ var _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./projection/conicEqualArea.js */ "nVu6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["conicEqualAreaRaw"]; }); /* harmony import */ var _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./projection/conicEquidistant.js */ "yWPb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["conicEquidistantRaw"]; }); /* harmony import */ var _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./projection/equalEarth.js */ "+WWN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["equalEarthRaw"]; }); /* harmony import */ var _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./projection/equirectangular.js */ "VXJj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["equirectangularRaw"]; }); /* harmony import */ var _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./projection/gnomonic.js */ "wKaL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["gnomonicRaw"]; }); /* harmony import */ var _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./projection/identity.js */ "bUA0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _projection_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./projection/index.js */ "1ibS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["projectionMutator"]; }); /* harmony import */ var _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./projection/mercator.js */ "LZ5Q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["mercatorRaw"]; }); /* harmony import */ var _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./projection/naturalEarth1.js */ "8nOX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["naturalEarth1Raw"]; }); /* harmony import */ var _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./projection/orthographic.js */ "LP84"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["orthographicRaw"]; }); /* harmony import */ var _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./projection/stereographic.js */ "aR9J"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["stereographicRaw"]; }); /* harmony import */ var _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./projection/transverseMercator.js */ "Y4Tn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["transverseMercatorRaw"]; }); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./rotation.js */ "cwsO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return _rotation_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stream.js */ "tepu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return _stream_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./transform.js */ "t9E6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); // DEPRECATED! Use d3.geoIdentity().clipExtent(…). /***/ }), /***/ "nVu6": /*!**************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conicEqualArea.js ***! \**************************************************************/ /*! exports provided: conicEqualAreaRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEqualAreaRaw", function() { return conicEqualAreaRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "bN2o"); /* harmony import */ var _cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea.js */ "vAb3"); function conicEqualAreaRaw(y0, y1) { var sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), n = (sy0 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1)) / 2; // Are the parallels symmetrical around the Equator? if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return Object(_cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["cylindricalEqualAreaRaw"])(y0); var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c) / n; function project(x, y) { var r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c - 2 * n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)) / n; return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x *= n), r0 - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x)]; } project.invert = function(x, y) { var r0y = r0 - y, l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(r0y)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(r0y); if (r0y * n < 0) l -= _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(r0y); return [l / n, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))]; }; return project; } /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEqualAreaRaw) .scale(155.424) .center([0, 33.6442]); }); /***/ }), /***/ "nWpo": /*!*******************************************!*\ !*** ./node_modules/d3-fetch/src/json.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseJson(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); if (response.status === 204 || response.status === 205) return; return response.json(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseJson); }); /***/ }), /***/ "nXVj": /*!***********************************************!*\ !*** ./node_modules/d3-force/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "nYR2": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/finalize.js ***! \*******************************************************************/ /*! exports provided: finalize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function finalize(callback) { return (source) => source.lift(new FinallyOperator(callback)); } class FinallyOperator { constructor(callback) { this.callback = callback; } call(subscriber, source) { return source.subscribe(new FinallySubscriber(subscriber, this.callback)); } } class FinallySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, callback) { super(destination); this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](callback)); } } //# sourceMappingURL=finalize.js.map /***/ }), /***/ "ngJS": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js ***! \**********************************************************************/ /*! exports provided: subscribeToArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; }); const subscribeToArray = (array) => (subscriber) => { for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) { subscriber.next(array[i]); } subscriber.complete(); }; //# sourceMappingURL=subscribeToArray.js.map /***/ }), /***/ "njJa": /*!**************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { var node = this, nodes = [node], next = [], children, i, n, index = -1; while (node = nodes.pop()) { next.push(node); if (children = node.children) { for (i = 0, n = children.length; i < n; ++i) { nodes.push(children[i]); } } } while (node = next.pop()) { callback.call(that, node, ++index, this); } return this; }); /***/ }), /***/ "oAyw": /*!*************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/iterator.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function*() { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { if (node = group[i]) yield node; } } }); /***/ }), /***/ "oB13": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/multicast.js ***! \********************************************************************/ /*! exports provided: multicast, MulticastOperator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; }); /* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/ConnectableObservable */ "EQ5u"); function multicast(subjectOrSubjectFactory, selector) { return function multicastOperatorFunction(source) { let subjectFactory; if (typeof subjectOrSubjectFactory === 'function') { subjectFactory = subjectOrSubjectFactory; } else { subjectFactory = function subjectFactory() { return subjectOrSubjectFactory; }; } if (typeof selector === 'function') { return source.lift(new MulticastOperator(subjectFactory, selector)); } const connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]); connectable.source = source; connectable.subjectFactory = subjectFactory; return connectable; }; } class MulticastOperator { constructor(subjectFactory, selector) { this.subjectFactory = subjectFactory; this.selector = selector; } call(subscriber, source) { const { selector } = this; const subject = this.subjectFactory(); const subscription = selector(subject).subscribe(subscriber); subscription.add(source.subscribe(subject)); return subscription; } } //# sourceMappingURL=multicast.js.map /***/ }), /***/ "oKyY": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/cross.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size / 5) / 2; context.moveTo(-3 * r, -r); context.lineTo(-r, -r); context.lineTo(-r, -3 * r); context.lineTo(r, -3 * r); context.lineTo(r, -r); context.lineTo(3 * r, -r); context.lineTo(3 * r, r); context.lineTo(r, r); context.lineTo(r, 3 * r); context.lineTo(-r, 3 * r); context.lineTo(-r, r); context.lineTo(-3 * r, r); context.closePath(); } }); /***/ }), /***/ "oMw+": /*!*****************************************************!*\ !*** ./node_modules/d3-time-format/src/isoParse.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ "v7Le"); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ "TCOF"); function parseIsoNative(string) { var date = new Date(string); return isNaN(date) ? null : date; } var parseIso = +new Date("2000-01-01T00:00:00.000Z") ? parseIsoNative : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__["utcParse"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__["isoSpecifier"]); /* harmony default export */ __webpack_exports__["default"] = (parseIso); /***/ }), /***/ "oUm1": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/order.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { if (node = group[i]) { if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); next = node; } } } return this; }); /***/ }), /***/ "oVo9": /*!******************************************!*\ !*** ./node_modules/d3-time/src/year.js ***! \******************************************/ /*! exports provided: default, years */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "years", function() { return years; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setMonth(0, 1); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setFullYear(date.getFullYear() + step); }, function(start, end) { return end.getFullYear() - start.getFullYear(); }, function(date) { return date.getFullYear(); }); // An optimized implementation for this simple case. year.every = function(k) { return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setFullYear(Math.floor(date.getFullYear() / k) * k); date.setMonth(0, 1); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setFullYear(date.getFullYear() + step * k); }); }; /* harmony default export */ __webpack_exports__["default"] = (year); var years = year.range; /***/ }), /***/ "oZiN": /*!**********************************************!*\ !*** ./node_modules/d3-brush/src/noevent.js ***! \**********************************************/ /*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); function nopropagation(event) { event.stopImmediatePropagation(); } /* harmony default export */ __webpack_exports__["default"] = (function(event) { event.preventDefault(); event.stopImmediatePropagation(); }); /***/ }), /***/ "oetV": /*!******************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/index.js ***! \******************************************************/ /*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ "qWhX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ "h2xr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ "JMsZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ "w5vR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ "qyUX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ "skVX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ "1jur"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ "gbBL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ "C33F"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ "xkTb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ "SxqP"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["scheme"]; }); /* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ "sn8G"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["scheme"]; }); /* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ "VMG8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["scheme"]; }); /* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ "AHz+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["scheme"]; }); /* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ "Yn3m"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["scheme"]; }); /* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ "LSUK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["scheme"]; }); /* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ "w6Z2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["scheme"]; }); /* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ "sore"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["scheme"]; }); /* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ "CKiT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["scheme"]; }); /* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ "mLZp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["scheme"]; }); /* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ "Y3EW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["scheme"]; }); /* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ "8F7Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["scheme"]; }); /* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ "yUst"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["scheme"]; }); /* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ "DHg+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["scheme"]; }); /* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ "uQ0a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["scheme"]; }); /* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ "eW2m"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["scheme"]; }); /* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ "Yij6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["scheme"]; }); /* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ "E//B"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["scheme"]; }); /* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ "2YwT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["scheme"]; }); /* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ "2kEi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["scheme"]; }); /* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ "jTaA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["scheme"]; }); /* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ "h9r8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["scheme"]; }); /* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ "vL4l"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["scheme"]; }); /* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ "qKhr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["scheme"]; }); /* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ "RBWq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["scheme"]; }); /* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ "50A1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["scheme"]; }); /* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ "rO+Z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["scheme"]; }); /* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ "XTjh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ "XfOf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ "X7xT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["warm"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["cool"]; }); /* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ "BvdE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ "wQ3i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ "Spa3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["magma"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["inferno"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["plasma"]; }); /***/ }), /***/ "ofXK": /*!**********************************************************************!*\ !*** ./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js ***! \**********************************************************************/ /*! exports provided: APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, registerLocaleData, ɵBrowserPlatformLocation, ɵDomAdapter, ɵNullViewportScroller, ɵPLATFORM_BROWSER_ID, ɵPLATFORM_SERVER_ID, ɵPLATFORM_WORKER_APP_ID, ɵPLATFORM_WORKER_UI_ID, ɵangular_packages_common_common_a, ɵangular_packages_common_common_b, ɵangular_packages_common_common_c, ɵangular_packages_common_common_d, ɵangular_packages_common_common_e, ɵangular_packages_common_common_f, ɵgetDOM, ɵparseCookieValue, ɵsetRootDomAdapter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_BASE_HREF", function() { return APP_BASE_HREF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncPipe", function() { return AsyncPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonModule", function() { return CommonModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrencyPipe", function() { return CurrencyPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOCUMENT", function() { return DOCUMENT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DatePipe", function() { return DatePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DecimalPipe", function() { return DecimalPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormStyle", function() { return FormStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatWidth", function() { return FormatWidth; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HashLocationStrategy", function() { return HashLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I18nPluralPipe", function() { return I18nPluralPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I18nSelectPipe", function() { return I18nSelectPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonPipe", function() { return JsonPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyValuePipe", function() { return KeyValuePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOCATION_INITIALIZED", function() { return LOCATION_INITIALIZED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationStrategy", function() { return LocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LowerCasePipe", function() { return LowerCasePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgClass", function() { return NgClass; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgComponentOutlet", function() { return NgComponentOutlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgForOf", function() { return NgForOf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgForOfContext", function() { return NgForOfContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgIf", function() { return NgIf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgIfContext", function() { return NgIfContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgLocaleLocalization", function() { return NgLocaleLocalization; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgLocalization", function() { return NgLocalization; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgPlural", function() { return NgPlural; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgPluralCase", function() { return NgPluralCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgStyle", function() { return NgStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitch", function() { return NgSwitch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitchCase", function() { return NgSwitchCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitchDefault", function() { return NgSwitchDefault; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgTemplateOutlet", function() { return NgTemplateOutlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFormatStyle", function() { return NumberFormatStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberSymbol", function() { return NumberSymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathLocationStrategy", function() { return PathLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PercentPipe", function() { return PercentPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformLocation", function() { return PlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Plural", function() { return Plural; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlicePipe", function() { return SlicePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TitleCasePipe", function() { return TitleCasePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TranslationWidth", function() { return TranslationWidth; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UpperCasePipe", function() { return UpperCasePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewportScroller", function() { return ViewportScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WeekDay", function() { return WeekDay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatCurrency", function() { return formatCurrency; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumber", function() { return formatNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPercent", function() { return formatPercent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrencySymbol", function() { return getCurrencySymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencyCode", function() { return getLocaleCurrencyCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencyName", function() { return getLocaleCurrencyName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencySymbol", function() { return getLocaleCurrencySymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDateFormat", function() { return getLocaleDateFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDateTimeFormat", function() { return getLocaleDateTimeFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDayNames", function() { return getLocaleDayNames; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDayPeriods", function() { return getLocaleDayPeriods; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDirection", function() { return getLocaleDirection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleEraNames", function() { return getLocaleEraNames; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriodRules", function() { return getLocaleExtraDayPeriodRules; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriods", function() { return getLocaleExtraDayPeriods; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleFirstDayOfWeek", function() { return getLocaleFirstDayOfWeek; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleId", function() { return getLocaleId; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleMonthNames", function() { return getLocaleMonthNames; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleNumberFormat", function() { return getLocaleNumberFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleNumberSymbol", function() { return getLocaleNumberSymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocalePluralCase", function() { return getLocalePluralCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleTimeFormat", function() { return getLocaleTimeFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleWeekEndRange", function() { return getLocaleWeekEndRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNumberOfCurrencyDigits", function() { return getNumberOfCurrencyDigits; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformBrowser", function() { return isPlatformBrowser; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformServer", function() { return isPlatformServer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformWorkerApp", function() { return isPlatformWorkerApp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformWorkerUi", function() { return isPlatformWorkerUi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerLocaleData", function() { return registerLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserPlatformLocation", function() { return BrowserPlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomAdapter", function() { return DomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNullViewportScroller", function() { return NullViewportScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_BROWSER_ID", function() { return PLATFORM_BROWSER_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_SERVER_ID", function() { return PLATFORM_SERVER_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_APP_ID", function() { return PLATFORM_WORKER_APP_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_UI_ID", function() { return PLATFORM_WORKER_UI_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_a", function() { return useBrowserPlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_b", function() { return createBrowserPlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_c", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_d", function() { return provideLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_e", function() { return COMMON_DIRECTIVES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_f", function() { return COMMON_PIPES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDOM", function() { return getDOM; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵparseCookieValue", function() { return parseCookieValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetRootDomAdapter", function() { return setRootDomAdapter; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _DOM = null; function getDOM() { return _DOM; } function setDOM(adapter) { _DOM = adapter; } function setRootDomAdapter(adapter) { if (!_DOM) { _DOM = adapter; } } /* tslint:disable:requireParameterType */ /** * Provides DOM operations in an environment-agnostic way. * * @security Tread carefully! Interacting with the DOM directly is dangerous and * can introduce XSS risks. */ class DomAdapter { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A DI Token representing the main rendering context. In a browser this is the DOM Document. * * Note: Document might not be available in the Application Context when Application and Rendering * Contexts are not the same (e.g. when running the application in a Web Worker). * * @publicApi */ const DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('DocumentToken'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This class should not be used directly by an application developer. Instead, use * {@link Location}. * * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be * platform-agnostic. * This means that we can have different implementation of `PlatformLocation` for the different * platforms that Angular supports. For example, `@angular/platform-browser` provides an * implementation specific to the browser environment, while `@angular/platform-server` provides * one suitable for use with server-side rendering. * * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy} * when they need to interact with the DOM APIs like pushState, popState, etc. * * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly * by the {@link Router} in order to navigate between routes. Since all interactions between {@link * Router} / * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation` * class, they are all platform-agnostic. * * @publicApi */ class PlatformLocation { } PlatformLocation.ɵfac = function PlatformLocation_Factory(t) { return new (t || PlatformLocation)(); }; PlatformLocation.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: useBrowserPlatformLocation, token: PlatformLocation, providedIn: "platform" }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PlatformLocation, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'platform', // See #23917 useFactory: useBrowserPlatformLocation }] }], null, null); })(); function useBrowserPlatformLocation() { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(BrowserPlatformLocation); } /** * @description * Indicates when a location is initialized. * * @publicApi */ const LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('Location Initialized'); /** * `PlatformLocation` encapsulates all of the direct calls to platform APIs. * This class should not be used directly by an application developer. Instead, use * {@link Location}. */ class BrowserPlatformLocation extends PlatformLocation { constructor(_doc) { super(); this._doc = _doc; this._init(); } // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it /** @internal */ _init() { this.location = getDOM().getLocation(); this._history = getDOM().getHistory(); } getBaseHrefFromDOM() { return getDOM().getBaseHref(this._doc); } onPopState(fn) { getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false); } onHashChange(fn) { getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false); } get href() { return this.location.href; } get protocol() { return this.location.protocol; } get hostname() { return this.location.hostname; } get port() { return this.location.port; } get pathname() { return this.location.pathname; } get search() { return this.location.search; } get hash() { return this.location.hash; } set pathname(newPath) { this.location.pathname = newPath; } pushState(state, title, url) { if (supportsState()) { this._history.pushState(state, title, url); } else { this.location.hash = url; } } replaceState(state, title, url) { if (supportsState()) { this._history.replaceState(state, title, url); } else { this.location.hash = url; } } forward() { this._history.forward(); } back() { this._history.back(); } getState() { return this._history.state; } } BrowserPlatformLocation.ɵfac = function BrowserPlatformLocation_Factory(t) { return new (t || BrowserPlatformLocation)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](DOCUMENT)); }; BrowserPlatformLocation.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: createBrowserPlatformLocation, token: BrowserPlatformLocation, providedIn: "platform" }); BrowserPlatformLocation.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [DOCUMENT,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserPlatformLocation, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'platform', // See #23917 useFactory: createBrowserPlatformLocation }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [DOCUMENT] }] }]; }, null); })(); function supportsState() { return !!window.history.pushState; } function createBrowserPlatformLocation() { return new BrowserPlatformLocation(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Joins two parts of a URL with a slash if needed. * * @param start URL string * @param end URL string * * * @returns The joined URL string. */ function joinWithSlash(start, end) { if (start.length == 0) { return end; } if (end.length == 0) { return start; } let slashes = 0; if (start.endsWith('/')) { slashes++; } if (end.startsWith('/')) { slashes++; } if (slashes == 2) { return start + end.substring(1); } if (slashes == 1) { return start + end; } return start + '/' + end; } /** * Removes a trailing slash from a URL string if needed. * Looks for the first occurrence of either `#`, `?`, or the end of the * line as `/` characters and removes the trailing slash if one exists. * * @param url URL string. * * @returns The URL string, modified if needed. */ function stripTrailingSlash(url) { const match = url.match(/#|\?|$/); const pathEndIdx = match && match.index || url.length; const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0); return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx); } /** * Normalizes URL parameters by prepending with `?` if needed. * * @param params String of URL parameters. * * @returns The normalized URL parameters string. */ function normalizeQueryParams(params) { return params && params[0] !== '?' ? '?' + params : params; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Enables the `Location` service to read route state from the browser's URL. * Angular provides two strategies: * `HashLocationStrategy` and `PathLocationStrategy`. * * Applications should use the `Router` or `Location` services to * interact with application route state. * * For instance, `HashLocationStrategy` produces URLs like * <code class="no-auto-link">http://example.com#/foo</code>, * and `PathLocationStrategy` produces * <code class="no-auto-link">http://example.com/foo</code> as an equivalent URL. * * See these two classes for more. * * @publicApi */ class LocationStrategy { } LocationStrategy.ɵfac = function LocationStrategy_Factory(t) { return new (t || LocationStrategy)(); }; LocationStrategy.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: provideLocationStrategy, token: LocationStrategy, providedIn: "root" }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LocationStrategy, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root', useFactory: provideLocationStrategy }] }], null, null); })(); function provideLocationStrategy(platformLocation) { // See #23917 const location = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT).location; return new PathLocationStrategy(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(PlatformLocation), location && location.origin || ''); } /** * A predefined [DI token](guide/glossary#di-token) for the base href * to be used with the `PathLocationStrategy`. * The base href is the URL prefix that should be preserved when generating * and recognizing URLs. * * @usageNotes * * The following example shows how to use this token to configure the root app injector * with a base href value, so that the DI framework can supply the dependency anywhere in the app. * * ```typescript * import {Component, NgModule} from '@angular/core'; * import {APP_BASE_HREF} from '@angular/common'; * * @NgModule({ * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}] * }) * class AppModule {} * ``` * * @publicApi */ const APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('appBaseHref'); /** * @description * A {@link LocationStrategy} used to configure the {@link Location} service to * represent its state in the * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the * browser's URL. * * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF} * or add a `<base href>` element to the document. * * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call * `location.go('/foo')`, the browser's URL will become * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly, * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`. * * Similarly, if you add `<base href='/my/app/'/>` to the document and call * `location.go('/foo')`, the browser's URL will become * `example.com/my/app/foo`. * * Note that when using `PathLocationStrategy`, neither the query nor * the fragment in the `<base href>` will be preserved, as outlined * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2). * * @usageNotes * * ### Example * * {@example common/location/ts/path_location_component.ts region='LocationComponent'} * * @publicApi */ class PathLocationStrategy extends LocationStrategy { constructor(_platformLocation, href) { super(); this._platformLocation = _platformLocation; if (href == null) { href = this._platformLocation.getBaseHrefFromDOM(); } if (href == null) { throw new Error(`No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.`); } this._baseHref = href; } onPopState(fn) { this._platformLocation.onPopState(fn); this._platformLocation.onHashChange(fn); } getBaseHref() { return this._baseHref; } prepareExternalUrl(internal) { return joinWithSlash(this._baseHref, internal); } path(includeHash = false) { const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search); const hash = this._platformLocation.hash; return hash && includeHash ? `${pathname}${hash}` : pathname; } pushState(state, title, url, queryParams) { const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams)); this._platformLocation.pushState(state, title, externalUrl); } replaceState(state, title, url, queryParams) { const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams)); this._platformLocation.replaceState(state, title, externalUrl); } forward() { this._platformLocation.forward(); } back() { this._platformLocation.back(); } } PathLocationStrategy.ɵfac = function PathLocationStrategy_Factory(t) { return new (t || PathLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8)); }; PathLocationStrategy.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: PathLocationStrategy, factory: PathLocationStrategy.ɵfac }); PathLocationStrategy.ctorParameters = () => [ { type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PathLocationStrategy, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * A {@link LocationStrategy} used to configure the {@link Location} service to * represent its state in the * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) * of the browser's URL. * * For instance, if you call `location.go('/foo')`, the browser's URL will become * `example.com#/foo`. * * @usageNotes * * ### Example * * {@example common/location/ts/hash_location_component.ts region='LocationComponent'} * * @publicApi */ class HashLocationStrategy extends LocationStrategy { constructor(_platformLocation, _baseHref) { super(); this._platformLocation = _platformLocation; this._baseHref = ''; if (_baseHref != null) { this._baseHref = _baseHref; } } onPopState(fn) { this._platformLocation.onPopState(fn); this._platformLocation.onHashChange(fn); } getBaseHref() { return this._baseHref; } path(includeHash = false) { // the hash value is always prefixed with a `#` // and if it is empty then it will stay empty let path = this._platformLocation.hash; if (path == null) path = '#'; return path.length > 0 ? path.substring(1) : path; } prepareExternalUrl(internal) { const url = joinWithSlash(this._baseHref, internal); return url.length > 0 ? ('#' + url) : url; } pushState(state, title, path, queryParams) { let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)); if (url.length == 0) { url = this._platformLocation.pathname; } this._platformLocation.pushState(state, title, url); } replaceState(state, title, path, queryParams) { let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)); if (url.length == 0) { url = this._platformLocation.pathname; } this._platformLocation.replaceState(state, title, url); } forward() { this._platformLocation.forward(); } back() { this._platformLocation.back(); } } HashLocationStrategy.ɵfac = function HashLocationStrategy_Factory(t) { return new (t || HashLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8)); }; HashLocationStrategy.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HashLocationStrategy, factory: HashLocationStrategy.ɵfac }); HashLocationStrategy.ctorParameters = () => [ { type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HashLocationStrategy, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * A service that applications can use to interact with a browser's URL. * * Depending on the `LocationStrategy` used, `Location` persists * to the URL's path or the URL's hash segment. * * @usageNotes * * It's better to use the `Router#navigate` service to trigger route changes. Use * `Location` only if you need to interact with or create normalized URLs outside of * routing. * * `Location` is responsible for normalizing the URL against the application's base href. * A normalized URL is absolute from the URL host, includes the application's base href, and has no * trailing slash: * - `/my/app/user/123` is normalized * - `my/app/user/123` **is not** normalized * - `/my/app/user/123/` **is not** normalized * * ### Example * * <code-example path='common/location/ts/path_location_component.ts' * region='LocationComponent'></code-example> * * @publicApi */ class Location { constructor(platformStrategy, platformLocation) { /** @internal */ this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](); /** @internal */ this._urlChangeListeners = []; this._platformStrategy = platformStrategy; const browserBaseHref = this._platformStrategy.getBaseHref(); this._platformLocation = platformLocation; this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref)); this._platformStrategy.onPopState((ev) => { this._subject.emit({ 'url': this.path(true), 'pop': true, 'state': ev.state, 'type': ev.type, }); }); } /** * Normalizes the URL path for this location. * * @param includeHash True to include an anchor fragment in the path. * * @returns The normalized URL path. */ // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is // removed. path(includeHash = false) { return this.normalize(this._platformStrategy.path(includeHash)); } /** * Reports the current state of the location history. * @returns The current value of the `history.state` object. */ getState() { return this._platformLocation.getState(); } /** * Normalizes the given path and compares to the current normalized path. * * @param path The given URL path. * @param query Query parameters. * * @returns True if the given URL path is equal to the current normalized path, false * otherwise. */ isCurrentPathEqualTo(path, query = '') { return this.path() == this.normalize(path + normalizeQueryParams(query)); } /** * Normalizes a URL path by stripping any trailing slashes. * * @param url String representing a URL. * * @returns The normalized URL string. */ normalize(url) { return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url))); } /** * Normalizes an external URL path. * If the given URL doesn't begin with a leading slash (`'/'`), adds one * before normalizing. Adds a hash if `HashLocationStrategy` is * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use. * * @param url String representing a URL. * * @returns A normalized platform-specific URL. */ prepareExternalUrl(url) { if (url && url[0] !== '/') { url = '/' + url; } return this._platformStrategy.prepareExternalUrl(url); } // TODO: rename this method to pushState /** * Changes the browser's URL to a normalized version of a given URL, and pushes a * new item onto the platform's history. * * @param path URL path to normalize. * @param query Query parameters. * @param state Location history state. * */ go(path, query = '', state = null) { this._platformStrategy.pushState(state, '', path, query); this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state); } /** * Changes the browser's URL to a normalized version of the given URL, and replaces * the top item on the platform's history stack. * * @param path URL path to normalize. * @param query Query parameters. * @param state Location history state. */ replaceState(path, query = '', state = null) { this._platformStrategy.replaceState(state, '', path, query); this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state); } /** * Navigates forward in the platform's history. */ forward() { this._platformStrategy.forward(); } /** * Navigates back in the platform's history. */ back() { this._platformStrategy.back(); } /** * Registers a URL change listener. Use to catch updates performed by the Angular * framework that are not detectible through "popstate" or "hashchange" events. * * @param fn The change handler function, which take a URL and a location history state. */ onUrlChange(fn) { this._urlChangeListeners.push(fn); if (!this._urlChangeSubscription) { this._urlChangeSubscription = this.subscribe(v => { this._notifyUrlChangeListeners(v.url, v.state); }); } } /** @internal */ _notifyUrlChangeListeners(url = '', state) { this._urlChangeListeners.forEach(fn => fn(url, state)); } /** * Subscribes to the platform's `popState` events. * * @param value Event that is triggered when the state history changes. * @param exception The exception to throw. * * @returns Subscribed events. */ subscribe(onNext, onThrow, onReturn) { return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn }); } } Location.ɵfac = function Location_Factory(t) { return new (t || Location)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LocationStrategy), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation)); }; /** * Normalizes URL parameters by prepending with `?` if needed. * * @param params String of URL parameters. * * @returns The normalized URL parameters string. */ Location.normalizeQueryParams = normalizeQueryParams; /** * Joins two parts of a URL with a slash if needed. * * @param start URL string * @param end URL string * * * @returns The joined URL string. */ Location.joinWithSlash = joinWithSlash; /** * Removes a trailing slash from a URL string if needed. * Looks for the first occurrence of either `#`, `?`, or the end of the * line as `/` characters and removes the trailing slash if one exists. * * @param url URL string. * * @returns The URL string, modified if needed. */ Location.stripTrailingSlash = stripTrailingSlash; Location.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: createLocation, token: Location, providedIn: "root" }); Location.ctorParameters = () => [ { type: LocationStrategy }, { type: PlatformLocation } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](Location, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root', // See #23917 useFactory: createLocation }] }], function () { return [{ type: LocationStrategy }, { type: PlatformLocation }]; }, null); })(); function createLocation() { return new Location(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(LocationStrategy), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(PlatformLocation)); } function _stripBaseHref(baseHref, url) { return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url; } function _stripIndexHtml(url) { return url.replace(/\/index.html$/, ''); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** @internal */ const CURRENCIES_EN = { 'ADP': [undefined, undefined, 0], 'AFN': [undefined, undefined, 0], 'ALL': [undefined, undefined, 0], 'AMD': [undefined, undefined, 2], 'AOA': [undefined, 'Kz'], 'ARS': [undefined, '$'], 'AUD': ['A$', '$'], 'BAM': [undefined, 'KM'], 'BBD': [undefined, '$'], 'BDT': [undefined, '৳'], 'BHD': [undefined, undefined, 3], 'BIF': [undefined, undefined, 0], 'BMD': [undefined, '$'], 'BND': [undefined, '$'], 'BOB': [undefined, 'Bs'], 'BRL': ['R$'], 'BSD': [undefined, '$'], 'BWP': [undefined, 'P'], 'BYN': [undefined, 'р.', 2], 'BYR': [undefined, undefined, 0], 'BZD': [undefined, '$'], 'CAD': ['CA$', '$', 2], 'CHF': [undefined, undefined, 2], 'CLF': [undefined, undefined, 4], 'CLP': [undefined, '$', 0], 'CNY': ['CN¥', '¥'], 'COP': [undefined, '$', 2], 'CRC': [undefined, '₡', 2], 'CUC': [undefined, '$'], 'CUP': [undefined, '$'], 'CZK': [undefined, 'Kč', 2], 'DJF': [undefined, undefined, 0], 'DKK': [undefined, 'kr', 2], 'DOP': [undefined, '$'], 'EGP': [undefined, 'E£'], 'ESP': [undefined, '₧', 0], 'EUR': ['€'], 'FJD': [undefined, '$'], 'FKP': [undefined, '£'], 'GBP': ['£'], 'GEL': [undefined, '₾'], 'GIP': [undefined, '£'], 'GNF': [undefined, 'FG', 0], 'GTQ': [undefined, 'Q'], 'GYD': [undefined, '$', 2], 'HKD': ['HK$', '$'], 'HNL': [undefined, 'L'], 'HRK': [undefined, 'kn'], 'HUF': [undefined, 'Ft', 2], 'IDR': [undefined, 'Rp', 2], 'ILS': ['₪'], 'INR': ['₹'], 'IQD': [undefined, undefined, 0], 'IRR': [undefined, undefined, 0], 'ISK': [undefined, 'kr', 0], 'ITL': [undefined, undefined, 0], 'JMD': [undefined, '$'], 'JOD': [undefined, undefined, 3], 'JPY': ['¥', undefined, 0], 'KHR': [undefined, '៛'], 'KMF': [undefined, 'CF', 0], 'KPW': [undefined, '₩', 0], 'KRW': ['₩', undefined, 0], 'KWD': [undefined, undefined, 3], 'KYD': [undefined, '$'], 'KZT': [undefined, '₸'], 'LAK': [undefined, '₭', 0], 'LBP': [undefined, 'L£', 0], 'LKR': [undefined, 'Rs'], 'LRD': [undefined, '$'], 'LTL': [undefined, 'Lt'], 'LUF': [undefined, undefined, 0], 'LVL': [undefined, 'Ls'], 'LYD': [undefined, undefined, 3], 'MGA': [undefined, 'Ar', 0], 'MGF': [undefined, undefined, 0], 'MMK': [undefined, 'K', 0], 'MNT': [undefined, '₮', 2], 'MRO': [undefined, undefined, 0], 'MUR': [undefined, 'Rs', 2], 'MXN': ['MX$', '$'], 'MYR': [undefined, 'RM'], 'NAD': [undefined, '$'], 'NGN': [undefined, '₦'], 'NIO': [undefined, 'C$'], 'NOK': [undefined, 'kr', 2], 'NPR': [undefined, 'Rs'], 'NZD': ['NZ$', '$'], 'OMR': [undefined, undefined, 3], 'PHP': [undefined, '₱'], 'PKR': [undefined, 'Rs', 2], 'PLN': [undefined, 'zł'], 'PYG': [undefined, '₲', 0], 'RON': [undefined, 'lei'], 'RSD': [undefined, undefined, 0], 'RUB': [undefined, '₽'], 'RUR': [undefined, 'р.'], 'RWF': [undefined, 'RF', 0], 'SBD': [undefined, '$'], 'SEK': [undefined, 'kr', 2], 'SGD': [undefined, '$'], 'SHP': [undefined, '£'], 'SLL': [undefined, undefined, 0], 'SOS': [undefined, undefined, 0], 'SRD': [undefined, '$'], 'SSP': [undefined, '£'], 'STD': [undefined, undefined, 0], 'STN': [undefined, 'Db'], 'SYP': [undefined, '£', 0], 'THB': [undefined, '฿'], 'TMM': [undefined, undefined, 0], 'TND': [undefined, undefined, 3], 'TOP': [undefined, 'T$'], 'TRL': [undefined, undefined, 0], 'TRY': [undefined, '₺'], 'TTD': [undefined, '$'], 'TWD': ['NT$', '$', 2], 'TZS': [undefined, undefined, 2], 'UAH': [undefined, '₴'], 'UGX': [undefined, undefined, 0], 'USD': ['$'], 'UYI': [undefined, undefined, 0], 'UYU': [undefined, '$'], 'UYW': [undefined, undefined, 4], 'UZS': [undefined, undefined, 2], 'VEF': [undefined, 'Bs', 2], 'VND': ['₫', undefined, 0], 'VUV': [undefined, undefined, 0], 'XAF': ['FCFA', undefined, 0], 'XCD': ['EC$', '$'], 'XOF': ['CFA', undefined, 0], 'XPF': ['CFPF', undefined, 0], 'XXX': ['¤'], 'YER': [undefined, undefined, 0], 'ZAR': [undefined, 'R'], 'ZMK': [undefined, undefined, 0], 'ZMW': [undefined, 'ZK'], 'ZWD': [undefined, undefined, 0] }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Format styles that can be used to represent numbers. * @see `getLocaleNumberFormat()`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var NumberFormatStyle; (function (NumberFormatStyle) { NumberFormatStyle[NumberFormatStyle["Decimal"] = 0] = "Decimal"; NumberFormatStyle[NumberFormatStyle["Percent"] = 1] = "Percent"; NumberFormatStyle[NumberFormatStyle["Currency"] = 2] = "Currency"; NumberFormatStyle[NumberFormatStyle["Scientific"] = 3] = "Scientific"; })(NumberFormatStyle || (NumberFormatStyle = {})); /** * Plurality cases used for translating plurals to different languages. * * @see `NgPlural` * @see `NgPluralCase` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var Plural; (function (Plural) { Plural[Plural["Zero"] = 0] = "Zero"; Plural[Plural["One"] = 1] = "One"; Plural[Plural["Two"] = 2] = "Two"; Plural[Plural["Few"] = 3] = "Few"; Plural[Plural["Many"] = 4] = "Many"; Plural[Plural["Other"] = 5] = "Other"; })(Plural || (Plural = {})); /** * Context-dependant translation forms for strings. * Typically the standalone version is for the nominative form of the word, * and the format version is used for the genitive case. * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles) * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var FormStyle; (function (FormStyle) { FormStyle[FormStyle["Format"] = 0] = "Format"; FormStyle[FormStyle["Standalone"] = 1] = "Standalone"; })(FormStyle || (FormStyle = {})); /** * String widths available for translations. * The specific character widths are locale-specific. * Examples are given for the word "Sunday" in English. * * @publicApi */ var TranslationWidth; (function (TranslationWidth) { /** 1 character for `en-US`. For example: 'S' */ TranslationWidth[TranslationWidth["Narrow"] = 0] = "Narrow"; /** 3 characters for `en-US`. For example: 'Sun' */ TranslationWidth[TranslationWidth["Abbreviated"] = 1] = "Abbreviated"; /** Full length for `en-US`. For example: "Sunday" */ TranslationWidth[TranslationWidth["Wide"] = 2] = "Wide"; /** 2 characters for `en-US`, For example: "Su" */ TranslationWidth[TranslationWidth["Short"] = 3] = "Short"; })(TranslationWidth || (TranslationWidth = {})); /** * String widths available for date-time formats. * The specific character widths are locale-specific. * Examples are given for `en-US`. * * @see `getLocaleDateFormat()` * @see `getLocaleTimeFormat()`` * @see `getLocaleDateTimeFormat()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * @publicApi */ var FormatWidth; (function (FormatWidth) { /** * For `en-US`, 'M/d/yy, h:mm a'` * (Example: `6/15/15, 9:03 AM`) */ FormatWidth[FormatWidth["Short"] = 0] = "Short"; /** * For `en-US`, `'MMM d, y, h:mm:ss a'` * (Example: `Jun 15, 2015, 9:03:01 AM`) */ FormatWidth[FormatWidth["Medium"] = 1] = "Medium"; /** * For `en-US`, `'MMMM d, y, h:mm:ss a z'` * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`) */ FormatWidth[FormatWidth["Long"] = 2] = "Long"; /** * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'` * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`) */ FormatWidth[FormatWidth["Full"] = 3] = "Full"; })(FormatWidth || (FormatWidth = {})); /** * Symbols that can be used to replace placeholders in number patterns. * Examples are based on `en-US` values. * * @see `getLocaleNumberSymbol()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var NumberSymbol; (function (NumberSymbol) { /** * Decimal separator. * For `en-US`, the dot character. * Example: 2,345`.`67 */ NumberSymbol[NumberSymbol["Decimal"] = 0] = "Decimal"; /** * Grouping separator, typically for thousands. * For `en-US`, the comma character. * Example: 2`,`345.67 */ NumberSymbol[NumberSymbol["Group"] = 1] = "Group"; /** * List-item separator. * Example: "one, two, and three" */ NumberSymbol[NumberSymbol["List"] = 2] = "List"; /** * Sign for percentage (out of 100). * Example: 23.4% */ NumberSymbol[NumberSymbol["PercentSign"] = 3] = "PercentSign"; /** * Sign for positive numbers. * Example: +23 */ NumberSymbol[NumberSymbol["PlusSign"] = 4] = "PlusSign"; /** * Sign for negative numbers. * Example: -23 */ NumberSymbol[NumberSymbol["MinusSign"] = 5] = "MinusSign"; /** * Computer notation for exponential value (n times a power of 10). * Example: 1.2E3 */ NumberSymbol[NumberSymbol["Exponential"] = 6] = "Exponential"; /** * Human-readable format of exponential. * Example: 1.2x103 */ NumberSymbol[NumberSymbol["SuperscriptingExponent"] = 7] = "SuperscriptingExponent"; /** * Sign for permille (out of 1000). * Example: 23.4‰ */ NumberSymbol[NumberSymbol["PerMille"] = 8] = "PerMille"; /** * Infinity, can be used with plus and minus. * Example: ∞, +∞, -∞ */ NumberSymbol[NumberSymbol["Infinity"] = 9] = "Infinity"; /** * Not a number. * Example: NaN */ NumberSymbol[NumberSymbol["NaN"] = 10] = "NaN"; /** * Symbol used between time units. * Example: 10:52 */ NumberSymbol[NumberSymbol["TimeSeparator"] = 11] = "TimeSeparator"; /** * Decimal separator for currency values (fallback to `Decimal`). * Example: $2,345.67 */ NumberSymbol[NumberSymbol["CurrencyDecimal"] = 12] = "CurrencyDecimal"; /** * Group separator for currency values (fallback to `Group`). * Example: $2,345.67 */ NumberSymbol[NumberSymbol["CurrencyGroup"] = 13] = "CurrencyGroup"; })(NumberSymbol || (NumberSymbol = {})); /** * The value for each day of the week, based on the `en-US` locale * * @publicApi */ var WeekDay; (function (WeekDay) { WeekDay[WeekDay["Sunday"] = 0] = "Sunday"; WeekDay[WeekDay["Monday"] = 1] = "Monday"; WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday"; WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday"; WeekDay[WeekDay["Thursday"] = 4] = "Thursday"; WeekDay[WeekDay["Friday"] = 5] = "Friday"; WeekDay[WeekDay["Saturday"] = 6] = "Saturday"; })(WeekDay || (WeekDay = {})); /** * Retrieves the locale ID from the currently loaded locale. * The loaded locale could be, for example, a global one rather than a regional one. * @param locale A locale code, such as `fr-FR`. * @returns The locale code. For example, `fr`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleId(locale) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale)[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId]; } /** * Retrieves day period strings for the given locale. * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDayPeriods(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const amPmData = [ data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsStandalone] ]; const amPm = getLastDefinedValue(amPmData, formStyle); return getLastDefinedValue(amPm, width); } /** * Retrieves days of the week for the given locale, using the Gregorian calendar. * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns An array of localized name strings. * For example,`[Sunday, Monday, ... Saturday]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDayNames(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const daysData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysStandalone]]; const days = getLastDefinedValue(daysData, formStyle); return getLastDefinedValue(days, width); } /** * Retrieves months of the year for the given locale, using the Gregorian calendar. * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns An array of localized name strings. * For example, `[January, February, ...]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleMonthNames(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const monthsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsStandalone]]; const months = getLastDefinedValue(monthsData, formStyle); return getLastDefinedValue(months, width); } /** * Retrieves Gregorian-calendar eras for the given locale. * @param locale A locale code for the locale format rules to use. * @param width The required character width. * @returns An array of localized era strings. * For example, `[AD, BC]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleEraNames(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const erasData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Eras]; return getLastDefinedValue(erasData, width); } /** * Retrieves the first day of the week for the given locale. * * @param locale A locale code for the locale format rules to use. * @returns A day index number, using the 0-based week-day index for `en-US` * (Sunday = 0, Monday = 1, ...). * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleFirstDayOfWeek(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].FirstDayOfWeek]; } /** * Range of week days that are considered the week-end for the given locale. * * @param locale A locale code for the locale format rules to use. * @returns The range of day values, `[startDay, endDay]`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleWeekEndRange(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].WeekendRange]; } /** * Retrieves a localized date-value formating string. * * @param locale A locale code for the locale format rules to use. * @param width The format type. * @returns The localized formating string. * @see `FormatWidth` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDateFormat(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateFormat], width); } /** * Retrieves a localized time-value formatting string. * * @param locale A locale code for the locale format rules to use. * @param width The format type. * @returns The localized formatting string. * @see `FormatWidth` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * @publicApi */ function getLocaleTimeFormat(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].TimeFormat], width); } /** * Retrieves a localized date-time formatting string. * * @param locale A locale code for the locale format rules to use. * @param width The format type. * @returns The localized formatting string. * @see `FormatWidth` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDateTimeFormat(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const dateTimeFormatData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateTimeFormat]; return getLastDefinedValue(dateTimeFormatData, width); } /** * Retrieves a localized number symbol that can be used to replace placeholders in number formats. * @param locale The locale code. * @param symbol The symbol to localize. * @returns The character for the localized symbol. * @see `NumberSymbol` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleNumberSymbol(locale, symbol) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const res = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][symbol]; if (typeof res === 'undefined') { if (symbol === NumberSymbol.CurrencyDecimal) { return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Decimal]; } else if (symbol === NumberSymbol.CurrencyGroup) { return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Group]; } } return res; } /** * Retrieves a number format for a given locale. * * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00` * when used to format the number 12345.678 could result in "12'345,678". That would happen if the * grouping separator for your language is an apostrophe, and the decimal separator is a comma. * * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders * that stand for the decimal separator, and so on, and are NOT real characters. * You must NOT "translate" the placeholders. For example, don't change `.` to `,` even though in * your language the decimal point is written with a comma. The symbols should be replaced by the * local equivalents, using the appropriate `NumberSymbol` for your language. * * Here are the special characters used in number patterns: * * | Symbol | Meaning | * |--------|---------| * | . | Replaced automatically by the character used for the decimal point. | * | , | Replaced by the "grouping" (thousands) separator. | * | 0 | Replaced by a digit (or zero if there aren't enough digits). | * | # | Replaced by a digit (or nothing if there aren't enough). | * | ¤ | Replaced by a currency symbol, such as $ or USD. | * | % | Marks a percent format. The % symbol may change position, but must be retained. | * | E | Marks a scientific format. The E symbol may change position, but must be retained. | * | ' | Special characters used as literal characters are quoted with ASCII single quotes. | * * @param locale A locale code for the locale format rules to use. * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.) * @returns The localized format string. * @see `NumberFormatStyle` * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns) * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleNumberFormat(locale, type) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberFormats][type]; } /** * Retrieves the symbol used to represent the currency for the main country * corresponding to a given locale. For example, '$' for `en-US`. * * @param locale A locale code for the locale format rules to use. * @returns The localized symbol character, * or `null` if the main country cannot be determined. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleCurrencySymbol(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencySymbol] || null; } /** * Retrieves the name of the currency for the main country corresponding * to a given locale. For example, 'US Dollar' for `en-US`. * @param locale A locale code for the locale format rules to use. * @returns The currency name, * or `null` if the main country cannot be determined. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleCurrencyName(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencyName] || null; } /** * Retrieves the default currency code for the given locale. * * The default is defined as the first currency which is still in use. * * @param locale The code of the locale whose currency code we want. * @returns The code of the default currency for the given locale. * * @publicApi */ function getLocaleCurrencyCode(locale) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocaleCurrencyCode"])(locale); } /** * Retrieves the currency values for a given locale. * @param locale A locale code for the locale format rules to use. * @returns The currency values. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function getLocaleCurrencies(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Currencies]; } /** * @alias core/ɵgetLocalePluralCase * @publicApi */ const getLocalePluralCase = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocalePluralCase"]; function checkFullData(data) { if (!data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData]) { throw new Error(`Missing extra locale data for the locale "${data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"] .LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`); } } /** * Retrieves locale-specific rules used to determine which day period to use * when more than one period is defined for a locale. * * There is a rule for each defined day period. The * first rule is applied to the first day period and so on. * Fall back to AM/PM when no rules are available. * * A rule can specify a period as time range, or as a single time value. * * This functionality is only available when you have loaded the full locale data. * See the ["I18n guide"](guide/i18n#i18n-pipes). * * @param locale A locale code for the locale format rules to use. * @returns The rules for the locale, a single time value or array of *from-time, to-time*, * or null if no periods are available. * * @see `getLocaleExtraDayPeriods()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleExtraDayPeriodRules(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); checkFullData(data); const rules = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][2 /* ExtraDayPeriodsRules */] || []; return rules.map((rule) => { if (typeof rule === 'string') { return extractTime(rule); } return [extractTime(rule[0]), extractTime(rule[1])]; }); } /** * Retrieves locale-specific day periods, which indicate roughly how a day is broken up * in different languages. * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight. * * This functionality is only available when you have loaded the full locale data. * See the ["I18n guide"](guide/i18n#i18n-pipes). * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns The translated day-period strings. * @see `getLocaleExtraDayPeriodRules()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleExtraDayPeriods(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); checkFullData(data); const dayPeriodsData = [ data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][0 /* ExtraDayPeriodFormats */], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][1 /* ExtraDayPeriodStandalone */] ]; const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || []; return getLastDefinedValue(dayPeriods, width) || []; } /** * Retrieves the writing direction of a specified locale * @param locale A locale code for the locale format rules to use. * @publicApi * @returns 'rtl' or 'ltr' * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function getLocaleDirection(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Directionality]; } /** * Retrieves the first value that is defined in an array, going backwards from an index position. * * To avoid repeating the same data (as when the "format" and "standalone" forms are the same) * add the first value to the locale data arrays, and add other values only if they are different. * * @param data The data array to retrieve from. * @param index A 0-based index into the array to start from. * @returns The value immediately before the given index position. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLastDefinedValue(data, index) { for (let i = index; i > -1; i--) { if (typeof data[i] !== 'undefined') { return data[i]; } } throw new Error('Locale data API: locale data undefined'); } /** * Extracts the hours and minutes from a string like "15:45" */ function extractTime(time) { const [h, m] = time.split(':'); return { hours: +h, minutes: +m }; } /** * Retrieves the currency symbol for a given currency code. * * For example, for the default `en-US` locale, the code `USD` can * be represented by the narrow symbol `$` or the wide symbol `US$`. * * @param code The currency code. * @param format The format, `wide` or `narrow`. * @param locale A locale code for the locale format rules to use. * * @returns The symbol, or the currency code if no symbol is available. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getCurrencySymbol(code, format, locale = 'en') { const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || []; const symbolNarrow = currency[1 /* SymbolNarrow */]; if (format === 'narrow' && typeof symbolNarrow === 'string') { return symbolNarrow; } return currency[0 /* Symbol */] || code; } // Most currencies have cents, that's why the default is 2 const DEFAULT_NB_OF_CURRENCY_DIGITS = 2; /** * Reports the number of decimal digits for a given currency. * The value depends upon the presence of cents in that particular currency. * * @param code The currency code. * @returns The number of decimal digits, typically 0 or 2. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getNumberOfCurrencyDigits(code) { let digits; const currency = CURRENCIES_EN[code]; if (currency) { digits = currency[2 /* NbOfDigits */]; } return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ISO8601_DATE_REGEX = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; // 1 2 3 4 5 6 7 8 9 10 11 const NAMED_FORMATS = {}; const DATE_FORMATS_SPLIT = /((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/; var ZoneWidth; (function (ZoneWidth) { ZoneWidth[ZoneWidth["Short"] = 0] = "Short"; ZoneWidth[ZoneWidth["ShortGMT"] = 1] = "ShortGMT"; ZoneWidth[ZoneWidth["Long"] = 2] = "Long"; ZoneWidth[ZoneWidth["Extended"] = 3] = "Extended"; })(ZoneWidth || (ZoneWidth = {})); var DateType; (function (DateType) { DateType[DateType["FullYear"] = 0] = "FullYear"; DateType[DateType["Month"] = 1] = "Month"; DateType[DateType["Date"] = 2] = "Date"; DateType[DateType["Hours"] = 3] = "Hours"; DateType[DateType["Minutes"] = 4] = "Minutes"; DateType[DateType["Seconds"] = 5] = "Seconds"; DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds"; DateType[DateType["Day"] = 7] = "Day"; })(DateType || (DateType = {})); var TranslationType; (function (TranslationType) { TranslationType[TranslationType["DayPeriods"] = 0] = "DayPeriods"; TranslationType[TranslationType["Days"] = 1] = "Days"; TranslationType[TranslationType["Months"] = 2] = "Months"; TranslationType[TranslationType["Eras"] = 3] = "Eras"; })(TranslationType || (TranslationType = {})); /** * @ngModule CommonModule * @description * * Formats a date according to locale rules. * * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch) * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime). * @param format The date-time components to include. See `DatePipe` for details. * @param locale A locale code for the locale format rules to use. * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`), * or a standard UTC/GMT or continental US time zone abbreviation. * If not specified, uses host system settings. * * @returns The formatted date string. * * @see `DatePipe` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function formatDate(value, format, locale, timezone) { let date = toDate(value); const namedFormat = getNamedFormat(locale, format); format = namedFormat || format; let parts = []; let match; while (format) { match = DATE_FORMATS_SPLIT.exec(format); if (match) { parts = parts.concat(match.slice(1)); const part = parts.pop(); if (!part) { break; } format = part; } else { parts.push(format); break; } } let dateTimezoneOffset = date.getTimezoneOffset(); if (timezone) { dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); date = convertTimezoneToLocal(date, timezone, true); } let text = ''; parts.forEach(value => { const dateFormatter = getDateFormatter(value); text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\''); }); return text; } /** * Create a new Date object with the given date value, and the time set to midnight. * * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999. * See: https://github.com/angular/angular/issues/40377 * * Note that this function returns a Date object whose time is midnight in the current locale's * timezone. In the future we might want to change this to be midnight in UTC, but this would be a * considerable breaking change. */ function createDate(year, month, date) { // The `newDate` is set to midnight (UTC) on January 1st 1970. // - In PST this will be December 31st 1969 at 4pm. // - In GMT this will be January 1st 1970 at 1am. // Note that they even have different years, dates and months! const newDate = new Date(0); // `setFullYear()` allows years like 0001 to be set correctly. This function does not // change the internal time of the date. // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019). // - In PST this will now be September 20, 2019 at 4pm // - In GMT this will now be September 20, 2019 at 1am newDate.setFullYear(year, month, date); // We want the final date to be at local midnight, so we reset the time. // - In PST this will now be September 20, 2019 at 12am // - In GMT this will now be September 20, 2019 at 12am newDate.setHours(0, 0, 0); return newDate; } function getNamedFormat(locale, format) { const localeId = getLocaleId(locale); NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {}; if (NAMED_FORMATS[localeId][format]) { return NAMED_FORMATS[localeId][format]; } let formatValue = ''; switch (format) { case 'shortDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Short); break; case 'mediumDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Medium); break; case 'longDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Long); break; case 'fullDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Full); break; case 'shortTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Short); break; case 'mediumTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium); break; case 'longTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Long); break; case 'fullTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Full); break; case 'short': const shortTime = getNamedFormat(locale, 'shortTime'); const shortDate = getNamedFormat(locale, 'shortDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]); break; case 'medium': const mediumTime = getNamedFormat(locale, 'mediumTime'); const mediumDate = getNamedFormat(locale, 'mediumDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]); break; case 'long': const longTime = getNamedFormat(locale, 'longTime'); const longDate = getNamedFormat(locale, 'longDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]); break; case 'full': const fullTime = getNamedFormat(locale, 'fullTime'); const fullDate = getNamedFormat(locale, 'fullDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]); break; } if (formatValue) { NAMED_FORMATS[localeId][format] = formatValue; } return formatValue; } function formatDateTime(str, opt_values) { if (opt_values) { str = str.replace(/\{([^}]+)}/g, function (match, key) { return (opt_values != null && key in opt_values) ? opt_values[key] : match; }); } return str; } function padNumber(num, digits, minusSign = '-', trim, negWrap) { let neg = ''; if (num < 0 || (negWrap && num <= 0)) { if (negWrap) { num = -num + 1; } else { num = -num; neg = minusSign; } } let strNum = String(num); while (strNum.length < digits) { strNum = '0' + strNum; } if (trim) { strNum = strNum.substr(strNum.length - digits); } return neg + strNum; } function formatFractionalSeconds(milliseconds, digits) { const strMs = padNumber(milliseconds, 3); return strMs.substr(0, digits); } /** * Returns a date formatter that transforms a date into its locale digit representation */ function dateGetter(name, size, offset = 0, trim = false, negWrap = false) { return function (date, locale) { let part = getDatePart(name, date); if (offset > 0 || part > -offset) { part += offset; } if (name === DateType.Hours) { if (part === 0 && offset === -12) { part = 12; } } else if (name === DateType.FractionalSeconds) { return formatFractionalSeconds(part, size); } const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign); return padNumber(part, size, localeMinus, trim, negWrap); }; } function getDatePart(part, date) { switch (part) { case DateType.FullYear: return date.getFullYear(); case DateType.Month: return date.getMonth(); case DateType.Date: return date.getDate(); case DateType.Hours: return date.getHours(); case DateType.Minutes: return date.getMinutes(); case DateType.Seconds: return date.getSeconds(); case DateType.FractionalSeconds: return date.getMilliseconds(); case DateType.Day: return date.getDay(); default: throw new Error(`Unknown DateType value "${part}".`); } } /** * Returns a date formatter that transforms a date into its locale string representation */ function dateStrGetter(name, width, form = FormStyle.Format, extended = false) { return function (date, locale) { return getDateTranslation(date, locale, name, width, form, extended); }; } /** * Returns the locale translation of a date for a given form, type and width */ function getDateTranslation(date, locale, name, width, form, extended) { switch (name) { case TranslationType.Months: return getLocaleMonthNames(locale, form, width)[date.getMonth()]; case TranslationType.Days: return getLocaleDayNames(locale, form, width)[date.getDay()]; case TranslationType.DayPeriods: const currentHours = date.getHours(); const currentMinutes = date.getMinutes(); if (extended) { const rules = getLocaleExtraDayPeriodRules(locale); const dayPeriods = getLocaleExtraDayPeriods(locale, form, width); const index = rules.findIndex(rule => { if (Array.isArray(rule)) { // morning, afternoon, evening, night const [from, to] = rule; const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes; const beforeTo = (currentHours < to.hours || (currentHours === to.hours && currentMinutes < to.minutes)); // We must account for normal rules that span a period during the day (e.g. 6am-9am) // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g. // 10pm - 5am) where `from` is greater (later!) than `to`. // // In the first case the current time must be BOTH after `from` AND before `to` // (e.g. 8am is after 6am AND before 10am). // // In the second case the current time must be EITHER after `from` OR before `to` // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is // after 10pm). if (from.hours < to.hours) { if (afterFrom && beforeTo) { return true; } } else if (afterFrom || beforeTo) { return true; } } else { // noon or midnight if (rule.hours === currentHours && rule.minutes === currentMinutes) { return true; } } return false; }); if (index !== -1) { return dayPeriods[index]; } } // if no rules for the day periods, we use am/pm by default return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1]; case TranslationType.Eras: return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1]; default: // This default case is not needed by TypeScript compiler, as the switch is exhaustive. // However Closure Compiler does not understand that and reports an error in typed mode. // The `throw new Error` below works around the problem, and the unexpected: never variable // makes sure tsc still checks this code is unreachable. const unexpected = name; throw new Error(`unexpected translation type ${unexpected}`); } } /** * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30, * extended = +04:30) */ function timeZoneGetter(width) { return function (date, locale, offset) { const zone = -1 * offset; const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign); const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60); switch (width) { case ZoneWidth.Short: return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + padNumber(Math.abs(zone % 60), 2, minusSign); case ZoneWidth.ShortGMT: return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign); case ZoneWidth.Long: return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign); case ZoneWidth.Extended: if (offset === 0) { return 'Z'; } else { return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign); } default: throw new Error(`Unknown zone width "${width}"`); } }; } const JANUARY = 0; const THURSDAY = 4; function getFirstThursdayOfYear(year) { const firstDayOfYear = createDate(year, JANUARY, 1).getDay(); return createDate(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear); } function getThursdayThisWeek(datetime) { return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay())); } function weekGetter(size, monthBased = false) { return function (date, locale) { let result; if (monthBased) { const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1; const today = date.getDate(); result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7); } else { const thisThurs = getThursdayThisWeek(date); // Some days of a year are part of next year according to ISO 8601. // Compute the firstThurs from the year of this week's Thursday const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear()); const diff = thisThurs.getTime() - firstThurs.getTime(); result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week } return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); }; } /** * Returns a date formatter that provides the week-numbering year for the input date. */ function weekNumberingYearGetter(size, trim = false) { return function (date, locale) { const thisThurs = getThursdayThisWeek(date); const weekNumberingYear = thisThurs.getFullYear(); return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim); }; } const DATE_FORMATS = {}; // Based on CLDR formats: // See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table // See also explanations: http://cldr.unicode.org/translation/date-time // TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x function getDateFormatter(format) { if (DATE_FORMATS[format]) { return DATE_FORMATS[format]; } let formatter; switch (format) { // Era name (AD/BC) case 'G': case 'GG': case 'GGG': formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated); break; case 'GGGG': formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide); break; case 'GGGGG': formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow); break; // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199) case 'y': formatter = dateGetter(DateType.FullYear, 1, 0, false, true); break; // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10) case 'yy': formatter = dateGetter(DateType.FullYear, 2, 0, true, true); break; // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10) case 'yyy': formatter = dateGetter(DateType.FullYear, 3, 0, false, true); break; // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010) case 'yyyy': formatter = dateGetter(DateType.FullYear, 4, 0, false, true); break; // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199) case 'Y': formatter = weekNumberingYearGetter(1); break; // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD // 2010 => 10) case 'YY': formatter = weekNumberingYearGetter(2, true); break; // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD // 2010 => 2010) case 'YYY': formatter = weekNumberingYearGetter(3); break; // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010) case 'YYYY': formatter = weekNumberingYearGetter(4); break; // Month of the year (1-12), numeric case 'M': case 'L': formatter = dateGetter(DateType.Month, 1, 1); break; case 'MM': case 'LL': formatter = dateGetter(DateType.Month, 2, 1); break; // Month of the year (January, ...), string, format case 'MMM': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated); break; case 'MMMM': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide); break; case 'MMMMM': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow); break; // Month of the year (January, ...), string, standalone case 'LLL': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone); break; case 'LLLL': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone); break; case 'LLLLL': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone); break; // Week of the year (1, ... 52) case 'w': formatter = weekGetter(1); break; case 'ww': formatter = weekGetter(2); break; // Week of the month (1, ...) case 'W': formatter = weekGetter(1, true); break; // Day of the month (1-31) case 'd': formatter = dateGetter(DateType.Date, 1); break; case 'dd': formatter = dateGetter(DateType.Date, 2); break; // Day of the Week case 'E': case 'EE': case 'EEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated); break; case 'EEEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide); break; case 'EEEEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow); break; case 'EEEEEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short); break; // Generic period of the day (am-pm) case 'a': case 'aa': case 'aaa': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated); break; case 'aaaa': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide); break; case 'aaaaa': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow); break; // Extended period of the day (midnight, at night, ...), standalone case 'b': case 'bb': case 'bbb': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true); break; case 'bbbb': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true); break; case 'bbbbb': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true); break; // Extended period of the day (midnight, night, ...), standalone case 'B': case 'BB': case 'BBB': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true); break; case 'BBBB': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true); break; case 'BBBBB': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true); break; // Hour in AM/PM, (1-12) case 'h': formatter = dateGetter(DateType.Hours, 1, -12); break; case 'hh': formatter = dateGetter(DateType.Hours, 2, -12); break; // Hour of the day (0-23) case 'H': formatter = dateGetter(DateType.Hours, 1); break; // Hour in day, padded (00-23) case 'HH': formatter = dateGetter(DateType.Hours, 2); break; // Minute of the hour (0-59) case 'm': formatter = dateGetter(DateType.Minutes, 1); break; case 'mm': formatter = dateGetter(DateType.Minutes, 2); break; // Second of the minute (0-59) case 's': formatter = dateGetter(DateType.Seconds, 1); break; case 'ss': formatter = dateGetter(DateType.Seconds, 2); break; // Fractional second case 'S': formatter = dateGetter(DateType.FractionalSeconds, 1); break; case 'SS': formatter = dateGetter(DateType.FractionalSeconds, 2); break; case 'SSS': formatter = dateGetter(DateType.FractionalSeconds, 3); break; // Timezone ISO8601 short format (-0430) case 'Z': case 'ZZ': case 'ZZZ': formatter = timeZoneGetter(ZoneWidth.Short); break; // Timezone ISO8601 extended format (-04:30) case 'ZZZZZ': formatter = timeZoneGetter(ZoneWidth.Extended); break; // Timezone GMT short format (GMT+4) case 'O': case 'OO': case 'OOO': // Should be location, but fallback to format O instead because we don't have the data yet case 'z': case 'zz': case 'zzz': formatter = timeZoneGetter(ZoneWidth.ShortGMT); break; // Timezone GMT long format (GMT+0430) case 'OOOO': case 'ZZZZ': // Should be location, but fallback to format O instead because we don't have the data yet case 'zzzz': formatter = timeZoneGetter(ZoneWidth.Long); break; default: return null; } DATE_FORMATS[format] = formatter; return formatter; } function timezoneToOffset(timezone, fallback) { // Support: IE 11 only, Edge 13-15+ // IE/Edge do not "understand" colon (`:`) in timezone timezone = timezone.replace(/:/g, ''); const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; } function addDateMinutes(date, minutes) { date = new Date(date.getTime()); date.setMinutes(date.getMinutes() + minutes); return date; } function convertTimezoneToLocal(date, timezone, reverse) { const reverseValue = reverse ? -1 : 1; const dateTimezoneOffset = date.getTimezoneOffset(); const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset)); } /** * Converts a value to date. * * Supported input formats: * - `Date` * - number: timestamp * - string: numeric (e.g. "1234"), ISO and date strings in a format supported by * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). * Note: ISO strings without time return a date without timeoffset. * * Throws if unable to convert to a date. */ function toDate(value) { if (isDate(value)) { return value; } if (typeof value === 'number' && !isNaN(value)) { return new Date(value); } if (typeof value === 'string') { value = value.trim(); if (/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(value)) { /* For ISO Strings without time the day, month and year must be extracted from the ISO String before Date creation to avoid time offset and errors in the new Date. If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new date, some browsers (e.g. IE 9) will throw an invalid Date error. If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the timeoffset is applied. Note: ISO months are 0 for January, 1 for February, ... */ const [y, m = 1, d = 1] = value.split('-').map((val) => +val); return createDate(y, m - 1, d); } const parsedNb = parseFloat(value); // any string that only contains numbers, like "1234" but not like "1234hello" if (!isNaN(value - parsedNb)) { return new Date(parsedNb); } let match; if (match = value.match(ISO8601_DATE_REGEX)) { return isoStringToDate(match); } } const date = new Date(value); if (!isDate(date)) { throw new Error(`Unable to convert "${value}" into a date`); } return date; } /** * Converts a date in ISO8601 to a Date. * Used instead of `Date.parse` because of browser discrepancies. */ function isoStringToDate(match) { const date = new Date(0); let tzHour = 0; let tzMin = 0; // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100" const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear; const timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like "+01:00" or "+0100" if (match[9]) { tzHour = Number(match[9] + match[10]); tzMin = Number(match[9] + match[11]); } dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3])); const h = Number(match[4] || 0) - tzHour; const m = Number(match[5] || 0) - tzMin; const s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11) // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms` // becomes `999ms`. const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000); timeSetter.call(date, h, m, s, ms); return date; } function isDate(value) { return value instanceof Date && !isNaN(value.valueOf()); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/; const MAX_DIGITS = 22; const DECIMAL_SEP = '.'; const ZERO_CHAR = '0'; const PATTERN_SEP = ';'; const GROUP_SEP = ','; const DIGIT_CHAR = '#'; const CURRENCY_CHAR = '¤'; const PERCENT_CHAR = '%'; /** * Transforms a number to a locale string based on a style and a format. */ function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) { let formattedText = ''; let isZero = false; if (!isFinite(value)) { formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity); } else { let parsedNumber = parseNumber(value); if (isPercent) { parsedNumber = toPercent(parsedNumber); } let minInt = pattern.minInt; let minFraction = pattern.minFrac; let maxFraction = pattern.maxFrac; if (digitsInfo) { const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP); if (parts === null) { throw new Error(`${digitsInfo} is not a valid digit info`); } const minIntPart = parts[1]; const minFractionPart = parts[3]; const maxFractionPart = parts[5]; if (minIntPart != null) { minInt = parseIntAutoRadix(minIntPart); } if (minFractionPart != null) { minFraction = parseIntAutoRadix(minFractionPart); } if (maxFractionPart != null) { maxFraction = parseIntAutoRadix(maxFractionPart); } else if (minFractionPart != null && minFraction > maxFraction) { maxFraction = minFraction; } } roundNumber(parsedNumber, minFraction, maxFraction); let digits = parsedNumber.digits; let integerLen = parsedNumber.integerLen; const exponent = parsedNumber.exponent; let decimals = []; isZero = digits.every(d => !d); // pad zeros for small numbers for (; integerLen < minInt; integerLen++) { digits.unshift(0); } // pad zeros for small numbers for (; integerLen < 0; integerLen++) { digits.unshift(0); } // extract decimals digits if (integerLen > 0) { decimals = digits.splice(integerLen, digits.length); } else { decimals = digits; digits = [0]; } // format the integer digits with grouping separators const groups = []; if (digits.length >= pattern.lgSize) { groups.unshift(digits.splice(-pattern.lgSize, digits.length).join('')); } while (digits.length > pattern.gSize) { groups.unshift(digits.splice(-pattern.gSize, digits.length).join('')); } if (digits.length) { groups.unshift(digits.join('')); } formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol)); // append the decimal digits if (decimals.length) { formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join(''); } if (exponent) { formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent; } } if (value < 0 && !isZero) { formattedText = pattern.negPre + formattedText + pattern.negSuf; } else { formattedText = pattern.posPre + formattedText + pattern.posSuf; } return formattedText; } /** * @ngModule CommonModule * @description * * Formats a number as currency using locale rules. * * @param value The number to format. * @param locale A locale code for the locale format rules to use. * @param currency A string containing the currency symbol or its name, * such as "$" or "Canadian Dollar". Used in output string, but does not affect the operation * of the function. * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) * currency code, such as `USD` for the US dollar and `EUR` for the euro. * Used to determine the number of digits in the decimal part. * @param digitsInfo Decimal representation options, specified by a string in the following format: * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. * * @returns The formatted currency value. * * @see `formatNumber()` * @see `DecimalPipe` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) { const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency); const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); pattern.minFrac = getNumberOfCurrencyDigits(currencyCode); pattern.maxFrac = pattern.minFrac; const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo); return res .replace(CURRENCY_CHAR, currency) // if we have 2 time the currency character, the second one is ignored .replace(CURRENCY_CHAR, '') // If there is a spacing between currency character and the value and // the currency character is supressed by passing an empty string, the // spacing character would remain as part of the string. Then we // should remove it. .trim(); } /** * @ngModule CommonModule * @description * * Formats a number as a percentage according to locale rules. * * @param value The number to format. * @param locale A locale code for the locale format rules to use. * @param digitsInfo Decimal representation options, specified by a string in the following format: * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. * * @returns The formatted percentage value. * * @see `formatNumber()` * @see `DecimalPipe` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * @publicApi * */ function formatPercent(value, locale, digitsInfo) { const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent); const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true); return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign)); } /** * @ngModule CommonModule * @description * * Formats a number as text, with group sizing, separator, and other * parameters based on the locale. * * @param value The number to format. * @param locale A locale code for the locale format rules to use. * @param digitsInfo Decimal representation options, specified by a string in the following format: * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. * * @returns The formatted text string. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function formatNumber(value, locale, digitsInfo) { const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal); const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo); } function parseNumberFormat(format, minusSign = '-') { const p = { minInt: 1, minFrac: 0, maxFrac: 0, posPre: '', posSuf: '', negPre: '', negSuf: '', gSize: 0, lgSize: 0 }; const patternParts = format.split(PATTERN_SEP); const positive = patternParts[0]; const negative = patternParts[1]; const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ? positive.split(DECIMAL_SEP) : [ positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1), positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1) ], integer = positiveParts[0], fraction = positiveParts[1] || ''; p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR)); for (let i = 0; i < fraction.length; i++) { const ch = fraction.charAt(i); if (ch === ZERO_CHAR) { p.minFrac = p.maxFrac = i + 1; } else if (ch === DIGIT_CHAR) { p.maxFrac = i + 1; } else { p.posSuf += ch; } } const groups = integer.split(GROUP_SEP); p.gSize = groups[1] ? groups[1].length : 0; p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0; if (negative) { const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR); p.negPre = negative.substr(0, pos).replace(/'/g, ''); p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, ''); } else { p.negPre = minusSign + p.posPre; p.negSuf = p.posSuf; } return p; } // Transforms a parsed number into a percentage by multiplying it by 100 function toPercent(parsedNumber) { // if the number is 0, don't do anything if (parsedNumber.digits[0] === 0) { return parsedNumber; } // Getting the current number of decimals const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen; if (parsedNumber.exponent) { parsedNumber.exponent += 2; } else { if (fractionLen === 0) { parsedNumber.digits.push(0, 0); } else if (fractionLen === 1) { parsedNumber.digits.push(0); } parsedNumber.integerLen += 2; } return parsedNumber; } /** * Parses a number. * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/ */ function parseNumber(num) { let numStr = Math.abs(num) + ''; let exponent = 0, digits, integerLen; let i, j, zeros; // Decimal point? if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) { numStr = numStr.replace(DECIMAL_SEP, ''); } // Exponential form? if ((i = numStr.search(/e/i)) > 0) { // Work out the exponent. if (integerLen < 0) integerLen = i; integerLen += +numStr.slice(i + 1); numStr = numStr.substring(0, i); } else if (integerLen < 0) { // There was no decimal point or exponent so it is an integer. integerLen = numStr.length; } // Count the number of leading zeros. for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */ } if (i === (zeros = numStr.length)) { // The digits are all zero. digits = [0]; integerLen = 1; } else { // Count the number of trailing zeros zeros--; while (numStr.charAt(zeros) === ZERO_CHAR) zeros--; // Trailing zeros are insignificant so ignore them integerLen -= i; digits = []; // Convert string to array of digits without leading/trailing zeros. for (j = 0; i <= zeros; i++, j++) { digits[j] = Number(numStr.charAt(i)); } } // If the number overflows the maximum allowed digits then use an exponent. if (integerLen > MAX_DIGITS) { digits = digits.splice(0, MAX_DIGITS - 1); exponent = integerLen - 1; integerLen = 1; } return { digits, exponent, integerLen }; } /** * Round the parsed number to the specified number of decimal places * This function changes the parsedNumber in-place */ function roundNumber(parsedNumber, minFrac, maxFrac) { if (minFrac > maxFrac) { throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`); } let digits = parsedNumber.digits; let fractionLen = digits.length - parsedNumber.integerLen; const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac); // The index of the digit to where rounding is to occur let roundAt = fractionSize + parsedNumber.integerLen; let digit = digits[roundAt]; if (roundAt > 0) { // Drop fractional digits beyond `roundAt` digits.splice(Math.max(parsedNumber.integerLen, roundAt)); // Set non-fractional digits beyond `roundAt` to 0 for (let j = roundAt; j < digits.length; j++) { digits[j] = 0; } } else { // We rounded to zero so reset the parsedNumber fractionLen = Math.max(0, fractionLen); parsedNumber.integerLen = 1; digits.length = Math.max(1, roundAt = fractionSize + 1); digits[0] = 0; for (let i = 1; i < roundAt; i++) digits[i] = 0; } if (digit >= 5) { if (roundAt - 1 < 0) { for (let k = 0; k > roundAt; k--) { digits.unshift(0); parsedNumber.integerLen++; } digits.unshift(1); parsedNumber.integerLen++; } else { digits[roundAt - 1]++; } } // Pad out with zeros to get the required fraction length for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0); let dropTrailingZeros = fractionSize !== 0; // Minimal length = nb of decimals required + current nb of integers // Any number besides that is optional and can be removed if it's a trailing 0 const minLen = minFrac + parsedNumber.integerLen; // Do any carrying, e.g. a digit was rounded up to 10 const carry = digits.reduceRight(function (carry, d, i, digits) { d = d + carry; digits[i] = d < 10 ? d : d - 10; // d % 10 if (dropTrailingZeros) { // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52) if (digits[i] === 0 && i >= minLen) { digits.pop(); } else { dropTrailingZeros = false; } } return d >= 10 ? 1 : 0; // Math.floor(d / 10); }, 0); if (carry) { digits.unshift(carry); parsedNumber.integerLen++; } } function parseIntAutoRadix(text) { const result = parseInt(text); if (isNaN(result)) { throw new Error('Invalid integer literal when parsing ' + text); } return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ class NgLocalization { } /** * Returns the plural category for a given value. * - "=value" when the case exists, * - the plural category otherwise */ function getPluralCategory(value, cases, ngLocalization, locale) { let key = `=${value}`; if (cases.indexOf(key) > -1) { return key; } key = ngLocalization.getPluralCategory(value, locale); if (cases.indexOf(key) > -1) { return key; } if (cases.indexOf('other') > -1) { return 'other'; } throw new Error(`No plural message found for value "${value}"`); } /** * Returns the plural case based on the locale * * @publicApi */ class NgLocaleLocalization extends NgLocalization { constructor(locale) { super(); this.locale = locale; } getPluralCategory(value, locale) { const plural = getLocalePluralCase(locale || this.locale)(value); switch (plural) { case Plural.Zero: return 'zero'; case Plural.One: return 'one'; case Plural.Two: return 'two'; case Plural.Few: return 'few'; case Plural.Many: return 'many'; default: return 'other'; } } } NgLocaleLocalization.ɵfac = function NgLocaleLocalization_Factory(t) { return new (t || NgLocaleLocalization)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; NgLocaleLocalization.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: NgLocaleLocalization, factory: NgLocaleLocalization.ɵfac }); NgLocaleLocalization.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLocaleLocalization, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Register global data to be used internally by Angular. See the * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data. * * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1 * * @publicApi */ function registerLocaleData(data, localeId, extraData) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵregisterLocaleData"])(data, localeId, extraData); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function parseCookieValue(cookieStr, name) { name = encodeURIComponent(name); for (const cookie of cookieStr.split(';')) { const eqIndex = cookie.indexOf('='); const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)]; if (cookieName.trim() === name) { return decodeURIComponent(cookieValue); } } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @usageNotes * ``` * <some-element [ngClass]="'first second'">...</some-element> * * <some-element [ngClass]="['first', 'second']">...</some-element> * * <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element> * * <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element> * * <some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element> * ``` * * @description * * Adds and removes CSS classes on an HTML element. * * The CSS classes are updated as follows, depending on the type of the expression evaluation: * - `string` - the CSS classes listed in the string (space delimited) are added, * - `Array` - the CSS classes declared as Array elements are added, * - `Object` - keys are CSS classes that get added when the expression given in the value * evaluates to a truthy value, otherwise they are removed. * * @publicApi */ class NgClass { constructor(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) { this._iterableDiffers = _iterableDiffers; this._keyValueDiffers = _keyValueDiffers; this._ngEl = _ngEl; this._renderer = _renderer; this._iterableDiffer = null; this._keyValueDiffer = null; this._initialClasses = []; this._rawClass = null; } set klass(value) { this._removeClasses(this._initialClasses); this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : []; this._applyClasses(this._initialClasses); this._applyClasses(this._rawClass); } set ngClass(value) { this._removeClasses(this._rawClass); this._applyClasses(this._initialClasses); this._iterableDiffer = null; this._keyValueDiffer = null; this._rawClass = typeof value === 'string' ? value.split(/\s+/) : value; if (this._rawClass) { if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisListLikeIterable"])(this._rawClass)) { this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create(); } else { this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create(); } } } ngDoCheck() { if (this._iterableDiffer) { const iterableChanges = this._iterableDiffer.diff(this._rawClass); if (iterableChanges) { this._applyIterableChanges(iterableChanges); } } else if (this._keyValueDiffer) { const keyValueChanges = this._keyValueDiffer.diff(this._rawClass); if (keyValueChanges) { this._applyKeyValueChanges(keyValueChanges); } } } _applyKeyValueChanges(changes) { changes.forEachAddedItem((record) => this._toggleClass(record.key, record.currentValue)); changes.forEachChangedItem((record) => this._toggleClass(record.key, record.currentValue)); changes.forEachRemovedItem((record) => { if (record.previousValue) { this._toggleClass(record.key, false); } }); } _applyIterableChanges(changes) { changes.forEachAddedItem((record) => { if (typeof record.item === 'string') { this._toggleClass(record.item, true); } else { throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(record.item)}`); } }); changes.forEachRemovedItem((record) => this._toggleClass(record.item, false)); } /** * Applies a collection of CSS classes to the DOM element. * * For argument of type Set and Array CSS class names contained in those collections are always * added. * For argument of type Map CSS class name in the map's key is toggled based on the value (added * for truthy and removed for falsy). */ _applyClasses(rawClassVal) { if (rawClassVal) { if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) { rawClassVal.forEach((klass) => this._toggleClass(klass, true)); } else { Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass])); } } } /** * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup * purposes. */ _removeClasses(rawClassVal) { if (rawClassVal) { if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) { rawClassVal.forEach((klass) => this._toggleClass(klass, false)); } else { Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false)); } } } _toggleClass(klass, enabled) { klass = klass.trim(); if (klass) { klass.split(/\s+/g).forEach(klass => { if (enabled) { this._renderer.addClass(this._ngEl.nativeElement, klass); } else { this._renderer.removeClass(this._ngEl.nativeElement, klass); } }); } } } NgClass.ɵfac = function NgClass_Factory(t) { return new (t || NgClass)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"])); }; NgClass.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgClass, selectors: [["", "ngClass", ""]], inputs: { klass: ["class", "klass"], ngClass: "ngClass" } }); NgClass.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] } ]; NgClass.propDecorators = { klass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['class',] }], ngClass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngClass',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgClass, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngClass]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] }]; }, { klass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['class'] }], ngClass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngClass'] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Instantiates a single {@link Component} type and inserts its Host View into current View. * `NgComponentOutlet` provides a declarative approach for dynamic component creation. * * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and * any existing component will get destroyed. * * @usageNotes * * ### Fine tune control * * You can control the component creation process by using the following optional attributes: * * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for * the Component. Defaults to the injector of the current view container. * * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content * section of the component, if exists. * * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other * module, then load a component from that module. * * ### Syntax * * Simple * ``` * <ng-container *ngComponentOutlet="componentTypeExpression"></ng-container> * ``` * * Customized injector/content * ``` * <ng-container *ngComponentOutlet="componentTypeExpression; * injector: injectorExpression; * content: contentNodesExpression;"> * </ng-container> * ``` * * Customized ngModuleFactory * ``` * <ng-container *ngComponentOutlet="componentTypeExpression; * ngModuleFactory: moduleFactory;"> * </ng-container> * ``` * * ### A simple example * * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'} * * A more complete example with additional options: * * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'} * * @publicApi * @ngModule CommonModule */ class NgComponentOutlet { constructor(_viewContainerRef) { this._viewContainerRef = _viewContainerRef; this._componentRef = null; this._moduleRef = null; } ngOnChanges(changes) { this._viewContainerRef.clear(); this._componentRef = null; if (this.ngComponentOutlet) { const elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector; if (changes['ngComponentOutletNgModuleFactory']) { if (this._moduleRef) this._moduleRef.destroy(); if (this.ngComponentOutletNgModuleFactory) { const parentModule = elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModuleRef"]); this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector); } else { this._moduleRef = null; } } const componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver : elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"]); const componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet); this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent); } } ngOnDestroy() { if (this._moduleRef) this._moduleRef.destroy(); } } NgComponentOutlet.ɵfac = function NgComponentOutlet_Factory(t) { return new (t || NgComponentOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"])); }; NgComponentOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgComponentOutlet, selectors: [["", "ngComponentOutlet", ""]], inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] }); NgComponentOutlet.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] } ]; NgComponentOutlet.propDecorators = { ngComponentOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletInjector: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletContent: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletNgModuleFactory: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgComponentOutlet, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngComponentOutlet]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }]; }, { ngComponentOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletInjector: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletContent: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletNgModuleFactory: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ class NgForOfContext { constructor($implicit, ngForOf, index, count) { this.$implicit = $implicit; this.ngForOf = ngForOf; this.index = index; this.count = count; } get first() { return this.index === 0; } get last() { return this.index === this.count - 1; } get even() { return this.index % 2 === 0; } get odd() { return !this.even; } } /** * A [structural directive](guide/structural-directives) that renders * a template for each item in a collection. * The directive is placed on an element, which becomes the parent * of the cloned templates. * * The `ngForOf` directive is generally used in the * [shorthand form](guide/structural-directives#asterisk) `*ngFor`. * In this form, the template to be rendered for each iteration is the content * of an anchor element containing the directive. * * The following example shows the shorthand syntax with some options, * contained in an `<li>` element. * * ``` * <li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li> * ``` * * The shorthand form expands into a long form that uses the `ngForOf` selector * on an `<ng-template>` element. * The content of the `<ng-template>` element is the `<li>` element that held the * short-form directive. * * Here is the expanded version of the short-form example. * * ``` * <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn"> * <li>...</li> * </ng-template> * ``` * * Angular automatically expands the shorthand syntax as it compiles the template. * The context for each embedded view is logically merged to the current component * context according to its lexical position. * * When using the shorthand syntax, Angular allows only [one structural directive * on an element](guide/built-in-directives#one-per-element). * If you want to iterate conditionally, for example, * put the `*ngIf` on a container element that wraps the `*ngFor` element. * For futher discussion, see * [Structural Directives](guide/built-in-directives#one-per-element). * * @usageNotes * * ### Local variables * * `NgForOf` provides exported values that can be aliased to local variables. * For example: * * ``` * <li *ngFor="let user of users; index as i; first as isFirst"> * {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span> * </li> * ``` * * The following exported values can be aliased to local variables: * * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`). * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is * more complex then a property access, for example when using the async pipe (`userStreams | * async`). * - `index: number`: The index of the current item in the iterable. * - `count: number`: The length of the iterable. * - `first: boolean`: True when the item is the first item in the iterable. * - `last: boolean`: True when the item is the last item in the iterable. * - `even: boolean`: True when the item has an even index in the iterable. * - `odd: boolean`: True when the item has an odd index in the iterable. * * ### Change propagation * * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM: * * * When an item is added, a new instance of the template is added to the DOM. * * When an item is removed, its template instance is removed from the DOM. * * When items are reordered, their respective templates are reordered in the DOM. * * Angular uses object identity to track insertions and deletions within the iterator and reproduce * those changes in the DOM. This has important implications for animations and any stateful * controls that are present, such as `<input>` elements that accept user input. Inserted rows can * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state * such as user input. * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers). * * The identities of elements in the iterator can change while the data does not. * This can happen, for example, if the iterator is produced from an RPC to the server, and that * RPC is re-run. Even if the data hasn't changed, the second response produces objects with * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old * elements were deleted and all new elements inserted). * * To avoid this expensive operation, you can customize the default tracking algorithm. * by supplying the `trackBy` option to `NgForOf`. * `trackBy` takes a function that has two arguments: `index` and `item`. * If `trackBy` is given, Angular tracks changes by the return value of the function. * * @see [Structural Directives](guide/structural-directives) * @ngModule CommonModule * @publicApi */ class NgForOf { constructor(_viewContainer, _template, _differs) { this._viewContainer = _viewContainer; this._template = _template; this._differs = _differs; this._ngForOf = null; this._ngForOfDirty = true; this._differ = null; } /** * The value of the iterable expression, which can be used as a * [template input variable](guide/structural-directives#shorthand). */ set ngForOf(ngForOf) { this._ngForOf = ngForOf; this._ngForOfDirty = true; } /** * A function that defines how to track changes for items in the iterable. * * When items are added, moved, or removed in the iterable, * the directive must re-render the appropriate DOM nodes. * To minimize churn in the DOM, only nodes that have changed * are re-rendered. * * By default, the change detector assumes that * the object instance identifies the node in the iterable. * When this function is supplied, the directive uses * the result of calling this function to identify the item node, * rather than the identity of the object itself. * * The function receives two inputs, * the iteration index and the associated node data. */ set ngForTrackBy(fn) { if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') { // TODO(vicb): use a log service once there is a public one available if (console && console.warn) { console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` + `See https://angular.io/api/common/NgForOf#change-propagation for more information.`); } } this._trackByFn = fn; } get ngForTrackBy() { return this._trackByFn; } /** * A reference to the template that is stamped out for each item in the iterable. * @see [template reference variable](guide/template-reference-variables) */ set ngForTemplate(value) { // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1 // The current type is too restrictive; a template that just uses index, for example, // should be acceptable. if (value) { this._template = value; } } /** * Applies the changes when needed. */ ngDoCheck() { if (this._ngForOfDirty) { this._ngForOfDirty = false; // React on ngForOf changes only once all inputs have been initialized const value = this._ngForOf; if (!this._differ && value) { try { this._differ = this._differs.find(value).create(this.ngForTrackBy); } catch (_a) { throw new Error(`Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`); } } } if (this._differ) { const changes = this._differ.diff(this._ngForOf); if (changes) this._applyChanges(changes); } } _applyChanges(changes) { const insertTuples = []; changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => { if (item.previousIndex == null) { // NgForOf is never "null" or "undefined" here because the differ detected // that a new item needs to be inserted from the iterable. This implies that // there is an iterable value for "_ngForOf". const view = this._viewContainer.createEmbeddedView(this._template, new NgForOfContext(null, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex); const tuple = new RecordViewTuple(item, view); insertTuples.push(tuple); } else if (currentIndex == null) { this._viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex); } else if (adjustedPreviousIndex !== null) { const view = this._viewContainer.get(adjustedPreviousIndex); this._viewContainer.move(view, currentIndex); const tuple = new RecordViewTuple(item, view); insertTuples.push(tuple); } }); for (let i = 0; i < insertTuples.length; i++) { this._perViewChange(insertTuples[i].view, insertTuples[i].record); } for (let i = 0, ilen = this._viewContainer.length; i < ilen; i++) { const viewRef = this._viewContainer.get(i); viewRef.context.index = i; viewRef.context.count = ilen; viewRef.context.ngForOf = this._ngForOf; } changes.forEachIdentityChange((record) => { const viewRef = this._viewContainer.get(record.currentIndex); viewRef.context.$implicit = record.item; }); } _perViewChange(view, record) { view.context.$implicit = record.item; } /** * Asserts the correct type of the context for the template that `NgForOf` will render. * * The presence of this method is a signal to the Ivy template type-check compiler that the * `NgForOf` structural directive renders its template with a specific context type. */ static ngTemplateContextGuard(dir, ctx) { return true; } } NgForOf.ɵfac = function NgForOf_Factory(t) { return new (t || NgForOf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"])); }; NgForOf.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgForOf, selectors: [["", "ngFor", "", "ngForOf", ""]], inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" } }); NgForOf.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] } ]; NgForOf.propDecorators = { ngForOf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTrackBy: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTemplate: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgForOf, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngFor][ngForOf]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] }]; }, { ngForOf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTrackBy: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTemplate: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); class RecordViewTuple { constructor(record, view) { this.record = record; this.view = view; } } function getTypeName(type) { return type['name'] || typeof type; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A structural directive that conditionally includes a template based on the value of * an expression coerced to Boolean. * When the expression evaluates to true, Angular renders the template * provided in a `then` clause, and when false or null, * Angular renders the template provided in an optional `else` clause. The default * template for the `else` clause is blank. * * A [shorthand form](guide/structural-directives#asterisk) of the directive, * `*ngIf="condition"`, is generally used, provided * as an attribute of the anchor element for the inserted template. * Angular expands this into a more explicit version, in which the anchor element * is contained in an `<ng-template>` element. * * Simple form with shorthand syntax: * * ``` * <div *ngIf="condition">Content to render when condition is true.</div> * ``` * * Simple form with expanded syntax: * * ``` * <ng-template [ngIf]="condition"><div>Content to render when condition is * true.</div></ng-template> * ``` * * Form with an "else" block: * * ``` * <div *ngIf="condition; else elseBlock">Content to render when condition is true.</div> * <ng-template #elseBlock>Content to render when condition is false.</ng-template> * ``` * * Shorthand form with "then" and "else" blocks: * * ``` * <div *ngIf="condition; then thenBlock else elseBlock"></div> * <ng-template #thenBlock>Content to render when condition is true.</ng-template> * <ng-template #elseBlock>Content to render when condition is false.</ng-template> * ``` * * Form with storing the value locally: * * ``` * <div *ngIf="condition as value; else elseBlock">{{value}}</div> * <ng-template #elseBlock>Content to render when value is null.</ng-template> * ``` * * @usageNotes * * The `*ngIf` directive is most commonly used to conditionally show an inline template, * as seen in the following example. * The default `else` template is blank. * * {@example common/ngIf/ts/module.ts region='NgIfSimple'} * * ### Showing an alternative template using `else` * * To display a template when `expression` evaluates to false, use an `else` template * binding as shown in the following example. * The `else` binding points to an `<ng-template>` element labeled `#elseBlock`. * The template can be defined anywhere in the component view, but is typically placed right after * `ngIf` for readability. * * {@example common/ngIf/ts/module.ts region='NgIfElse'} * * ### Using an external `then` template * * In the previous example, the then-clause template is specified inline, as the content of the * tag that contains the `ngIf` directive. You can also specify a template that is defined * externally, by referencing a labeled `<ng-template>` element. When you do this, you can * change which template to use at runtime, as shown in the following example. * * {@example common/ngIf/ts/module.ts region='NgIfThenElse'} * * ### Storing a conditional result in a variable * * You might want to show a set of properties from the same object. If you are waiting * for asynchronous data, the object can be undefined. * In this case, you can use `ngIf` and store the result of the condition in a local * variable as shown in the following example. * * {@example common/ngIf/ts/module.ts region='NgIfAs'} * * This code uses only one `AsyncPipe`, so only one subscription is created. * The conditional statement stores the result of `userStream|async` in the local variable `user`. * You can then bind the local `user` repeatedly. * * The conditional displays the data only if `userStream` returns a value, * so you don't need to use the * safe-navigation-operator (`?.`) * to guard against null values when accessing properties. * You can display an alternative template while waiting for the data. * * ### Shorthand syntax * * The shorthand syntax `*ngIf` expands into two separate template specifications * for the "then" and "else" clauses. For example, consider the following shorthand statement, * that is meant to show a loading page while waiting for data to be loaded. * * ``` * <div class="hero-list" *ngIf="heroes else loading"> * ... * </div> * * <ng-template #loading> * <div>Loading...</div> * </ng-template> * ``` * * You can see that the "else" clause references the `<ng-template>` * with the `#loading` label, and the template for the "then" clause * is provided as the content of the anchor element. * * However, when Angular expands the shorthand syntax, it creates * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives. * The anchor element containing the template for the "then" clause becomes * the content of this unlabeled `<ng-template>` tag. * * ``` * <ng-template [ngIf]="heroes" [ngIfElse]="loading"> * <div class="hero-list"> * ... * </div> * </ng-template> * * <ng-template #loading> * <div>Loading...</div> * </ng-template> * ``` * * The presence of the implicit template object has implications for the nesting of * structural directives. For more on this subject, see * [Structural Directives](https://angular.io/guide/built-in-directives#one-per-element). * * @ngModule CommonModule * @publicApi */ class NgIf { constructor(_viewContainer, templateRef) { this._viewContainer = _viewContainer; this._context = new NgIfContext(); this._thenTemplateRef = null; this._elseTemplateRef = null; this._thenViewRef = null; this._elseViewRef = null; this._thenTemplateRef = templateRef; } /** * The Boolean expression to evaluate as the condition for showing a template. */ set ngIf(condition) { this._context.$implicit = this._context.ngIf = condition; this._updateView(); } /** * A template to show if the condition expression evaluates to true. */ set ngIfThen(templateRef) { assertTemplate('ngIfThen', templateRef); this._thenTemplateRef = templateRef; this._thenViewRef = null; // clear previous view if any. this._updateView(); } /** * A template to show if the condition expression evaluates to false. */ set ngIfElse(templateRef) { assertTemplate('ngIfElse', templateRef); this._elseTemplateRef = templateRef; this._elseViewRef = null; // clear previous view if any. this._updateView(); } _updateView() { if (this._context.$implicit) { if (!this._thenViewRef) { this._viewContainer.clear(); this._elseViewRef = null; if (this._thenTemplateRef) { this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context); } } } else { if (!this._elseViewRef) { this._viewContainer.clear(); this._thenViewRef = null; if (this._elseTemplateRef) { this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context); } } } } /** * Asserts the correct type of the context for the template that `NgIf` will render. * * The presence of this method is a signal to the Ivy template type-check compiler that the * `NgIf` structural directive renders its template with a specific context type. */ static ngTemplateContextGuard(dir, ctx) { return true; } } NgIf.ɵfac = function NgIf_Factory(t) { return new (t || NgIf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"])); }; NgIf.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgIf, selectors: [["", "ngIf", ""]], inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" } }); NgIf.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] } ]; NgIf.propDecorators = { ngIf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfThen: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfElse: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgIf, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngIf]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }]; }, { ngIf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfThen: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfElse: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @publicApi */ class NgIfContext { constructor() { this.$implicit = null; this.ngIf = null; } } function assertTemplate(property, templateRef) { const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView); if (!isTemplateRefOrNull) { throw new Error(`${property} must be a TemplateRef, but received '${Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(templateRef)}'.`); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SwitchView { constructor(_viewContainerRef, _templateRef) { this._viewContainerRef = _viewContainerRef; this._templateRef = _templateRef; this._created = false; } create() { this._created = true; this._viewContainerRef.createEmbeddedView(this._templateRef); } destroy() { this._created = false; this._viewContainerRef.clear(); } enforceState(created) { if (created && !this._created) { this.create(); } else if (!created && this._created) { this.destroy(); } } } /** * @ngModule CommonModule * * @description * The `[ngSwitch]` directive on a container specifies an expression to match against. * The expressions to match are provided by `ngSwitchCase` directives on views within the container. * - Every view that matches is rendered. * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered. * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase` * or `ngSwitchDefault` directive are preserved at the location. * * @usageNotes * Define a container element for the directive, and specify the switch expression * to match against as an attribute: * * ``` * <container-element [ngSwitch]="switch_expression"> * ``` * * Within the container, `*ngSwitchCase` statements specify the match expressions * as attributes. Include `*ngSwitchDefault` as the final case. * * ``` * <container-element [ngSwitch]="switch_expression"> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * ... * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * ### Usage Examples * * The following example shows how to use more than one case to display the same view: * * ``` * <container-element [ngSwitch]="switch_expression"> * <!-- the same view can be shown in more than one case --> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * <some-element *ngSwitchCase="match_expression_2">...</some-element> * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element> * <!--default case when there are no matches --> * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * The following example shows how cases can be nested: * ``` * <container-element [ngSwitch]="switch_expression"> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * <some-element *ngSwitchCase="match_expression_2">...</some-element> * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element> * <ng-container *ngSwitchCase="match_expression_3"> * <!-- use a ng-container to group multiple root nodes --> * <inner-element></inner-element> * <inner-other-element></inner-other-element> * </ng-container> * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * @publicApi * @see `NgSwitchCase` * @see `NgSwitchDefault` * @see [Structural Directives](guide/structural-directives) * */ class NgSwitch { constructor() { this._defaultUsed = false; this._caseCount = 0; this._lastCaseCheckIndex = 0; this._lastCasesMatched = false; } set ngSwitch(newValue) { this._ngSwitch = newValue; if (this._caseCount === 0) { this._updateDefaultCases(true); } } /** @internal */ _addCase() { return this._caseCount++; } /** @internal */ _addDefault(view) { if (!this._defaultViews) { this._defaultViews = []; } this._defaultViews.push(view); } /** @internal */ _matchCase(value) { const matched = value == this._ngSwitch; this._lastCasesMatched = this._lastCasesMatched || matched; this._lastCaseCheckIndex++; if (this._lastCaseCheckIndex === this._caseCount) { this._updateDefaultCases(!this._lastCasesMatched); this._lastCaseCheckIndex = 0; this._lastCasesMatched = false; } return matched; } _updateDefaultCases(useDefault) { if (this._defaultViews && useDefault !== this._defaultUsed) { this._defaultUsed = useDefault; for (let i = 0; i < this._defaultViews.length; i++) { const defaultView = this._defaultViews[i]; defaultView.enforceState(useDefault); } } } } NgSwitch.ɵfac = function NgSwitch_Factory(t) { return new (t || NgSwitch)(); }; NgSwitch.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgSwitch, selectors: [["", "ngSwitch", ""]], inputs: { ngSwitch: "ngSwitch" } }); NgSwitch.propDecorators = { ngSwitch: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitch, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitch]' }] }], function () { return []; }, { ngSwitch: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @ngModule CommonModule * * @description * Provides a switch case expression to match against an enclosing `ngSwitch` expression. * When the expressions match, the given `NgSwitchCase` template is rendered. * If multiple match expressions match the switch expression value, all of them are displayed. * * @usageNotes * * Within a switch container, `*ngSwitchCase` statements specify the match expressions * as attributes. Include `*ngSwitchDefault` as the final case. * * ``` * <container-element [ngSwitch]="switch_expression"> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * ... * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * Each switch-case statement contains an in-line HTML template or template reference * that defines the subtree to be selected if the value of the match expression * matches the value of the switch expression. * * Unlike JavaScript, which uses strict equality, Angular uses loose equality. * This means that the empty string, `""` matches 0. * * @publicApi * @see `NgSwitch` * @see `NgSwitchDefault` * */ class NgSwitchCase { constructor(viewContainer, templateRef, ngSwitch) { this.ngSwitch = ngSwitch; ngSwitch._addCase(); this._view = new SwitchView(viewContainer, templateRef); } /** * Performs case matching. For internal use only. */ ngDoCheck() { this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase)); } } NgSwitchCase.ɵfac = function NgSwitchCase_Factory(t) { return new (t || NgSwitchCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 1)); }; NgSwitchCase.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgSwitchCase, selectors: [["", "ngSwitchCase", ""]], inputs: { ngSwitchCase: "ngSwitchCase" } }); NgSwitchCase.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] } ]; NgSwitchCase.propDecorators = { ngSwitchCase: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchCase, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitchCase]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] }]; }, { ngSwitchCase: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @ngModule CommonModule * * @description * * Creates a view that is rendered when no `NgSwitchCase` expressions * match the `NgSwitch` expression. * This statement should be the final case in an `NgSwitch`. * * @publicApi * @see `NgSwitch` * @see `NgSwitchCase` * */ class NgSwitchDefault { constructor(viewContainer, templateRef, ngSwitch) { ngSwitch._addDefault(new SwitchView(viewContainer, templateRef)); } } NgSwitchDefault.ɵfac = function NgSwitchDefault_Factory(t) { return new (t || NgSwitchDefault)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 1)); }; NgSwitchDefault.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgSwitchDefault, selectors: [["", "ngSwitchDefault", ""]] }); NgSwitchDefault.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchDefault, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitchDefault]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @usageNotes * ``` * <some-element [ngPlural]="value"> * <ng-template ngPluralCase="=0">there is nothing</ng-template> * <ng-template ngPluralCase="=1">there is one</ng-template> * <ng-template ngPluralCase="few">there are a few</ng-template> * </some-element> * ``` * * @description * * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization. * * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees * that match the switch expression's pluralization category. * * To use this directive you must provide a container element that sets the `[ngPlural]` attribute * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their * expression: * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value * matches the switch expression exactly, * - otherwise, the view will be treated as a "category match", and will only display if exact * value matches aren't found and the value maps to its category for the defined locale. * * See http://cldr.unicode.org/index/cldr-spec/plural-rules * * @publicApi */ class NgPlural { constructor(_localization) { this._localization = _localization; this._caseViews = {}; } set ngPlural(value) { this._switchValue = value; this._updateView(); } addCase(value, switchView) { this._caseViews[value] = switchView; } _updateView() { this._clearViews(); const cases = Object.keys(this._caseViews); const key = getPluralCategory(this._switchValue, cases, this._localization); this._activateView(this._caseViews[key]); } _clearViews() { if (this._activeView) this._activeView.destroy(); } _activateView(view) { if (view) { this._activeView = view; this._activeView.create(); } } } NgPlural.ɵfac = function NgPlural_Factory(t) { return new (t || NgPlural)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization)); }; NgPlural.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgPlural, selectors: [["", "ngPlural", ""]], inputs: { ngPlural: "ngPlural" } }); NgPlural.ctorParameters = () => [ { type: NgLocalization } ]; NgPlural.propDecorators = { ngPlural: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPlural, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngPlural]' }] }], function () { return [{ type: NgLocalization }]; }, { ngPlural: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @ngModule CommonModule * * @description * * Creates a view that will be added/removed from the parent {@link NgPlural} when the * given expression matches the plural expression according to CLDR rules. * * @usageNotes * ``` * <some-element [ngPlural]="value"> * <ng-template ngPluralCase="=0">...</ng-template> * <ng-template ngPluralCase="other">...</ng-template> * </some-element> *``` * * See {@link NgPlural} for more details and example. * * @publicApi */ class NgPluralCase { constructor(value, template, viewContainer, ngPlural) { this.value = value; const isANumber = !isNaN(Number(value)); ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template)); } } NgPluralCase.ɵfac = function NgPluralCase_Factory(t) { return new (t || NgPluralCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectAttribute"]('ngPluralCase'), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgPlural, 1)); }; NgPluralCase.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgPluralCase, selectors: [["", "ngPluralCase", ""]] }); NgPluralCase.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['ngPluralCase',] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: NgPlural, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPluralCase, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngPluralCase]' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['ngPluralCase'] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: NgPlural, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @usageNotes * * Set the font of the containing element to the result of an expression. * * ``` * <some-element [ngStyle]="{'font-style': styleExp}">...</some-element> * ``` * * Set the width of the containing element to a pixel value returned by an expression. * * ``` * <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element> * ``` * * Set a collection of style values using an expression that returns key-value pairs. * * ``` * <some-element [ngStyle]="objExp">...</some-element> * ``` * * @description * * An attribute directive that updates styles for the containing HTML element. * Sets one or more style properties, specified as colon-separated key-value pairs. * The key is a style name, with an optional `.<unit>` suffix * (such as 'top.px', 'font-style.em'). * The value is an expression to be evaluated. * The resulting non-null value, expressed in the given unit, * is assigned to the given style property. * If the result of evaluation is null, the corresponding style is removed. * * @publicApi */ class NgStyle { constructor(_ngEl, _differs, _renderer) { this._ngEl = _ngEl; this._differs = _differs; this._renderer = _renderer; this._ngStyle = null; this._differ = null; } set ngStyle(values) { this._ngStyle = values; if (!this._differ && values) { this._differ = this._differs.find(values).create(); } } ngDoCheck() { if (this._differ) { const changes = this._differ.diff(this._ngStyle); if (changes) { this._applyChanges(changes); } } } _setStyle(nameAndUnit, value) { const [name, unit] = nameAndUnit.split('.'); value = value != null && unit ? `${value}${unit}` : value; if (value != null) { this._renderer.setStyle(this._ngEl.nativeElement, name, value); } else { this._renderer.removeStyle(this._ngEl.nativeElement, name); } } _applyChanges(changes) { changes.forEachRemovedItem((record) => this._setStyle(record.key, null)); changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue)); changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue)); } } NgStyle.ɵfac = function NgStyle_Factory(t) { return new (t || NgStyle)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"])); }; NgStyle.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgStyle, selectors: [["", "ngStyle", ""]], inputs: { ngStyle: "ngStyle" } }); NgStyle.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] } ]; NgStyle.propDecorators = { ngStyle: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngStyle',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgStyle, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngStyle]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] }]; }, { ngStyle: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngStyle'] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @description * * Inserts an embedded view from a prepared `TemplateRef`. * * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`. * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding * by the local template `let` declarations. * * @usageNotes * ``` * <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container> * ``` * * Using the key `$implicit` in the context object will set its value as default. * * ### Example * * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'} * * @publicApi */ class NgTemplateOutlet { constructor(_viewContainerRef) { this._viewContainerRef = _viewContainerRef; this._viewRef = null; /** * A context object to attach to the {@link EmbeddedViewRef}. This should be an * object, the object's keys will be available for binding by the local template `let` * declarations. * Using the key `$implicit` in the context object will set its value as default. */ this.ngTemplateOutletContext = null; /** * A string defining the template reference and optionally the context object for the template. */ this.ngTemplateOutlet = null; } ngOnChanges(changes) { const recreateView = this._shouldRecreateView(changes); if (recreateView) { const viewContainerRef = this._viewContainerRef; if (this._viewRef) { viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef)); } this._viewRef = this.ngTemplateOutlet ? viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext) : null; } else if (this._viewRef && this.ngTemplateOutletContext) { this._updateExistingContext(this.ngTemplateOutletContext); } } /** * We need to re-create existing embedded view if: * - templateRef has changed * - context has changes * * We mark context object as changed when the corresponding object * shape changes (new properties are added or existing properties are removed). * In other words we consider context with the same properties as "the same" even * if object reference changes (see https://github.com/angular/angular/issues/13407). */ _shouldRecreateView(changes) { const ctxChange = changes['ngTemplateOutletContext']; return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange)); } _hasContextShapeChanged(ctxChange) { const prevCtxKeys = Object.keys(ctxChange.previousValue || {}); const currCtxKeys = Object.keys(ctxChange.currentValue || {}); if (prevCtxKeys.length === currCtxKeys.length) { for (let propName of currCtxKeys) { if (prevCtxKeys.indexOf(propName) === -1) { return true; } } return false; } return true; } _updateExistingContext(ctx) { for (let propName of Object.keys(ctx)) { this._viewRef.context[propName] = this.ngTemplateOutletContext[propName]; } } } NgTemplateOutlet.ɵfac = function NgTemplateOutlet_Factory(t) { return new (t || NgTemplateOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"])); }; NgTemplateOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgTemplateOutlet, selectors: [["", "ngTemplateOutlet", ""]], inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] }); NgTemplateOutlet.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] } ]; NgTemplateOutlet.propDecorators = { ngTemplateOutletContext: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngTemplateOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgTemplateOutlet, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngTemplateOutlet]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }]; }, { ngTemplateOutletContext: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngTemplateOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A collection of Angular directives that are likely to be used in each and every Angular * application. */ const COMMON_DIRECTIVES = [ NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function invalidPipeArgumentError(type, value) { return Error(`InvalidPipeArgument: '${value}' for pipe '${Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type)}'`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SubscribableStrategy { createSubscription(async, updateLatestValue) { return async.subscribe({ next: updateLatestValue, error: (e) => { throw e; } }); } dispose(subscription) { subscription.unsubscribe(); } onDestroy(subscription) { subscription.unsubscribe(); } } class PromiseStrategy { createSubscription(async, updateLatestValue) { return async.then(updateLatestValue, e => { throw e; }); } dispose(subscription) { } onDestroy(subscription) { } } const _promiseStrategy = new PromiseStrategy(); const _subscribableStrategy = new SubscribableStrategy(); /** * @ngModule CommonModule * @description * * Unwraps a value from an asynchronous primitive. * * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid * potential memory leaks. * * @usageNotes * * ### Examples * * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the * promise. * * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'} * * It's also possible to use `async` with Observables. The example below binds the `time` Observable * to the view. The Observable continuously updates the view with the current time. * * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'} * * @publicApi */ class AsyncPipe { constructor(_ref) { this._ref = _ref; this._latestValue = null; this._subscription = null; this._obj = null; this._strategy = null; } ngOnDestroy() { if (this._subscription) { this._dispose(); } } transform(obj) { if (!this._obj) { if (obj) { this._subscribe(obj); } return this._latestValue; } if (obj !== this._obj) { this._dispose(); return this.transform(obj); } return this._latestValue; } _subscribe(obj) { this._obj = obj; this._strategy = this._selectStrategy(obj); this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value)); } _selectStrategy(obj) { if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(obj)) { return _promiseStrategy; } if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisSubscribable"])(obj)) { return _subscribableStrategy; } throw invalidPipeArgumentError(AsyncPipe, obj); } _dispose() { this._strategy.dispose(this._subscription); this._latestValue = null; this._subscription = null; this._obj = null; } _updateLatestValue(async, value) { if (async === this._obj) { this._latestValue = value; this._ref.markForCheck(); } } } AsyncPipe.ɵfac = function AsyncPipe_Factory(t) { return new (t || AsyncPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectPipeChangeDetectorRef"]()); }; AsyncPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "async", type: AsyncPipe, pure: false }); AsyncPipe.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AsyncPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'async', pure: false }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Transforms text to all lower case. * * @see `UpperCasePipe` * @see `TitleCasePipe` * @usageNotes * * The following example defines a view that allows the user to enter * text, and then uses the pipe to convert the input text to all lower case. * * <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example> * * @ngModule CommonModule * @publicApi */ class LowerCasePipe { transform(value) { if (value == null) return null; if (typeof value !== 'string') { throw invalidPipeArgumentError(LowerCasePipe, value); } return value.toLowerCase(); } } LowerCasePipe.ɵfac = function LowerCasePipe_Factory(t) { return new (t || LowerCasePipe)(); }; LowerCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "lowercase", type: LowerCasePipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LowerCasePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'lowercase' }] }], null, null); })(); // // Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result // can be achieved by using /\p{L}\S*/gu and also known as Unicode Property Escapes // (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no // transpilation of this functionality down to ES5 without external tool, the only solution is // to use already transpiled form. Example can be found here - // https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1 // const unicodeWordMatch = /(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g; /** * Transforms text to title case. * Capitalizes the first letter of each word and transforms the * rest of the word to lower case. * Words are delimited by any whitespace character, such as a space, tab, or line-feed character. * * @see `LowerCasePipe` * @see `UpperCasePipe` * * @usageNotes * The following example shows the result of transforming various strings into title case. * * <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example> * * @ngModule CommonModule * @publicApi */ class TitleCasePipe { transform(value) { if (value == null) return null; if (typeof value !== 'string') { throw invalidPipeArgumentError(TitleCasePipe, value); } return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.substr(1).toLowerCase())); } } TitleCasePipe.ɵfac = function TitleCasePipe_Factory(t) { return new (t || TitleCasePipe)(); }; TitleCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "titlecase", type: TitleCasePipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TitleCasePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'titlecase' }] }], null, null); })(); /** * Transforms text to all upper case. * @see `LowerCasePipe` * @see `TitleCasePipe` * * @ngModule CommonModule * @publicApi */ class UpperCasePipe { transform(value) { if (value == null) return null; if (typeof value !== 'string') { throw invalidPipeArgumentError(UpperCasePipe, value); } return value.toUpperCase(); } } UpperCasePipe.ɵfac = function UpperCasePipe_Factory(t) { return new (t || UpperCasePipe)(); }; UpperCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "uppercase", type: UpperCasePipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](UpperCasePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'uppercase' }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // clang-format off /** * @ngModule CommonModule * @description * * Formats a date value according to locale rules. * * Only the `en-US` locale data comes with Angular. To localize dates * in another language, you must import the corresponding locale data. * See the [I18n guide](guide/i18n#i18n-pipes) for more information. * * @see `formatDate()` * * * @usageNotes * * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to * reformat the date on every change-detection cycle, treat the date as an immutable object * and change the reference when the pipe needs to run again. * * ### Pre-defined format options * * | Option | Equivalent to | Examples (given in `en-US` locale) | * |---------------|-------------------------------------|-------------------------------------------------| * | `'short'` | `'M/d/yy, h:mm a'` | `6/15/15, 9:03 AM` | * | `'medium'` | `'MMM d, y, h:mm:ss a'` | `Jun 15, 2015, 9:03:01 AM` | * | `'long'` | `'MMMM d, y, h:mm:ss a z'` | `June 15, 2015 at 9:03:01 AM GMT+1` | * | `'full'` | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` | * | `'shortDate'` | `'M/d/yy'` | `6/15/15` | * | `'mediumDate'`| `'MMM d, y'` | `Jun 15, 2015` | * | `'longDate'` | `'MMMM d, y'` | `June 15, 2015` | * | `'fullDate'` | `'EEEE, MMMM d, y'` | `Monday, June 15, 2015` | * | `'shortTime'` | `'h:mm a'` | `9:03 AM` | * | `'mediumTime'`| `'h:mm:ss a'` | `9:03:01 AM` | * | `'longTime'` | `'h:mm:ss a z'` | `9:03:01 AM GMT+1` | * | `'fullTime'` | `'h:mm:ss a zzzz'` | `9:03:01 AM GMT+01:00` | * * ### Custom format options * * You can construct a format string using symbols to specify the components * of a date-time value, as described in the following table. * Format details depend on the locale. * Fields marked with (*) are only available in the extra data set for the given locale. * * | Field type | Format | Description | Example Value | * |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------| * | Era | G, GG & GGG | Abbreviated | AD | * | | GGGG | Wide | Anno Domini | * | | GGGGG | Narrow | A | * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 | * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 | * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 | * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 | * | Week-numbering year| Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 | * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 | * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 | * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 | * | Month | M | Numeric: 1 digit | 9, 12 | * | | MM | Numeric: 2 digits + zero padded | 09, 12 | * | | MMM | Abbreviated | Sep | * | | MMMM | Wide | September | * | | MMMMM | Narrow | S | * | Month standalone | L | Numeric: 1 digit | 9, 12 | * | | LL | Numeric: 2 digits + zero padded | 09, 12 | * | | LLL | Abbreviated | Sep | * | | LLLL | Wide | September | * | | LLLLL | Narrow | S | * | Week of year | w | Numeric: minimum digits | 1... 53 | * | | ww | Numeric: 2 digits + zero padded | 01... 53 | * | Week of month | W | Numeric: 1 digit | 1... 5 | * | Day of month | d | Numeric: minimum digits | 1 | * | | dd | Numeric: 2 digits + zero padded | 01 | * | Week day | E, EE & EEE | Abbreviated | Tue | * | | EEEE | Wide | Tuesday | * | | EEEEE | Narrow | T | * | | EEEEEE | Short | Tu | * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM | * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem | * | | aaaaa | Narrow | a/p | * | Period* | B, BB & BBB | Abbreviated | mid. | * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night | * | | BBBBB | Narrow | md | * | Period standalone* | b, bb & bbb | Abbreviated | mid. | * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night | * | | bbbbb | Narrow | md | * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 | * | | hh | Numeric: 2 digits + zero padded | 01, 12 | * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 | * | | HH | Numeric: 2 digits + zero padded | 00, 23 | * | Minute | m | Numeric: minimum digits | 8, 59 | * | | mm | Numeric: 2 digits + zero padded | 08, 59 | * | Second | s | Numeric: minimum digits | 0... 59 | * | | ss | Numeric: 2 digits + zero padded | 00... 59 | * | Fractional seconds | S | Numeric: 1 digit | 0... 9 | * | | SS | Numeric: 2 digits + zero padded | 00... 99 | * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 | * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 | * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 | * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 | * | | ZZZZ | Long localized GMT format | GMT-8:00 | * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 | * | | O, OO & OOO | Short localized GMT format | GMT-8 | * | | OOOO | Long localized GMT format | GMT-08:00 | * * * ### Format examples * * These examples transform a date into various formats, * assuming that `dateObj` is a JavaScript `Date` object for * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11, * given in the local time for the `en-US` locale. * * ``` * {{ dateObj | date }} // output is 'Jun 15, 2015' * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM' * {{ dateObj | date:'shortTime' }} // output is '9:43 PM' * {{ dateObj | date:'mm:ss' }} // output is '43:11' * ``` * * ### Usage example * * The following component uses a date pipe to display the current date in different formats. * * ``` * @Component({ * selector: 'date-pipe', * template: `<div> * <p>Today is {{today | date}}</p> * <p>Or if you prefer, {{today | date:'fullDate'}}</p> * <p>The time is {{today | date:'h:mm a z'}}</p> * </div>` * }) * // Get the current date and time as a date-time value. * export class DatePipeComponent { * today: number = Date.now(); * } * ``` * * @publicApi */ // clang-format on class DatePipe { constructor(locale) { this.locale = locale; } transform(value, format = 'mediumDate', timezone, locale) { if (value == null || value === '' || value !== value) return null; try { return formatDate(value, format, locale || this.locale, timezone); } catch (error) { throw invalidPipeArgumentError(DatePipe, error.message); } } } DatePipe.ɵfac = function DatePipe_Factory(t) { return new (t || DatePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; DatePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "date", type: DatePipe, pure: true }); DatePipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DatePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'date', pure: true }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _INTERPOLATION_REGEXP = /#/g; /** * @ngModule CommonModule * @description * * Maps a value to a string that pluralizes the value according to locale rules. * * @usageNotes * * ### Example * * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'} * * @publicApi */ class I18nPluralPipe { constructor(_localization) { this._localization = _localization; } /** * @param value the number to be formatted * @param pluralMap an object that mimics the ICU format, see * http://userguide.icu-project.org/formatparse/messages. * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by * default). */ transform(value, pluralMap, locale) { if (value == null) return ''; if (typeof pluralMap !== 'object' || pluralMap === null) { throw invalidPipeArgumentError(I18nPluralPipe, pluralMap); } const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale); return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString()); } } I18nPluralPipe.ɵfac = function I18nPluralPipe_Factory(t) { return new (t || I18nPluralPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization)); }; I18nPluralPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "i18nPlural", type: I18nPluralPipe, pure: true }); I18nPluralPipe.ctorParameters = () => [ { type: NgLocalization } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nPluralPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'i18nPlural', pure: true }] }], function () { return [{ type: NgLocalization }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Generic selector that displays the string that matches the current value. * * If none of the keys of the `mapping` match the `value`, then the content * of the `other` key is returned when present, otherwise an empty string is returned. * * @usageNotes * * ### Example * * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'} * * @publicApi */ class I18nSelectPipe { /** * @param value a string to be internationalized. * @param mapping an object that indicates the text that should be displayed * for different values of the provided `value`. */ transform(value, mapping) { if (value == null) return ''; if (typeof mapping !== 'object' || typeof value !== 'string') { throw invalidPipeArgumentError(I18nSelectPipe, mapping); } if (mapping.hasOwnProperty(value)) { return mapping[value]; } if (mapping.hasOwnProperty('other')) { return mapping['other']; } return ''; } } I18nSelectPipe.ɵfac = function I18nSelectPipe_Factory(t) { return new (t || I18nSelectPipe)(); }; I18nSelectPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "i18nSelect", type: I18nSelectPipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nSelectPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'i18nSelect', pure: true }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Converts a value into its JSON-format representation. Useful for debugging. * * @usageNotes * * The following component uses a JSON pipe to convert an object * to JSON format, and displays the string in both formats for comparison. * * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'} * * @publicApi */ class JsonPipe { /** * @param value A value of any type to convert into a JSON-format string. */ transform(value) { return JSON.stringify(value, null, 2); } } JsonPipe.ɵfac = function JsonPipe_Factory(t) { return new (t || JsonPipe)(); }; JsonPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "json", type: JsonPipe, pure: false }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'json', pure: false }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function makeKeyValuePair(key, value) { return { key: key, value: value }; } /** * @ngModule CommonModule * @description * * Transforms Object or Map into an array of key value pairs. * * The output array will be ordered by keys. * By default the comparator will be by Unicode point value. * You can optionally pass a compareFn if your keys are complex types. * * @usageNotes * ### Examples * * This examples show how an Object or a Map can be iterated by ngFor with the use of this * keyvalue pipe. * * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'} * * @publicApi */ class KeyValuePipe { constructor(differs) { this.differs = differs; this.keyValues = []; } transform(input, compareFn = defaultComparator) { if (!input || (!(input instanceof Map) && typeof input !== 'object')) { return null; } if (!this.differ) { // make a differ for whatever type we've been passed in this.differ = this.differs.find(input).create(); } const differChanges = this.differ.diff(input); if (differChanges) { this.keyValues = []; differChanges.forEachItem((r) => { this.keyValues.push(makeKeyValuePair(r.key, r.currentValue)); }); this.keyValues.sort(compareFn); } return this.keyValues; } } KeyValuePipe.ɵfac = function KeyValuePipe_Factory(t) { return new (t || KeyValuePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"])); }; KeyValuePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "keyvalue", type: KeyValuePipe, pure: false }); KeyValuePipe.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](KeyValuePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'keyvalue', pure: false }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }]; }, null); })(); function defaultComparator(keyValueA, keyValueB) { const a = keyValueA.key; const b = keyValueB.key; // if same exit with 0; if (a === b) return 0; // make sure that undefined are at the end of the sort. if (a === undefined) return 1; if (b === undefined) return -1; // make sure that nulls are at the end of the sort. if (a === null) return 1; if (b === null) return -1; if (typeof a == 'string' && typeof b == 'string') { return a < b ? -1 : 1; } if (typeof a == 'number' && typeof b == 'number') { return a - b; } if (typeof a == 'boolean' && typeof b == 'boolean') { return a < b ? -1 : 1; } // `a` and `b` are of different types. Compare their string values. const aString = String(a); const bString = String(b); return aString == bString ? 0 : aString < bString ? -1 : 1; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Formats a value according to digit options and locale rules. * Locale determines group sizing and separator, * decimal point character, and other locale-specific configurations. * * @see `formatNumber()` * * @usageNotes * * ### digitsInfo * * The value's decimal representation is specified by the `digitsInfo` * parameter, written in the following format:<br> * * ``` * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits} * ``` * * - `minIntegerDigits`: * The minimum number of integer digits before the decimal point. * Default is 1. * * - `minFractionDigits`: * The minimum number of digits after the decimal point. * Default is 0. * * - `maxFractionDigits`: * The maximum number of digits after the decimal point. * Default is 3. * * If the formatted value is truncated it will be rounded using the "to-nearest" method: * * ``` * {{3.6 | number: '1.0-0'}} * <!--will output '4'--> * * {{-3.6 | number:'1.0-0'}} * <!--will output '-4'--> * ``` * * ### locale * * `locale` will format a value according to locale rules. * Locale determines group sizing and separator, * decimal point character, and other locale-specific configurations. * * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default. * * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app). * * ### Example * * The following code shows how the pipe transforms values * according to various format specifications, * where the caller's default locale is `en-US`. * * <code-example path="common/pipes/ts/number_pipe.ts" region='NumberPipe'></code-example> * * @publicApi */ class DecimalPipe { constructor(_locale) { this._locale = _locale; } /** * @param value The value to be formatted. * @param digitsInfo Sets digit and decimal representation. * [See more](#digitsinfo). * @param locale Specifies what locale format rules to use. * [See more](#locale). */ transform(value, digitsInfo, locale) { if (!isValue(value)) return null; locale = locale || this._locale; try { const num = strToNumber(value); return formatNumber(num, locale, digitsInfo); } catch (error) { throw invalidPipeArgumentError(DecimalPipe, error.message); } } } DecimalPipe.ɵfac = function DecimalPipe_Factory(t) { return new (t || DecimalPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; DecimalPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "number", type: DecimalPipe, pure: true }); DecimalPipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DecimalPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'number' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @ngModule CommonModule * @description * * Transforms a number to a percentage * string, formatted according to locale rules that determine group sizing and * separator, decimal-point character, and other locale-specific * configurations. * * @see `formatPercent()` * * @usageNotes * The following code shows how the pipe transforms numbers * into text strings, according to various format specifications, * where the caller's default locale is `en-US`. * * <code-example path="common/pipes/ts/percent_pipe.ts" region='PercentPipe'></code-example> * * @publicApi */ class PercentPipe { constructor(_locale) { this._locale = _locale; } transform(value, digitsInfo, locale) { if (!isValue(value)) return null; locale = locale || this._locale; try { const num = strToNumber(value); return formatPercent(num, locale, digitsInfo); } catch (error) { throw invalidPipeArgumentError(PercentPipe, error.message); } } } PercentPipe.ɵfac = function PercentPipe_Factory(t) { return new (t || PercentPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; PercentPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "percent", type: PercentPipe, pure: true }); PercentPipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PercentPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'percent' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @ngModule CommonModule * @description * * Transforms a number to a currency string, formatted according to locale rules * that determine group sizing and separator, decimal-point character, * and other locale-specific configurations. * * {@a currency-code-deprecation} * <div class="alert is-helpful"> * * **Deprecation notice:** * * The default currency code is currently always `USD` but this is deprecated from v9. * * **In v11 the default currency code will be taken from the current locale identified by * the `LOCALE_ID` token. See the [i18n guide](guide/i18n#setting-up-the-locale-of-your-app) for * more information.** * * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in * your application `NgModule`: * * ```ts * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'} * ``` * * </div> * * @see `getCurrencySymbol()` * @see `formatCurrency()` * * @usageNotes * The following code shows how the pipe transforms numbers * into text strings, according to various format specifications, * where the caller's default locale is `en-US`. * * <code-example path="common/pipes/ts/currency_pipe.ts" region='CurrencyPipe'></code-example> * * @publicApi */ class CurrencyPipe { constructor(_locale, _defaultCurrencyCode = 'USD') { this._locale = _locale; this._defaultCurrencyCode = _defaultCurrencyCode; } transform(value, currencyCode, display = 'symbol', digitsInfo, locale) { if (!isValue(value)) return null; locale = locale || this._locale; if (typeof display === 'boolean') { if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) { console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`); } display = display ? 'symbol' : 'code'; } let currency = currencyCode || this._defaultCurrencyCode; if (display !== 'code') { if (display === 'symbol' || display === 'symbol-narrow') { currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale); } else { currency = display; } } try { const num = strToNumber(value); return formatCurrency(num, locale, currency, currencyCode, digitsInfo); } catch (error) { throw invalidPipeArgumentError(CurrencyPipe, error.message); } } } CurrencyPipe.ɵfac = function CurrencyPipe_Factory(t) { return new (t || CurrencyPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"])); }; CurrencyPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "currency", type: CurrencyPipe, pure: true }); CurrencyPipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CurrencyPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'currency' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"]] }] }]; }, null); })(); function isValue(value) { return !(value == null || value === '' || value !== value); } /** * Transforms a string into a number (if needed). */ function strToNumber(value) { // Convert strings to numbers if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) { return Number(value); } if (typeof value !== 'number') { throw new Error(`${value} is not a number`); } return value; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Creates a new `Array` or `String` containing a subset (slice) of the elements. * * @usageNotes * * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()` * and `String.prototype.slice()`. * * When operating on an `Array`, the returned `Array` is always a copy even when all * the elements are being returned. * * When operating on a blank value, the pipe returns the blank value. * * ### List Example * * This `ngFor` example: * * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'} * * produces the following: * * ```html * <li>b</li> * <li>c</li> * ``` * * ### String Examples * * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'} * * @publicApi */ class SlicePipe { transform(value, start, end) { if (value == null) return null; if (!this.supports(value)) { throw invalidPipeArgumentError(SlicePipe, value); } return value.slice(start, end); } supports(obj) { return typeof obj === 'string' || Array.isArray(obj); } } SlicePipe.ɵfac = function SlicePipe_Factory(t) { return new (t || SlicePipe)(); }; SlicePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "slice", type: SlicePipe, pure: false }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SlicePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'slice', pure: false }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A collection of Angular pipes that are likely to be used in each and every application. */ const COMMON_PIPES = [ AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe, ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This does not contain the location providers, // as they need some platform specific implementations to work. /** * Exports all the basic Angular directives and pipes, * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on. * Re-exported by `BrowserModule`, which is included automatically in the root * `AppModule` when you create a new app with the CLI `new` command. * * * The `providers` options configure the NgModule's injector to provide * localization dependencies to members. * * The `exports` options make the declared directives and pipes available for import * by other NgModules. * * @publicApi */ class CommonModule { } CommonModule.ɵfac = function CommonModule_Factory(t) { return new (t || CommonModule)(); }; CommonModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: CommonModule }); CommonModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ { provide: NgLocalization, useClass: NgLocaleLocalization }, ] }); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](CommonModule, { declarations: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CommonModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ declarations: [COMMON_DIRECTIVES, COMMON_PIPES], exports: [COMMON_DIRECTIVES, COMMON_PIPES], providers: [ { provide: NgLocalization, useClass: NgLocaleLocalization }, ] }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const PLATFORM_BROWSER_ID = 'browser'; const PLATFORM_SERVER_ID = 'server'; const PLATFORM_WORKER_APP_ID = 'browserWorkerApp'; const PLATFORM_WORKER_UI_ID = 'browserWorkerUi'; /** * Returns whether a platform id represents a browser platform. * @publicApi */ function isPlatformBrowser(platformId) { return platformId === PLATFORM_BROWSER_ID; } /** * Returns whether a platform id represents a server platform. * @publicApi */ function isPlatformServer(platformId) { return platformId === PLATFORM_SERVER_ID; } /** * Returns whether a platform id represents a web worker app platform. * @publicApi */ function isPlatformWorkerApp(platformId) { return platformId === PLATFORM_WORKER_APP_ID; } /** * Returns whether a platform id represents a web worker UI platform. * @publicApi */ function isPlatformWorkerUi(platformId) { return platformId === PLATFORM_WORKER_UI_ID; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines a scroll position manager. Implemented by `BrowserViewportScroller`. * * @publicApi */ class ViewportScroller { } // De-sugared tree-shakable injection // See #23917 /** @nocollapse */ ViewportScroller.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ token: ViewportScroller, providedIn: 'root', factory: () => new BrowserViewportScroller(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT), window) }); /** * Manages the scroll position for a browser window. */ class BrowserViewportScroller { constructor(document, window) { this.document = document; this.window = window; this.offset = () => [0, 0]; } /** * Configures the top offset used when scrolling to an anchor. * @param offset A position in screen coordinates (a tuple with x and y values) * or a function that returns the top offset position. * */ setOffset(offset) { if (Array.isArray(offset)) { this.offset = () => offset; } else { this.offset = offset; } } /** * Retrieves the current scroll position. * @returns The position in screen coordinates. */ getScrollPosition() { if (this.supportsScrolling()) { return [this.window.pageXOffset, this.window.pageYOffset]; } else { return [0, 0]; } } /** * Sets the scroll position. * @param position The new position in screen coordinates. */ scrollToPosition(position) { if (this.supportsScrolling()) { this.window.scrollTo(position[0], position[1]); } } /** * Scrolls to an element and attempts to focus the element. * * Note that the function name here is misleading in that the target string may be an ID for a * non-anchor element. * * @param target The ID of an element or name of the anchor. * * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document * @see https://html.spec.whatwg.org/#scroll-to-fragid */ scrollToAnchor(target) { var _a; if (!this.supportsScrolling()) { return; } // TODO(atscott): The correct behavior for `getElementsByName` would be to also verify that the // element is an anchor. However, this could be considered a breaking change and should be // done in a major version. const elSelected = (_a = this.document.getElementById(target)) !== null && _a !== void 0 ? _a : this.document.getElementsByName(target)[0]; if (elSelected === undefined) { return; } this.scrollToElement(elSelected); // After scrolling to the element, the spec dictates that we follow the focus steps for the // target. Rather than following the robust steps, simply attempt focus. this.attemptFocus(elSelected); } /** * Disables automatic scroll restoration provided by the browser. */ setHistoryScrollRestoration(scrollRestoration) { if (this.supportScrollRestoration()) { const history = this.window.history; if (history && history.scrollRestoration) { history.scrollRestoration = scrollRestoration; } } } /** * Scrolls to an element using the native offset and the specified offset set on this scroller. * * The offset can be used when we know that there is a floating header and scrolling naively to an * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header. */ scrollToElement(el) { const rect = el.getBoundingClientRect(); const left = rect.left + this.window.pageXOffset; const top = rect.top + this.window.pageYOffset; const offset = this.offset(); this.window.scrollTo(left - offset[0], top - offset[1]); } /** * Calls `focus` on the `focusTarget` and returns `true` if the element was focused successfully. * * If `false`, further steps may be necessary to determine a valid substitute to be focused * instead. * * @see https://html.spec.whatwg.org/#get-the-focusable-area * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus * @see https://html.spec.whatwg.org/#focusable-area */ attemptFocus(focusTarget) { focusTarget.focus(); return this.document.activeElement === focusTarget; } /** * We only support scroll restoration when we can get a hold of window. * This means that we do not support this behavior when running in a web worker. * * Lifting this restriction right now would require more changes in the dom adapter. * Since webworkers aren't widely used, we will lift it once RouterScroller is * battle-tested. */ supportScrollRestoration() { try { if (!this.supportsScrolling()) { return false; } // The `scrollRestoration` property could be on the `history` instance or its prototype. const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) || getScrollRestorationProperty(Object.getPrototypeOf(this.window.history)); // We can write to the `scrollRestoration` property if it is a writable data field or it has a // setter function. return !!scrollRestorationDescriptor && !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set); } catch (_a) { return false; } } supportsScrolling() { try { return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window; } catch (_a) { return false; } } } function getScrollRestorationProperty(obj) { return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration'); } /** * Provides an empty implementation of the viewport scroller. */ class NullViewportScroller { /** * Empty implementation */ setOffset(offset) { } /** * Empty implementation */ getScrollPosition() { return [0, 0]; } /** * Empty implementation */ scrollToPosition(position) { } /** * Empty implementation */ scrollToAnchor(anchor) { } /** * Empty implementation */ setHistoryScrollRestoration(scrollRestoration) { } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=common.js.map /***/ }), /***/ "ofxX": /*!*******************************************!*\ !*** ./node_modules/d3-random/src/lcg.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lcg; }); // https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use const mul = 0x19660D; const inc = 0x3C6EF35F; const eps = 1 / 0x100000000; function lcg(seed = Math.random()) { let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0; return () => (state = mul * state + inc | 0, eps * (state >>> 0)); } /***/ }), /***/ "oxeV": /*!*************************************************!*\ !*** ./node_modules/d3-selection/src/window.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(node) { return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node || (node.document && node) // node is a Window || node.defaultView; // node is a Document }); /***/ }), /***/ "p/1U": /*!************************************************!*\ !*** ./node_modules/d3-format/src/exponent.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(Math.abs(x)), x ? x[1] : NaN; }); /***/ }), /***/ "p/7N": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/quad.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(node, x0, y0, x1, y1) { this.node = node; this.x0 = x0; this.y0 = y0; this.x1 = x1; this.y1 = y1; }); /***/ }), /***/ "p5SD": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/centroid.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "mPOO"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "tepu"); var W0, W1, X0, Y0, Z0, X1, Y1, Z1, X2, Y2, Z2, lambda00, phi00, // first point x0, y0, z0; // previous point var centroidStream = { sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], point: centroidPoint, lineStart: centroidLineStart, lineEnd: centroidLineEnd, polygonStart: function() { centroidStream.lineStart = centroidRingStart; centroidStream.lineEnd = centroidRingEnd; }, polygonEnd: function() { centroidStream.lineStart = centroidLineStart; centroidStream.lineEnd = centroidLineEnd; } }; // Arithmetic mean of Cartesian vectors. function centroidPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); centroidPointCartesian(cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi)); } function centroidPointCartesian(x, y, z) { ++W0; X0 += (x - X0) / W0; Y0 += (y - Y0) / W0; Z0 += (z - Z0) / W0; } function centroidLineStart() { centroidStream.point = centroidLinePointFirst; } function centroidLinePointFirst(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda); y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda); z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); centroidStream.point = centroidLinePoint; centroidPointCartesian(x0, y0, z0); } function centroidLinePoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda), y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda), z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), w = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); W1 += w; X1 += w * (x0 + (x0 = x)); Y1 += w * (y0 + (y0 = y)); Z1 += w * (z0 + (z0 = z)); centroidPointCartesian(x0, y0, z0); } function centroidLineEnd() { centroidStream.point = centroidPoint; } // See J. E. Brock, The Inertia Tensor for a Spherical Triangle, // J. Applied Mechanics 42, 239 (1975). function centroidRingStart() { centroidStream.point = centroidRingPointFirst; } function centroidRingEnd() { centroidRingPoint(lambda00, phi00); centroidStream.point = centroidPoint; } function centroidRingPointFirst(lambda, phi) { lambda00 = lambda, phi00 = phi; lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; centroidStream.point = centroidRingPoint; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda); y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda); z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); centroidPointCartesian(x0, y0, z0); } function centroidRingPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda), y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda), z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["hypot"])(cx, cy, cz), w = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(m), // line weight = angle v = m && -w / m; // area weight multiplier X2.add(v * cx); Y2.add(v * cy); Z2.add(v * cz); W1 += w; X1 += w * (x0 + (x0 = x)); Y1 += w * (y0 + (y0 = y)); Z1 += w * (z0 + (z0 = z)); centroidPointCartesian(x0, y0, z0); } /* harmony default export */ __webpack_exports__["default"] = (function(object) { W0 = W1 = X0 = Y0 = Z0 = X1 = Y1 = Z1 = 0; X2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Y2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Z2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, centroidStream); var x = +X2, y = +Y2, z = +Z2, m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["hypot"])(x, y, z); // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid. if (m < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) { x = X1, y = Y1, z = Z1; // If the feature has zero length, fall back to arithmetic mean of point vectors. if (W1 < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) x = X0, y = Y0, z = Z0; m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["hypot"])(x, y, z); // If the feature still has an undefined ccentroid, then return. if (m < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) return [NaN, NaN]; } return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(z / m) * _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"]]; }); /***/ }), /***/ "p9/F": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/buffer.js ***! \*****************************************************************/ /*! exports provided: buffer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function buffer(closingNotifier) { return function bufferOperatorFunction(source) { return source.lift(new BufferOperator(closingNotifier)); }; } class BufferOperator { constructor(closingNotifier) { this.closingNotifier = closingNotifier; } call(subscriber, source) { return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier)); } } class BufferSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, closingNotifier) { super(destination); this.buffer = []; this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(closingNotifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } _next(value) { this.buffer.push(value); } notifyNext() { const buffer = this.buffer; this.buffer = []; this.destination.next(buffer); } } //# sourceMappingURL=buffer.js.map /***/ }), /***/ "pD2Y": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/index.js ***! \**************************************************/ /*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "ZzDG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ "yEp2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ "S83q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ "G21l"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ "UGGt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ "U6M7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ "4xfg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "Ud7J"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ "cb2h"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ "WFeF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ "kO9b"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ "S3lI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformCss"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformSvg"]; }); /* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ "znUM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ "42CK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasisClosed"]; }); /* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ "cNgm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["hslLong"]; }); /* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ "El5h"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ "Ws9M"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["hclLong"]; }); /* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ "OHKE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["cubehelixLong"]; }); /* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ "rAw/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ "Gvn4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /***/ }), /***/ "pL0w": /*!*****************************************************!*\ !*** ./node_modules/d3-shape/src/curve/monotone.js ***! \*****************************************************/ /*! exports provided: monotoneX, monotoneY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneX", function() { return monotoneX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneY", function() { return monotoneY; }); function sign(x) { return x < 0 ? -1 : 1; } // Calculate the slopes of the tangents (Hermite-type interpolation) based on // the following paper: Steffen, M. 1990. A Simple Method for Monotonic // Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. // NOV(II), P. 443, 1990. function slope3(that, x2, y2) { var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1); return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; } // Calculate a one-sided slope. function slope2(that, t) { var h = that._x1 - that._x0; return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; } // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations // "you can express cubic Hermite interpolation in terms of cubic Bézier curves // with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". function point(that, t0, t1) { var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3; that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); } function MonotoneX(context) { this._context = context; } MonotoneX.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x1, this._y1); break; case 3: point(this, this._t0, slope2(this, this._t0)); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { var t1 = NaN; x = +x, y = +y; if (x === this._x1 && y === this._y1) return; // Ignore coincident points. switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break; default: point(this, this._t0, t1 = slope3(this, x, y)); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; this._t0 = t1; } } function MonotoneY(context) { this._context = new ReflectContext(context); } (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { MonotoneX.prototype.point.call(this, y, x); }; function ReflectContext(context) { this._context = context; } ReflectContext.prototype = { moveTo: function(x, y) { this._context.moveTo(y, x); }, closePath: function() { this._context.closePath(); }, lineTo: function(x, y) { this._context.lineTo(y, x); }, bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } }; function monotoneX(context) { return new MonotoneX(context); } function monotoneY(context) { return new MonotoneY(context); } /***/ }), /***/ "pLZG": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/filter.js ***! \*****************************************************************/ /*! exports provided: filter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function filter(predicate, thisArg) { return function filterOperatorFunction(source) { return source.lift(new FilterOperator(predicate, thisArg)); }; } class FilterOperator { constructor(predicate, thisArg) { this.predicate = predicate; this.thisArg = thisArg; } call(subscriber, source) { return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg)); } } class FilterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, thisArg) { super(destination); this.predicate = predicate; this.thisArg = thisArg; this.count = 0; } _next(value) { let result; try { result = this.predicate.call(this.thisArg, value, this.count++); } catch (err) { this.destination.error(err); return; } if (result) { this.destination.next(value); } } } //# sourceMappingURL=filter.js.map /***/ }), /***/ "pLzU": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js ***! \*************************************************************************/ /*! exports provided: subscribeToIterable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; }); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); const subscribeToIterable = (iterable) => (subscriber) => { const iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]](); do { let item; try { item = iterator.next(); } catch (err) { subscriber.error(err); return subscriber; } if (item.done) { subscriber.complete(); break; } subscriber.next(item.value); if (subscriber.closed) { break; } } while (true); if (typeof iterator.return === 'function') { subscriber.add(() => { if (iterator.return) { iterator.return(); } }); } return subscriber; }; //# sourceMappingURL=subscribeToIterable.js.map /***/ }), /***/ "pXlZ": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowWhen.js ***! \*********************************************************************/ /*! exports provided: windowWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function windowWhen(closingSelector) { return function windowWhenOperatorFunction(source) { return source.lift(new WindowOperator(closingSelector)); }; } class WindowOperator { constructor(closingSelector) { this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector)); } } class WindowSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"] { constructor(destination, closingSelector) { super(destination); this.destination = destination; this.closingSelector = closingSelector; this.openWindow(); } notifyNext(_outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) { this.openWindow(innerSub); } notifyError(error) { this._error(error); } notifyComplete(innerSub) { this.openWindow(innerSub); } _next(value) { this.window.next(value); } _error(err) { this.window.error(err); this.destination.error(err); this.unsubscribeClosingNotification(); } _complete() { this.window.complete(); this.destination.complete(); this.unsubscribeClosingNotification(); } unsubscribeClosingNotification() { if (this.closingNotification) { this.closingNotification.unsubscribe(); } } openWindow(innerSub = null) { if (innerSub) { this.remove(innerSub); innerSub.unsubscribe(); } const prevWindow = this.window; if (prevWindow) { prevWindow.complete(); } const window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); this.destination.next(window); let closingNotifier; try { const { closingSelector } = this; closingNotifier = closingSelector(); } catch (e) { this.destination.error(e); this.window.error(e); return; } this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier)); } } //# sourceMappingURL=windowWhen.js.map /***/ }), /***/ "pZEX": /*!***************************************************!*\ !*** ./node_modules/d3-time-format/src/locale.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatLocale; }); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ "tgfz"); function localDate(d) { if (0 <= d.y && d.y < 100) { var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); date.setFullYear(d.y); return date; } return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); } function utcDate(d) { if (0 <= d.y && d.y < 100) { var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); date.setUTCFullYear(d.y); return date; } return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); } function newDate(y, m, d) { return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; } function formatLocale(locale) { var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_weekdays = locale.days, locale_shortWeekdays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths; var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths); var formats = { "a": formatShortWeekday, "A": formatWeekday, "b": formatShortMonth, "B": formatMonth, "c": null, "d": formatDayOfMonth, "e": formatDayOfMonth, "f": formatMicroseconds, "g": formatYearISO, "G": formatFullYearISO, "H": formatHour24, "I": formatHour12, "j": formatDayOfYear, "L": formatMilliseconds, "m": formatMonthNumber, "M": formatMinutes, "p": formatPeriod, "q": formatQuarter, "Q": formatUnixTimestamp, "s": formatUnixTimestampSeconds, "S": formatSeconds, "u": formatWeekdayNumberMonday, "U": formatWeekNumberSunday, "V": formatWeekNumberISO, "w": formatWeekdayNumberSunday, "W": formatWeekNumberMonday, "x": null, "X": null, "y": formatYear, "Y": formatFullYear, "Z": formatZone, "%": formatLiteralPercent }; var utcFormats = { "a": formatUTCShortWeekday, "A": formatUTCWeekday, "b": formatUTCShortMonth, "B": formatUTCMonth, "c": null, "d": formatUTCDayOfMonth, "e": formatUTCDayOfMonth, "f": formatUTCMicroseconds, "g": formatUTCYearISO, "G": formatUTCFullYearISO, "H": formatUTCHour24, "I": formatUTCHour12, "j": formatUTCDayOfYear, "L": formatUTCMilliseconds, "m": formatUTCMonthNumber, "M": formatUTCMinutes, "p": formatUTCPeriod, "q": formatUTCQuarter, "Q": formatUnixTimestamp, "s": formatUnixTimestampSeconds, "S": formatUTCSeconds, "u": formatUTCWeekdayNumberMonday, "U": formatUTCWeekNumberSunday, "V": formatUTCWeekNumberISO, "w": formatUTCWeekdayNumberSunday, "W": formatUTCWeekNumberMonday, "x": null, "X": null, "y": formatUTCYear, "Y": formatUTCFullYear, "Z": formatUTCZone, "%": formatLiteralPercent }; var parses = { "a": parseShortWeekday, "A": parseWeekday, "b": parseShortMonth, "B": parseMonth, "c": parseLocaleDateTime, "d": parseDayOfMonth, "e": parseDayOfMonth, "f": parseMicroseconds, "g": parseYear, "G": parseFullYear, "H": parseHour24, "I": parseHour24, "j": parseDayOfYear, "L": parseMilliseconds, "m": parseMonthNumber, "M": parseMinutes, "p": parsePeriod, "q": parseQuarter, "Q": parseUnixTimestamp, "s": parseUnixTimestampSeconds, "S": parseSeconds, "u": parseWeekdayNumberMonday, "U": parseWeekNumberSunday, "V": parseWeekNumberISO, "w": parseWeekdayNumberSunday, "W": parseWeekNumberMonday, "x": parseLocaleDate, "X": parseLocaleTime, "y": parseYear, "Y": parseFullYear, "Z": parseZone, "%": parseLiteralPercent }; // These recursive directive definitions must be deferred. formats.x = newFormat(locale_date, formats); formats.X = newFormat(locale_time, formats); formats.c = newFormat(locale_dateTime, formats); utcFormats.x = newFormat(locale_date, utcFormats); utcFormats.X = newFormat(locale_time, utcFormats); utcFormats.c = newFormat(locale_dateTime, utcFormats); function newFormat(specifier, formats) { return function(date) { var string = [], i = -1, j = 0, n = specifier.length, c, pad, format; if (!(date instanceof Date)) date = new Date(+date); while (++i < n) { if (specifier.charCodeAt(i) === 37) { string.push(specifier.slice(j, i)); if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); else pad = c === "e" ? " " : "0"; if (format = formats[c]) c = format(date, pad); string.push(c); j = i + 1; } } string.push(specifier.slice(j, i)); return string.join(""); }; } function newParse(specifier, Z) { return function(string) { var d = newDate(1900, undefined, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day; if (i != string.length) return null; // If a UNIX timestamp is specified, return it. if ("Q" in d) return new Date(d.Q); if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); // If this is utcParse, never use the local timezone. if (Z && !("Z" in d)) d.Z = 0; // The am-pm flag is 0 for AM, and 1 for PM. if ("p" in d) d.H = d.H % 12 + d.p * 12; // If the month was not specified, inherit from the quarter. if (d.m === undefined) d.m = "q" in d ? d.q : 0; // Convert day-of-week and week-of-year to day-of-year. if ("V" in d) { if (d.V < 1 || d.V > 53) return null; if (!("w" in d)) d.w = 1; if ("Z" in d) { week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"])(week); week = d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].offset(week, (d.V - 1) * 7); d.y = week.getUTCFullYear(); d.m = week.getUTCMonth(); d.d = week.getUTCDate() + (d.w + 6) % 7; } else { week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"])(week); week = d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].offset(week, (d.V - 1) * 7); d.y = week.getFullYear(); d.m = week.getMonth(); d.d = week.getDate() + (d.w + 6) % 7; } } else if ("W" in d || "U" in d) { if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); d.m = 0; d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; } // If a time zone is specified, all fields are interpreted as UTC and then // offset according to the specified time zone. if ("Z" in d) { d.H += d.Z / 100 | 0; d.M += d.Z % 100; return utcDate(d); } // Otherwise, all fields are in local time. return localDate(d); }; } function parseSpecifier(d, specifier, string, j) { var i = 0, n = specifier.length, m = string.length, c, parse; while (i < n) { if (j >= m) return -1; c = specifier.charCodeAt(i++); if (c === 37) { c = specifier.charAt(i++); parse = parses[c in pads ? specifier.charAt(i++) : c]; if (!parse || ((j = parse(d, string, j)) < 0)) return -1; } else if (c != string.charCodeAt(j++)) { return -1; } } return j; } function parsePeriod(d, string, i) { var n = periodRe.exec(string.slice(i)); return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseShortWeekday(d, string, i) { var n = shortWeekdayRe.exec(string.slice(i)); return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseWeekday(d, string, i) { var n = weekdayRe.exec(string.slice(i)); return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseShortMonth(d, string, i) { var n = shortMonthRe.exec(string.slice(i)); return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseMonth(d, string, i) { var n = monthRe.exec(string.slice(i)); return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseLocaleDateTime(d, string, i) { return parseSpecifier(d, locale_dateTime, string, i); } function parseLocaleDate(d, string, i) { return parseSpecifier(d, locale_date, string, i); } function parseLocaleTime(d, string, i) { return parseSpecifier(d, locale_time, string, i); } function formatShortWeekday(d) { return locale_shortWeekdays[d.getDay()]; } function formatWeekday(d) { return locale_weekdays[d.getDay()]; } function formatShortMonth(d) { return locale_shortMonths[d.getMonth()]; } function formatMonth(d) { return locale_months[d.getMonth()]; } function formatPeriod(d) { return locale_periods[+(d.getHours() >= 12)]; } function formatQuarter(d) { return 1 + ~~(d.getMonth() / 3); } function formatUTCShortWeekday(d) { return locale_shortWeekdays[d.getUTCDay()]; } function formatUTCWeekday(d) { return locale_weekdays[d.getUTCDay()]; } function formatUTCShortMonth(d) { return locale_shortMonths[d.getUTCMonth()]; } function formatUTCMonth(d) { return locale_months[d.getUTCMonth()]; } function formatUTCPeriod(d) { return locale_periods[+(d.getUTCHours() >= 12)]; } function formatUTCQuarter(d) { return 1 + ~~(d.getUTCMonth() / 3); } return { format: function(specifier) { var f = newFormat(specifier += "", formats); f.toString = function() { return specifier; }; return f; }, parse: function(specifier) { var p = newParse(specifier += "", false); p.toString = function() { return specifier; }; return p; }, utcFormat: function(specifier) { var f = newFormat(specifier += "", utcFormats); f.toString = function() { return specifier; }; return f; }, utcParse: function(specifier) { var p = newParse(specifier += "", true); p.toString = function() { return specifier; }; return p; } }; } var pads = {"-": "", "_": " ", "0": "0"}, numberRe = /^\s*\d+/, // note: ignores next directive percentRe = /^%/, requoteRe = /[\\^$*+?|[\]().{}]/g; function pad(value, fill, width) { var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length; return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); } function requote(s) { return s.replace(requoteRe, "\\$&"); } function formatRe(names) { return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); } function formatLookup(names) { return new Map(names.map((name, i) => [name.toLowerCase(), i])); } function parseWeekdayNumberSunday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.w = +n[0], i + n[0].length) : -1; } function parseWeekdayNumberMonday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.u = +n[0], i + n[0].length) : -1; } function parseWeekNumberSunday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.U = +n[0], i + n[0].length) : -1; } function parseWeekNumberISO(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.V = +n[0], i + n[0].length) : -1; } function parseWeekNumberMonday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.W = +n[0], i + n[0].length) : -1; } function parseFullYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 4)); return n ? (d.y = +n[0], i + n[0].length) : -1; } function parseYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; } function parseZone(d, string, i) { var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; } function parseQuarter(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; } function parseMonthNumber(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.m = n[0] - 1, i + n[0].length) : -1; } function parseDayOfMonth(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.d = +n[0], i + n[0].length) : -1; } function parseDayOfYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 3)); return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; } function parseHour24(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.H = +n[0], i + n[0].length) : -1; } function parseMinutes(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.M = +n[0], i + n[0].length) : -1; } function parseSeconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.S = +n[0], i + n[0].length) : -1; } function parseMilliseconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 3)); return n ? (d.L = +n[0], i + n[0].length) : -1; } function parseMicroseconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 6)); return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; } function parseLiteralPercent(d, string, i) { var n = percentRe.exec(string.slice(i, i + 1)); return n ? i + n[0].length : -1; } function parseUnixTimestamp(d, string, i) { var n = numberRe.exec(string.slice(i)); return n ? (d.Q = +n[0], i + n[0].length) : -1; } function parseUnixTimestampSeconds(d, string, i) { var n = numberRe.exec(string.slice(i)); return n ? (d.s = +n[0], i + n[0].length) : -1; } function formatDayOfMonth(d, p) { return pad(d.getDate(), p, 2); } function formatHour24(d, p) { return pad(d.getHours(), p, 2); } function formatHour12(d, p) { return pad(d.getHours() % 12 || 12, p, 2); } function formatDayOfYear(d, p) { return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d), p, 3); } function formatMilliseconds(d, p) { return pad(d.getMilliseconds(), p, 3); } function formatMicroseconds(d, p) { return formatMilliseconds(d, p) + "000"; } function formatMonthNumber(d, p) { return pad(d.getMonth() + 1, p, 2); } function formatMinutes(d, p) { return pad(d.getMinutes(), p, 2); } function formatSeconds(d, p) { return pad(d.getSeconds(), p, 2); } function formatWeekdayNumberMonday(d) { var day = d.getDay(); return day === 0 ? 7 : day; } function formatWeekNumberSunday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); } function dISO(d) { var day = d.getDay(); return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].ceil(d); } function formatWeekNumberISO(d, p) { d = dISO(d); return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d).getDay() === 4), p, 2); } function formatWeekdayNumberSunday(d) { return d.getDay(); } function formatWeekNumberMonday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); } function formatYear(d, p) { return pad(d.getFullYear() % 100, p, 2); } function formatYearISO(d, p) { d = dISO(d); return pad(d.getFullYear() % 100, p, 2); } function formatFullYear(d, p) { return pad(d.getFullYear() % 10000, p, 4); } function formatFullYearISO(d, p) { var day = d.getDay(); d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].ceil(d); return pad(d.getFullYear() % 10000, p, 4); } function formatZone(d) { var z = d.getTimezoneOffset(); return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2); } function formatUTCDayOfMonth(d, p) { return pad(d.getUTCDate(), p, 2); } function formatUTCHour24(d, p) { return pad(d.getUTCHours(), p, 2); } function formatUTCHour12(d, p) { return pad(d.getUTCHours() % 12 || 12, p, 2); } function formatUTCDayOfYear(d, p) { return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d), p, 3); } function formatUTCMilliseconds(d, p) { return pad(d.getUTCMilliseconds(), p, 3); } function formatUTCMicroseconds(d, p) { return formatUTCMilliseconds(d, p) + "000"; } function formatUTCMonthNumber(d, p) { return pad(d.getUTCMonth() + 1, p, 2); } function formatUTCMinutes(d, p) { return pad(d.getUTCMinutes(), p, 2); } function formatUTCSeconds(d, p) { return pad(d.getUTCSeconds(), p, 2); } function formatUTCWeekdayNumberMonday(d) { var dow = d.getUTCDay(); return dow === 0 ? 7 : dow; } function formatUTCWeekNumberSunday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); } function UTCdISO(d) { var day = d.getUTCDay(); return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].ceil(d); } function formatUTCWeekNumberISO(d, p) { d = UTCdISO(d); return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d).getUTCDay() === 4), p, 2); } function formatUTCWeekdayNumberSunday(d) { return d.getUTCDay(); } function formatUTCWeekNumberMonday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); } function formatUTCYear(d, p) { return pad(d.getUTCFullYear() % 100, p, 2); } function formatUTCYearISO(d, p) { d = UTCdISO(d); return pad(d.getUTCFullYear() % 100, p, 2); } function formatUTCFullYear(d, p) { return pad(d.getUTCFullYear() % 10000, p, 4); } function formatUTCFullYearISO(d, p) { var day = d.getUTCDay(); d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].ceil(d); return pad(d.getUTCFullYear() % 10000, p, 4); } function formatUTCZone() { return "+0000"; } function formatLiteralPercent() { return "%"; } function formatUnixTimestamp(d) { return +d; } function formatUnixTimestampSeconds(d) { return Math.floor(+d / 1000); } /***/ }), /***/ "pb3N": /*!***********************************************!*\ !*** ./node_modules/d3-geo/src/clip/index.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ "ODVu"); /* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin.js */ "5xK/"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains.js */ "7FHc"); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony default export */ __webpack_exports__["default"] = (function(pointVisible, clipLine, interpolate, start) { return function(sink) { var line = clipLine(sink), ringBuffer = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), ringSink = clipLine(ringBuffer), polygonStarted = false, polygon, segments, ring; var clip = { point: point, lineStart: lineStart, lineEnd: lineEnd, polygonStart: function() { clip.point = pointRing; clip.lineStart = ringStart; clip.lineEnd = ringEnd; segments = []; polygon = []; }, polygonEnd: function() { clip.point = point; clip.lineStart = lineStart; clip.lineEnd = lineEnd; segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments); var startInside = Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_3__["default"])(polygon, start); if (segments.length) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_1__["default"])(segments, compareIntersection, startInside, interpolate, sink); } else if (startInside) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; sink.lineStart(); interpolate(null, null, 1, sink); sink.lineEnd(); } if (polygonStarted) sink.polygonEnd(), polygonStarted = false; segments = polygon = null; }, sphere: function() { sink.polygonStart(); sink.lineStart(); interpolate(null, null, 1, sink); sink.lineEnd(); sink.polygonEnd(); } }; function point(lambda, phi) { if (pointVisible(lambda, phi)) sink.point(lambda, phi); } function pointLine(lambda, phi) { line.point(lambda, phi); } function lineStart() { clip.point = pointLine; line.lineStart(); } function lineEnd() { clip.point = point; line.lineEnd(); } function pointRing(lambda, phi) { ring.push([lambda, phi]); ringSink.point(lambda, phi); } function ringStart() { ringSink.lineStart(); ring = []; } function ringEnd() { pointRing(ring[0][0], ring[0][1]); ringSink.lineEnd(); var clean = ringSink.clean(), ringSegments = ringBuffer.result(), i, n = ringSegments.length, m, segment, point; ring.pop(); polygon.push(ring); ring = null; if (!n) return; // No intersections. if (clean & 1) { segment = ringSegments[0]; if ((m = segment.length - 1) > 0) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; sink.lineStart(); for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); sink.lineEnd(); } return; } // Rejoin connected segments. // TODO reuse ringBuffer.rejoin()? if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); segments.push(ringSegments.filter(validSegment)); } return clip; }; }); function validSegment(segment) { return segment.length > 1; } // Intersections are sorted along the clip edge. For both antimeridian cutting // and circle clipping, the same comparison is used. function compareIntersection(a, b) { return ((a = a.x)[0] < 0 ? a[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - a[1]) - ((b = b.x)[0] < 0 ? b[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - b[1]); } /***/ }), /***/ "pbho": /*!********************************************!*\ !*** ./node_modules/d3-geo/src/compose.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { function compose(x, y) { return x = a(x, y), b(x[0], x[1]); } if (a.invert && b.invert) compose.invert = function(x, y) { return x = b.invert(x, y), x && a.invert(x[0], x[1]); }; return compose; }); /***/ }), /***/ "pjAE": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js ***! \*************************************************************************/ /*! exports provided: UnsubscriptionError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; }); const UnsubscriptionErrorImpl = (() => { function UnsubscriptionErrorImpl(errors) { Error.call(this); this.message = errors ? `${errors.length} errors occurred during unsubscription: ${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}` : ''; this.name = 'UnsubscriptionError'; this.errors = errors; return this; } UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype); return UnsubscriptionErrorImpl; })(); const UnsubscriptionError = UnsubscriptionErrorImpl; //# sourceMappingURL=UnsubscriptionError.js.map /***/ }), /***/ "prbS": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/interpolate.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var x0 = a[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], y0 = a[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], x1 = b[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], y1 = b[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), cy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1), sy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1), kx0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x0), ky0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x0), kx1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x1), ky1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x1), d = 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(y1 - y0) + cy0 * cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(x1 - x0))), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d); var interpolate = d ? function(t) { var B = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(t *= d) / k, A = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d - t) / k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1; return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(z, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"] ]; } : function() { return [x0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], y0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; }; interpolate.distance = d; return interpolate; }); /***/ }), /***/ "ptze": /*!**********************************************!*\ !*** ./node_modules/d3-random/src/normal.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomNormal(source) { function randomNormal(mu, sigma) { var x, r; mu = mu == null ? 0 : +mu; sigma = sigma == null ? 1 : +sigma; return function() { var y; // If available, use the second previously-generated uniform random. if (x != null) y = x, x = null; // Otherwise, generate a new x and y. else do { x = source() * 2 - 1; y = source() * 2 - 1; r = x * x + y * y; } while (!r || r > 1); return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r); }; } randomNormal.source = sourceRandomNormal; return randomNormal; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "pxpQ": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/observeOn.js ***! \********************************************************************/ /*! exports provided: observeOn, ObserveOnOperator, ObserveOnSubscriber, ObserveOnMessage */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Notification */ "WMd4"); function observeOn(scheduler, delay = 0) { return function observeOnOperatorFunction(source) { return source.lift(new ObserveOnOperator(scheduler, delay)); }; } class ObserveOnOperator { constructor(scheduler, delay = 0) { this.scheduler = scheduler; this.delay = delay; } call(subscriber, source) { return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay)); } } class ObserveOnSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, scheduler, delay = 0) { super(destination); this.scheduler = scheduler; this.delay = delay; } static dispatch(arg) { const { notification, destination } = arg; notification.observe(destination); this.unsubscribe(); } scheduleMessage(notification) { const destination = this.destination; destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination))); } _next(value) { this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createNext(value)); } _error(err) { this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createError(err)); this.unsubscribe(); } _complete() { this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createComplete()); this.unsubscribe(); } } class ObserveOnMessage { constructor(notification, destination) { this.notification = notification; this.destination = destination; } } //# sourceMappingURL=observeOn.js.map /***/ }), /***/ "q+nN": /*!*******************************************!*\ !*** ./node_modules/d3-drag/src/index.js ***! \*******************************************/ /*! exports provided: drag, dragDisable, dragEnable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ "AJ/N"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ "tU+D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["yesdrag"]; }); /***/ }), /***/ "q7zd": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMapTo.js ***! \**********************************************************************/ /*! exports provided: concatMapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; }); /* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./concatMap */ "bOdf"); function concatMapTo(innerObservable, resultSelector) { return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(() => innerObservable, resultSelector); } //# sourceMappingURL=concatMapTo.js.map /***/ }), /***/ "q92s": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/merge.js ***! \****************************************************************/ /*! exports provided: merge */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); /* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/merge */ "VRyK"); function merge(...observables) { return (source) => source.lift.call(Object(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"])(source, ...observables)); } //# sourceMappingURL=merge.js.map /***/ }), /***/ "qCKp": /*!*********************************************!*\ !*** ./node_modules/rxjs/_esm2015/index.js ***! \*********************************************/ /*! exports provided: Observable, ConnectableObservable, GroupedObservable, observable, Subject, BehaviorSubject, ReplaySubject, AsyncSubject, asap, asapScheduler, async, asyncScheduler, queue, queueScheduler, animationFrame, animationFrameScheduler, VirtualTimeScheduler, VirtualAction, Scheduler, Subscription, Subscriber, Notification, NotificationKind, pipe, noop, identity, isObservable, ArgumentOutOfRangeError, EmptyError, ObjectUnsubscribedError, UnsubscriptionError, TimeoutError, bindCallback, bindNodeCallback, combineLatest, concat, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, iif, interval, merge, never, of, onErrorResumeNext, pairs, partition, race, range, throwError, timer, using, zip, scheduled, EMPTY, NEVER, config */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/Observable */ "HDdC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; }); /* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/observable/ConnectableObservable */ "EQ5u"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; }); /* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/operators/groupBy */ "OQgR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; }); /* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/symbol/observable */ "kJWO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; }); /* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/Subject */ "XNiG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; }); /* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/BehaviorSubject */ "2Vo4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; }); /* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./internal/ReplaySubject */ "jtHE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; }); /* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./internal/AsyncSubject */ "NHP+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; }); /* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internal/scheduler/asap */ "7Hc7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asapScheduler"]; }); /* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./internal/scheduler/async */ "D0XW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "async", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["asyncScheduler"]; }); /* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internal/scheduler/queue */ "qgXg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queueScheduler"]; }); /* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internal/scheduler/animationFrame */ "eNwd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrameScheduler"]; }); /* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internal/scheduler/VirtualTimeScheduler */ "iKkX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; }); /* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internal/Scheduler */ "Y/cZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; }); /* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internal/Subscription */ "quSY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; }); /* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./internal/Subscriber */ "7o/Q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; }); /* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./internal/Notification */ "WMd4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; }); /* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./internal/util/pipe */ "mCNh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; }); /* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./internal/util/noop */ "KqfI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; }); /* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internal/util/identity */ "SpAZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; }); /* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./internal/util/isObservable */ "7+OI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; }); /* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./internal/util/ArgumentOutOfRangeError */ "4I5i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; }); /* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./internal/util/EmptyError */ "sVev"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; }); /* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./internal/util/ObjectUnsubscribedError */ "9ppp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; }); /* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./internal/util/UnsubscriptionError */ "pjAE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; }); /* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./internal/util/TimeoutError */ "Y6u4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; }); /* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./internal/observable/bindCallback */ "QqCr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; }); /* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internal/observable/bindNodeCallback */ "4O5X"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; }); /* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./internal/observable/combineLatest */ "itXk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; }); /* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./internal/observable/concat */ "GyhO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; }); /* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./internal/observable/defer */ "NXyV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; }); /* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./internal/observable/empty */ "EY2u"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; }); /* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./internal/observable/forkJoin */ "cp0P"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; }); /* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./internal/observable/from */ "Cfvw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; }); /* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./internal/observable/fromEvent */ "xgIS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; }); /* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./internal/observable/fromEventPattern */ "04ZW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; }); /* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./internal/observable/generate */ "WPMC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; }); /* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./internal/observable/iif */ "r0o6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; }); /* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./internal/observable/interval */ "l5mm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; }); /* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./internal/observable/merge */ "VRyK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; }); /* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./internal/observable/never */ "5yfJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; }); /* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./internal/observable/of */ "LRne"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; }); /* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./internal/observable/onErrorResumeNext */ "Hkhx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; }); /* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./internal/observable/pairs */ "hKy8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; }); /* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./internal/observable/partition */ "2QGa"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; }); /* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./internal/observable/race */ "Nv8m"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; }); /* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./internal/observable/range */ "NNCq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; }); /* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./internal/observable/throwError */ "z6cu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; }); /* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./internal/observable/timer */ "PqYM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; }); /* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./internal/observable/using */ "Qn8I"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; }); /* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./internal/observable/zip */ "1uah"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; }); /* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./internal/scheduled/scheduled */ "7HRe"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; }); /* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./internal/config */ "2fFW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; }); //# sourceMappingURL=index.js.map /***/ }), /***/ "qE0H": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/curve/natural.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function Natural(context) { this._context = context; } Natural.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = []; this._y = []; }, lineEnd: function() { var x = this._x, y = this._y, n = x.length; if (n) { this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); if (n === 2) { this._context.lineTo(x[1], y[1]); } else { var px = controlPoints(x), py = controlPoints(y); for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); } } } if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); this._line = 1 - this._line; this._x = this._y = null; }, point: function(x, y) { this._x.push(+x); this._y.push(+y); } }; // See https://www.particleincell.com/2012/bezier-splines/ for derivation. function controlPoints(x) { var i, n = x.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n); a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; a[n - 1] = r[n - 1] / b[n - 1]; for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; b[n - 1] = (x[n] + a[n - 1]) / 2; for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; return [a, b]; } /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Natural(context); }); /***/ }), /***/ "qKDy": /*!***********************************************!*\ !*** ./node_modules/d3-brush/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "qKhr": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "f0f0f0bdbdbd636363", "f7f7f7cccccc969696525252", "f7f7f7cccccc969696636363252525", "f7f7f7d9d9d9bdbdbd969696636363252525", "f7f7f7d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "qLhn": /*!*************************************************!*\ !*** ./node_modules/d3-selection/src/create.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator.js */ "V/Wt"); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select.js */ "AKWm"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { return Object(_select_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name).call(document.documentElement)); }); /***/ }), /***/ "qR3b": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/merge.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony default export */ __webpack_exports__["default"] = (function(transition) { if (transition._id !== this._id) throw new Error; for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group0[i] || group1[i]) { merge[i] = node; } } } for (; j < m0; ++j) { merges[j] = groups0[j]; } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](merges, this._parents, this._name, this._id); }); /***/ }), /***/ "qWhX": /*!***********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")); /***/ }), /***/ "qZ0a": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publishLast.js ***! \**********************************************************************/ /*! exports provided: publishLast */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; }); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publishLast() { return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); } //# sourceMappingURL=publishLast.js.map /***/ }), /***/ "qgXg": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/queue.js ***! \****************************************************************/ /*! exports provided: queueScheduler, queue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return queueScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; }); /* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./QueueAction */ "YuR2"); /* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QueueScheduler */ "Hh5Z"); const queueScheduler = new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]); const queue = queueScheduler; //# sourceMappingURL=queue.js.map /***/ }), /***/ "qnQu": /*!*****************************************************!*\ !*** ./node_modules/d3-format/src/formatDecimal.js ***! \*****************************************************/ /*! exports provided: default, formatDecimalParts */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDecimalParts", function() { return formatDecimalParts; }); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10); }); // Computes the decimal coefficient and exponent of the specified number x with // significant digits p, where x is positive and p is in [1, 21] or undefined. // For example, formatDecimalParts(1.23) returns ["123", 0]. function formatDecimalParts(x, p) { if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity var i, coefficient = x.slice(0, i); // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). return [ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1) ]; } /***/ }), /***/ "qqpY": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/order/none.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var n = series.length, o = new Array(n); while (--n >= 0) o[n] = n; return o; }); /***/ }), /***/ "quSY": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Subscription.js ***! \*************************************************************/ /*! exports provided: Subscription */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isArray */ "DH7j"); /* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/isObject */ "XoHu"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/isFunction */ "n6bG"); /* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/UnsubscriptionError */ "pjAE"); class Subscription { constructor(unsubscribe) { this.closed = false; this._parentOrParents = null; this._subscriptions = null; if (unsubscribe) { this._ctorUnsubscribe = true; this._unsubscribe = unsubscribe; } } unsubscribe() { let errors; if (this.closed) { return; } let { _parentOrParents, _ctorUnsubscribe, _unsubscribe, _subscriptions } = this; this.closed = true; this._parentOrParents = null; this._subscriptions = null; if (_parentOrParents instanceof Subscription) { _parentOrParents.remove(this); } else if (_parentOrParents !== null) { for (let index = 0; index < _parentOrParents.length; ++index) { const parent = _parentOrParents[index]; parent.remove(this); } } if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) { if (_ctorUnsubscribe) { this._unsubscribe = undefined; } try { _unsubscribe.call(this); } catch (e) { errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e]; } } if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) { let index = -1; let len = _subscriptions.length; while (++index < len) { const sub = _subscriptions[index]; if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) { try { sub.unsubscribe(); } catch (e) { errors = errors || []; if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) { errors = errors.concat(flattenUnsubscriptionErrors(e.errors)); } else { errors.push(e); } } } } } if (errors) { throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors); } } add(teardown) { let subscription = teardown; if (!teardown) { return Subscription.EMPTY; } switch (typeof teardown) { case 'function': subscription = new Subscription(teardown); case 'object': if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') { return subscription; } else if (this.closed) { subscription.unsubscribe(); return subscription; } else if (!(subscription instanceof Subscription)) { const tmp = subscription; subscription = new Subscription(); subscription._subscriptions = [tmp]; } break; default: { throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); } } let { _parentOrParents } = subscription; if (_parentOrParents === null) { subscription._parentOrParents = this; } else if (_parentOrParents instanceof Subscription) { if (_parentOrParents === this) { return subscription; } subscription._parentOrParents = [_parentOrParents, this]; } else if (_parentOrParents.indexOf(this) === -1) { _parentOrParents.push(this); } else { return subscription; } const subscriptions = this._subscriptions; if (subscriptions === null) { this._subscriptions = [subscription]; } else { subscriptions.push(subscription); } return subscription; } remove(subscription) { const subscriptions = this._subscriptions; if (subscriptions) { const subscriptionIndex = subscriptions.indexOf(subscription); if (subscriptionIndex !== -1) { subscriptions.splice(subscriptionIndex, 1); } } } } Subscription.EMPTY = (function (empty) { empty.closed = true; return empty; }(new Subscription())); function flattenUnsubscriptionErrors(errors) { return errors.reduce((errs, err) => errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) ? err.errors : err), []); } //# sourceMappingURL=Subscription.js.map /***/ }), /***/ "qyUX": /*!********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")); /***/ }), /***/ "r0WS": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timestamp.js ***! \********************************************************************/ /*! exports provided: timestamp, Timestamp */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "lJxs"); function timestamp(scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])((value) => new Timestamp(value, scheduler.now())); } class Timestamp { constructor(value, timestamp) { this.value = value; this.timestamp = timestamp; } } //# sourceMappingURL=timestamp.js.map /***/ }), /***/ "r0o6": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/iif.js ***! \***************************************************************/ /*! exports provided: iif */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; }); /* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defer */ "NXyV"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty */ "EY2u"); function iif(condition, trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"], falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"]) { return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(() => condition() ? trueResult : falseResult); } //# sourceMappingURL=iif.js.map /***/ }), /***/ "r5Py": /*!*************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/select.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function(select) { var name = this._name, id = this._id; if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selector"])(select); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { if ("__data__" in node) subnode.__data__ = node.__data__; subgroup[i] = subnode; Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id)); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, name, id); }); /***/ }), /***/ "rAw/": /*!******************************************************!*\ !*** ./node_modules/d3-interpolate/src/piecewise.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return piecewise; }); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); function piecewise(interpolate, values) { if (values === undefined) values = interpolate, interpolate = _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); while (i < n) I[i] = interpolate(v, v = values[++i]); return function(t) { var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); return I[i](t - i); }; } /***/ }), /***/ "rBOd": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/path/area.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "mPOO"); var areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), x00, y00, x0, y0; var areaStream = { point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonStart: function() { areaStream.lineStart = areaRingStart; areaStream.lineEnd = areaRingEnd; }, polygonEnd: function() { areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; areaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(areaRingSum)); areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); }, result: function() { var area = areaSum / 2; areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); return area; } }; function areaRingStart() { areaStream.point = areaPointFirst; } function areaPointFirst(x, y) { areaStream.point = areaPoint; x00 = x0 = x, y00 = y0 = y; } function areaPoint(x, y) { areaRingSum.add(y0 * x - x0 * y); x0 = x, y0 = y; } function areaRingEnd() { areaPoint(x00, y00); } /* harmony default export */ __webpack_exports__["default"] = (areaStream); /***/ }), /***/ "rO+Z": /*!**************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***! \**************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fee6cefdae6be6550d", "feeddefdbe85fd8d3cd94701", "feeddefdbe85fd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "rWgG": /*!*********************************************!*\ !*** ./node_modules/d3-format/src/index.js ***! \*********************************************/ /*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "EjHT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["format"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["formatPrefix"]; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "sXBl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ "CbjS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["FormatSpecifier"]; }); /* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ "2tFh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ "2TPD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ "2Ynt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /***/ }), /***/ "rdqn": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/graticule.js ***! \**********************************************/ /*! exports provided: default, graticule10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return graticule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "graticule10", function() { return graticule10; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); function graticuleX(y0, y1, dy) { var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(y0, y1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dy).concat(y1); return function(x) { return y.map(function(y) { return [x, y]; }); }; } function graticuleY(x0, x1, dx) { var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(x0, x1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dx).concat(x1); return function(y) { return x.map(function(x) { return [x, y]; }); }; } function graticule() { var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5; function graticule() { return {type: "MultiLineString", coordinates: lines()}; } function lines() { return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(X0 / DX) * DX, X1, DX).map(X) .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(Y0 / DY) * DY, Y1, DY).map(Y)) .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(x % DX) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(x)) .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(y % DY) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(y)); } graticule.lines = function() { return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; }); }; graticule.outline = function() { return { type: "Polygon", coordinates: [ X(X0).concat( Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ] }; }; graticule.extent = function(_) { if (!arguments.length) return graticule.extentMinor(); return graticule.extentMajor(_).extentMinor(_); }; graticule.extentMajor = function(_) { if (!arguments.length) return [[X0, Y0], [X1, Y1]]; X0 = +_[0][0], X1 = +_[1][0]; Y0 = +_[0][1], Y1 = +_[1][1]; if (X0 > X1) _ = X0, X0 = X1, X1 = _; if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; return graticule.precision(precision); }; graticule.extentMinor = function(_) { if (!arguments.length) return [[x0, y0], [x1, y1]]; x0 = +_[0][0], x1 = +_[1][0]; y0 = +_[0][1], y1 = +_[1][1]; if (x0 > x1) _ = x0, x0 = x1, x1 = _; if (y0 > y1) _ = y0, y0 = y1, y1 = _; return graticule.precision(precision); }; graticule.step = function(_) { if (!arguments.length) return graticule.stepMinor(); return graticule.stepMajor(_).stepMinor(_); }; graticule.stepMajor = function(_) { if (!arguments.length) return [DX, DY]; DX = +_[0], DY = +_[1]; return graticule; }; graticule.stepMinor = function(_) { if (!arguments.length) return [dx, dy]; dx = +_[0], dy = +_[1]; return graticule; }; graticule.precision = function(_) { if (!arguments.length) return precision; precision = +_; x = graticuleX(y0, y1, 90); y = graticuleY(x0, x1, precision); X = graticuleX(Y0, Y1, 90); Y = graticuleY(X0, X1, precision); return graticule; }; return graticule .extentMajor([[-180, -90 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 90 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]) .extentMinor([[-180, -80 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 80 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]); } function graticule10() { return graticule()(); } /***/ }), /***/ "rgrl": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/distance.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length.js */ "zz/+"); var coordinates = [null, null], object = {type: "LineString", coordinates: coordinates}; /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { coordinates[0] = a; coordinates[1] = b; return Object(_length_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object); }); /***/ }), /***/ "rkAg": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/triangle.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var sqrt3 = Math.sqrt(3); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var y = -Math.sqrt(size / (sqrt3 * 3)); context.moveTo(0, y * 2); context.lineTo(-sqrt3 * y, -y); context.lineTo(sqrt3 * y, -y); context.closePath(); } }); /***/ }), /***/ "rtYu": /*!***************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/schedule.js ***! \***************************************************************/ /*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CREATED", function() { return CREATED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCHEDULED", function() { return SCHEDULED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTING", function() { return STARTING; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTED", function() { return STARTED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RUNNING", function() { return RUNNING; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDING", function() { return ENDING; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDED", function() { return ENDED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "ta7q"); var emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "end", "cancel", "interrupt"); var emptyTween = []; var CREATED = 0; var SCHEDULED = 1; var STARTING = 2; var STARTED = 3; var RUNNING = 4; var ENDING = 5; var ENDED = 6; /* harmony default export */ __webpack_exports__["default"] = (function(node, name, id, index, group, timing) { var schedules = node.__transition; if (!schedules) node.__transition = {}; else if (id in schedules) return; create(node, id, { name: name, index: index, // For context during callback. group: group, // For context during callback. on: emptyOn, tween: emptyTween, time: timing.time, delay: timing.delay, duration: timing.duration, ease: timing.ease, timer: null, state: CREATED }); }); function init(node, id) { var schedule = get(node, id); if (schedule.state > CREATED) throw new Error("too late; already scheduled"); return schedule; } function set(node, id) { var schedule = get(node, id); if (schedule.state > STARTED) throw new Error("too late; already running"); return schedule; } function get(node, id) { var schedule = node.__transition; if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); return schedule; } function create(node, id, self) { var schedules = node.__transition, tween; // Initialize the self timer when the transition is created. // Note the actual delay is not known until the first callback! schedules[id] = self; self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(schedule, 0, self.time); function schedule(elapsed) { self.state = SCHEDULED; self.timer.restart(start, self.delay, self.time); // If the elapsed delay is less than our first sleep, start immediately. if (self.delay <= elapsed) start(elapsed - self.delay); } function start(elapsed) { var i, j, n, o; // If the state is not SCHEDULED, then we previously errored on start. if (self.state !== SCHEDULED) return stop(); for (i in schedules) { o = schedules[i]; if (o.name !== self.name) continue; // While this element already has a starting transition during this frame, // defer starting an interrupting transition until that transition has a // chance to tick (and possibly end); see d3/d3-transition#54! if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(start); // Interrupt the active transition, if any. if (o.state === RUNNING) { o.state = ENDED; o.timer.stop(); o.on.call("interrupt", node, node.__data__, o.index, o.group); delete schedules[i]; } // Cancel any pre-empted transitions. else if (+i < id) { o.state = ENDED; o.timer.stop(); o.on.call("cancel", node, node.__data__, o.index, o.group); delete schedules[i]; } } // Defer the first tick to end of the current frame; see d3/d3#1576. // Note the transition may be canceled after start and before the first tick! // Note this must be scheduled before the start event; see d3/d3-transition#16! // Assuming this is successful, subsequent callbacks go straight to tick. Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(function() { if (self.state === STARTED) { self.state = RUNNING; self.timer.restart(tick, self.delay, self.time); tick(elapsed); } }); // Dispatch the start event. // Note this must be done before the tween are initialized. self.state = STARTING; self.on.call("start", node, node.__data__, self.index, self.group); if (self.state !== STARTING) return; // interrupted self.state = STARTED; // Initialize the tween, deleting null tween. tween = new Array(n = self.tween.length); for (i = 0, j = -1; i < n; ++i) { if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { tween[++j] = o; } } tween.length = j + 1; } function tick(elapsed) { var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n = tween.length; while (++i < n) { tween[i].call(node, t); } // Dispatch the end event. if (self.state === ENDING) { self.on.call("end", node, node.__data__, self.index, self.group); stop(); } } function stop() { self.state = ENDED; self.timer.stop(); delete schedules[id]; for (var i in schedules) return; // eslint-disable-line no-unused-vars delete node.__transition; } } /***/ }), /***/ "s8O9": /*!******************************************!*\ !*** ./node_modules/d3-time/src/hour.js ***! \******************************************/ /*! exports provided: default, hours */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hours", function() { return hours; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; }, function(date) { return date.getHours(); }); /* harmony default export */ __webpack_exports__["default"] = (hour); var hours = hour.range; /***/ }), /***/ "sCaM": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/band.js ***! \*******************************************/ /*! exports provided: default, point */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return band; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _ordinal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ordinal.js */ "3xmg"); function band() { var scale = Object(_ordinal_js__WEBPACK_IMPORTED_MODULE_2__["default"])().unknown(undefined), domain = scale.domain, ordinalRange = scale.range, r0 = 0, r1 = 1, step, bandwidth, round = false, paddingInner = 0, paddingOuter = 0, align = 0.5; delete scale.unknown; function rescale() { var n = domain().length, reverse = r1 < r0, start = reverse ? r1 : r0, stop = reverse ? r0 : r1; step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); if (round) step = Math.floor(step); start += (stop - start - step * (n - paddingInner)) * align; bandwidth = step * (1 - paddingInner); if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n).map(function(i) { return start + step * i; }); return ordinalRange(reverse ? values.reverse() : values); } scale.domain = function(_) { return arguments.length ? (domain(_), rescale()) : domain(); }; scale.range = function(_) { return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1]; }; scale.rangeRound = function(_) { return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale(); }; scale.bandwidth = function() { return bandwidth; }; scale.step = function() { return step; }; scale.round = function(_) { return arguments.length ? (round = !!_, rescale()) : round; }; scale.padding = function(_) { return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; }; scale.paddingInner = function(_) { return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; }; scale.paddingOuter = function(_) { return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; }; scale.align = function(_) { return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; }; scale.copy = function() { return band(domain(), [r0, r1]) .round(round) .paddingInner(paddingInner) .paddingOuter(paddingOuter) .align(align); }; return _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(rescale(), arguments); } function pointish(scale) { var copy = scale.copy; scale.padding = scale.paddingOuter; delete scale.paddingInner; delete scale.paddingOuter; scale.copy = function() { return pointish(copy()); }; return scale; } function point() { return pointish(band.apply(null, arguments).paddingInner(1)); } /***/ }), /***/ "sFV2": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/color.js ***! \**************************************************/ /*! exports provided: hue, gamma, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hue", function() { return hue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gamma", function() { return gamma; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nogamma; }); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "xpj1"); function linear(a, d) { return function(t) { return a + t * d; }; } function exponential(a, b, y) { return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { return Math.pow(a + t * b, y); }; } function hue(a, b) { var d = b - a; return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); } function gamma(y) { return (y = +y) === 1 ? nogamma : function(a, b) { return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); }; } function nogamma(a, b) { var d = b - a; return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); } /***/ }), /***/ "sK06": /*!*********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/cardinalOpen.js ***! \*********************************************************/ /*! exports provided: CardinalOpen, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalOpen", function() { return CardinalOpen; }); /* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ "d5JU"); function CardinalOpen(context, tension) { this._context = context; this._k = (1 - tension) / 6; } CardinalOpen.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; case 3: this._point = 4; // proceed default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { function cardinal(context) { return new CardinalOpen(context, tension); } cardinal.tension = function(tension) { return custom(+tension); }; return cardinal; })(0)); /***/ }), /***/ "sQjb": /*!*************************************************!*\ !*** ./node_modules/d3-transition/src/index.js ***! \*************************************************/ /*! exports provided: transition, active, interrupt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ "YrTO"); /* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ "0W9s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ "6nXi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ "dW/k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /***/ }), /***/ "sTY7": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowToggle.js ***! \***********************************************************************/ /*! exports provided: windowToggle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function windowToggle(openings, closingSelector) { return (source) => source.lift(new WindowToggleOperator(openings, closingSelector)); } class WindowToggleOperator { constructor(openings, closingSelector) { this.openings = openings; this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector)); } } class WindowToggleSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, openings, closingSelector) { super(destination); this.openings = openings; this.closingSelector = closingSelector; this.contexts = []; this.add(this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, openings, openings)); } _next(value) { const { contexts } = this; if (contexts) { const len = contexts.length; for (let i = 0; i < len; i++) { contexts[i].window.next(value); } } } _error(err) { const { contexts } = this; this.contexts = null; if (contexts) { const len = contexts.length; let index = -1; while (++index < len) { const context = contexts[index]; context.window.error(err); context.subscription.unsubscribe(); } } super._error(err); } _complete() { const { contexts } = this; this.contexts = null; if (contexts) { const len = contexts.length; let index = -1; while (++index < len) { const context = contexts[index]; context.window.complete(); context.subscription.unsubscribe(); } } super._complete(); } _unsubscribe() { const { contexts } = this; this.contexts = null; if (contexts) { const len = contexts.length; let index = -1; while (++index < len) { const context = contexts[index]; context.window.unsubscribe(); context.subscription.unsubscribe(); } } } notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) { if (outerValue === this.openings) { let closingNotifier; try { const { closingSelector } = this; closingNotifier = closingSelector(innerValue); } catch (e) { return this.error(e); } const window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); const context = { window, subscription }; this.contexts.push(context); const innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier, context); if (innerSubscription.closed) { this.closeWindow(this.contexts.length - 1); } else { innerSubscription.context = context; subscription.add(innerSubscription); } this.destination.next(window); } else { this.closeWindow(this.contexts.indexOf(outerValue)); } } notifyError(err) { this.error(err); } notifyComplete(inner) { if (inner !== this.openSubscription) { this.closeWindow(this.contexts.indexOf(inner.context)); } } closeWindow(index) { if (index === -1) { return; } const { contexts } = this; const context = contexts[index]; const { window, subscription } = context; contexts.splice(index, 1); window.complete(); subscription.unsubscribe(); } } //# sourceMappingURL=windowToggle.js.map /***/ }), /***/ "sUwa": /*!******************************************!*\ !*** ./node_modules/d3-time/src/week.js ***! \******************************************/ /*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sunday", function() { return sunday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monday", function() { return monday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesday", function() { return tuesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesday", function() { return wednesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursday", function() { return thursday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "friday", function() { return friday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturday", function() { return saturday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sundays", function() { return sundays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mondays", function() { return mondays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesdays", function() { return tuesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesdays", function() { return wednesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursdays", function() { return thursdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fridays", function() { return fridays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturdays", function() { return saturdays; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); function weekday(i) { return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setDate(date.getDate() + step * 7); }, function(start, end) { return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; }); } var sunday = weekday(0); var monday = weekday(1); var tuesday = weekday(2); var wednesday = weekday(3); var thursday = weekday(4); var friday = weekday(5); var saturday = weekday(6); var sundays = sunday.range; var mondays = monday.range; var tuesdays = tuesday.range; var wednesdays = wednesday.range; var thursdays = thursday.range; var fridays = friday.range; var saturdays = saturday.range; /***/ }), /***/ "sVev": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/EmptyError.js ***! \****************************************************************/ /*! exports provided: EmptyError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; }); const EmptyErrorImpl = (() => { function EmptyErrorImpl() { Error.call(this); this.message = 'no elements in sequence'; this.name = 'EmptyError'; return this; } EmptyErrorImpl.prototype = Object.create(Error.prototype); return EmptyErrorImpl; })(); const EmptyError = EmptyErrorImpl; //# sourceMappingURL=EmptyError.js.map /***/ }), /***/ "sXBl": /*!**********************************************!*\ !*** ./node_modules/d3-format/src/locale.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ "mHFb"); /* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ "AUoe"); /* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ "CbjS"); /* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ "kds9"); /* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ "tO8Z"); /* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "ze3m"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ "EUnC"); var map = Array.prototype.map, prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; /* harmony default export */ __webpack_exports__["default"] = (function(locale) { var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__["default"])(map.call(locale.grouping, Number), locale.thousands + ""), currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", decimal = locale.decimal === undefined ? "." : locale.decimal + "", numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(map.call(locale.numerals, String)), percent = locale.percent === undefined ? "%" : locale.percent + "", minus = locale.minus === undefined ? "−" : locale.minus + "", nan = locale.nan === undefined ? "NaN" : locale.nan + ""; function newFormat(specifier) { specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier); var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type; // The "n" type is an alias for ",g". if (type === "n") comma = true, type = "g"; // The "" type, and any invalid type, is an alias for ".12~g". else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type]) precision === undefined && (precision = 12), trim = true, type = "g"; // If zero fill is specified, padding goes after sign and before digits. if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; // Compute the prefix and suffix. // For SI-prefix, the suffix is lazily computed. var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; // What format function should we use? // Is this an integer type? // Can this type generate exponential notation? var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type], maybeSuffix = /[defgprs%]/.test(type); // Set the default precision if not specified, // or clamp the specified precision to the supported range. // For significant precision, it must be in [1, 21]. // For fixed precision, it must be in [0, 20]. precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision)); function format(value) { var valuePrefix = prefix, valueSuffix = suffix, i, n, c; if (type === "c") { valueSuffix = formatType(value) + valueSuffix; value = ""; } else { value = +value; // Determine the sign. -0 is not less than 0, but 1 / -0 is! var valueNegative = value < 0 || 1 / value < 0; // Perform the initial formatting. value = isNaN(value) ? nan : formatType(Math.abs(value), precision); // Trim insignificant zeros. if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value); // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; // Compute the prefix and suffix. valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__["prefixExponent"] / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); // Break the formatted value into the integer “value” part that can be // grouped, and fractional or exponential “suffix” part that is not. if (maybeSuffix) { i = -1, n = value.length; while (++i < n) { if (c = value.charCodeAt(i), 48 > c || c > 57) { valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; value = value.slice(0, i); break; } } } } // If the fill character is not "0", grouping is applied before padding. if (comma && !zero) value = group(value, Infinity); // Compute the padding. var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : ""; // If the fill character is "0", grouping is applied after padding. if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; // Reconstruct the final output based on the desired alignment. switch (align) { case "<": value = valuePrefix + value + valueSuffix + padding; break; case "=": value = valuePrefix + padding + value + valueSuffix; break; case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; default: value = padding + valuePrefix + value + valueSuffix; break; } return numerals(value); } format.toString = function() { return specifier + ""; }; return format; } function formatPrefix(specifier, value) { var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3]; return function(value) { return f(k * value) + prefix; }; } return { format: newFormat, formatPrefix: formatPrefix }; }); /***/ }), /***/ "sb9E": /*!****************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/selectChild.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ "Cnj1"); var find = Array.prototype.find; function childFind(match) { return function() { return find.call(this.children, match); }; } function childFirst() { return this.firstElementChild; } /* harmony default export */ __webpack_exports__["default"] = (function(match) { return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__["childMatcher"])(match))); }); /***/ }), /***/ "skEf": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/html.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function htmlRemove() { this.innerHTML = ""; } function htmlConstant(value) { return function() { this.innerHTML = value; }; } function htmlFunction(value) { return function() { var v = value.apply(this, arguments); this.innerHTML = v == null ? "" : v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML; }); /***/ }), /***/ "skVX": /*!********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")); /***/ }), /***/ "sn8G": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "af8dc3f7f7f77fbf7b", "7b3294c2a5cfa6dba0008837", "7b3294c2a5cff7f7f7a6dba0008837", "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "sore": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***! \*****************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fc8d59ffffbf91cf60", "d7191cfdae61a6d96a1a9641", "d7191cfdae61ffffbfa6d96a1a9641", "d73027fc8d59fee08bd9ef8b91cf601a9850", "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "ssni": /*!*************************************************!*\ !*** ./node_modules/d3-scale/src/tickFormat.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return tickFormat; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "rWgG"); function tickFormat(start, stop, count, specifier) { var step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, count), precision; specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatSpecifier"])(specifier == null ? ",f" : specifier); switch (specifier.type) { case "s": { var value = Math.max(Math.abs(start), Math.abs(stop)); if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionPrefix"])(step, value))) specifier.precision = precision; return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatPrefix"])(specifier, value); } case "": case "e": case "g": case "p": case "r": { if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionRound"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); break; } case "f": case "%": { if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionFixed"])(step))) specifier.precision = precision - (specifier.type === "%") * 2; break; } } return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); } /***/ }), /***/ "sukG": /*!********************************************!*\ !*** ./node_modules/d3-fetch/src/index.js ***! \********************************************/ /*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _blob_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob.js */ "kgU0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return _blob_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ "XO33"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _buffer_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv.js */ "8cru"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__["csv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__["tsv"]; }); /* harmony import */ var _image_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image.js */ "HN8k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return _image_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _json_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json.js */ "nWpo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return _json_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text.js */ "7NYn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return _text_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _xml_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml.js */ "8moF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__["html"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__["svg"]; }); /***/ }), /***/ "syX2": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timeoutWith.js ***! \**********************************************************************/ /*! exports provided: timeoutWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isDate */ "mlxB"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function timeoutWith(due, withObservable, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return (source) => { let absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__["isDate"])(due); let waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due); return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler)); }; } class TimeoutWithOperator { constructor(waitFor, absoluteTimeout, withObservable, scheduler) { this.waitFor = waitFor; this.absoluteTimeout = absoluteTimeout; this.withObservable = withObservable; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler)); } } class TimeoutWithSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, absoluteTimeout, waitFor, withObservable, scheduler) { super(destination); this.absoluteTimeout = absoluteTimeout; this.waitFor = waitFor; this.withObservable = withObservable; this.scheduler = scheduler; this.scheduleTimeout(); } static dispatchTimeout(subscriber) { const { withObservable } = subscriber; subscriber._unsubscribeAndRecycle(); subscriber.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(withObservable, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](subscriber))); } scheduleTimeout() { const { action } = this; if (action) { this.action = action.schedule(this, this.waitFor); } else { this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this)); } } _next(value) { if (!this.absoluteTimeout) { this.scheduleTimeout(); } super._next(value); } _unsubscribe() { this.action = undefined; this.scheduler = null; this.withObservable = null; } } //# sourceMappingURL=timeoutWith.js.map /***/ }), /***/ "t9E6": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/transform.js ***! \**********************************************/ /*! exports provided: default, transformer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); /* harmony default export */ __webpack_exports__["default"] = (function(methods) { return { stream: transformer(methods) }; }); function transformer(methods) { return function(stream) { var s = new TransformStream; for (var key in methods) s[key] = methods[key]; s.stream = stream; return s; }; } function TransformStream() {} TransformStream.prototype = { constructor: TransformStream, point: function(x, y) { this.stream.point(x, y); }, sphere: function() { this.stream.sphere(); }, lineStart: function() { this.stream.lineStart(); }, lineEnd: function() { this.stream.lineEnd(); }, polygonStart: function() { this.stream.polygonStart(); }, polygonEnd: function() { this.stream.polygonEnd(); } }; /***/ }), /***/ "tAAF": /*!********************************************!*\ !*** ./node_modules/d3-array/src/least.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return least; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); function least(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { let min; let defined = false; if (compare.length === 1) { let minValue; for (const element of values) { const value = compare(element); if (defined ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, minValue) < 0 : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, value) === 0) { min = element; minValue = value; defined = true; } } } else { for (const value of values) { if (defined ? compare(value, min) < 0 : compare(value, value) === 0) { min = value; defined = true; } } } return min; } /***/ }), /***/ "tIkd": /*!********************************************!*\ !*** ./node_modules/d3-ease/src/circle.js ***! \********************************************/ /*! exports provided: circleIn, circleOut, circleInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleIn", function() { return circleIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleOut", function() { return circleOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleInOut", function() { return circleInOut; }); function circleIn(t) { return 1 - Math.sqrt(1 - t * t); } function circleOut(t) { return Math.sqrt(1 - --t * t); } function circleInOut(t) { return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; } /***/ }), /***/ "tO8Z": /*!***************************************************!*\ !*** ./node_modules/d3-format/src/formatTypes.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); /* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "ze3m"); /* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatRounded.js */ "P3jZ"); /* harmony default export */ __webpack_exports__["default"] = ({ "%": (x, p) => (x * 100).toFixed(p), "b": (x) => Math.round(x).toString(2), "c": (x) => x + "", "d": _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"], "e": (x, p) => x.toExponential(p), "f": (x, p) => x.toFixed(p), "g": (x, p) => x.toPrecision(p), "o": (x) => Math.round(x).toString(8), "p": (x, p) => Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x * 100, p), "r": _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__["default"], "s": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__["default"], "X": (x) => Math.round(x).toString(16).toUpperCase(), "x": (x) => Math.round(x).toString(16) }); /***/ }), /***/ "tOsU": /*!**************************************************!*\ !*** ./node_modules/d3-contour/src/ascending.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a - b; }); /***/ }), /***/ "tS1D": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timeout.js ***! \******************************************************************/ /*! exports provided: timeout */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/TimeoutError */ "Y6u4"); /* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./timeoutWith */ "syX2"); /* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/throwError */ "z6cu"); function timeout(due, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler); } //# sourceMappingURL=timeout.js.map /***/ }), /***/ "tSfe": /*!****************************************************!*\ !*** ./node_modules/d3-quadtree/src/visitAfter.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "p/7N"); /* harmony default export */ __webpack_exports__["default"] = (function(callback) { var quads = [], next = [], q; if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](this._root, this._x0, this._y0, this._x1, this._y1)); while (q = quads.pop()) { var node = q.node; if (node.length) { var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); } next.push(q); } while (q = next.pop()) { callback(q.node, q.x0, q.y0, q.x1, q.y1); } return this; }); /***/ }), /***/ "tU+D": /*!********************************************!*\ !*** ./node_modules/d3-drag/src/nodrag.js ***! \********************************************/ /*! exports provided: default, yesdrag */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yesdrag", function() { return yesdrag; }); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ "cdIC"); /* harmony default export */ __webpack_exports__["default"] = (function(view) { var root = view.document.documentElement, selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); if ("onselectstart" in root) { selection.on("selectstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); } else { root.__noselect = root.style.MozUserSelect; root.style.MozUserSelect = "none"; } }); function yesdrag(view, noclick) { var root = view.document.documentElement, selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", null); if (noclick) { selection.on("click.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); setTimeout(function() { selection.on("click.drag", null); }, 0); } if ("onselectstart" in root) { selection.on("selectstart.drag", null); } else { root.style.MozUserSelect = root.__noselect; delete root.__noselect; } } /***/ }), /***/ "tUiF": /*!**********************************************!*\ !*** ./node_modules/d3-polygon/src/index.js ***! \**********************************************/ /*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "n+Lp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./centroid.js */ "H39o"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _hull_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hull.js */ "ezys"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return _hull_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contains.js */ "uV4M"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./length.js */ "INn1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /***/ }), /***/ "ta7q": /*!********************************************!*\ !*** ./node_modules/d3-timer/src/index.js ***! \********************************************/ /*! exports provided: now, timer, timerFlush, timeout, interval */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "dPRQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["now"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timerFlush"]; }); /* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ "Pgey"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ "1byx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /***/ }), /***/ "tepu": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/stream.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function streamGeometry(geometry, stream) { if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { streamGeometryType[geometry.type](geometry, stream); } } var streamObjectType = { Feature: function(object, stream) { streamGeometry(object.geometry, stream); }, FeatureCollection: function(object, stream) { var features = object.features, i = -1, n = features.length; while (++i < n) streamGeometry(features[i].geometry, stream); } }; var streamGeometryType = { Sphere: function(object, stream) { stream.sphere(); }, Point: function(object, stream) { object = object.coordinates; stream.point(object[0], object[1], object[2]); }, MultiPoint: function(object, stream) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); }, LineString: function(object, stream) { streamLine(object.coordinates, stream, 0); }, MultiLineString: function(object, stream) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) streamLine(coordinates[i], stream, 0); }, Polygon: function(object, stream) { streamPolygon(object.coordinates, stream); }, MultiPolygon: function(object, stream) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) streamPolygon(coordinates[i], stream); }, GeometryCollection: function(object, stream) { var geometries = object.geometries, i = -1, n = geometries.length; while (++i < n) streamGeometry(geometries[i], stream); } }; function streamLine(coordinates, stream, closed) { var i = -1, n = coordinates.length - closed, coordinate; stream.lineStart(); while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); stream.lineEnd(); } function streamPolygon(coordinates, stream) { var i = -1, n = coordinates.length; stream.polygonStart(); while (++i < n) streamLine(coordinates[i], stream, 1); stream.polygonEnd(); } /* harmony default export */ __webpack_exports__["default"] = (function(object, stream) { if (object && streamObjectType.hasOwnProperty(object.type)) { streamObjectType[object.type](object, stream); } else { streamGeometry(object, stream); } }); /***/ }), /***/ "tf+s": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/subscribeOn.js ***! \**********************************************************************/ /*! exports provided: subscribeOn */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; }); /* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/SubscribeOnObservable */ "O4y0"); function subscribeOn(scheduler, delay = 0) { return function subscribeOnOperatorFunction(source) { return source.lift(new SubscribeOnOperator(scheduler, delay)); }; } class SubscribeOnOperator { constructor(scheduler, delay) { this.scheduler = scheduler; this.delay = delay; } call(subscriber, source) { return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber); } } //# sourceMappingURL=subscribeOn.js.map /***/ }), /***/ "tgfz": /*!*******************************************!*\ !*** ./node_modules/d3-time/src/index.js ***! \*******************************************/ /*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ "GAlb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); /* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ "Xt/6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); /* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ "LDjW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["minutes"]; }); /* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ "s8O9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["hours"]; }); /* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ "dCyY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["days"]; }); /* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ "sUwa"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["monday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["mondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["friday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["fridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturdays"]; }); /* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ "lgMH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["months"]; }); /* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ "oVo9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["years"]; }); /* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ "+O7D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["utcMinutes"]; }); /* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ "9iN3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["utcHours"]; }); /* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ "brLB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["utcDays"]; }); /* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ "Jzny"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMonday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFriday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturdays"]; }); /* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ "Vfhj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["utcMonths"]; }); /* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ "d65L"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["utcYears"]; }); /***/ }), /***/ "tk/3": /*!********************************************************************!*\ !*** ./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js ***! \********************************************************************/ /*! exports provided: HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpErrorResponse, HttpEventType, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, ɵHttpInterceptingHandler, ɵangular_packages_common_http_http_a, ɵangular_packages_common_http_http_b, ɵangular_packages_common_http_http_c, ɵangular_packages_common_http_http_d, ɵangular_packages_common_http_http_e, ɵangular_packages_common_http_http_f, ɵangular_packages_common_http_http_g, ɵangular_packages_common_http_http_h */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HTTP_INTERCEPTORS", function() { return HTTP_INTERCEPTORS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpBackend", function() { return HttpBackend; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClient", function() { return HttpClient; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientJsonpModule", function() { return HttpClientJsonpModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientModule", function() { return HttpClientModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientXsrfModule", function() { return HttpClientXsrfModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpErrorResponse", function() { return HttpErrorResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpEventType", function() { return HttpEventType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHandler", function() { return HttpHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHeaderResponse", function() { return HttpHeaderResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHeaders", function() { return HttpHeaders; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpParams", function() { return HttpParams; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpRequest", function() { return HttpRequest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpResponse", function() { return HttpResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpResponseBase", function() { return HttpResponseBase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpUrlEncodingCodec", function() { return HttpUrlEncodingCodec; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpXhrBackend", function() { return HttpXhrBackend; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpXsrfTokenExtractor", function() { return HttpXsrfTokenExtractor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonpClientBackend", function() { return JsonpClientBackend; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonpInterceptor", function() { return JsonpInterceptor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XhrFactory", function() { return XhrFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵHttpInterceptingHandler", function() { return HttpInterceptingHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_a", function() { return NoopInterceptor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_b", function() { return JsonpCallbackContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_c", function() { return jsonpCallbackContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_d", function() { return BrowserXhr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_e", function() { return XSRF_COOKIE_NAME; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_f", function() { return XSRF_HEADER_NAME; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_g", function() { return HttpXsrfCookieExtractor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_h", function() { return HttpXsrfInterceptor; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "kU1M"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "ofXK"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a * `HttpResponse`. * * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the * `HttpBackend`. * * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain. * * @publicApi */ class HttpHandler { } /** * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend. * * Interceptors sit between the `HttpClient` interface and the `HttpBackend`. * * When injected, `HttpBackend` dispatches requests directly to the backend, without going * through the interceptor chain. * * @publicApi */ class HttpBackend { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents the header configuration options for an HTTP request. * Instances are immutable. Modifying methods return a cloned * instance with the change. The original object is never changed. * * @publicApi */ class HttpHeaders { /** Constructs a new HTTP header object with the given values.*/ constructor(headers) { /** * Internal map of lowercased header names to the normalized * form of the name (the form seen first). */ this.normalizedNames = new Map(); /** * Queued updates to be materialized the next initialization. */ this.lazyUpdate = null; if (!headers) { this.headers = new Map(); } else if (typeof headers === 'string') { this.lazyInit = () => { this.headers = new Map(); headers.split('\n').forEach(line => { const index = line.indexOf(':'); if (index > 0) { const name = line.slice(0, index); const key = name.toLowerCase(); const value = line.slice(index + 1).trim(); this.maybeSetNormalizedName(name, key); if (this.headers.has(key)) { this.headers.get(key).push(value); } else { this.headers.set(key, [value]); } } }); }; } else { this.lazyInit = () => { this.headers = new Map(); Object.keys(headers).forEach(name => { let values = headers[name]; const key = name.toLowerCase(); if (typeof values === 'string') { values = [values]; } if (values.length > 0) { this.headers.set(key, values); this.maybeSetNormalizedName(name, key); } }); }; } } /** * Checks for existence of a given header. * * @param name The header name to check for existence. * * @returns True if the header exists, false otherwise. */ has(name) { this.init(); return this.headers.has(name.toLowerCase()); } /** * Retrieves the first value of a given header. * * @param name The header name. * * @returns The value string if the header exists, null otherwise */ get(name) { this.init(); const values = this.headers.get(name.toLowerCase()); return values && values.length > 0 ? values[0] : null; } /** * Retrieves the names of the headers. * * @returns A list of header names. */ keys() { this.init(); return Array.from(this.normalizedNames.values()); } /** * Retrieves a list of values for a given header. * * @param name The header name from which to retrieve values. * * @returns A string of values if the header exists, null otherwise. */ getAll(name) { this.init(); return this.headers.get(name.toLowerCase()) || null; } /** * Appends a new value to the existing set of values for a header * and returns them in a clone of the original instance. * * @param name The header name for which to append the values. * @param value The value to append. * * @returns A clone of the HTTP headers object with the value appended to the given header. */ append(name, value) { return this.clone({ name, value, op: 'a' }); } /** * Sets or modifies a value for a given header in a clone of the original instance. * If the header already exists, its value is replaced with the given value * in the returned object. * * @param name The header name. * @param value The value or values to set or overide for the given header. * * @returns A clone of the HTTP headers object with the newly set header value. */ set(name, value) { return this.clone({ name, value, op: 's' }); } /** * Deletes values for a given header in a clone of the original instance. * * @param name The header name. * @param value The value or values to delete for the given header. * * @returns A clone of the HTTP headers object with the given value deleted. */ delete(name, value) { return this.clone({ name, value, op: 'd' }); } maybeSetNormalizedName(name, lcName) { if (!this.normalizedNames.has(lcName)) { this.normalizedNames.set(lcName, name); } } init() { if (!!this.lazyInit) { if (this.lazyInit instanceof HttpHeaders) { this.copyFrom(this.lazyInit); } else { this.lazyInit(); } this.lazyInit = null; if (!!this.lazyUpdate) { this.lazyUpdate.forEach(update => this.applyUpdate(update)); this.lazyUpdate = null; } } } copyFrom(other) { other.init(); Array.from(other.headers.keys()).forEach(key => { this.headers.set(key, other.headers.get(key)); this.normalizedNames.set(key, other.normalizedNames.get(key)); }); } clone(update) { const clone = new HttpHeaders(); clone.lazyInit = (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this; clone.lazyUpdate = (this.lazyUpdate || []).concat([update]); return clone; } applyUpdate(update) { const key = update.name.toLowerCase(); switch (update.op) { case 'a': case 's': let value = update.value; if (typeof value === 'string') { value = [value]; } if (value.length === 0) { return; } this.maybeSetNormalizedName(update.name, key); const base = (update.op === 'a' ? this.headers.get(key) : undefined) || []; base.push(...value); this.headers.set(key, base); break; case 'd': const toDelete = update.value; if (!toDelete) { this.headers.delete(key); this.normalizedNames.delete(key); } else { let existing = this.headers.get(key); if (!existing) { return; } existing = existing.filter(value => toDelete.indexOf(value) === -1); if (existing.length === 0) { this.headers.delete(key); this.normalizedNames.delete(key); } else { this.headers.set(key, existing); } } break; } } /** * @internal */ forEach(fn) { this.init(); Array.from(this.normalizedNames.keys()) .forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key))); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides encoding and decoding of URL parameter and query-string values. * * Serializes and parses URL parameter keys and values to encode and decode them. * If you pass URL query parameters without encoding, * the query parameters can be misinterpreted at the receiving end. * * * @publicApi */ class HttpUrlEncodingCodec { /** * Encodes a key name for a URL parameter or query-string. * @param key The key name. * @returns The encoded key name. */ encodeKey(key) { return standardEncoding(key); } /** * Encodes the value of a URL parameter or query-string. * @param value The value. * @returns The encoded value. */ encodeValue(value) { return standardEncoding(value); } /** * Decodes an encoded URL parameter or query-string key. * @param key The encoded key name. * @returns The decoded key name. */ decodeKey(key) { return decodeURIComponent(key); } /** * Decodes an encoded URL parameter or query-string value. * @param value The encoded value. * @returns The decoded value. */ decodeValue(value) { return decodeURIComponent(value); } } function paramParser(rawParams, codec) { const map = new Map(); if (rawParams.length > 0) { // The `window.location.search` can be used while creating an instance of the `HttpParams` class // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search` // may start with the `?` char, so we strip it if it's present. const params = rawParams.replace(/^\?/, '').split('&'); params.forEach((param) => { const eqIdx = param.indexOf('='); const [key, val] = eqIdx == -1 ? [codec.decodeKey(param), ''] : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))]; const list = map.get(key) || []; list.push(val); map.set(key, list); }); } return map; } function standardEncoding(v) { return encodeURIComponent(v) .replace(/%40/gi, '@') .replace(/%3A/gi, ':') .replace(/%24/gi, '$') .replace(/%2C/gi, ',') .replace(/%3B/gi, ';') .replace(/%2B/gi, '+') .replace(/%3D/gi, '=') .replace(/%3F/gi, '?') .replace(/%2F/gi, '/'); } /** * An HTTP request/response body that represents serialized parameters, * per the MIME type `application/x-www-form-urlencoded`. * * This class is immutable; all mutation operations return a new instance. * * @publicApi */ class HttpParams { constructor(options = {}) { this.updates = null; this.cloneFrom = null; this.encoder = options.encoder || new HttpUrlEncodingCodec(); if (!!options.fromString) { if (!!options.fromObject) { throw new Error(`Cannot specify both fromString and fromObject.`); } this.map = paramParser(options.fromString, this.encoder); } else if (!!options.fromObject) { this.map = new Map(); Object.keys(options.fromObject).forEach(key => { const value = options.fromObject[key]; this.map.set(key, Array.isArray(value) ? value : [value]); }); } else { this.map = null; } } /** * Reports whether the body includes one or more values for a given parameter. * @param param The parameter name. * @returns True if the parameter has one or more values, * false if it has no value or is not present. */ has(param) { this.init(); return this.map.has(param); } /** * Retrieves the first value for a parameter. * @param param The parameter name. * @returns The first value of the given parameter, * or `null` if the parameter is not present. */ get(param) { this.init(); const res = this.map.get(param); return !!res ? res[0] : null; } /** * Retrieves all values for a parameter. * @param param The parameter name. * @returns All values in a string array, * or `null` if the parameter not present. */ getAll(param) { this.init(); return this.map.get(param) || null; } /** * Retrieves all the parameters for this body. * @returns The parameter names in a string array. */ keys() { this.init(); return Array.from(this.map.keys()); } /** * Appends a new value to existing values for a parameter. * @param param The parameter name. * @param value The new value to add. * @return A new body with the appended value. */ append(param, value) { return this.clone({ param, value, op: 'a' }); } /** * Constructs a new body with appended values for the given parameter name. * @param params parameters and values * @return A new body with the new value. */ appendAll(params) { const updates = []; Object.keys(params).forEach(param => { const value = params[param]; if (Array.isArray(value)) { value.forEach(_value => { updates.push({ param, value: _value, op: 'a' }); }); } else { updates.push({ param, value, op: 'a' }); } }); return this.clone(updates); } /** * Replaces the value for a parameter. * @param param The parameter name. * @param value The new value. * @return A new body with the new value. */ set(param, value) { return this.clone({ param, value, op: 's' }); } /** * Removes a given value or all values from a parameter. * @param param The parameter name. * @param value The value to remove, if provided. * @return A new body with the given value removed, or with all values * removed if no value is specified. */ delete(param, value) { return this.clone({ param, value, op: 'd' }); } /** * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are * separated by `&`s. */ toString() { this.init(); return this.keys() .map(key => { const eKey = this.encoder.encodeKey(key); // `a: ['1']` produces `'a=1'` // `b: []` produces `''` // `c: ['1', '2']` produces `'c=1&c=2'` return this.map.get(key).map(value => eKey + '=' + this.encoder.encodeValue(value)) .join('&'); }) // filter out empty values because `b: []` produces `''` // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't .filter(param => param !== '') .join('&'); } clone(update) { const clone = new HttpParams({ encoder: this.encoder }); clone.cloneFrom = this.cloneFrom || this; clone.updates = (this.updates || []).concat(update); return clone; } init() { if (this.map === null) { this.map = new Map(); } if (this.cloneFrom !== null) { this.cloneFrom.init(); this.cloneFrom.keys().forEach(key => this.map.set(key, this.cloneFrom.map.get(key))); this.updates.forEach(update => { switch (update.op) { case 'a': case 's': const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || []; base.push(update.value); this.map.set(update.param, base); break; case 'd': if (update.value !== undefined) { let base = this.map.get(update.param) || []; const idx = base.indexOf(update.value); if (idx !== -1) { base.splice(idx, 1); } if (base.length > 0) { this.map.set(update.param, base); } else { this.map.delete(update.param); } } else { this.map.delete(update.param); break; } } }); this.cloneFrom = this.updates = null; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Determine whether the given HTTP method may include a body. */ function mightHaveBody(method) { switch (method) { case 'DELETE': case 'GET': case 'HEAD': case 'OPTIONS': case 'JSONP': return false; default: return true; } } /** * Safely assert whether the given value is an ArrayBuffer. * * In some execution environments ArrayBuffer is not defined. */ function isArrayBuffer(value) { return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer; } /** * Safely assert whether the given value is a Blob. * * In some execution environments Blob is not defined. */ function isBlob(value) { return typeof Blob !== 'undefined' && value instanceof Blob; } /** * Safely assert whether the given value is a FormData instance. * * In some execution environments FormData is not defined. */ function isFormData(value) { return typeof FormData !== 'undefined' && value instanceof FormData; } /** * An outgoing HTTP request with an optional typed body. * * `HttpRequest` represents an outgoing request, including URL, method, * headers, body, and other request configuration options. Instances should be * assumed to be immutable. To modify a `HttpRequest`, the `clone` * method should be used. * * @publicApi */ class HttpRequest { constructor(method, url, third, fourth) { this.url = url; /** * The request body, or `null` if one isn't set. * * Bodies are not enforced to be immutable, as they can include a reference to any * user-defined data type. However, interceptors should take care to preserve * idempotence by treating them as such. */ this.body = null; /** * Whether this request should be made in a way that exposes progress events. * * Progress events are expensive (change detection runs on each event) and so * they should only be requested if the consumer intends to monitor them. */ this.reportProgress = false; /** * Whether this request should be sent with outgoing credentials (cookies). */ this.withCredentials = false; /** * The expected response type of the server. * * This is used to parse the response appropriately before returning it to * the requestee. */ this.responseType = 'json'; this.method = method.toUpperCase(); // Next, need to figure out which argument holds the HttpRequestInit // options, if any. let options; // Check whether a body argument is expected. The only valid way to omit // the body argument is to use a known no-body method like GET. if (mightHaveBody(this.method) || !!fourth) { // Body is the third argument, options are the fourth. this.body = (third !== undefined) ? third : null; options = fourth; } else { // No body required, options are the third argument. The body stays null. options = third; } // If options have been passed, interpret them. if (options) { // Normalize reportProgress and withCredentials. this.reportProgress = !!options.reportProgress; this.withCredentials = !!options.withCredentials; // Override default response type of 'json' if one is provided. if (!!options.responseType) { this.responseType = options.responseType; } // Override headers if they're provided. if (!!options.headers) { this.headers = options.headers; } if (!!options.params) { this.params = options.params; } } // If no headers have been passed in, construct a new HttpHeaders instance. if (!this.headers) { this.headers = new HttpHeaders(); } // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance. if (!this.params) { this.params = new HttpParams(); this.urlWithParams = url; } else { // Encode the parameters to a string in preparation for inclusion in the URL. const params = this.params.toString(); if (params.length === 0) { // No parameters, the visible URL is just the URL given at creation time. this.urlWithParams = url; } else { // Does the URL already have query parameters? Look for '?'. const qIdx = url.indexOf('?'); // There are 3 cases to handle: // 1) No existing parameters -> append '?' followed by params. // 2) '?' exists and is followed by existing query string -> // append '&' followed by params. // 3) '?' exists at the end of the url -> append params directly. // This basically amounts to determining the character, if any, with // which to join the URL and parameters. const sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : ''); this.urlWithParams = url + sep + params; } } } /** * Transform the free-form body into a serialized format suitable for * transmission to the server. */ serializeBody() { // If no body is present, no need to serialize it. if (this.body === null) { return null; } // Check whether the body is already in a serialized form. If so, // it can just be returned directly. if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) || typeof this.body === 'string') { return this.body; } // Check whether the body is an instance of HttpUrlEncodedParams. if (this.body instanceof HttpParams) { return this.body.toString(); } // Check whether the body is an object or array, and serialize with JSON if so. if (typeof this.body === 'object' || typeof this.body === 'boolean' || Array.isArray(this.body)) { return JSON.stringify(this.body); } // Fall back on toString() for everything else. return this.body.toString(); } /** * Examine the body and attempt to infer an appropriate MIME type * for it. * * If no such type can be inferred, this method will return `null`. */ detectContentTypeHeader() { // An empty body has no content type. if (this.body === null) { return null; } // FormData bodies rely on the browser's content type assignment. if (isFormData(this.body)) { return null; } // Blobs usually have their own content type. If it doesn't, then // no type can be inferred. if (isBlob(this.body)) { return this.body.type || null; } // Array buffers have unknown contents and thus no type can be inferred. if (isArrayBuffer(this.body)) { return null; } // Technically, strings could be a form of JSON data, but it's safe enough // to assume they're plain strings. if (typeof this.body === 'string') { return 'text/plain'; } // `HttpUrlEncodedParams` has its own content-type. if (this.body instanceof HttpParams) { return 'application/x-www-form-urlencoded;charset=UTF-8'; } // Arrays, objects, and numbers will be encoded as JSON. if (typeof this.body === 'object' || typeof this.body === 'number' || Array.isArray(this.body)) { return 'application/json'; } // No type could be inferred. return null; } clone(update = {}) { // For method, url, and responseType, take the current value unless // it is overridden in the update hash. const method = update.method || this.method; const url = update.url || this.url; const responseType = update.responseType || this.responseType; // The body is somewhat special - a `null` value in update.body means // whatever current body is present is being overridden with an empty // body, whereas an `undefined` value in update.body implies no // override. const body = (update.body !== undefined) ? update.body : this.body; // Carefully handle the boolean options to differentiate between // `false` and `undefined` in the update args. const withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials; const reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress; // Headers and params may be appended to if `setHeaders` or // `setParams` are used. let headers = update.headers || this.headers; let params = update.params || this.params; // Check whether the caller has asked to add headers. if (update.setHeaders !== undefined) { // Set every requested header. headers = Object.keys(update.setHeaders) .reduce((headers, name) => headers.set(name, update.setHeaders[name]), headers); } // Check whether the caller has asked to set params. if (update.setParams) { // Set every requested param. params = Object.keys(update.setParams) .reduce((params, param) => params.set(param, update.setParams[param]), params); } // Finally, construct the new HttpRequest using the pieces from above. return new HttpRequest(method, url, body, { params, headers, reportProgress, responseType, withCredentials, }); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Type enumeration for the different kinds of `HttpEvent`. * * @publicApi */ var HttpEventType; (function (HttpEventType) { /** * The request was sent out over the wire. */ HttpEventType[HttpEventType["Sent"] = 0] = "Sent"; /** * An upload progress event was received. */ HttpEventType[HttpEventType["UploadProgress"] = 1] = "UploadProgress"; /** * The response status code and headers were received. */ HttpEventType[HttpEventType["ResponseHeader"] = 2] = "ResponseHeader"; /** * A download progress event was received. */ HttpEventType[HttpEventType["DownloadProgress"] = 3] = "DownloadProgress"; /** * The full response including the body was received. */ HttpEventType[HttpEventType["Response"] = 4] = "Response"; /** * A custom event from an interceptor or a backend. */ HttpEventType[HttpEventType["User"] = 5] = "User"; })(HttpEventType || (HttpEventType = {})); /** * Base class for both `HttpResponse` and `HttpHeaderResponse`. * * @publicApi */ class HttpResponseBase { /** * Super-constructor for all responses. * * The single parameter accepted is an initialization hash. Any properties * of the response passed there will override the default values. */ constructor(init, defaultStatus = 200, defaultStatusText = 'OK') { // If the hash has values passed, use them to initialize the response. // Otherwise use the default values. this.headers = init.headers || new HttpHeaders(); this.status = init.status !== undefined ? init.status : defaultStatus; this.statusText = init.statusText || defaultStatusText; this.url = init.url || null; // Cache the ok value to avoid defining a getter. this.ok = this.status >= 200 && this.status < 300; } } /** * A partial HTTP response which only includes the status and header data, * but no response body. * * `HttpHeaderResponse` is a `HttpEvent` available on the response * event stream, only when progress events are requested. * * @publicApi */ class HttpHeaderResponse extends HttpResponseBase { /** * Create a new `HttpHeaderResponse` with the given parameters. */ constructor(init = {}) { super(init); this.type = HttpEventType.ResponseHeader; } /** * Copy this `HttpHeaderResponse`, overriding its contents with the * given parameter hash. */ clone(update = {}) { // Perform a straightforward initialization of the new HttpHeaderResponse, // overriding the current parameters with new ones if given. return new HttpHeaderResponse({ headers: update.headers || this.headers, status: update.status !== undefined ? update.status : this.status, statusText: update.statusText || this.statusText, url: update.url || this.url || undefined, }); } } /** * A full HTTP response, including a typed response body (which may be `null` * if one was not returned). * * `HttpResponse` is a `HttpEvent` available on the response event * stream. * * @publicApi */ class HttpResponse extends HttpResponseBase { /** * Construct a new `HttpResponse`. */ constructor(init = {}) { super(init); this.type = HttpEventType.Response; this.body = init.body !== undefined ? init.body : null; } clone(update = {}) { return new HttpResponse({ body: (update.body !== undefined) ? update.body : this.body, headers: update.headers || this.headers, status: (update.status !== undefined) ? update.status : this.status, statusText: update.statusText || this.statusText, url: update.url || this.url || undefined, }); } } /** * A response that represents an error or failure, either from a * non-successful HTTP status, an error while executing the request, * or some other failure which occurred during the parsing of the response. * * Any error returned on the `Observable` response stream will be * wrapped in an `HttpErrorResponse` to provide additional context about * the state of the HTTP layer when the error occurred. The error property * will contain either a wrapped Error object or the error response returned * from the server. * * @publicApi */ class HttpErrorResponse extends HttpResponseBase { constructor(init) { // Initialize with a default status of 0 / Unknown Error. super(init, 0, 'Unknown Error'); this.name = 'HttpErrorResponse'; /** * Errors are never okay, even when the status code is in the 2xx success range. */ this.ok = false; // If the response was successful, then this was a parse error. Otherwise, it was // a protocol-level failure of some sort. Either the request failed in transit // or the server returned an unsuccessful status code. if (this.status >= 200 && this.status < 300) { this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`; } else { this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`; } this.error = init.error || null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and * the given `body`. This function clones the object and adds the body. * * Note that the `responseType` *options* value is a String that identifies the * single data type of the response. * A single overload version of the method handles each response type. * The value of `responseType` cannot be a union, as the combined signature could imply. * */ function addBody(options, body) { return { body, headers: options.headers, observe: options.observe, params: options.params, reportProgress: options.reportProgress, responseType: options.responseType, withCredentials: options.withCredentials, }; } /** * Performs HTTP requests. * This service is available as an injectable class, with methods to perform HTTP requests. * Each request method has multiple signatures, and the return type varies based on * the signature that is called (mainly the values of `observe` and `responseType`). * * Note that the `responseType` *options* value is a String that identifies the * single data type of the response. * A single overload version of the method handles each response type. * The value of `responseType` cannot be a union, as the combined signature could imply. * * @usageNotes * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application. * * ### HTTP Request Example * * ``` * // GET heroes whose name contains search term * searchHeroes(term: string): observable<Hero[]>{ * * const params = new HttpParams({fromString: 'name=term'}); * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params}); * } * ``` * * Alternatively, the parameter string can be used without invoking HttpParams * by directly joining to the URL. * ``` * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'}); * ``` * * * ### JSONP Example * ``` * requestJsonp(url, callback = 'callback') { * return this.httpClient.jsonp(this.heroesURL, callback); * } * ``` * * ### PATCH Example * ``` * // PATCH one of the heroes' name * patchHero (id: number, heroName: string): Observable<{}> { * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42 * return this.httpClient.patch(url, {name: heroName}, httpOptions) * .pipe(catchError(this.handleError('patchHero'))); * } * ``` * * @see [HTTP Guide](guide/http) * @see [HTTP Request](api/common/http/HttpRequest) * * @publicApi */ class HttpClient { constructor(handler) { this.handler = handler; } /** * Constructs an observable for a generic HTTP request that, when subscribed, * fires the request through the chain of registered interceptors and on to the * server. * * You can pass an `HttpRequest` directly as the only parameter. In this case, * the call returns an observable of the raw `HttpEvent` stream. * * Alternatively you can pass an HTTP method as the first parameter, * a URL string as the second, and an options hash containing the request body as the third. * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the * type of returned observable. * * The `responseType` value determines how a successful response body is parsed. * * If `responseType` is the default `json`, you can pass a type interface for the resulting * object as a type parameter to the call. * * The `observe` value determines the return type, according to what you are interested in * observing. * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including * progress events by default. * * An `observe` value of response returns an observable of `HttpResponse<T>`, * where the `T` parameter depends on the `responseType` and any optionally provided type * parameter. * * An `observe` value of body returns an observable of `<T>` with the same `T` body type. * */ request(first, url, options = {}) { let req; // First, check whether the primary argument is an instance of `HttpRequest`. if (first instanceof HttpRequest) { // It is. The other arguments must be undefined (per the signatures) and can be // ignored. req = first; } else { // It's a string, so it represents a URL. Construct a request based on it, // and incorporate the remaining arguments (assuming `GET` unless a method is // provided. // Figure out the headers. let headers = undefined; if (options.headers instanceof HttpHeaders) { headers = options.headers; } else { headers = new HttpHeaders(options.headers); } // Sort out parameters. let params = undefined; if (!!options.params) { if (options.params instanceof HttpParams) { params = options.params; } else { params = new HttpParams({ fromObject: options.params }); } } // Construct the request. req = new HttpRequest(first, url, (options.body !== undefined ? options.body : null), { headers, params, reportProgress: options.reportProgress, // By default, JSON is assumed to be returned for all calls. responseType: options.responseType || 'json', withCredentials: options.withCredentials, }); } // Start with an Observable.of() the initial request, and run the handler (which // includes all interceptors) inside a concatMap(). This way, the handler runs // inside an Observable chain, which causes interceptors to be re-run on every // subscription (this also makes retries re-run the handler, including interceptors). const events$ = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(req).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["concatMap"])((req) => this.handler.handle(req))); // If coming via the API signature which accepts a previously constructed HttpRequest, // the only option is to get the event stream. Otherwise, return the event stream if // that is what was requested. if (first instanceof HttpRequest || options.observe === 'events') { return events$; } // The requested stream contains either the full response or the body. In either // case, the first step is to filter the event stream to extract a stream of // responses(s). const res$ = events$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])((event) => event instanceof HttpResponse)); // Decide which stream to return. switch (options.observe || 'body') { case 'body': // The requested stream is the body. Map the response stream to the response // body. This could be done more simply, but a misbehaving interceptor might // transform the response body into a different format and ignore the requested // responseType. Guard against this by validating that the response is of the // requested type. switch (req.responseType) { case 'arraybuffer': return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => { // Validate that the body is an ArrayBuffer. if (res.body !== null && !(res.body instanceof ArrayBuffer)) { throw new Error('Response is not an ArrayBuffer.'); } return res.body; })); case 'blob': return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => { // Validate that the body is a Blob. if (res.body !== null && !(res.body instanceof Blob)) { throw new Error('Response is not a Blob.'); } return res.body; })); case 'text': return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => { // Validate that the body is a string. if (res.body !== null && typeof res.body !== 'string') { throw new Error('Response is not a string.'); } return res.body; })); case 'json': default: // No validation needed for JSON responses, as they can be of any type. return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => res.body)); } case 'response': // The response stream was requested directly, so return it. return res$; default: // Guard against new future observe types being added. throw new Error(`Unreachable: unhandled observe type ${options.observe}}`); } } /** * Constructs an observable that, when subscribed, causes the configured * `DELETE` request to execute on the server. See the individual overloads for * details on the return type. * * @param url The endpoint URL. * @param options The HTTP options to send with the request. * */ delete(url, options = {}) { return this.request('DELETE', url, options); } /** * Constructs an observable that, when subscribed, causes the configured * `GET` request to execute on the server. See the individual overloads for * details on the return type. */ get(url, options = {}) { return this.request('GET', url, options); } /** * Constructs an observable that, when subscribed, causes the configured * `HEAD` request to execute on the server. The `HEAD` method returns * meta information about the resource without transferring the * resource itself. See the individual overloads for * details on the return type. */ head(url, options = {}) { return this.request('HEAD', url, options); } /** * Constructs an `Observable` that, when subscribed, causes a request with the special method * `JSONP` to be dispatched via the interceptor pipeline. * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain * API endpoints that don't support newer, * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol. * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the * requests even if the API endpoint is not located on the same domain (origin) as the client-side * application making the request. * The endpoint API must support JSONP callback for JSONP requests to work. * The resource API returns the JSON response wrapped in a callback function. * You can pass the callback function name as one of the query parameters. * Note that JSONP requests can only be used with `GET` requests. * * @param url The resource URL. * @param callbackParam The callback function name. * */ jsonp(url, callbackParam) { return this.request('JSONP', url, { params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'), observe: 'body', responseType: 'json', }); } /** * Constructs an `Observable` that, when subscribed, causes the configured * `OPTIONS` request to execute on the server. This method allows the client * to determine the supported HTTP methods and other capabilites of an endpoint, * without implying a resource action. See the individual overloads for * details on the return type. */ options(url, options = {}) { return this.request('OPTIONS', url, options); } /** * Constructs an observable that, when subscribed, causes the configured * `PATCH` request to execute on the server. See the individual overloads for * details on the return type. */ patch(url, body, options = {}) { return this.request('PATCH', url, addBody(options, body)); } /** * Constructs an observable that, when subscribed, causes the configured * `POST` request to execute on the server. The server responds with the location of * the replaced resource. See the individual overloads for * details on the return type. */ post(url, body, options = {}) { return this.request('POST', url, addBody(options, body)); } /** * Constructs an observable that, when subscribed, causes the configured * `PUT` request to execute on the server. The `PUT` method replaces an existing resource * with a new set of values. * See the individual overloads for details on the return type. */ put(url, body, options = {}) { return this.request('PUT', url, addBody(options, body)); } } HttpClient.ɵfac = function HttpClient_Factory(t) { return new (t || HttpClient)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpHandler)); }; HttpClient.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpClient, factory: HttpClient.ɵfac }); HttpClient.ctorParameters = () => [ { type: HttpHandler } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClient, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: HttpHandler }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`. * * */ class HttpInterceptorHandler { constructor(next, interceptor) { this.next = next; this.interceptor = interceptor; } handle(req) { return this.interceptor.intercept(req, this.next); } } /** * A multi-provider token that represents the array of registered * `HttpInterceptor` objects. * * @publicApi */ const HTTP_INTERCEPTORS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('HTTP_INTERCEPTORS'); class NoopInterceptor { intercept(req, next) { return next.handle(req); } } NoopInterceptor.ɵfac = function NoopInterceptor_Factory(t) { return new (t || NoopInterceptor)(); }; NoopInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: NoopInterceptor, factory: NoopInterceptor.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NoopInterceptor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Every request made through JSONP needs a callback name that's unique across the // whole page. Each request is assigned an id and the callback name is constructed // from that. The next id to be assigned is tracked in a global variable here that // is shared among all applications on the page. let nextRequestId = 0; // Error text given when a JSONP script is injected, but doesn't invoke the callback // passed in its URL. const JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.'; // Error text given when a request is passed to the JsonpClientBackend that doesn't // have a request method JSONP. const JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.'; const JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.'; /** * DI token/abstract type representing a map of JSONP callbacks. * * In the browser, this should always be the `window` object. * * */ class JsonpCallbackContext { } /** * Processes an `HttpRequest` with the JSONP method, * by performing JSONP style requests. * @see `HttpHandler` * @see `HttpXhrBackend` * * @publicApi */ class JsonpClientBackend { constructor(callbackMap, document) { this.callbackMap = callbackMap; this.document = document; /** * A resolved promise that can be used to schedule microtasks in the event handlers. */ this.resolvedPromise = Promise.resolve(); } /** * Get the name of the next callback method, by incrementing the global `nextRequestId`. */ nextCallback() { return `ng_jsonp_callback_${nextRequestId++}`; } /** * Processes a JSONP request and returns an event stream of the results. * @param req The request object. * @returns An observable of the response events. * */ handle(req) { // Firstly, check both the method and response type. If either doesn't match // then the request was improperly routed here and cannot be handled. if (req.method !== 'JSONP') { throw new Error(JSONP_ERR_WRONG_METHOD); } else if (req.responseType !== 'json') { throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE); } // Everything else happens inside the Observable boundary. return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"]((observer) => { // The first step to make a request is to generate the callback name, and replace the // callback placeholder in the URL with the name. Care has to be taken here to ensure // a trailing &, if matched, gets inserted back into the URL in the correct place. const callback = this.nextCallback(); const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`); // Construct the <script> tag and point it at the URL. const node = this.document.createElement('script'); node.src = url; // A JSONP request requires waiting for multiple callbacks. These variables // are closed over and track state across those callbacks. // The response object, if one has been received, or null otherwise. let body = null; // Whether the response callback has been called. let finished = false; // Whether the request has been cancelled (and thus any other callbacks) // should be ignored. let cancelled = false; // Set the response callback in this.callbackMap (which will be the window // object in the browser. The script being loaded via the <script> tag will // eventually call this callback. this.callbackMap[callback] = (data) => { // Data has been received from the JSONP script. Firstly, delete this callback. delete this.callbackMap[callback]; // Next, make sure the request wasn't cancelled in the meantime. if (cancelled) { return; } // Set state to indicate data was received. body = data; finished = true; }; // cleanup() is a utility closure that removes the <script> from the page and // the response callback from the window. This logic is used in both the // success, error, and cancellation paths, so it's extracted out for convenience. const cleanup = () => { // Remove the <script> tag if it's still on the page. if (node.parentNode) { node.parentNode.removeChild(node); } // Remove the response callback from the callbackMap (window object in the // browser). delete this.callbackMap[callback]; }; // onLoad() is the success callback which runs after the response callback // if the JSONP script loads successfully. The event itself is unimportant. // If something went wrong, onLoad() may run without the response callback // having been invoked. const onLoad = (event) => { // Do nothing if the request has been cancelled. if (cancelled) { return; } // We wrap it in an extra Promise, to ensure the microtask // is scheduled after the loaded endpoint has executed any potential microtask itself, // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496 this.resolvedPromise.then(() => { // Cleanup the page. cleanup(); // Check whether the response callback has run. if (!finished) { // It hasn't, something went wrong with the request. Return an error via // the Observable error path. All JSONP errors have status 0. observer.error(new HttpErrorResponse({ url, status: 0, statusText: 'JSONP Error', error: new Error(JSONP_ERR_NO_CALLBACK), })); return; } // Success. body either contains the response body or null if none was // returned. observer.next(new HttpResponse({ body, status: 200, statusText: 'OK', url, })); // Complete the stream, the response is over. observer.complete(); }); }; // onError() is the error callback, which runs if the script returned generates // a Javascript error. It emits the error via the Observable error channel as // a HttpErrorResponse. const onError = (error) => { // If the request was already cancelled, no need to emit anything. if (cancelled) { return; } cleanup(); // Wrap the error in a HttpErrorResponse. observer.error(new HttpErrorResponse({ error, status: 0, statusText: 'JSONP Error', url, })); }; // Subscribe to both the success (load) and error events on the <script> tag, // and add it to the page. node.addEventListener('load', onLoad); node.addEventListener('error', onError); this.document.body.appendChild(node); // The request has now been successfully sent. observer.next({ type: HttpEventType.Sent }); // Cancellation handler. return () => { // Track the cancellation so event listeners won't do anything even if already scheduled. cancelled = true; // Remove the event listeners so they won't run if the events later fire. node.removeEventListener('load', onLoad); node.removeEventListener('error', onError); // And finally, clean up the page. cleanup(); }; }); } } JsonpClientBackend.ɵfac = function JsonpClientBackend_Factory(t) { return new (t || JsonpClientBackend)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](JsonpCallbackContext), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"])); }; JsonpClientBackend.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: JsonpClientBackend, factory: JsonpClientBackend.ɵfac }); JsonpClientBackend.ctorParameters = () => [ { type: JsonpCallbackContext }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonpClientBackend, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]] }] }]; }, null); })(); /** * Identifies requests with the method JSONP and * shifts them to the `JsonpClientBackend`. * * @see `HttpInterceptor` * * @publicApi */ class JsonpInterceptor { constructor(jsonp) { this.jsonp = jsonp; } /** * Identifies and handles a given JSONP request. * @param req The outgoing request object to handle. * @param next The next interceptor in the chain, or the backend * if no interceptors remain in the chain. * @returns An observable of the event stream. */ intercept(req, next) { if (req.method === 'JSONP') { return this.jsonp.handle(req); } // Fall through for normal HTTP requests. return next.handle(req); } } JsonpInterceptor.ɵfac = function JsonpInterceptor_Factory(t) { return new (t || JsonpInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](JsonpClientBackend)); }; JsonpInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: JsonpInterceptor, factory: JsonpInterceptor.ɵfac }); JsonpInterceptor.ctorParameters = () => [ { type: JsonpClientBackend } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonpInterceptor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: JsonpClientBackend }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const XSSI_PREFIX = /^\)\]\}',?\n/; /** * Determine an appropriate URL for the response, by checking either * XMLHttpRequest.responseURL or the X-Request-URL header. */ function getResponseUrl(xhr) { if ('responseURL' in xhr && xhr.responseURL) { return xhr.responseURL; } if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) { return xhr.getResponseHeader('X-Request-URL'); } return null; } /** * A wrapper around the `XMLHttpRequest` constructor. * * @publicApi */ class XhrFactory { } /** * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API. * */ class BrowserXhr { constructor() { } build() { return (new XMLHttpRequest()); } } BrowserXhr.ɵfac = function BrowserXhr_Factory(t) { return new (t || BrowserXhr)(); }; BrowserXhr.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: BrowserXhr, factory: BrowserXhr.ɵfac }); BrowserXhr.ctorParameters = () => []; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserXhr, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return []; }, null); })(); /** * Uses `XMLHttpRequest` to send requests to a backend server. * @see `HttpHandler` * @see `JsonpClientBackend` * * @publicApi */ class HttpXhrBackend { constructor(xhrFactory) { this.xhrFactory = xhrFactory; } /** * Processes a request and returns a stream of response events. * @param req The request object. * @returns An observable of the response events. */ handle(req) { // Quick check to give a better error message when a user attempts to use // HttpClient.jsonp() without installing the HttpClientJsonpModule if (req.method === 'JSONP') { throw new Error(`Attempted to construct Jsonp request without HttpClientJsonpModule installed.`); } // Everything happens on Observable subscription. return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"]((observer) => { // Start by setting up the XHR object with request method, URL, and withCredentials flag. const xhr = this.xhrFactory.build(); xhr.open(req.method, req.urlWithParams); if (!!req.withCredentials) { xhr.withCredentials = true; } // Add all the requested headers. req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(','))); // Add an Accept header if one isn't present already. if (!req.headers.has('Accept')) { xhr.setRequestHeader('Accept', 'application/json, text/plain, */*'); } // Auto-detect the Content-Type header if one isn't present already. if (!req.headers.has('Content-Type')) { const detectedType = req.detectContentTypeHeader(); // Sometimes Content-Type detection fails. if (detectedType !== null) { xhr.setRequestHeader('Content-Type', detectedType); } } // Set the responseType if one was requested. if (req.responseType) { const responseType = req.responseType.toLowerCase(); // JSON responses need to be processed as text. This is because if the server // returns an XSSI-prefixed JSON response, the browser will fail to parse it, // xhr.response will be null, and xhr.responseText cannot be accessed to // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON // is parsed by first requesting text and then applying JSON.parse. xhr.responseType = ((responseType !== 'json') ? responseType : 'text'); } // Serialize the request body if one is present. If not, this will be set to null. const reqBody = req.serializeBody(); // If progress events are enabled, response headers will be delivered // in two events - the HttpHeaderResponse event and the full HttpResponse // event. However, since response headers don't change in between these // two events, it doesn't make sense to parse them twice. So headerResponse // caches the data extracted from the response whenever it's first parsed, // to ensure parsing isn't duplicated. let headerResponse = null; // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest // state, and memoizes it into headerResponse. const partialFromXhr = () => { if (headerResponse !== null) { return headerResponse; } // Read status and normalize an IE9 bug (https://bugs.jquery.com/ticket/1450). const status = xhr.status === 1223 ? 204 : xhr.status; const statusText = xhr.statusText || 'OK'; // Parse headers from XMLHttpRequest - this step is lazy. const headers = new HttpHeaders(xhr.getAllResponseHeaders()); // Read the response URL from the XMLHttpResponse instance and fall back on the // request URL. const url = getResponseUrl(xhr) || req.url; // Construct the HttpHeaderResponse and memoize it. headerResponse = new HttpHeaderResponse({ headers, status, statusText, url }); return headerResponse; }; // Next, a few closures are defined for the various events which XMLHttpRequest can // emit. This allows them to be unregistered as event listeners later. // First up is the load event, which represents a response being fully available. const onLoad = () => { // Read response state from the memoized partial data. let { headers, status, statusText, url } = partialFromXhr(); // The body will be read out if present. let body = null; if (status !== 204) { // Use XMLHttpRequest.response if set, responseText otherwise. body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response; } // Normalize another potential bug (this one comes from CORS). if (status === 0) { status = !!body ? 200 : 0; } // ok determines whether the response will be transmitted on the event or // error channel. Unsuccessful status codes (not 2xx) will always be errors, // but a successful status code can still result in an error if the user // asked for JSON data and the body cannot be parsed as such. let ok = status >= 200 && status < 300; // Check whether the body needs to be parsed as JSON (in many cases the browser // will have done that already). if (req.responseType === 'json' && typeof body === 'string') { // Save the original body, before attempting XSSI prefix stripping. const originalBody = body; body = body.replace(XSSI_PREFIX, ''); try { // Attempt the parse. If it fails, a parse error should be delivered to the user. body = body !== '' ? JSON.parse(body) : null; } catch (error) { // Since the JSON.parse failed, it's reasonable to assume this might not have been a // JSON response. Restore the original body (including any XSSI prefix) to deliver // a better error response. body = originalBody; // If this was an error request to begin with, leave it as a string, it probably // just isn't JSON. Otherwise, deliver the parsing error to the user. if (ok) { // Even though the response status was 2xx, this is still an error. ok = false; // The parse error contains the text of the body that failed to parse. body = { error, text: body }; } } } if (ok) { // A successful response is delivered on the event stream. observer.next(new HttpResponse({ body, headers, status, statusText, url: url || undefined, })); // The full body has been received and delivered, no further events // are possible. This request is complete. observer.complete(); } else { // An unsuccessful request is delivered on the error channel. observer.error(new HttpErrorResponse({ // The error in this case is the response body (error from the server). error: body, headers, status, statusText, url: url || undefined, })); } }; // The onError callback is called when something goes wrong at the network level. // Connection timeout, DNS error, offline, etc. These are actual errors, and are // transmitted on the error channel. const onError = (error) => { const { url } = partialFromXhr(); const res = new HttpErrorResponse({ error, status: xhr.status || 0, statusText: xhr.statusText || 'Unknown Error', url: url || undefined, }); observer.error(res); }; // The sentHeaders flag tracks whether the HttpResponseHeaders event // has been sent on the stream. This is necessary to track if progress // is enabled since the event will be sent on only the first download // progerss event. let sentHeaders = false; // The download progress event handler, which is only registered if // progress events are enabled. const onDownProgress = (event) => { // Send the HttpResponseHeaders event if it hasn't been sent already. if (!sentHeaders) { observer.next(partialFromXhr()); sentHeaders = true; } // Start building the download progress event to deliver on the response // event stream. let progressEvent = { type: HttpEventType.DownloadProgress, loaded: event.loaded, }; // Set the total number of bytes in the event if it's available. if (event.lengthComputable) { progressEvent.total = event.total; } // If the request was for text content and a partial response is // available on XMLHttpRequest, include it in the progress event // to allow for streaming reads. if (req.responseType === 'text' && !!xhr.responseText) { progressEvent.partialText = xhr.responseText; } // Finally, fire the event. observer.next(progressEvent); }; // The upload progress event handler, which is only registered if // progress events are enabled. const onUpProgress = (event) => { // Upload progress events are simpler. Begin building the progress // event. let progress = { type: HttpEventType.UploadProgress, loaded: event.loaded, }; // If the total number of bytes being uploaded is available, include // it. if (event.lengthComputable) { progress.total = event.total; } // Send the event. observer.next(progress); }; // By default, register for load and error events. xhr.addEventListener('load', onLoad); xhr.addEventListener('error', onError); xhr.addEventListener('timeout', onError); xhr.addEventListener('abort', onError); // Progress events are only enabled if requested. if (req.reportProgress) { // Download progress is always enabled if requested. xhr.addEventListener('progress', onDownProgress); // Upload progress depends on whether there is a body to upload. if (reqBody !== null && xhr.upload) { xhr.upload.addEventListener('progress', onUpProgress); } } // Fire the request, and notify the event stream that it was fired. xhr.send(reqBody); observer.next({ type: HttpEventType.Sent }); // This is the return from the Observable function, which is the // request cancellation handler. return () => { // On a cancellation, remove all registered event listeners. xhr.removeEventListener('error', onError); xhr.removeEventListener('abort', onError); xhr.removeEventListener('load', onLoad); xhr.removeEventListener('timeout', onError); if (req.reportProgress) { xhr.removeEventListener('progress', onDownProgress); if (reqBody !== null && xhr.upload) { xhr.upload.removeEventListener('progress', onUpProgress); } } // Finally, abort the in-flight request. if (xhr.readyState !== xhr.DONE) { xhr.abort(); } }; }); } } HttpXhrBackend.ɵfac = function HttpXhrBackend_Factory(t) { return new (t || HttpXhrBackend)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XhrFactory)); }; HttpXhrBackend.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpXhrBackend, factory: HttpXhrBackend.ɵfac }); HttpXhrBackend.ctorParameters = () => [ { type: XhrFactory } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXhrBackend, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: XhrFactory }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const XSRF_COOKIE_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_COOKIE_NAME'); const XSRF_HEADER_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_HEADER_NAME'); /** * Retrieves the current XSRF token to use with the next outgoing request. * * @publicApi */ class HttpXsrfTokenExtractor { } /** * `HttpXsrfTokenExtractor` which retrieves the token from a cookie. */ class HttpXsrfCookieExtractor { constructor(doc, platform, cookieName) { this.doc = doc; this.platform = platform; this.cookieName = cookieName; this.lastCookieString = ''; this.lastToken = null; /** * @internal for testing */ this.parseCount = 0; } getToken() { if (this.platform === 'server') { return null; } const cookieString = this.doc.cookie || ''; if (cookieString !== this.lastCookieString) { this.parseCount++; this.lastToken = Object(_angular_common__WEBPACK_IMPORTED_MODULE_3__["ɵparseCookieValue"])(cookieString, this.cookieName); this.lastCookieString = cookieString; } return this.lastToken; } } HttpXsrfCookieExtractor.ɵfac = function HttpXsrfCookieExtractor_Factory(t) { return new (t || HttpXsrfCookieExtractor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XSRF_COOKIE_NAME)); }; HttpXsrfCookieExtractor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpXsrfCookieExtractor, factory: HttpXsrfCookieExtractor.ɵfac }); HttpXsrfCookieExtractor.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"],] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_COOKIE_NAME,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXsrfCookieExtractor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_COOKIE_NAME] }] }]; }, null); })(); /** * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests. */ class HttpXsrfInterceptor { constructor(tokenService, headerName) { this.tokenService = tokenService; this.headerName = headerName; } intercept(req, next) { const lcUrl = req.url.toLowerCase(); // Skip both non-mutating requests and absolute URLs. // Non-mutating requests don't require a token, and absolute URLs require special handling // anyway as the cookie set // on our origin is not the same as the token expected by another origin. if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') || lcUrl.startsWith('https://')) { return next.handle(req); } const token = this.tokenService.getToken(); // Be careful not to overwrite an existing header of the same name. if (token !== null && !req.headers.has(this.headerName)) { req = req.clone({ headers: req.headers.set(this.headerName, token) }); } return next.handle(req); } } HttpXsrfInterceptor.ɵfac = function HttpXsrfInterceptor_Factory(t) { return new (t || HttpXsrfInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpXsrfTokenExtractor), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XSRF_HEADER_NAME)); }; HttpXsrfInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpXsrfInterceptor, factory: HttpXsrfInterceptor.ɵfac }); HttpXsrfInterceptor.ctorParameters = () => [ { type: HttpXsrfTokenExtractor }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_HEADER_NAME,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXsrfInterceptor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: HttpXsrfTokenExtractor }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_HEADER_NAME] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An injectable `HttpHandler` that applies multiple interceptors * to a request before passing it to the given `HttpBackend`. * * The interceptors are loaded lazily from the injector, to allow * interceptors to themselves inject classes depending indirectly * on `HttpInterceptingHandler` itself. * @see `HttpInterceptor` */ class HttpInterceptingHandler { constructor(backend, injector) { this.backend = backend; this.injector = injector; this.chain = null; } handle(req) { if (this.chain === null) { const interceptors = this.injector.get(HTTP_INTERCEPTORS, []); this.chain = interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), this.backend); } return this.chain.handle(req); } } HttpInterceptingHandler.ɵfac = function HttpInterceptingHandler_Factory(t) { return new (t || HttpInterceptingHandler)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpBackend), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"])); }; HttpInterceptingHandler.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpInterceptingHandler, factory: HttpInterceptingHandler.ɵfac }); HttpInterceptingHandler.ctorParameters = () => [ { type: HttpBackend }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpInterceptingHandler, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: HttpBackend }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"] }]; }, null); })(); /** * Constructs an `HttpHandler` that applies interceptors * to a request before passing it to the given `HttpBackend`. * * Use as a factory function within `HttpClientModule`. * * */ function interceptingHandler(backend, interceptors = []) { if (!interceptors) { return backend; } return interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend); } /** * Factory function that determines where to store JSONP callbacks. * * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist * in test environments. In that case, callbacks are stored on an anonymous object instead. * * */ function jsonpCallbackContext() { if (typeof window === 'object') { return window; } return {}; } /** * Configures XSRF protection support for outgoing requests. * * For a server that supports a cookie-based XSRF protection system, * use directly to configure XSRF protection with the correct * cookie and header names. * * If no names are supplied, the default cookie name is `XSRF-TOKEN` * and the default header name is `X-XSRF-TOKEN`. * * @publicApi */ class HttpClientXsrfModule { /** * Disable the default XSRF protection. */ static disable() { return { ngModule: HttpClientXsrfModule, providers: [ { provide: HttpXsrfInterceptor, useClass: NoopInterceptor }, ], }; } /** * Configure XSRF protection. * @param options An object that can specify either or both * cookie name or header name. * - Cookie name default is `XSRF-TOKEN`. * - Header name default is `X-XSRF-TOKEN`. * */ static withOptions(options = {}) { return { ngModule: HttpClientXsrfModule, providers: [ options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [], options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [], ], }; } } HttpClientXsrfModule.ɵfac = function HttpClientXsrfModule_Factory(t) { return new (t || HttpClientXsrfModule)(); }; HttpClientXsrfModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: HttpClientXsrfModule }); HttpClientXsrfModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ HttpXsrfInterceptor, { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true }, { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor }, { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' }, { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' }, ] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientXsrfModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ providers: [ HttpXsrfInterceptor, { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true }, { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor }, { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' }, { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' }, ] }] }], null, null); })(); /** * Configures the [dependency injector](guide/glossary#injector) for `HttpClient` * with supporting services for XSRF. Automatically imported by `HttpClientModule`. * * You can add interceptors to the chain behind `HttpClient` by binding them to the * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`. * * @publicApi */ class HttpClientModule { } HttpClientModule.ɵfac = function HttpClientModule_Factory(t) { return new (t || HttpClientModule)(); }; HttpClientModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: HttpClientModule }); HttpClientModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ HttpClient, { provide: HttpHandler, useClass: HttpInterceptingHandler }, HttpXhrBackend, { provide: HttpBackend, useExisting: HttpXhrBackend }, BrowserXhr, { provide: XhrFactory, useExisting: BrowserXhr }, ], imports: [[ HttpClientXsrfModule.withOptions({ cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN' }), ]] }); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](HttpClientModule, { imports: [HttpClientXsrfModule] }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ /** * Optional configuration for XSRF protection. */ imports: [ HttpClientXsrfModule.withOptions({ cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN' }), ], /** * Configures the [dependency injector](guide/glossary#injector) where it is imported * with supporting services for HTTP communications. */ providers: [ HttpClient, { provide: HttpHandler, useClass: HttpInterceptingHandler }, HttpXhrBackend, { provide: HttpBackend, useExisting: HttpXhrBackend }, BrowserXhr, { provide: XhrFactory, useExisting: BrowserXhr }, ] }] }], null, null); })(); /** * Configures the [dependency injector](guide/glossary#injector) for `HttpClient` * with supporting services for JSONP. * Without this module, Jsonp requests reach the backend * with method JSONP, where they are rejected. * * You can add interceptors to the chain behind `HttpClient` by binding them to the * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`. * * @publicApi */ class HttpClientJsonpModule { } HttpClientJsonpModule.ɵfac = function HttpClientJsonpModule_Factory(t) { return new (t || HttpClientJsonpModule)(); }; HttpClientJsonpModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: HttpClientJsonpModule }); HttpClientJsonpModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ JsonpClientBackend, { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext }, { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true }, ] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientJsonpModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ providers: [ JsonpClientBackend, { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext }, { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true }, ] }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=http.js.map /***/ }), /***/ "tnsW": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/audit.js ***! \****************************************************************/ /*! exports provided: audit */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function audit(durationSelector) { return function auditOperatorFunction(source) { return source.lift(new AuditOperator(durationSelector)); }; } class AuditOperator { constructor(durationSelector) { this.durationSelector = durationSelector; } call(subscriber, source) { return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector)); } } class AuditSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, durationSelector) { super(destination); this.durationSelector = durationSelector; this.hasValue = false; } _next(value) { this.value = value; this.hasValue = true; if (!this.throttled) { let duration; try { const { durationSelector } = this; duration = durationSelector(value); } catch (err) { return this.destination.error(err); } const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)); if (!innerSubscription || innerSubscription.closed) { this.clearThrottle(); } else { this.add(this.throttled = innerSubscription); } } } clearThrottle() { const { value, hasValue, throttled } = this; if (throttled) { this.remove(throttled); this.throttled = undefined; throttled.unsubscribe(); } if (hasValue) { this.value = undefined; this.hasValue = false; this.destination.next(value); } } notifyNext() { this.clearThrottle(); } notifyComplete() { this.clearThrottle(); } } //# sourceMappingURL=audit.js.map /***/ }), /***/ "tvR+": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/index.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round.js */ "DdT1"); /* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify.js */ "I4jL"); /* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors.js */ "IeU1"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ "CSvP"); /* harmony default export */ __webpack_exports__["default"] = (function() { var tile = _squarify_js__WEBPACK_IMPORTED_MODULE_1__["default"], round = false, dx = 1, dy = 1, paddingStack = [0], paddingInner = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingTop = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingRight = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingBottom = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingLeft = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"]; function treemap(root) { root.x0 = root.y0 = 0; root.x1 = dx; root.y1 = dy; root.eachBefore(positionNode); paddingStack = [0]; if (round) root.eachBefore(_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); return root; } function positionNode(node) { var p = paddingStack[node.depth], x0 = node.x0 + p, y0 = node.y0 + p, x1 = node.x1 - p, y1 = node.y1 - p; if (x1 < x0) x0 = x1 = (x0 + x1) / 2; if (y1 < y0) y0 = y1 = (y0 + y1) / 2; node.x0 = x0; node.y0 = y0; node.x1 = x1; node.y1 = y1; if (node.children) { p = paddingStack[node.depth + 1] = paddingInner(node) / 2; x0 += paddingLeft(node) - p; y0 += paddingTop(node) - p; x1 -= paddingRight(node) - p; y1 -= paddingBottom(node) - p; if (x1 < x0) x0 = x1 = (x0 + x1) / 2; if (y1 < y0) y0 = y1 = (y0 + y1) / 2; tile(node, x0, y0, x1, y1); } } treemap.round = function(x) { return arguments.length ? (round = !!x, treemap) : round; }; treemap.size = function(x) { return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy]; }; treemap.tile = function(x) { return arguments.length ? (tile = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_2__["required"])(x), treemap) : tile; }; treemap.padding = function(x) { return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner(); }; treemap.paddingInner = function(x) { return arguments.length ? (paddingInner = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingInner; }; treemap.paddingOuter = function(x) { return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop(); }; treemap.paddingTop = function(x) { return arguments.length ? (paddingTop = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingTop; }; treemap.paddingRight = function(x) { return arguments.length ? (paddingRight = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingRight; }; treemap.paddingBottom = function(x) { return arguments.length ? (paddingBottom = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingBottom; }; treemap.paddingLeft = function(x) { return arguments.length ? (paddingLeft = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingLeft; }; return treemap; }); /***/ }), /***/ "tyNb": /*!**********************************************************************!*\ !*** ./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js ***! \**********************************************************************/ /*! exports provided: ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, provideRoutes, ɵEmptyOutletComponent, ɵROUTER_PROVIDERS, ɵangular_packages_router_router_a, ɵangular_packages_router_router_b, ɵangular_packages_router_router_c, ɵangular_packages_router_router_d, ɵangular_packages_router_router_e, ɵangular_packages_router_router_f, ɵangular_packages_router_router_g, ɵangular_packages_router_router_h, ɵangular_packages_router_router_i, ɵangular_packages_router_router_j, ɵangular_packages_router_router_k, ɵangular_packages_router_router_l, ɵangular_packages_router_router_m, ɵangular_packages_router_router_n, ɵangular_packages_router_router_o, ɵassignExtraOptionsToRouter, ɵflatten */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivatedRoute", function() { return ActivatedRoute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivatedRouteSnapshot", function() { return ActivatedRouteSnapshot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationEnd", function() { return ActivationEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationStart", function() { return ActivationStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseRouteReuseStrategy", function() { return BaseRouteReuseStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildActivationEnd", function() { return ChildActivationEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildActivationStart", function() { return ChildActivationStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildrenOutletContexts", function() { return ChildrenOutletContexts; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultUrlSerializer", function() { return DefaultUrlSerializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardsCheckEnd", function() { return GuardsCheckEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardsCheckStart", function() { return GuardsCheckStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationCancel", function() { return NavigationCancel; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationEnd", function() { return NavigationEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationError", function() { return NavigationError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationStart", function() { return NavigationStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoPreloading", function() { return NoPreloading; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutletContext", function() { return OutletContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRIMARY_OUTLET", function() { return PRIMARY_OUTLET; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloadAllModules", function() { return PreloadAllModules; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloadingStrategy", function() { return PreloadingStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTER_CONFIGURATION", function() { return ROUTER_CONFIGURATION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTER_INITIALIZER", function() { return ROUTER_INITIALIZER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTES", function() { return ROUTES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolveEnd", function() { return ResolveEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolveStart", function() { return ResolveStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteConfigLoadEnd", function() { return RouteConfigLoadEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteConfigLoadStart", function() { return RouteConfigLoadStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteReuseStrategy", function() { return RouteReuseStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return Router; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterEvent", function() { return RouterEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLink", function() { return RouterLink; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLinkActive", function() { return RouterLinkActive; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLinkWithHref", function() { return RouterLinkWithHref; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterModule", function() { return RouterModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterOutlet", function() { return RouterOutlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterPreloader", function() { return RouterPreloader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterState", function() { return RouterState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterStateSnapshot", function() { return RouterStateSnapshot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoutesRecognized", function() { return RoutesRecognized; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return Scroll; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlHandlingStrategy", function() { return UrlHandlingStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSegment", function() { return UrlSegment; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSegmentGroup", function() { return UrlSegmentGroup; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSerializer", function() { return UrlSerializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlTree", function() { return UrlTree; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToParamMap", function() { return convertToParamMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provideRoutes", function() { return provideRoutes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEmptyOutletComponent", function() { return ɵEmptyOutletComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵROUTER_PROVIDERS", function() { return ROUTER_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_a", function() { return ROUTER_FORROOT_GUARD; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_b", function() { return routerNgProbeToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_c", function() { return createRouterScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_d", function() { return provideLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_e", function() { return provideForRootGuard; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_f", function() { return setupRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_g", function() { return rootRoute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_h", function() { return RouterInitializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_i", function() { return getAppInitializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_j", function() { return getBootstrapListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_k", function() { return provideRouterInitializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_l", function() { return ɵEmptyOutletComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_m", function() { return Tree; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_n", function() { return TreeNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_o", function() { return RouterScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵassignExtraOptionsToRouter", function() { return assignExtraOptionsToRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflatten", function() { return flatten; }); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "kU1M"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Base for events the router goes through, as opposed to events tied to a specific * route. Fired one time for any given navigation. * * The following code shows how a class subscribes to router events. * * ```ts * class MyService { * constructor(public router: Router, logger: Logger) { * router.events.pipe( * filter((e: Event): e is RouterEvent => e instanceof RouterEvent) * ).subscribe((e: RouterEvent) => { * logger.log(e.id, e.url); * }); * } * } * ``` * * @see `Event` * @see [Router events summary](guide/router#router-events) * @publicApi */ class RouterEvent { constructor( /** A unique ID that the router assigns to every router navigation. */ id, /** The URL that is the destination for this navigation. */ url) { this.id = id; this.url = url; } } /** * An event triggered when a navigation starts. * * @publicApi */ class NavigationStart extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ navigationTrigger = 'imperative', /** @docsNotRequired */ restoredState = null) { super(id, url); this.navigationTrigger = navigationTrigger; this.restoredState = restoredState; } /** @docsNotRequired */ toString() { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; } } /** * An event triggered when a navigation ends successfully. * * @see `NavigationStart` * @see `NavigationCancel` * @see `NavigationError` * * @publicApi */ class NavigationEnd extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; } /** @docsNotRequired */ toString() { return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`; } } /** * An event triggered when a navigation is canceled, directly or indirectly. * This can happen when a route guard * returns `false` or initiates a redirect by returning a `UrlTree`. * * @see `NavigationStart` * @see `NavigationEnd` * @see `NavigationError` * * @publicApi */ class NavigationCancel extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ reason) { super(id, url); this.reason = reason; } /** @docsNotRequired */ toString() { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; } } /** * An event triggered when a navigation fails due to an unexpected error. * * @see `NavigationStart` * @see `NavigationEnd` * @see `NavigationCancel` * * @publicApi */ class NavigationError extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ error) { super(id, url); this.error = error; } /** @docsNotRequired */ toString() { return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`; } } /** * An event triggered when routes are recognized. * * @publicApi */ class RoutesRecognized extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } /** @docsNotRequired */ toString() { return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered at the start of the Guard phase of routing. * * @see `GuardsCheckEnd` * * @publicApi */ class GuardsCheckStart extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } toString() { return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered at the end of the Guard phase of routing. * * @see `GuardsCheckStart` * * @publicApi */ class GuardsCheckEnd extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state, /** @docsNotRequired */ shouldActivate) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; this.shouldActivate = shouldActivate; } toString() { return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`; } } /** * An event triggered at the start of the Resolve phase of routing. * * Runs in the "resolve" phase whether or not there is anything to resolve. * In future, may change to only run when there are things to be resolved. * * @see `ResolveEnd` * * @publicApi */ class ResolveStart extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } toString() { return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered at the end of the Resolve phase of routing. * @see `ResolveStart`. * * @publicApi */ class ResolveEnd extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } toString() { return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered before lazy loading a route configuration. * * @see `RouteConfigLoadEnd` * * @publicApi */ class RouteConfigLoadStart { constructor( /** @docsNotRequired */ route) { this.route = route; } toString() { return `RouteConfigLoadStart(path: ${this.route.path})`; } } /** * An event triggered when a route has been lazy loaded. * * @see `RouteConfigLoadStart` * * @publicApi */ class RouteConfigLoadEnd { constructor( /** @docsNotRequired */ route) { this.route = route; } toString() { return `RouteConfigLoadEnd(path: ${this.route.path})`; } } /** * An event triggered at the start of the child-activation * part of the Resolve phase of routing. * @see `ChildActivationEnd` * @see `ResolveStart` * * @publicApi */ class ChildActivationStart { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ChildActivationStart(path: '${path}')`; } } /** * An event triggered at the end of the child-activation part * of the Resolve phase of routing. * @see `ChildActivationStart` * @see `ResolveStart` * @publicApi */ class ChildActivationEnd { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ChildActivationEnd(path: '${path}')`; } } /** * An event triggered at the start of the activation part * of the Resolve phase of routing. * @see `ActivationEnd` * @see `ResolveStart` * * @publicApi */ class ActivationStart { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ActivationStart(path: '${path}')`; } } /** * An event triggered at the end of the activation part * of the Resolve phase of routing. * @see `ActivationStart` * @see `ResolveStart` * * @publicApi */ class ActivationEnd { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ActivationEnd(path: '${path}')`; } } /** * An event triggered by scrolling. * * @publicApi */ class Scroll { constructor( /** @docsNotRequired */ routerEvent, /** @docsNotRequired */ position, /** @docsNotRequired */ anchor) { this.routerEvent = routerEvent; this.position = position; this.anchor = anchor; } toString() { const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null; return `Scroll(anchor: '${this.anchor}', position: '${pos}')`; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The primary routing outlet. * * @publicApi */ const PRIMARY_OUTLET = 'primary'; class ParamsAsMap { constructor(params) { this.params = params || {}; } has(name) { return Object.prototype.hasOwnProperty.call(this.params, name); } get(name) { if (this.has(name)) { const v = this.params[name]; return Array.isArray(v) ? v[0] : v; } return null; } getAll(name) { if (this.has(name)) { const v = this.params[name]; return Array.isArray(v) ? v : [v]; } return []; } get keys() { return Object.keys(this.params); } } /** * Converts a `Params` instance to a `ParamMap`. * @param params The instance to convert. * @returns The new map instance. * * @publicApi */ function convertToParamMap(params) { return new ParamsAsMap(params); } const NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError'; function navigationCancelingError(message) { const error = Error('NavigationCancelingError: ' + message); error[NAVIGATION_CANCELING_ERROR] = true; return error; } function isNavigationCancelingError(error) { return error && error[NAVIGATION_CANCELING_ERROR]; } // Matches the route configuration (`route`) against the actual URL (`segments`). function defaultUrlMatcher(segments, segmentGroup, route) { const parts = route.path.split('/'); if (parts.length > segments.length) { // The actual URL is shorter than the config, no match return null; } if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || parts.length < segments.length)) { // The config is longer than the actual URL but we are looking for a full match, return null return null; } const posParams = {}; // Check each config part against the actual URL for (let index = 0; index < parts.length; index++) { const part = parts[index]; const segment = segments[index]; const isParameter = part.startsWith(':'); if (isParameter) { posParams[part.substring(1)] = segment; } else if (part !== segment.path) { // The actual URL part does not match the config, no match return null; } } return { consumed: segments.slice(0, parts.length), posParams }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function shallowEqualArrays(a, b) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; ++i) { if (!shallowEqual(a[i], b[i])) return false; } return true; } function shallowEqual(a, b) { // While `undefined` should never be possible, it would sometimes be the case in IE 11 // and pre-chromium Edge. The check below accounts for this edge case. const k1 = a ? Object.keys(a) : undefined; const k2 = b ? Object.keys(b) : undefined; if (!k1 || !k2 || k1.length != k2.length) { return false; } let key; for (let i = 0; i < k1.length; i++) { key = k1[i]; if (!equalArraysOrString(a[key], b[key])) { return false; } } return true; } /** * Test equality for arrays of strings or a string. */ function equalArraysOrString(a, b) { if (Array.isArray(a) && Array.isArray(b)) { if (a.length !== b.length) return false; const aSorted = [...a].sort(); const bSorted = [...b].sort(); return aSorted.every((val, index) => bSorted[index] === val); } else { return a === b; } } /** * Flattens single-level nested arrays. */ function flatten(arr) { return Array.prototype.concat.apply([], arr); } /** * Return the last element of an array. */ function last(a) { return a.length > 0 ? a[a.length - 1] : null; } /** * Verifys all booleans in an array are `true`. */ function and(bools) { return !bools.some(v => !v); } function forEach(map, callback) { for (const prop in map) { if (map.hasOwnProperty(prop)) { callback(map[prop], prop); } } } function wrapIntoObservable(value) { if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisObservable"])(value)) { return value; } if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisPromise"])(value)) { // Use `Promise.resolve()` to wrap promise-like instances. // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the // change detection. return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(Promise.resolve(value)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function createEmptyUrlTree() { return new UrlTree(new UrlSegmentGroup([], {}), {}, null); } function containsTree(container, containee, exact) { if (exact) { return equalQueryParams(container.queryParams, containee.queryParams) && equalSegmentGroups(container.root, containee.root); } return containsQueryParams(container.queryParams, containee.queryParams) && containsSegmentGroup(container.root, containee.root); } function equalQueryParams(container, containee) { // TODO: This does not handle array params correctly. return shallowEqual(container, containee); } function equalSegmentGroups(container, containee) { if (!equalPath(container.segments, containee.segments)) return false; if (container.numberOfChildren !== containee.numberOfChildren) return false; for (const c in containee.children) { if (!container.children[c]) return false; if (!equalSegmentGroups(container.children[c], containee.children[c])) return false; } return true; } function containsQueryParams(container, containee) { return Object.keys(containee).length <= Object.keys(container).length && Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key])); } function containsSegmentGroup(container, containee) { return containsSegmentGroupHelper(container, containee, containee.segments); } function containsSegmentGroupHelper(container, containee, containeePaths) { if (container.segments.length > containeePaths.length) { const current = container.segments.slice(0, containeePaths.length); if (!equalPath(current, containeePaths)) return false; if (containee.hasChildren()) return false; return true; } else if (container.segments.length === containeePaths.length) { if (!equalPath(container.segments, containeePaths)) return false; for (const c in containee.children) { if (!container.children[c]) return false; if (!containsSegmentGroup(container.children[c], containee.children[c])) return false; } return true; } else { const current = containeePaths.slice(0, container.segments.length); const next = containeePaths.slice(container.segments.length); if (!equalPath(container.segments, current)) return false; if (!container.children[PRIMARY_OUTLET]) return false; return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next); } } /** * @description * * Represents the parsed URL. * * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a * serialized tree. * UrlTree is a data structure that provides a lot of affordances in dealing with URLs * * @usageNotes * ### Example * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const tree: UrlTree = * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment'); * const f = tree.fragment; // return 'fragment' * const q = tree.queryParams; // returns {debug: 'true'} * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET]; * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33' * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor' * g.children['support'].segments; // return 1 segment 'help' * } * } * ``` * * @publicApi */ class UrlTree { /** @internal */ constructor( /** The root segment group of the URL tree */ root, /** The query params of the URL */ queryParams, /** The fragment of the URL */ fragment) { this.root = root; this.queryParams = queryParams; this.fragment = fragment; } get queryParamMap() { if (!this._queryParamMap) { this._queryParamMap = convertToParamMap(this.queryParams); } return this._queryParamMap; } /** @docsNotRequired */ toString() { return DEFAULT_SERIALIZER.serialize(this); } } /** * @description * * Represents the parsed URL segment group. * * See `UrlTree` for more information. * * @publicApi */ class UrlSegmentGroup { constructor( /** The URL segments of this group. See `UrlSegment` for more information */ segments, /** The list of children of this group */ children) { this.segments = segments; this.children = children; /** The parent node in the url tree */ this.parent = null; forEach(children, (v, k) => v.parent = this); } /** Whether the segment has child segments */ hasChildren() { return this.numberOfChildren > 0; } /** Number of child segments */ get numberOfChildren() { return Object.keys(this.children).length; } /** @docsNotRequired */ toString() { return serializePaths(this); } } /** * @description * * Represents a single URL segment. * * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix * parameters associated with the segment. * * @usageNotes * ### Example * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const tree: UrlTree = router.parseUrl('/team;id=33'); * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET]; * const s: UrlSegment[] = g.segments; * s[0].path; // returns 'team' * s[0].parameters; // returns {id: 33} * } * } * ``` * * @publicApi */ class UrlSegment { constructor( /** The path part of a URL segment */ path, /** The matrix parameters associated with a segment */ parameters) { this.path = path; this.parameters = parameters; } get parameterMap() { if (!this._parameterMap) { this._parameterMap = convertToParamMap(this.parameters); } return this._parameterMap; } /** @docsNotRequired */ toString() { return serializePath(this); } } function equalSegments(as, bs) { return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters)); } function equalPath(as, bs) { if (as.length !== bs.length) return false; return as.every((a, i) => a.path === bs[i].path); } function mapChildrenIntoArray(segment, fn) { let res = []; forEach(segment.children, (child, childOutlet) => { if (childOutlet === PRIMARY_OUTLET) { res = res.concat(fn(child, childOutlet)); } }); forEach(segment.children, (child, childOutlet) => { if (childOutlet !== PRIMARY_OUTLET) { res = res.concat(fn(child, childOutlet)); } }); return res; } /** * @description * * Serializes and deserializes a URL string into a URL tree. * * The url serialization strategy is customizable. You can * make all URLs case insensitive by providing a custom UrlSerializer. * * See `DefaultUrlSerializer` for an example of a URL serializer. * * @publicApi */ class UrlSerializer { } /** * @description * * A default implementation of the `UrlSerializer`. * * Example URLs: * * ``` * /inbox/33(popup:compose) * /inbox/33;open=true/messages/44 * ``` * * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to * specify route specific parameters. * * @publicApi */ class DefaultUrlSerializer { /** Parses a url into a `UrlTree` */ parse(url) { const p = new UrlParser(url); return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment()); } /** Converts a `UrlTree` into a url */ serialize(tree) { const segment = `/${serializeSegment(tree.root, true)}`; const query = serializeQueryParams(tree.queryParams); const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : ''; return `${segment}${query}${fragment}`; } } const DEFAULT_SERIALIZER = new DefaultUrlSerializer(); function serializePaths(segment) { return segment.segments.map(p => serializePath(p)).join('/'); } function serializeSegment(segment, root) { if (!segment.hasChildren()) { return serializePaths(segment); } if (root) { const primary = segment.children[PRIMARY_OUTLET] ? serializeSegment(segment.children[PRIMARY_OUTLET], false) : ''; const children = []; forEach(segment.children, (v, k) => { if (k !== PRIMARY_OUTLET) { children.push(`${k}:${serializeSegment(v, false)}`); } }); return children.length > 0 ? `${primary}(${children.join('//')})` : primary; } else { const children = mapChildrenIntoArray(segment, (v, k) => { if (k === PRIMARY_OUTLET) { return [serializeSegment(segment.children[PRIMARY_OUTLET], false)]; } return [`${k}:${serializeSegment(v, false)}`]; }); // use no parenthesis if the only child is a primary outlet route if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) { return `${serializePaths(segment)}/${children[0]}`; } return `${serializePaths(segment)}/(${children.join('//')})`; } } /** * Encodes a URI string with the default encoding. This function will only ever be called from * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't * have to be encoded per https://url.spec.whatwg.org. */ function encodeUriString(s) { return encodeURIComponent(s) .replace(/%40/g, '@') .replace(/%3A/gi, ':') .replace(/%24/g, '$') .replace(/%2C/gi, ','); } /** * This function should be used to encode both keys and values in a query string key/value. In * the following URL, you need to call encodeUriQuery on "k" and "v": * * http://www.site.org/html;mk=mv?k=v#f */ function encodeUriQuery(s) { return encodeUriString(s).replace(/%3B/gi, ';'); } /** * This function should be used to encode a URL fragment. In the following URL, you need to call * encodeUriFragment on "f": * * http://www.site.org/html;mk=mv?k=v#f */ function encodeUriFragment(s) { return encodeURI(s); } /** * This function should be run on any URI segment as well as the key and value in a key/value * pair for matrix params. In the following URL, you need to call encodeUriSegment on "html", * "mk", and "mv": * * http://www.site.org/html;mk=mv?k=v#f */ function encodeUriSegment(s) { return encodeUriString(s).replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/%26/gi, '&'); } function decode(s) { return decodeURIComponent(s); } // Query keys/values should have the "+" replaced first, as "+" in a query string is " ". // decodeURIComponent function will not decode "+" as a space. function decodeQuery(s) { return decode(s.replace(/\+/g, '%20')); } function serializePath(path) { return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`; } function serializeMatrixParams(params) { return Object.keys(params) .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`) .join(''); } function serializeQueryParams(params) { const strParams = Object.keys(params).map((name) => { const value = params[name]; return Array.isArray(value) ? value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`; }); return strParams.length ? `?${strParams.join('&')}` : ''; } const SEGMENT_RE = /^[^\/()?;=#]+/; function matchSegments(str) { const match = str.match(SEGMENT_RE); return match ? match[0] : ''; } const QUERY_PARAM_RE = /^[^=?&#]+/; // Return the name of the query param at the start of the string or an empty string function matchQueryParams(str) { const match = str.match(QUERY_PARAM_RE); return match ? match[0] : ''; } const QUERY_PARAM_VALUE_RE = /^[^?&#]+/; // Return the value of the query param at the start of the string or an empty string function matchUrlQueryParamValue(str) { const match = str.match(QUERY_PARAM_VALUE_RE); return match ? match[0] : ''; } class UrlParser { constructor(url) { this.url = url; this.remaining = url; } parseRootSegment() { this.consumeOptional('/'); if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) { return new UrlSegmentGroup([], {}); } // The root segment group never has segments return new UrlSegmentGroup([], this.parseChildren()); } parseQueryParams() { const params = {}; if (this.consumeOptional('?')) { do { this.parseQueryParam(params); } while (this.consumeOptional('&')); } return params; } parseFragment() { return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null; } parseChildren() { if (this.remaining === '') { return {}; } this.consumeOptional('/'); const segments = []; if (!this.peekStartsWith('(')) { segments.push(this.parseSegment()); } while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) { this.capture('/'); segments.push(this.parseSegment()); } let children = {}; if (this.peekStartsWith('/(')) { this.capture('/'); children = this.parseParens(true); } let res = {}; if (this.peekStartsWith('(')) { res = this.parseParens(false); } if (segments.length > 0 || Object.keys(children).length > 0) { res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children); } return res; } // parse a segment with its matrix parameters // ie `name;k1=v1;k2` parseSegment() { const path = matchSegments(this.remaining); if (path === '' && this.peekStartsWith(';')) { throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`); } this.capture(path); return new UrlSegment(decode(path), this.parseMatrixParams()); } parseMatrixParams() { const params = {}; while (this.consumeOptional(';')) { this.parseParam(params); } return params; } parseParam(params) { const key = matchSegments(this.remaining); if (!key) { return; } this.capture(key); let value = ''; if (this.consumeOptional('=')) { const valueMatch = matchSegments(this.remaining); if (valueMatch) { value = valueMatch; this.capture(value); } } params[decode(key)] = decode(value); } // Parse a single query parameter `name[=value]` parseQueryParam(params) { const key = matchQueryParams(this.remaining); if (!key) { return; } this.capture(key); let value = ''; if (this.consumeOptional('=')) { const valueMatch = matchUrlQueryParamValue(this.remaining); if (valueMatch) { value = valueMatch; this.capture(value); } } const decodedKey = decodeQuery(key); const decodedVal = decodeQuery(value); if (params.hasOwnProperty(decodedKey)) { // Append to existing values let currentVal = params[decodedKey]; if (!Array.isArray(currentVal)) { currentVal = [currentVal]; params[decodedKey] = currentVal; } currentVal.push(decodedVal); } else { // Create a new value params[decodedKey] = decodedVal; } } // parse `(a/b//outlet_name:c/d)` parseParens(allowPrimary) { const segments = {}; this.capture('('); while (!this.consumeOptional(')') && this.remaining.length > 0) { const path = matchSegments(this.remaining); const next = this.remaining[path.length]; // if is is not one of these characters, then the segment was unescaped // or the group was not closed if (next !== '/' && next !== ')' && next !== ';') { throw new Error(`Cannot parse url '${this.url}'`); } let outletName = undefined; if (path.indexOf(':') > -1) { outletName = path.substr(0, path.indexOf(':')); this.capture(outletName); this.capture(':'); } else if (allowPrimary) { outletName = PRIMARY_OUTLET; } const children = this.parseChildren(); segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] : new UrlSegmentGroup([], children); this.consumeOptional('//'); } return segments; } peekStartsWith(str) { return this.remaining.startsWith(str); } // Consumes the prefix when it is present and returns whether it has been consumed consumeOptional(str) { if (this.peekStartsWith(str)) { this.remaining = this.remaining.substring(str.length); return true; } return false; } capture(str) { if (!this.consumeOptional(str)) { throw new Error(`Expected "${str}".`); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Tree { constructor(root) { this._root = root; } get root() { return this._root.value; } /** * @internal */ parent(t) { const p = this.pathFromRoot(t); return p.length > 1 ? p[p.length - 2] : null; } /** * @internal */ children(t) { const n = findNode(t, this._root); return n ? n.children.map(t => t.value) : []; } /** * @internal */ firstChild(t) { const n = findNode(t, this._root); return n && n.children.length > 0 ? n.children[0].value : null; } /** * @internal */ siblings(t) { const p = findPath(t, this._root); if (p.length < 2) return []; const c = p[p.length - 2].children.map(c => c.value); return c.filter(cc => cc !== t); } /** * @internal */ pathFromRoot(t) { return findPath(t, this._root).map(s => s.value); } } // DFS for the node matching the value function findNode(value, node) { if (value === node.value) return node; for (const child of node.children) { const node = findNode(value, child); if (node) return node; } return null; } // Return the path to the node with the given value using DFS function findPath(value, node) { if (value === node.value) return [node]; for (const child of node.children) { const path = findPath(value, child); if (path.length) { path.unshift(node); return path; } } return []; } class TreeNode { constructor(value, children) { this.value = value; this.children = children; } toString() { return `TreeNode(${this.value})`; } } // Return the list of T indexed by outlet name function nodeChildrenAsMap(node) { const map = {}; if (node) { node.children.forEach(child => map[child.value.outlet] = child); } return map; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents the state of the router as a tree of activated routes. * * @usageNotes * * Every node in the route tree is an `ActivatedRoute` instance * that knows about the "consumed" URL segments, the extracted parameters, * and the resolved data. * Use the `ActivatedRoute` properties to traverse the tree from any node. * * The following fragment shows how a component gets the root node * of the current state to establish its own route tree: * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const state: RouterState = router.routerState; * const root: ActivatedRoute = state.root; * const child = root.firstChild; * const id: Observable<string> = child.params.map(p => p.id); * //... * } * } * ``` * * @see `ActivatedRoute` * @see [Getting route information](guide/router#getting-route-information) * * @publicApi */ class RouterState extends Tree { /** @internal */ constructor(root, /** The current snapshot of the router state */ snapshot) { super(root); this.snapshot = snapshot; setRouterState(this, root); } toString() { return this.snapshot.toString(); } } function createEmptyState(urlTree, rootComponent) { const snapshot = createEmptyStateSnapshot(urlTree, rootComponent); const emptyUrl = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]([new UrlSegment('', {})]); const emptyParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({}); const emptyData = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({}); const emptyQueryParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({}); const fragment = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](''); const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root); activated.snapshot = snapshot.root; return new RouterState(new TreeNode(activated, []), snapshot); } function createEmptyStateSnapshot(urlTree, rootComponent) { const emptyParams = {}; const emptyData = {}; const emptyQueryParams = {}; const fragment = ''; const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {}); return new RouterStateSnapshot('', new TreeNode(activated, [])); } /** * Provides access to information about a route associated with a component * that is loaded in an outlet. * Use to traverse the `RouterState` tree and extract information from nodes. * * The following example shows how to construct a component using information from a * currently activated route. * * {@example router/activated-route/module.ts region="activated-route" * header="activated-route.component.ts"} * * @see [Getting route information](guide/router#getting-route-information) * * @publicApi */ class ActivatedRoute { /** @internal */ constructor( /** An observable of the URL segments matched by this route. */ url, /** An observable of the matrix parameters scoped to this route. */ params, /** An observable of the query parameters shared by all the routes. */ queryParams, /** An observable of the URL fragment shared by all the routes. */ fragment, /** An observable of the static and resolved data of this route. */ data, /** The outlet name of the route, a constant. */ outlet, /** The component of the route, a constant. */ // TODO(vsavkin): remove |string component, futureSnapshot) { this.url = url; this.params = params; this.queryParams = queryParams; this.fragment = fragment; this.data = data; this.outlet = outlet; this.component = component; this._futureSnapshot = futureSnapshot; } /** The configuration used to match this route. */ get routeConfig() { return this._futureSnapshot.routeConfig; } /** The root of the router state. */ get root() { return this._routerState.root; } /** The parent of this route in the router state tree. */ get parent() { return this._routerState.parent(this); } /** The first child of this route in the router state tree. */ get firstChild() { return this._routerState.firstChild(this); } /** The children of this route in the router state tree. */ get children() { return this._routerState.children(this); } /** The path from the root of the router state tree to this route. */ get pathFromRoot() { return this._routerState.pathFromRoot(this); } /** * An Observable that contains a map of the required and optional parameters * specific to the route. * The map supports retrieving single and multiple values from the same parameter. */ get paramMap() { if (!this._paramMap) { this._paramMap = this.params.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((p) => convertToParamMap(p))); } return this._paramMap; } /** * An Observable that contains a map of the query parameters available to all routes. * The map supports retrieving single and multiple values from the query parameter. */ get queryParamMap() { if (!this._queryParamMap) { this._queryParamMap = this.queryParams.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((p) => convertToParamMap(p))); } return this._queryParamMap; } toString() { return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`; } } /** * Returns the inherited params, data, and resolve for a given route. * By default, this only inherits values up to the nearest path-less or component-less route. * @internal */ function inheritedParamsDataResolve(route, paramsInheritanceStrategy = 'emptyOnly') { const pathFromRoot = route.pathFromRoot; let inheritingStartingFrom = 0; if (paramsInheritanceStrategy !== 'always') { inheritingStartingFrom = pathFromRoot.length - 1; while (inheritingStartingFrom >= 1) { const current = pathFromRoot[inheritingStartingFrom]; const parent = pathFromRoot[inheritingStartingFrom - 1]; // current route is an empty path => inherits its parent's params and data if (current.routeConfig && current.routeConfig.path === '') { inheritingStartingFrom--; // parent is componentless => current route should inherit its params and data } else if (!parent.component) { inheritingStartingFrom--; } else { break; } } } return flattenInherited(pathFromRoot.slice(inheritingStartingFrom)); } /** @internal */ function flattenInherited(pathFromRoot) { return pathFromRoot.reduce((res, curr) => { const params = Object.assign(Object.assign({}, res.params), curr.params); const data = Object.assign(Object.assign({}, res.data), curr.data); const resolve = Object.assign(Object.assign({}, res.resolve), curr._resolvedData); return { params, data, resolve }; }, { params: {}, data: {}, resolve: {} }); } /** * @description * * Contains the information about a route associated with a component loaded in an * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to * traverse the router state tree. * * The following example initializes a component with route information extracted * from the snapshot of the root node at the time of creation. * * ``` * @Component({templateUrl:'./my-component.html'}) * class MyComponent { * constructor(route: ActivatedRoute) { * const id: string = route.snapshot.params.id; * const url: string = route.snapshot.url.join(''); * const user = route.snapshot.data.user; * } * } * ``` * * @publicApi */ class ActivatedRouteSnapshot { /** @internal */ constructor( /** The URL segments matched by this route */ url, /** * The matrix parameters scoped to this route. * * You can compute all params (or data) in the router state or to get params outside * of an activated component by traversing the `RouterState` tree as in the following * example: * ``` * collectRouteParams(router: Router) { * let params = {}; * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root]; * while (stack.length > 0) { * const route = stack.pop()!; * params = {...params, ...route.params}; * stack.push(...route.children); * } * return params; * } * ``` */ params, /** The query parameters shared by all the routes */ queryParams, /** The URL fragment shared by all the routes */ fragment, /** The static and resolved data of this route */ data, /** The outlet name of the route */ outlet, /** The component of the route */ component, routeConfig, urlSegment, lastPathIndex, resolve) { this.url = url; this.params = params; this.queryParams = queryParams; this.fragment = fragment; this.data = data; this.outlet = outlet; this.component = component; this.routeConfig = routeConfig; this._urlSegment = urlSegment; this._lastPathIndex = lastPathIndex; this._resolve = resolve; } /** The root of the router state */ get root() { return this._routerState.root; } /** The parent of this route in the router state tree */ get parent() { return this._routerState.parent(this); } /** The first child of this route in the router state tree */ get firstChild() { return this._routerState.firstChild(this); } /** The children of this route in the router state tree */ get children() { return this._routerState.children(this); } /** The path from the root of the router state tree to this route */ get pathFromRoot() { return this._routerState.pathFromRoot(this); } get paramMap() { if (!this._paramMap) { this._paramMap = convertToParamMap(this.params); } return this._paramMap; } get queryParamMap() { if (!this._queryParamMap) { this._queryParamMap = convertToParamMap(this.queryParams); } return this._queryParamMap; } toString() { const url = this.url.map(segment => segment.toString()).join('/'); const matched = this.routeConfig ? this.routeConfig.path : ''; return `Route(url:'${url}', path:'${matched}')`; } } /** * @description * * Represents the state of the router at a moment in time. * * This is a tree of activated route snapshots. Every node in this tree knows about * the "consumed" URL segments, the extracted parameters, and the resolved data. * * The following example shows how a component is initialized with information * from the snapshot of the root node's state at the time of creation. * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const state: RouterState = router.routerState; * const snapshot: RouterStateSnapshot = state.snapshot; * const root: ActivatedRouteSnapshot = snapshot.root; * const child = root.firstChild; * const id: Observable<string> = child.params.map(p => p.id); * //... * } * } * ``` * * @publicApi */ class RouterStateSnapshot extends Tree { /** @internal */ constructor( /** The url from which this snapshot was created */ url, root) { super(root); this.url = url; setRouterState(this, root); } toString() { return serializeNode(this._root); } } function setRouterState(state, node) { node.value._routerState = state; node.children.forEach(c => setRouterState(state, c)); } function serializeNode(node) { const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : ''; return `${node.value}${c}`; } /** * The expectation is that the activate route is created with the right set of parameters. * So we push new values into the observables only when they are not the initial values. * And we detect that by checking if the snapshot field is set. */ function advanceActivatedRoute(route) { if (route.snapshot) { const currentSnapshot = route.snapshot; const nextSnapshot = route._futureSnapshot; route.snapshot = nextSnapshot; if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) { route.queryParams.next(nextSnapshot.queryParams); } if (currentSnapshot.fragment !== nextSnapshot.fragment) { route.fragment.next(nextSnapshot.fragment); } if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) { route.params.next(nextSnapshot.params); } if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) { route.url.next(nextSnapshot.url); } if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) { route.data.next(nextSnapshot.data); } } else { route.snapshot = route._futureSnapshot; // this is for resolved data route.data.next(route._futureSnapshot.data); } } function equalParamsAndUrlSegments(a, b) { const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url); const parentsMismatch = !a.parent !== !b.parent; return equalUrlParams && !parentsMismatch && (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function createRouterState(routeReuseStrategy, curr, prevState) { const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined); return new RouterState(root, curr); } function createNode(routeReuseStrategy, curr, prevState) { // reuse an activated route that is currently displayed on the screen if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) { const value = prevState.value; value._futureSnapshot = curr.value; const children = createOrReuseChildren(routeReuseStrategy, curr, prevState); return new TreeNode(value, children); // retrieve an activated route that is used to be displayed, but is not currently displayed } else { const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value); if (detachedRouteHandle) { const tree = detachedRouteHandle.route; setFutureSnapshotsOfActivatedRoutes(curr, tree); return tree; } else { const value = createActivatedRoute(curr.value); const children = curr.children.map(c => createNode(routeReuseStrategy, c)); return new TreeNode(value, children); } } } function setFutureSnapshotsOfActivatedRoutes(curr, result) { if (curr.value.routeConfig !== result.value.routeConfig) { throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route'); } if (curr.children.length !== result.children.length) { throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children'); } result.value._futureSnapshot = curr.value; for (let i = 0; i < curr.children.length; ++i) { setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]); } } function createOrReuseChildren(routeReuseStrategy, curr, prevState) { return curr.children.map(child => { for (const p of prevState.children) { if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) { return createNode(routeReuseStrategy, child, p); } } return createNode(routeReuseStrategy, child); }); } function createActivatedRoute(c) { return new ActivatedRoute(new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.url), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.params), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.queryParams), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.fragment), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.data), c.outlet, c.component, c); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function createUrlTree(route, urlTree, commands, queryParams, fragment) { if (commands.length === 0) { return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment); } const nav = computeNavigation(commands); if (nav.toRoot()) { return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment); } const startingPosition = findStartingPosition(nav, urlTree, route); const segmentGroup = startingPosition.processChildren ? updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) : updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands); return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment); } function isMatrixParams(command) { return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath; } /** * Determines if a given command has an `outlets` map. When we encounter a command * with an outlets k/v map, we need to apply each outlet individually to the existing segment. */ function isCommandWithOutlets(command) { return typeof command === 'object' && command != null && command.outlets; } function tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) { let qp = {}; if (queryParams) { forEach(queryParams, (value, name) => { qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`; }); } if (urlTree.root === oldSegmentGroup) { return new UrlTree(newSegmentGroup, qp, fragment); } return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment); } function replaceSegment(current, oldSegment, newSegment) { const children = {}; forEach(current.children, (c, outletName) => { if (c === oldSegment) { children[outletName] = newSegment; } else { children[outletName] = replaceSegment(c, oldSegment, newSegment); } }); return new UrlSegmentGroup(current.segments, children); } class Navigation { constructor(isAbsolute, numberOfDoubleDots, commands) { this.isAbsolute = isAbsolute; this.numberOfDoubleDots = numberOfDoubleDots; this.commands = commands; if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) { throw new Error('Root segment cannot have matrix parameters'); } const cmdWithOutlet = commands.find(isCommandWithOutlets); if (cmdWithOutlet && cmdWithOutlet !== last(commands)) { throw new Error('{outlets:{}} has to be the last command'); } } toRoot() { return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/'; } } /** Transforms commands to a normalized `Navigation` */ function computeNavigation(commands) { if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') { return new Navigation(true, 0, commands); } let numberOfDoubleDots = 0; let isAbsolute = false; const res = commands.reduce((res, cmd, cmdIdx) => { if (typeof cmd === 'object' && cmd != null) { if (cmd.outlets) { const outlets = {}; forEach(cmd.outlets, (commands, name) => { outlets[name] = typeof commands === 'string' ? commands.split('/') : commands; }); return [...res, { outlets }]; } if (cmd.segmentPath) { return [...res, cmd.segmentPath]; } } if (!(typeof cmd === 'string')) { return [...res, cmd]; } if (cmdIdx === 0) { cmd.split('/').forEach((urlPart, partIndex) => { if (partIndex == 0 && urlPart === '.') { // skip './a' } else if (partIndex == 0 && urlPart === '') { // '/a' isAbsolute = true; } else if (urlPart === '..') { // '../a' numberOfDoubleDots++; } else if (urlPart != '') { res.push(urlPart); } }); return res; } return [...res, cmd]; }, []); return new Navigation(isAbsolute, numberOfDoubleDots, res); } class Position { constructor(segmentGroup, processChildren, index) { this.segmentGroup = segmentGroup; this.processChildren = processChildren; this.index = index; } } function findStartingPosition(nav, tree, route) { if (nav.isAbsolute) { return new Position(tree.root, true, 0); } if (route.snapshot._lastPathIndex === -1) { const segmentGroup = route.snapshot._urlSegment; // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children // see issue #26224, #13011, #35687 // However, if the ActivatedRoute is the root we should process children like above. const processChildren = segmentGroup === tree.root; return new Position(segmentGroup, processChildren, 0); } const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1; const index = route.snapshot._lastPathIndex + modifier; return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots); } function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) { let g = group; let ci = index; let dd = numberOfDoubleDots; while (dd > ci) { dd -= ci; g = g.parent; if (!g) { throw new Error('Invalid number of \'../\''); } ci = g.segments.length; } return new Position(g, false, ci - dd); } function getOutlets(commands) { if (isCommandWithOutlets(commands[0])) { return commands[0].outlets; } return { [PRIMARY_OUTLET]: commands }; } function updateSegmentGroup(segmentGroup, startIndex, commands) { if (!segmentGroup) { segmentGroup = new UrlSegmentGroup([], {}); } if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) { return updateSegmentGroupChildren(segmentGroup, startIndex, commands); } const m = prefixedWith(segmentGroup, startIndex, commands); const slicedCommands = commands.slice(m.commandIndex); if (m.match && m.pathIndex < segmentGroup.segments.length) { const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {}); g.children[PRIMARY_OUTLET] = new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children); return updateSegmentGroupChildren(g, 0, slicedCommands); } else if (m.match && slicedCommands.length === 0) { return new UrlSegmentGroup(segmentGroup.segments, {}); } else if (m.match && !segmentGroup.hasChildren()) { return createNewSegmentGroup(segmentGroup, startIndex, commands); } else if (m.match) { return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands); } else { return createNewSegmentGroup(segmentGroup, startIndex, commands); } } function updateSegmentGroupChildren(segmentGroup, startIndex, commands) { if (commands.length === 0) { return new UrlSegmentGroup(segmentGroup.segments, {}); } else { const outlets = getOutlets(commands); const children = {}; forEach(outlets, (commands, outlet) => { if (typeof commands === 'string') { commands = [commands]; } if (commands !== null) { children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands); } }); forEach(segmentGroup.children, (child, childOutlet) => { if (outlets[childOutlet] === undefined) { children[childOutlet] = child; } }); return new UrlSegmentGroup(segmentGroup.segments, children); } } function prefixedWith(segmentGroup, startIndex, commands) { let currentCommandIndex = 0; let currentPathIndex = startIndex; const noMatch = { match: false, pathIndex: 0, commandIndex: 0 }; while (currentPathIndex < segmentGroup.segments.length) { if (currentCommandIndex >= commands.length) return noMatch; const path = segmentGroup.segments[currentPathIndex]; const command = commands[currentCommandIndex]; // Do not try to consume command as part of the prefixing if it has outlets because it can // contain outlets other than the one being processed. Consuming the outlets command would // result in other outlets being ignored. if (isCommandWithOutlets(command)) { break; } const curr = `${command}`; const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null; if (currentPathIndex > 0 && curr === undefined) break; if (curr && next && (typeof next === 'object') && next.outlets === undefined) { if (!compare(curr, next, path)) return noMatch; currentCommandIndex += 2; } else { if (!compare(curr, {}, path)) return noMatch; currentCommandIndex++; } currentPathIndex++; } return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex }; } function createNewSegmentGroup(segmentGroup, startIndex, commands) { const paths = segmentGroup.segments.slice(0, startIndex); let i = 0; while (i < commands.length) { const command = commands[i]; if (isCommandWithOutlets(command)) { const children = createNewSegmentChildren(command.outlets); return new UrlSegmentGroup(paths, children); } // if we start with an object literal, we need to reuse the path part from the segment if (i === 0 && isMatrixParams(commands[0])) { const p = segmentGroup.segments[startIndex]; paths.push(new UrlSegment(p.path, stringify(commands[0]))); i++; continue; } const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`; const next = (i < commands.length - 1) ? commands[i + 1] : null; if (curr && next && isMatrixParams(next)) { paths.push(new UrlSegment(curr, stringify(next))); i += 2; } else { paths.push(new UrlSegment(curr, {})); i++; } } return new UrlSegmentGroup(paths, {}); } function createNewSegmentChildren(outlets) { const children = {}; forEach(outlets, (commands, outlet) => { if (typeof commands === 'string') { commands = [commands]; } if (commands !== null) { children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands); } }); return children; } function stringify(params) { const res = {}; forEach(params, (v, k) => res[k] = `${v}`); return res; } function compare(path, params, segment) { return path == segment.path && shallowEqual(params, segment.parameters); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent) => Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(t => { new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent) .activate(rootContexts); return t; }); class ActivateRoutes { constructor(routeReuseStrategy, futureState, currState, forwardEvent) { this.routeReuseStrategy = routeReuseStrategy; this.futureState = futureState; this.currState = currState; this.forwardEvent = forwardEvent; } activate(parentContexts) { const futureRoot = this.futureState._root; const currRoot = this.currState ? this.currState._root : null; this.deactivateChildRoutes(futureRoot, currRoot, parentContexts); advanceActivatedRoute(this.futureState.root); this.activateChildRoutes(futureRoot, currRoot, parentContexts); } // De-activate the child route that are not re-used for the future state deactivateChildRoutes(futureNode, currNode, contexts) { const children = nodeChildrenAsMap(currNode); // Recurse on the routes active in the future state to de-activate deeper children futureNode.children.forEach(futureChild => { const childOutletName = futureChild.value.outlet; this.deactivateRoutes(futureChild, children[childOutletName], contexts); delete children[childOutletName]; }); // De-activate the routes that will not be re-used forEach(children, (v, childName) => { this.deactivateRouteAndItsChildren(v, contexts); }); } deactivateRoutes(futureNode, currNode, parentContext) { const future = futureNode.value; const curr = currNode ? currNode.value : null; if (future === curr) { // Reusing the node, check to see if the children need to be de-activated if (future.component) { // If we have a normal route, we need to go through an outlet. const context = parentContext.getContext(future.outlet); if (context) { this.deactivateChildRoutes(futureNode, currNode, context.children); } } else { // if we have a componentless route, we recurse but keep the same outlet map. this.deactivateChildRoutes(futureNode, currNode, parentContext); } } else { if (curr) { // Deactivate the current route which will not be re-used this.deactivateRouteAndItsChildren(currNode, parentContext); } } } deactivateRouteAndItsChildren(route, parentContexts) { if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) { this.detachAndStoreRouteSubtree(route, parentContexts); } else { this.deactivateRouteAndOutlet(route, parentContexts); } } detachAndStoreRouteSubtree(route, parentContexts) { const context = parentContexts.getContext(route.value.outlet); if (context && context.outlet) { const componentRef = context.outlet.detach(); const contexts = context.children.onOutletDeactivated(); this.routeReuseStrategy.store(route.value.snapshot, { componentRef, route, contexts }); } } deactivateRouteAndOutlet(route, parentContexts) { const context = parentContexts.getContext(route.value.outlet); // The context could be `null` if we are on a componentless route but there may still be // children that need deactivating. const contexts = context && route.value.component ? context.children : parentContexts; const children = nodeChildrenAsMap(route); for (const childOutlet of Object.keys(children)) { this.deactivateRouteAndItsChildren(children[childOutlet], contexts); } if (context && context.outlet) { // Destroy the component context.outlet.deactivate(); // Destroy the contexts for all the outlets that were in the component context.children.onOutletDeactivated(); } } activateChildRoutes(futureNode, currNode, contexts) { const children = nodeChildrenAsMap(currNode); futureNode.children.forEach(c => { this.activateRoutes(c, children[c.value.outlet], contexts); this.forwardEvent(new ActivationEnd(c.value.snapshot)); }); if (futureNode.children.length) { this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot)); } } activateRoutes(futureNode, currNode, parentContexts) { const future = futureNode.value; const curr = currNode ? currNode.value : null; advanceActivatedRoute(future); // reusing the node if (future === curr) { if (future.component) { // If we have a normal route, we need to go through an outlet. const context = parentContexts.getOrCreateContext(future.outlet); this.activateChildRoutes(futureNode, currNode, context.children); } else { // if we have a componentless route, we recurse but keep the same outlet map. this.activateChildRoutes(futureNode, currNode, parentContexts); } } else { if (future.component) { // if we have a normal route, we need to place the component into the outlet and recurse. const context = parentContexts.getOrCreateContext(future.outlet); if (this.routeReuseStrategy.shouldAttach(future.snapshot)) { const stored = this.routeReuseStrategy.retrieve(future.snapshot); this.routeReuseStrategy.store(future.snapshot, null); context.children.onOutletReAttached(stored.contexts); context.attachRef = stored.componentRef; context.route = stored.route.value; if (context.outlet) { // Attach right away when the outlet has already been instantiated // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated context.outlet.attach(stored.componentRef, stored.route.value); } advanceActivatedRouteNodeAndItsChildren(stored.route); } else { const config = parentLoadedConfig(future.snapshot); const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null; context.attachRef = null; context.route = future; context.resolver = cmpFactoryResolver; if (context.outlet) { // Activate the outlet when it has already been instantiated // Otherwise it will get activated from its `ngOnInit` when instantiated context.outlet.activateWith(future, cmpFactoryResolver); } this.activateChildRoutes(futureNode, null, context.children); } } else { // if we have a componentless route, we recurse but keep the same outlet map. this.activateChildRoutes(futureNode, null, parentContexts); } } } } function advanceActivatedRouteNodeAndItsChildren(node) { advanceActivatedRoute(node.value); node.children.forEach(advanceActivatedRouteNodeAndItsChildren); } function parentLoadedConfig(snapshot) { for (let s = snapshot.parent; s; s = s.parent) { const route = s.routeConfig; if (route && route._loadedConfig) return route._loadedConfig; if (route && route.component) return null; } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class LoadedRouterConfig { constructor(routes, module) { this.routes = routes; this.module = module; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Simple function check, but generic so type inference will flow. Example: * * function product(a: number, b: number) { * return a * b; * } * * if (isFunction<product>(fn)) { * return fn(1, 2); * } else { * throw "Must provide the `product` function"; * } */ function isFunction(v) { return typeof v === 'function'; } function isBoolean(v) { return typeof v === 'boolean'; } function isUrlTree(v) { return v instanceof UrlTree; } function isCanLoad(guard) { return guard && isFunction(guard.canLoad); } function isCanActivate(guard) { return guard && isFunction(guard.canActivate); } function isCanActivateChild(guard) { return guard && isFunction(guard.canActivateChild); } function isCanDeactivate(guard) { return guard && isFunction(guard.canDeactivate); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const INITIAL_VALUE = Symbol('INITIAL_VALUE'); function prioritizedGuardValue() { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(obs => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["combineLatest"])(obs.map(o => o.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["startWith"])(INITIAL_VALUE)))) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["scan"])((acc, list) => { let isPending = false; return list.reduce((innerAcc, val, i) => { if (innerAcc !== INITIAL_VALUE) return innerAcc; // Toggle pending flag if any values haven't been set yet if (val === INITIAL_VALUE) isPending = true; // Any other return values are only valid if we haven't yet hit a pending // call. This guarantees that in the case of a guard at the bottom of the // tree that returns a redirect, we will wait for the higher priority // guard at the top to finish before performing the redirect. if (!isPending) { // Early return when we hit a `false` value as that should always // cancel navigation if (val === false) return val; if (i === list.length - 1 || isUrlTree(val)) { return val; } } return innerAcc; }, acc); }, INITIAL_VALUE), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(item => item !== INITIAL_VALUE), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(item => isUrlTree(item) ? item : item === true), // Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["take"])(1)); }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This component is used internally within the router to be a placeholder when an empty * router-outlet is needed. For example, with a config such as: * * `{path: 'parent', outlet: 'nav', children: [...]}` * * In order to render, there needs to be a component on this config, which will default * to this `EmptyOutletComponent`. */ class ɵEmptyOutletComponent { } ɵEmptyOutletComponent.ɵfac = function ɵEmptyOutletComponent_Factory(t) { return new (t || ɵEmptyOutletComponent)(); }; ɵEmptyOutletComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ type: ɵEmptyOutletComponent, selectors: [["ng-component"]], decls: 1, vars: 0, template: function ɵEmptyOutletComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "router-outlet"); } }, directives: function () { return [RouterOutlet]; }, encapsulation: 2 }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](ɵEmptyOutletComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{ template: `<router-outlet></router-outlet>` }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function validateConfig(config, parentPath = '') { // forEach doesn't iterate undefined values for (let i = 0; i < config.length; i++) { const route = config[i]; const fullPath = getFullPath(parentPath, route); validateNode(route, fullPath); } } function validateNode(route, fullPath) { if (typeof ngDevMode === 'undefined' || ngDevMode) { if (!route) { throw new Error(` Invalid configuration of route '${fullPath}': Encountered undefined route. The reason might be an extra comma. Example: const routes: Routes = [ { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, { path: 'dashboard', component: DashboardComponent },, << two commas { path: 'detail/:id', component: HeroDetailComponent } ]; `); } if (Array.isArray(route)) { throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`); } if (!route.component && !route.children && !route.loadChildren && (route.outlet && route.outlet !== PRIMARY_OUTLET)) { throw new Error(`Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`); } if (route.redirectTo && route.children) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`); } if (route.redirectTo && route.loadChildren) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`); } if (route.children && route.loadChildren) { throw new Error(`Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`); } if (route.redirectTo && route.component) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`); } if (route.redirectTo && route.canActivate) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` + `so canActivate will never be executed.`); } if (route.path && route.matcher) { throw new Error(`Invalid configuration of route '${fullPath}': path and matcher cannot be used together`); } if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) { throw new Error(`Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`); } if (route.path === void 0 && route.matcher === void 0) { throw new Error(`Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`); } if (typeof route.path === 'string' && route.path.charAt(0) === '/') { throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`); } if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) { const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`; throw new Error(`Invalid configuration of route '{path: "${fullPath}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`); } if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') { throw new Error(`Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`); } } if (route.children) { validateConfig(route.children, fullPath); } } function getFullPath(parentPath, currentRoute) { if (!currentRoute) { return parentPath; } if (!parentPath && !currentRoute.path) { return ''; } else if (parentPath && !currentRoute.path) { return `${parentPath}/`; } else if (!parentPath && currentRoute.path) { return currentRoute.path; } else { return `${parentPath}/${currentRoute.path}`; } } /** * Makes a copy of the config and adds any default required properties. */ function standardizeConfig(r) { const children = r.children && r.children.map(standardizeConfig); const c = children ? Object.assign(Object.assign({}, r), { children }) : Object.assign({}, r); if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) { c.component = ɵEmptyOutletComponent; } return c; } /** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */ function getOutlet(route) { return route.outlet || PRIMARY_OUTLET; } /** * Sorts the `routes` such that the ones with an outlet matching `outletName` come first. * The order of the configs is otherwise preserved. */ function sortByMatchingOutlets(routes, outletName) { const sortedConfig = routes.filter(r => getOutlet(r) === outletName); sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName)); return sortedConfig; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const noMatch = { matched: false, consumedSegments: [], lastChild: 0, parameters: {}, positionalParamSegments: {} }; function match(segmentGroup, route, segments) { var _a; if (route.path === '') { if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) { return Object.assign({}, noMatch); } return { matched: true, consumedSegments: [], lastChild: 0, parameters: {}, positionalParamSegments: {} }; } const matcher = route.matcher || defaultUrlMatcher; const res = matcher(segments, segmentGroup, route); if (!res) return Object.assign({}, noMatch); const posParams = {}; forEach(res.posParams, (v, k) => { posParams[k] = v.path; }); const parameters = res.consumed.length > 0 ? Object.assign(Object.assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) : posParams; return { matched: true, consumedSegments: res.consumed, lastChild: res.consumed.length, // TODO(atscott): investigate combining parameters and positionalParamSegments parameters, positionalParamSegments: (_a = res.posParams) !== null && _a !== void 0 ? _a : {} }; } function split(segmentGroup, consumedSegments, slicedSegments, config, relativeLinkResolution = 'corrected') { if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) { const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children))); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; return { segmentGroup: s, slicedSegments: [] }; } if (slicedSegments.length === 0 && containsEmptyPathMatches(segmentGroup, slicedSegments, config)) { const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution)); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; return { segmentGroup: s, slicedSegments }; } const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; return { segmentGroup: s, slicedSegments }; } function addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) { const res = {}; for (const r of routes) { if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) { const s = new UrlSegmentGroup([], {}); s._sourceSegment = segmentGroup; if (relativeLinkResolution === 'legacy') { s._segmentIndexShift = segmentGroup.segments.length; } else { s._segmentIndexShift = consumedSegments.length; } res[getOutlet(r)] = s; } } return Object.assign(Object.assign({}, children), res); } function createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) { const res = {}; res[PRIMARY_OUTLET] = primarySegment; primarySegment._sourceSegment = segmentGroup; primarySegment._segmentIndexShift = consumedSegments.length; for (const r of routes) { if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) { const s = new UrlSegmentGroup([], {}); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; res[getOutlet(r)] = s; } } return res; } function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) { return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET); } function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) { return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r)); } function emptyPathMatch(segmentGroup, slicedSegments, r) { if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') { return false; } return r.path === ''; } /** * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without * verifying that its children are a full match for the remainder of the `rawSegment` children as * well. */ function isImmediateMatch(route, rawSegment, segments, outlet) { // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to // a config like // * `{path: '', children: [{path: 'b', outlet: 'b'}]}` // or even // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]` // // The exception here is when the segment outlet is for the primary outlet. This would // result in a match inside the named outlet because all children there are written as primary // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like // * `{path: '', outlet: 'x' children: [{path: 'b'}]}` // This should only match if the url is `/(x:b)`. if (getOutlet(route) !== outlet && (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) { return false; } if (route.path === '**') { return true; } return match(rawSegment, route, segments).matched; } function noLeftoversInUrl(segmentGroup, segments, outlet) { return segments.length === 0 && !segmentGroup.children[outlet]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NoMatch { constructor(segmentGroup) { this.segmentGroup = segmentGroup || null; } } class AbsoluteRedirect { constructor(urlTree) { this.urlTree = urlTree; } } function noMatch$1(segmentGroup) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(new NoMatch(segmentGroup))); } function absoluteRedirect(newTree) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(new AbsoluteRedirect(newTree))); } function namedOutletsRedirect(redirectTo) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`))); } function canLoadFails(route) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(navigationCancelingError(`Cannot load children because the guard of the route "path: '${route.path}'" returned false`))); } /** * Returns the `UrlTree` with the redirection applied. * * Lazy modules are loaded along the way. */ function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) { return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply(); } class ApplyRedirects { constructor(moduleInjector, configLoader, urlSerializer, urlTree, config) { this.configLoader = configLoader; this.urlSerializer = urlSerializer; this.urlTree = urlTree; this.config = config; this.allowRedirects = true; this.ngModule = moduleInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]); } apply() { const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup; // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is // only necessary to prevent failures in tests which assert exact object matches. The `split` is // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these // properties. Before the implementations were merged, the `applyRedirects` would not assign // them. We should be able to remove this logic as a "breaking change" but should do some more // investigation into the failures first. const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children); const expanded$ = this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET); const urlTrees$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((rootSegmentGroup) => { return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment); })); return urlTrees$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { if (e instanceof AbsoluteRedirect) { // after an absolute redirect we do not apply any more redirects! this.allowRedirects = false; // we need to run matching, so we can fetch all lazy-loaded modules return this.match(e.urlTree); } if (e instanceof NoMatch) { throw this.noMatchError(e); } throw e; })); } match(tree) { const expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET); const mapped$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((rootSegmentGroup) => { return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment); })); return mapped$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { if (e instanceof NoMatch) { throw this.noMatchError(e); } throw e; })); } noMatchError(e) { return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`); } createUrlTree(rootCandidate, queryParams, fragment) { const root = rootCandidate.segments.length > 0 ? new UrlSegmentGroup([], { [PRIMARY_OUTLET]: rootCandidate }) : rootCandidate; return new UrlTree(root, queryParams, fragment); } expandSegmentGroup(ngModule, routes, segmentGroup, outlet) { if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) { return this.expandChildren(ngModule, routes, segmentGroup) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((children) => new UrlSegmentGroup([], children))); } return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true); } // Recursively expand segment groups for all the child outlets expandChildren(ngModule, routes, segmentGroup) { // Expand outlets one at a time, starting with the primary outlet. We need to do it this way // because an absolute redirect from the primary outlet takes precedence. const childOutlets = []; for (const child of Object.keys(segmentGroup.children)) { if (child === 'primary') { childOutlets.unshift(child); } else { childOutlets.push(child); } } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(childOutlets) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(childOutlet => { const child = segmentGroup.children[childOutlet]; // Sort the routes so routes with outlets that match the segment appear // first, followed by routes for other outlets, which might match if they have an // empty path. const sortedRoutes = sortByMatchingOutlets(routes, childOutlet); return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(s => ({ segment: s, outlet: childOutlet }))); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["scan"])((children, expandedChild) => { children[expandedChild.outlet] = expandedChild.segment; return children; }, {}), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["last"])()); } expandSegment(ngModule, segmentGroup, routes, segments, outlet, allowRedirects) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(routes).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])((r) => { const expanded$ = this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects); return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { if (e instanceof NoMatch) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } throw e; })); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])((s) => !!s), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e, _) => { if (e instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["EmptyError"] || e.name === 'EmptyError') { if (noLeftoversInUrl(segmentGroup, segments, outlet)) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup([], {})); } throw new NoMatch(segmentGroup); } throw e; })); } expandSegmentAgainstRoute(ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) { if (!isImmediateMatch(route, segmentGroup, paths, outlet)) { return noMatch$1(segmentGroup); } if (route.redirectTo === undefined) { return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet); } if (allowRedirects && this.allowRedirects) { return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet); } return noMatch$1(segmentGroup); } expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) { if (route.path === '**') { return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet); } return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet); } expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet) { const newTree = this.applyRedirectCommands([], route.redirectTo, {}); if (route.redirectTo.startsWith('/')) { return absoluteRedirect(newTree); } return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((newSegments) => { const group = new UrlSegmentGroup(newSegments, {}); return this.expandSegment(ngModule, group, routes, newSegments, outlet, false); })); } expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) { const { matched, consumedSegments, lastChild, positionalParamSegments } = match(segmentGroup, route, segments); if (!matched) return noMatch$1(segmentGroup); const newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments); if (route.redirectTo.startsWith('/')) { return absoluteRedirect(newTree); } return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((newSegments) => { return this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false); })); } matchSegmentAgainstRoute(ngModule, rawSegmentGroup, route, segments, outlet) { if (route.path === '**') { if (route.loadChildren) { const loaded$ = route._loadedConfig ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig) : this.configLoader.load(ngModule.injector, route); return loaded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((cfg) => { route._loadedConfig = cfg; return new UrlSegmentGroup(segments, {}); })); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(segments, {})); } const { matched, consumedSegments, lastChild } = match(rawSegmentGroup, route, segments); if (!matched) return noMatch$1(rawSegmentGroup); const rawSlicedSegments = segments.slice(lastChild); const childConfig$ = this.getChildConfig(ngModule, route, segments); return childConfig$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((routerConfig) => { const childModule = routerConfig.module; const childConfig = routerConfig.routes; const { segmentGroup: splitSegmentGroup, slicedSegments } = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig); // See comment on the other call to `split` about why this is necessary. const segmentGroup = new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children); if (slicedSegments.length === 0 && segmentGroup.hasChildren()) { const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup); return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((children) => new UrlSegmentGroup(consumedSegments, children))); } if (childConfig.length === 0 && slicedSegments.length === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(consumedSegments, {})); } const matchedOnOutlet = getOutlet(route) === outlet; const expanded$ = this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true); return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((cs) => new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children))); })); } getChildConfig(ngModule, route, segments) { if (route.children) { // The children belong to the same module return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig(route.children, ngModule)); } if (route.loadChildren) { // lazy children belong to the loaded module if (route._loadedConfig !== undefined) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig); } return this.runCanLoadGuards(ngModule.injector, route, segments) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((shouldLoadResult) => { if (shouldLoadResult) { return this.configLoader.load(ngModule.injector, route) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((cfg) => { route._loadedConfig = cfg; return cfg; })); } return canLoadFails(route); })); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig([], ngModule)); } runCanLoadGuards(moduleInjector, route, segments) { const canLoad = route.canLoad; if (!canLoad || canLoad.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); const canLoadObservables = canLoad.map((injectionToken) => { const guard = moduleInjector.get(injectionToken); let guardVal; if (isCanLoad(guard)) { guardVal = guard.canLoad(route, segments); } else if (isFunction(guard)) { guardVal = guard(route, segments); } else { throw new Error('Invalid CanLoad guard'); } return wrapIntoObservable(guardVal); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canLoadObservables) .pipe(prioritizedGuardValue(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])((result) => { if (!isUrlTree(result)) return; const error = navigationCancelingError(`Redirecting to "${this.urlSerializer.serialize(result)}"`); error.url = result; throw error; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(result => result === true)); } lineralizeSegments(route, urlTree) { let res = []; let c = urlTree.root; while (true) { res = res.concat(c.segments); if (c.numberOfChildren === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(res); } if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) { return namedOutletsRedirect(route.redirectTo); } c = c.children[PRIMARY_OUTLET]; } } applyRedirectCommands(segments, redirectTo, posParams) { return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams); } applyRedirectCreatreUrlTree(redirectTo, urlTree, segments, posParams) { const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams); return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment); } createQueryParams(redirectToParams, actualParams) { const res = {}; forEach(redirectToParams, (v, k) => { const copySourceValue = typeof v === 'string' && v.startsWith(':'); if (copySourceValue) { const sourceName = v.substring(1); res[k] = actualParams[sourceName]; } else { res[k] = v; } }); return res; } createSegmentGroup(redirectTo, group, segments, posParams) { const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams); let children = {}; forEach(group.children, (child, name) => { children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams); }); return new UrlSegmentGroup(updatedSegments, children); } createSegments(redirectTo, redirectToSegments, actualSegments, posParams) { return redirectToSegments.map(s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) : this.findOrReturn(s, actualSegments)); } findPosParam(redirectTo, redirectToUrlSegment, posParams) { const pos = posParams[redirectToUrlSegment.path.substring(1)]; if (!pos) throw new Error(`Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`); return pos; } findOrReturn(redirectToUrlSegment, actualSegments) { let idx = 0; for (const s of actualSegments) { if (s.path === redirectToUrlSegment.path) { actualSegments.splice(idx); return s; } idx++; } return redirectToUrlSegment; } } /** * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`. * * When a segment group has only one child which is a primary outlet, merges that child into the * parent. That is, the child segment group's segments are merged into the `s` and the child's * children become the children of `s`. Think of this like a 'squash', merging the child segment * group into the parent. */ function mergeTrivialChildren(s) { if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) { const c = s.children[PRIMARY_OUTLET]; return new UrlSegmentGroup(s.segments.concat(c.segments), c.children); } return s; } /** * Recursively merges primary segment children into their parents and also drops empty children * (those which have no segments and no children themselves). The latter prevents serializing a * group into something like `/a(aux:)`, where `aux` is an empty child segment. */ function squashSegmentGroup(segmentGroup) { const newChildren = {}; for (const childOutlet of Object.keys(segmentGroup.children)) { const child = segmentGroup.children[childOutlet]; const childCandidate = squashSegmentGroup(child); // don't add empty children if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) { newChildren[childOutlet] = childCandidate; } } const s = new UrlSegmentGroup(segmentGroup.segments, newChildren); return mergeTrivialChildren(s); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(urlAfterRedirects => (Object.assign(Object.assign({}, t), { urlAfterRedirects }))))); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class CanActivate { constructor(path) { this.path = path; this.route = this.path[this.path.length - 1]; } } class CanDeactivate { constructor(component, route) { this.component = component; this.route = route; } } function getAllRouteGuards(future, curr, parentContexts) { const futureRoot = future._root; const currRoot = curr ? curr._root : null; return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]); } function getCanActivateChild(p) { const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null; if (!canActivateChild || canActivateChild.length === 0) return null; return { node: p, guards: canActivateChild }; } function getToken(token, snapshot, moduleInjector) { const config = getClosestLoadedConfig(snapshot); const injector = config ? config.module.injector : moduleInjector; return injector.get(token); } function getClosestLoadedConfig(snapshot) { if (!snapshot) return null; for (let s = snapshot.parent; s; s = s.parent) { const route = s.routeConfig; if (route && route._loadedConfig) return route._loadedConfig; } return null; } function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = { canDeactivateChecks: [], canActivateChecks: [] }) { const prevChildren = nodeChildrenAsMap(currNode); // Process the children of the future route futureNode.children.forEach(c => { getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks); delete prevChildren[c.value.outlet]; }); // Process any children left from the current route (not active for the future route) forEach(prevChildren, (v, k) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks)); return checks; } function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = { canDeactivateChecks: [], canActivateChecks: [] }) { const future = futureNode.value; const curr = currNode ? currNode.value : null; const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null; // reusing the node if (curr && future.routeConfig === curr.routeConfig) { const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers); if (shouldRun) { checks.canActivateChecks.push(new CanActivate(futurePath)); } else { // we need to set the data future.data = curr.data; future._resolvedData = curr._resolvedData; } // If we have a component, we need to go through an outlet. if (future.component) { getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks); // if we have a componentless route, we recurse but keep the same outlet map. } else { getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks); } if (shouldRun && context && context.outlet && context.outlet.isActivated) { checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr)); } } else { if (curr) { deactivateRouteAndItsChildren(currNode, context, checks); } checks.canActivateChecks.push(new CanActivate(futurePath)); // If we have a component, we need to go through an outlet. if (future.component) { getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks); // if we have a componentless route, we recurse but keep the same outlet map. } else { getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks); } } return checks; } function shouldRunGuardsAndResolvers(curr, future, mode) { if (typeof mode === 'function') { return mode(curr, future); } switch (mode) { case 'pathParamsChange': return !equalPath(curr.url, future.url); case 'pathParamsOrQueryParamsChange': return !equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams); case 'always': return true; case 'paramsOrQueryParamsChange': return !equalParamsAndUrlSegments(curr, future) || !shallowEqual(curr.queryParams, future.queryParams); case 'paramsChange': default: return !equalParamsAndUrlSegments(curr, future); } } function deactivateRouteAndItsChildren(route, context, checks) { const children = nodeChildrenAsMap(route); const r = route.value; forEach(children, (node, childName) => { if (!r.component) { deactivateRouteAndItsChildren(node, context, checks); } else if (context) { deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks); } else { deactivateRouteAndItsChildren(node, null, checks); } }); if (!r.component) { checks.canDeactivateChecks.push(new CanDeactivate(null, r)); } else if (context && context.outlet && context.outlet.isActivated) { checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r)); } else { checks.canDeactivateChecks.push(new CanDeactivate(null, r)); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function checkGuards(moduleInjector, forwardEvent) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(t => { const { targetSnapshot, currentSnapshot, guards: { canActivateChecks, canDeactivateChecks } } = t; if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object.assign(Object.assign({}, t), { guardsResult: true })); } return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(canDeactivate => { return canDeactivate && isBoolean(canDeactivate) ? runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) : Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canDeactivate); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(guardsResult => (Object.assign(Object.assign({}, t), { guardsResult })))); }); } function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(result => { return result !== true; }, true)); } function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])((check) => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["concat"])(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, moduleInjector), runCanActivate(futureSnapshot, check.route, moduleInjector)); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(result => { return result !== true; }, true)); } /** * This should fire off `ActivationStart` events for each route being activated at this * level. * In other words, if you're activating `a` and `b` below, `path` will contain the * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always * return * `true` so checks continue to run. */ function fireActivationStart(snapshot, forwardEvent) { if (snapshot !== null && forwardEvent) { forwardEvent(new ActivationStart(snapshot)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); } /** * This should fire off `ChildActivationStart` events for each route being activated at this * level. * In other words, if you're activating `a` and `b` below, `path` will contain the * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always * return * `true` so checks continue to run. */ function fireChildActivationStart(snapshot, forwardEvent) { if (snapshot !== null && forwardEvent) { forwardEvent(new ChildActivationStart(snapshot)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); } function runCanActivate(futureRSS, futureARS, moduleInjector) { const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null; if (!canActivate || canActivate.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); const canActivateObservables = canActivate.map((c) => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["defer"])(() => { const guard = getToken(c, futureARS, moduleInjector); let observable; if (isCanActivate(guard)) { observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS)); } else if (isFunction(guard)) { observable = wrapIntoObservable(guard(futureARS, futureRSS)); } else { throw new Error('Invalid CanActivate guard'); } return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])()); }); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canActivateObservables).pipe(prioritizedGuardValue()); } function runCanActivateChild(futureRSS, path, moduleInjector) { const futureARS = path[path.length - 1]; const canActivateChildGuards = path.slice(0, path.length - 1) .reverse() .map(p => getCanActivateChild(p)) .filter(_ => _ !== null); const canActivateChildGuardsMapped = canActivateChildGuards.map((d) => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["defer"])(() => { const guardsMapped = d.guards.map((c) => { const guard = getToken(c, d.node, moduleInjector); let observable; if (isCanActivateChild(guard)) { observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS)); } else if (isFunction(guard)) { observable = wrapIntoObservable(guard(futureARS, futureRSS)); } else { throw new Error('Invalid CanActivateChild guard'); } return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])()); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(guardsMapped).pipe(prioritizedGuardValue()); }); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canActivateChildGuardsMapped).pipe(prioritizedGuardValue()); } function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) { const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null; if (!canDeactivate || canDeactivate.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); const canDeactivateObservables = canDeactivate.map((c) => { const guard = getToken(c, currARS, moduleInjector); let observable; if (isCanDeactivate(guard)) { observable = wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS)); } else if (isFunction(guard)) { observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS)); } else { throw new Error('Invalid CanDeactivate guard'); } return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])()); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canDeactivateObservables).pipe(prioritizedGuardValue()); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NoMatch$1 { } function newObservableError(e) { // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead. return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(e)); } function recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy = 'emptyOnly', relativeLinkResolution = 'legacy') { try { const result = new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) .recognize(); if (result === null) { return newObservableError(new NoMatch$1()); } else { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(result); } } catch (e) { // Catch the potential error from recognize due to duplicate outlet matches and return as an // `Observable` error instead. return newObservableError(e); } } class Recognizer { constructor(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) { this.rootComponentType = rootComponentType; this.config = config; this.urlTree = urlTree; this.url = url; this.paramsInheritanceStrategy = paramsInheritanceStrategy; this.relativeLinkResolution = relativeLinkResolution; } recognize() { const rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined), this.relativeLinkResolution) .segmentGroup; const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET); if (children === null) { return null; } // Use Object.freeze to prevent readers of the Router state from modifying it outside of a // navigation, resulting in the router being out of sync with the browser. const root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {}); const rootNode = new TreeNode(root, children); const routeState = new RouterStateSnapshot(this.url, rootNode); this.inheritParamsAndData(routeState._root); return routeState; } inheritParamsAndData(routeNode) { const route = routeNode.value; const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy); route.params = Object.freeze(i.params); route.data = Object.freeze(i.data); routeNode.children.forEach(n => this.inheritParamsAndData(n)); } processSegmentGroup(config, segmentGroup, outlet) { if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) { return this.processChildren(config, segmentGroup); } return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet); } /** * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if * we cannot find a match for _any_ of the children. * * @param config - The `Routes` to match against * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the * config. */ processChildren(config, segmentGroup) { const children = []; for (const childOutlet of Object.keys(segmentGroup.children)) { const child = segmentGroup.children[childOutlet]; // Sort the config so that routes with outlets that match the one being activated appear // first, followed by routes for other outlets, which might match if they have an empty path. const sortedConfig = sortByMatchingOutlets(config, childOutlet); const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet); if (outletChildren === null) { // Configs must match all segment children so because we did not find a match for this // outlet, return `null`. return null; } children.push(...outletChildren); } // Because we may have matched two outlets to the same empty path segment, we can have multiple // activated results for the same outlet. We should merge the children of these results so the // final return value is only one `TreeNode` per outlet. const mergedChildren = mergeEmptyPathMatches(children); if (typeof ngDevMode === 'undefined' || ngDevMode) { // This should really never happen - we are only taking the first match for each outlet and // merge the empty path matches. checkOutletNameUniqueness(mergedChildren); } sortActivatedRouteSnapshots(mergedChildren); return mergedChildren; } processSegment(config, segmentGroup, segments, outlet) { for (const r of config) { const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet); if (children !== null) { return children; } } if (noLeftoversInUrl(segmentGroup, segments, outlet)) { return []; } return null; } processSegmentAgainstRoute(route, rawSegment, segments, outlet) { if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null; let snapshot; let consumedSegments = []; let rawSlicedSegments = []; if (route.path === '**') { const params = segments.length > 0 ? last(segments).parameters : {}; snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route)); } else { const result = match(rawSegment, route, segments); if (!result.matched) { return null; } consumedSegments = result.consumedSegments; rawSlicedSegments = segments.slice(result.lastChild); snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route)); } const childConfig = getChildConfig(route); const { segmentGroup, slicedSegments } = split(rawSegment, consumedSegments, rawSlicedSegments, // Filter out routes with redirectTo because we are trying to create activated route // snapshots and don't handle redirects here. That should have been done in // `applyRedirects`. childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution); if (slicedSegments.length === 0 && segmentGroup.hasChildren()) { const children = this.processChildren(childConfig, segmentGroup); if (children === null) { return null; } return [new TreeNode(snapshot, children)]; } if (childConfig.length === 0 && slicedSegments.length === 0) { return [new TreeNode(snapshot, [])]; } const matchedOnOutlet = getOutlet(route) === outlet; // If we matched a config due to empty path match on a different outlet, we need to continue // passing the current outlet for the segment rather than switch to PRIMARY. // Note that we switch to primary when we have a match because outlet configs look like this: // {path: 'a', outlet: 'a', children: [ // {path: 'b', component: B}, // {path: 'c', component: C}, // ]} // Notice that the children of the named outlet are configured with the primary outlet const children = this.processSegment(childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet); if (children === null) { return null; } return [new TreeNode(snapshot, children)]; } } function sortActivatedRouteSnapshots(nodes) { nodes.sort((a, b) => { if (a.value.outlet === PRIMARY_OUTLET) return -1; if (b.value.outlet === PRIMARY_OUTLET) return 1; return a.value.outlet.localeCompare(b.value.outlet); }); } function getChildConfig(route) { if (route.children) { return route.children; } if (route.loadChildren) { return route._loadedConfig.routes; } return []; } function hasEmptyPathConfig(node) { const config = node.value.routeConfig; return config && config.path === '' && config.redirectTo === undefined; } /** * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the * children from each duplicate. This is necessary because different outlets can match a single * empty path route config and the results need to then be merged. */ function mergeEmptyPathMatches(nodes) { const result = []; for (const node of nodes) { if (!hasEmptyPathConfig(node)) { result.push(node); continue; } const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig); if (duplicateEmptyPathNode !== undefined) { duplicateEmptyPathNode.children.push(...node.children); } else { result.push(node); } } return result; } function checkOutletNameUniqueness(nodes) { const names = {}; nodes.forEach(n => { const routeWithSameOutletName = names[n.value.outlet]; if (routeWithSameOutletName) { const p = routeWithSameOutletName.url.map(s => s.toString()).join('/'); const c = n.value.url.map(s => s.toString()).join('/'); throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`); } names[n.value.outlet] = n.value; }); } function getSourceSegmentGroup(segmentGroup) { let s = segmentGroup; while (s._sourceSegment) { s = s._sourceSegment; } return s; } function getPathIndexShift(segmentGroup) { let s = segmentGroup; let res = (s._segmentIndexShift ? s._segmentIndexShift : 0); while (s._sourceSegment) { s = s._sourceSegment; res += (s._segmentIndexShift ? s._segmentIndexShift : 0); } return res - 1; } function getData(route) { return route.data || {}; } function getResolve(route) { return route.resolve || {}; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(t => recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(targetSnapshot => (Object.assign(Object.assign({}, t), { targetSnapshot }))))); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function resolveData(paramsInheritanceStrategy, moduleInjector) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(t => { const { targetSnapshot, guards: { canActivateChecks } } = t; if (!canActivateChecks.length) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t); } let canActivateChecksResolved = 0; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canActivateChecks) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(() => canActivateChecksResolved++), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeLast"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(_ => canActivateChecksResolved === canActivateChecks.length ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t) : rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"])); }); } function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) { const resolve = futureARS._resolve; return resolveNode(resolve, futureARS, futureRSS, moduleInjector) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((resolvedData) => { futureARS._resolvedData = resolvedData; futureARS.data = Object.assign(Object.assign({}, futureARS.data), inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve); return null; })); } function resolveNode(resolve, futureARS, futureRSS, moduleInjector) { const keys = Object.keys(resolve); if (keys.length === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])({}); } const data = {}; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(keys).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((key) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])((value) => { data[key] = value; }))), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeLast"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(() => { // Ensure all resolvers returned values, otherwise don't emit any "next" and just complete // the chain which will cancel navigation if (Object.keys(data).length === keys.length) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(data); } return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; })); } function getResolver(injectionToken, futureARS, futureRSS, moduleInjector) { const resolver = getToken(injectionToken, futureARS, moduleInjector); return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) : wrapIntoObservable(resolver(futureARS, futureRSS)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Perform a side effect through a switchMap for every emission on the source Observable, * but return an Observable that is identical to the source. It's essentially the same as * the `tap` operator, but if the side effectful `next` function returns an ObservableInput, * it will wait before continuing with the original value. */ function switchTap(next) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(v => { const nextResult = next(v); if (nextResult) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(nextResult).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(() => v)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(v); }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Provides a way to customize when activated routes get reused. * * @publicApi */ class RouteReuseStrategy { } /** * @description * * This base route reuse strategy only reuses routes when the matched router configs are * identical. This prevents components from being destroyed and recreated * when just the fragment or query parameters change * (that is, the existing component is _reused_). * * This strategy does not store any routes for later reuse. * * Angular uses this strategy by default. * * * It can be used as a base class for custom route reuse strategies, i.e. you can create your own * class that extends the `BaseRouteReuseStrategy` one. * @publicApi */ class BaseRouteReuseStrategy { /** * Whether the given route should detach for later reuse. * Always returns false for `BaseRouteReuseStrategy`. * */ shouldDetach(route) { return false; } /** * A no-op; the route is never stored since this strategy never detaches routes for later re-use. */ store(route, detachedTree) { } /** Returns `false`, meaning the route (and its subtree) is never reattached */ shouldAttach(route) { return false; } /** Returns `null` because this strategy does not store routes for later re-use. */ retrieve(route) { return null; } /** * Determines if a route should be reused. * This strategy returns `true` when the future route config and current route config are * identical. */ shouldReuseRoute(future, curr) { return future.routeConfig === curr.routeConfig; } } class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The [DI token](guide/glossary/#di-token) for a router configuration. * @see `ROUTES` * @publicApi */ const ROUTES = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTES'); class RouterConfigLoader { constructor(loader, compiler, onLoadStartListener, onLoadEndListener) { this.loader = loader; this.compiler = compiler; this.onLoadStartListener = onLoadStartListener; this.onLoadEndListener = onLoadEndListener; } load(parentInjector, route) { if (route._loader$) { return route._loader$; } if (this.onLoadStartListener) { this.onLoadStartListener(route); } const moduleFactory$ = this.loadModuleFactory(route.loadChildren); const loadRunner = moduleFactory$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((factory) => { if (this.onLoadEndListener) { this.onLoadEndListener(route); } const module = factory.create(parentInjector); // When loading a module that doesn't provide `RouterModule.forChild()` preloader // will get stuck in an infinite loop. The child module's Injector will look to // its parent `Injector` when it doesn't find any ROUTES so it will return routes // for it's parent module instead. return new LoadedRouterConfig(flatten(module.injector.get(ROUTES, undefined, _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectFlags"].Self | _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectFlags"].Optional)) .map(standardizeConfig), module); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((err) => { route._loader$ = undefined; throw err; })); // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much route._loader$ = new rxjs__WEBPACK_IMPORTED_MODULE_2__["ConnectableObservable"](loadRunner, () => new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]()) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["refCount"])()); return route._loader$; } loadModuleFactory(loadChildren) { if (typeof loadChildren === 'string') { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(this.loader.load(loadChildren)); } else { return wrapIntoObservable(loadChildren()).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((t) => { if (t instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactory"]) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t); } else { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(this.compiler.compileModuleAsync(t)); } })); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Store contextual information about a `RouterOutlet` * * @publicApi */ class OutletContext { constructor() { this.outlet = null; this.route = null; this.resolver = null; this.children = new ChildrenOutletContexts(); this.attachRef = null; } } /** * Store contextual information about the children (= nested) `RouterOutlet` * * @publicApi */ class ChildrenOutletContexts { constructor() { // contexts for child outlets, by name. this.contexts = new Map(); } /** Called when a `RouterOutlet` directive is instantiated */ onChildOutletCreated(childName, outlet) { const context = this.getOrCreateContext(childName); context.outlet = outlet; this.contexts.set(childName, context); } /** * Called when a `RouterOutlet` directive is destroyed. * We need to keep the context as the outlet could be destroyed inside a NgIf and might be * re-created later. */ onChildOutletDestroyed(childName) { const context = this.getContext(childName); if (context) { context.outlet = null; } } /** * Called when the corresponding route is deactivated during navigation. * Because the component get destroyed, all children outlet are destroyed. */ onOutletDeactivated() { const contexts = this.contexts; this.contexts = new Map(); return contexts; } onOutletReAttached(contexts) { this.contexts = contexts; } getOrCreateContext(childName) { let context = this.getContext(childName); if (!context) { context = new OutletContext(); this.contexts.set(childName, context); } return context; } getContext(childName) { return this.contexts.get(childName) || null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Provides a way to migrate AngularJS applications to Angular. * * @publicApi */ class UrlHandlingStrategy { } /** * @publicApi */ class DefaultUrlHandlingStrategy { shouldProcessUrl(url) { return true; } extract(url) { return url; } merge(newUrlPart, wholeUrl) { return newUrlPart; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function defaultErrorHandler(error) { throw error; } function defaultMalformedUriErrorHandler(error, urlSerializer, url) { return urlSerializer.parse('/'); } /** * @internal */ function defaultRouterHook(snapshot, runExtras) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } /** * @description * * A service that provides navigation among views and URL manipulation capabilities. * * @see `Route`. * @see [Routing and Navigation Guide](guide/router). * * @ngModule RouterModule * * @publicApi */ class Router { /** * Creates the router service. */ // TODO: vsavkin make internal after the final is out. constructor(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) { this.rootComponentType = rootComponentType; this.urlSerializer = urlSerializer; this.rootContexts = rootContexts; this.location = location; this.config = config; this.lastSuccessfulNavigation = null; this.currentNavigation = null; this.disposed = false; /** * Tracks the previously seen location change from the location subscription so we can compare * the two latest to see if they are duplicates. See setUpLocationChangeListener. */ this.lastLocationChangeInfo = null; this.navigationId = 0; this.isNgZoneEnabled = false; /** * An event stream for routing events in this NgModule. */ this.events = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); /** * A handler for navigation errors in this NgModule. */ this.errorHandler = defaultErrorHandler; /** * A handler for errors thrown by `Router.parseUrl(url)` * when `url` contains an invalid character. * The most common case is a `%` sign * that's not encoded and is not part of a percent encoded sequence. */ this.malformedUriErrorHandler = defaultMalformedUriErrorHandler; /** * True if at least one navigation event has occurred, * false otherwise. */ this.navigated = false; this.lastSuccessfulId = -1; /** * Hooks that enable you to pause navigation, * either before or after the preactivation phase. * Used by `RouterModule`. * * @internal */ this.hooks = { beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook }; /** * A strategy for extracting and merging URLs. * Used for AngularJS to Angular migrations. */ this.urlHandlingStrategy = new DefaultUrlHandlingStrategy(); /** * A strategy for re-using routes. */ this.routeReuseStrategy = new DefaultRouteReuseStrategy(); /** * How to handle a navigation request to the current URL. One of: * - `'ignore'` : The router ignores the request. * - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature. */ this.onSameUrlNavigation = 'ignore'; /** * How to merge parameters, data, and resolved data from parent to child * routes. One of: * * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data * for path-less or component-less routes. * - `'always'` : Inherit parent parameters, data, and resolved data * for all child routes. */ this.paramsInheritanceStrategy = 'emptyOnly'; /** * Determines when the router updates the browser URL. * By default (`"deferred"`), updates the browser URL after navigation has finished. * Set to `'eager'` to update the browser URL at the beginning of navigation. * You can choose to update early so that, if navigation fails, * you can show an error message with the URL that failed. */ this.urlUpdateStrategy = 'deferred'; /** * Enables a bug fix that corrects relative link resolution in components with empty paths. * @see `RouterModule` */ this.relativeLinkResolution = 'corrected'; const onLoadStart = (r) => this.triggerEvent(new RouteConfigLoadStart(r)); const onLoadEnd = (r) => this.triggerEvent(new RouteConfigLoadEnd(r)); this.ngModule = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]); this.console = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]); const ngZone = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]); this.isNgZoneEnabled = ngZone instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"] && _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone(); this.resetConfig(config); this.currentUrlTree = createEmptyUrlTree(); this.rawUrlTree = this.currentUrlTree; this.browserUrlTree = this.currentUrlTree; this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd); this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType); this.transitions = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({ id: 0, currentUrlTree: this.currentUrlTree, currentRawUrl: this.currentUrlTree, extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree), urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree), rawUrl: this.currentUrlTree, extras: {}, resolve: null, reject: null, promise: Promise.resolve(true), source: 'imperative', restoredState: null, currentSnapshot: this.routerState.snapshot, targetSnapshot: null, currentRouterState: this.routerState, targetRouterState: null, guards: { canActivateChecks: [], canDeactivateChecks: [] }, guardsResult: null, }); this.navigations = this.setupNavigations(this.transitions); this.processNavigations(); } setupNavigations(transitions) { const eventsSubject = this.events; return transitions.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(t => t.id !== 0), // Extract URL Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(t => (Object.assign(Object.assign({}, t), { extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl) }))), // Using switchMap so we cancel executing navigations when a new one comes in Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { let completed = false; let errored = false; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe( // Store the Navigation object Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { this.currentNavigation = { id: t.id, initialUrl: t.currentRawUrl, extractedUrl: t.extractedUrl, trigger: t.source, extras: t.extras, previousNavigation: this.lastSuccessfulNavigation ? Object.assign(Object.assign({}, this.lastSuccessfulNavigation), { previousNavigation: null }) : null }; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { const urlTransition = !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString(); const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) && this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl); if (processCurrentUrl) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe( // Fire NavigationStart event Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { const transition = this.transitions.getValue(); eventsSubject.next(new NavigationStart(t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState)); if (transition !== this.transitions.getValue()) { return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; } // This delay is required to match old behavior that forced // navigation to always be async return Promise.resolve(t); }), // ApplyRedirects applyRedirects$1(this.ngModule.injector, this.configLoader, this.urlSerializer, this.config), // Update the currentNavigation Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { this.currentNavigation = Object.assign(Object.assign({}, this.currentNavigation), { finalUrl: t.urlAfterRedirects }); }), // Recognize recognize$1(this.rootComponentType, this.config, (url) => this.serializeUrl(url), this.paramsInheritanceStrategy, this.relativeLinkResolution), // Update URL if in `eager` update mode Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { if (this.urlUpdateStrategy === 'eager') { if (!t.extras.skipLocationChange) { this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id, t.extras.state); } this.browserUrlTree = t.urlAfterRedirects; } // Fire RoutesRecognized const routesRecognized = new RoutesRecognized(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); eventsSubject.next(routesRecognized); })); } else { const processPreviousUrl = urlTransition && this.rawUrlTree && this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree); /* When the current URL shouldn't be processed, but the previous one was, * we handle this "error condition" by navigating to the previously * successful URL, but leaving the URL intact.*/ if (processPreviousUrl) { const { id, extractedUrl, source, restoredState, extras } = t; const navStart = new NavigationStart(id, this.serializeUrl(extractedUrl), source, restoredState); eventsSubject.next(navStart); const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) })); } else { /* When neither the current or previous URL can be processed, do nothing * other than update router's internal reference to the current "settled" * URL. This way the next navigation will be coming from the current URL * in the browser. */ this.rawUrlTree = t.rawUrl; this.browserUrlTree = t.urlAfterRedirects; t.resolve(null); return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; } } }), // Before Preactivation switchTap(t => { const { targetSnapshot, id: navigationId, extractedUrl: appliedUrlTree, rawUrl: rawUrlTree, extras: { skipLocationChange, replaceUrl } } = t; return this.hooks.beforePreactivation(targetSnapshot, { navigationId, appliedUrlTree, rawUrlTree, skipLocationChange: !!skipLocationChange, replaceUrl: !!replaceUrl, }); }), // --- GUARDS --- Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { const guardsStart = new GuardsCheckStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); this.triggerEvent(guardsStart); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(t => (Object.assign(Object.assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts) }))), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { if (isUrlTree(t.guardsResult)) { const error = navigationCancelingError(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`); error.url = t.guardsResult; throw error; } const guardsEnd = new GuardsCheckEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult); this.triggerEvent(guardsEnd); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(t => { if (!t.guardsResult) { this.resetUrlToCurrentUrlTree(); const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), ''); eventsSubject.next(navCancel); t.resolve(false); return false; } return true; }), // --- RESOLVE --- switchTap(t => { if (t.guards.canActivateChecks.length) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { const resolveStart = new ResolveStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); this.triggerEvent(resolveStart); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { let dataResolved = false; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(resolveData(this.paramsInheritanceStrategy, this.ngModule.injector), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])({ next: () => dataResolved = true, complete: () => { if (!dataResolved) { const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), `At least one route resolver didn't emit any value.`); eventsSubject.next(navCancel); t.resolve(false); } } })); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { const resolveEnd = new ResolveEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); this.triggerEvent(resolveEnd); })); } return undefined; }), // --- AFTER PREACTIVATION --- switchTap((t) => { const { targetSnapshot, id: navigationId, extractedUrl: appliedUrlTree, rawUrl: rawUrlTree, extras: { skipLocationChange, replaceUrl } } = t; return this.hooks.afterPreactivation(targetSnapshot, { navigationId, appliedUrlTree, rawUrlTree, skipLocationChange: !!skipLocationChange, replaceUrl: !!replaceUrl, }); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((t) => { const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState); return (Object.assign(Object.assign({}, t), { targetRouterState })); }), /* Once here, we are about to activate syncronously. The assumption is this will succeed, and user code may read from the Router service. Therefore before activation, we need to update router properties storing the current URL and the RouterState, as well as updated the browser URL. All this should happen *before* activating. */ Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])((t) => { this.currentUrlTree = t.urlAfterRedirects; this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl); this.routerState = t.targetRouterState; if (this.urlUpdateStrategy === 'deferred') { if (!t.extras.skipLocationChange) { this.setBrowserUrl(this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state); } this.browserUrlTree = t.urlAfterRedirects; } }), activateRoutes(this.rootContexts, this.routeReuseStrategy, (evt) => this.triggerEvent(evt)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])({ next() { completed = true; }, complete() { completed = true; } }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["finalize"])(() => { /* When the navigation stream finishes either through error or success, we * set the `completed` or `errored` flag. However, there are some situations * where we could get here without either of those being set. For instance, a * redirect during NavigationStart. Therefore, this is a catch-all to make * sure the NavigationCancel * event is fired when a navigation gets cancelled but not caught by other * means. */ if (!completed && !errored) { // Must reset to current URL tree here to ensure history.state is set. On a // fresh page load, if a new navigation comes in before a successful // navigation completes, there will be nothing in // history.state.navigationId. This can cause sync problems with AngularJS // sync code which looks for a value here in order to determine whether or // not to handle a given popstate event or to leave it to the Angular // router. this.resetUrlToCurrentUrlTree(); const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`); eventsSubject.next(navCancel); t.resolve(false); } // currentNavigation should always be reset to null here. If navigation was // successful, lastSuccessfulTransition will have already been set. Therefore // we can safely set currentNavigation to null here. this.currentNavigation = null; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { errored = true; /* This error type is issued during Redirect, and is handled as a * cancellation rather than an error. */ if (isNavigationCancelingError(e)) { const redirecting = isUrlTree(e.url); if (!redirecting) { // Set property only if we're not redirecting. If we landed on a page and // redirect to `/` route, the new navigation is going to see the `/` // isn't a change from the default currentUrlTree and won't navigate. // This is only applicable with initial navigation, so setting // `navigated` only when not redirecting resolves this scenario. this.navigated = true; this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl); } const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message); eventsSubject.next(navCancel); // When redirecting, we need to delay resolving the navigation // promise and push it to the redirect navigation if (!redirecting) { t.resolve(false); } else { // setTimeout is required so this navigation finishes with // the return EMPTY below. If it isn't allowed to finish // processing, there can be multiple navigations to the same // URL. setTimeout(() => { const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree); const extras = { skipLocationChange: t.extras.skipLocationChange, replaceUrl: this.urlUpdateStrategy === 'eager' }; this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise }); }, 0); } /* All other errors should reset to the router's internal URL reference to * the pre-error state. */ } else { this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl); const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e); eventsSubject.next(navError); try { t.resolve(this.errorHandler(e)); } catch (ee) { t.reject(ee); } } return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; })); // TODO(jasonaden): remove cast once g3 is on updated TypeScript })); } /** * @internal * TODO: this should be removed once the constructor of the router made internal */ resetRootComponentType(rootComponentType) { this.rootComponentType = rootComponentType; // TODO: vsavkin router 4.0 should make the root component set to null // this will simplify the lifecycle of the router. this.routerState.root.component = this.rootComponentType; } getTransition() { const transition = this.transitions.value; // This value needs to be set. Other values such as extractedUrl are set on initial navigation // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not // processing the previous URL. transition.urlAfterRedirects = this.browserUrlTree; return transition; } setTransition(t) { this.transitions.next(Object.assign(Object.assign({}, this.getTransition()), t)); } /** * Sets up the location change listener and performs the initial navigation. */ initialNavigation() { this.setUpLocationChangeListener(); if (this.navigationId === 0) { this.navigateByUrl(this.location.path(true), { replaceUrl: true }); } } /** * Sets up the location change listener. This listener detects navigations triggered from outside * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router * navigation so that the correct events, guards, etc. are triggered. */ setUpLocationChangeListener() { // Don't need to use Zone.wrap any more, because zone.js // already patch onPopState, so location change callback will // run into ngZone if (!this.locationSubscription) { this.locationSubscription = this.location.subscribe(event => { const currentChange = this.extractLocationChangeInfoFromEvent(event); if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) { // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS // hybrid apps. setTimeout(() => { const { source, state, urlTree } = currentChange; const extras = { replaceUrl: true }; if (state) { const stateCopy = Object.assign({}, state); delete stateCopy.navigationId; if (Object.keys(stateCopy).length !== 0) { extras.state = stateCopy; } } this.scheduleNavigation(urlTree, source, state, extras); }, 0); } this.lastLocationChangeInfo = currentChange; }); } } /** Extracts router-related information from a `PopStateEvent`. */ extractLocationChangeInfoFromEvent(change) { var _a; return { source: change['type'] === 'popstate' ? 'popstate' : 'hashchange', urlTree: this.parseUrl(change['url']), // Navigations coming from Angular router have a navigationId state // property. When this exists, restore the state. state: ((_a = change.state) === null || _a === void 0 ? void 0 : _a.navigationId) ? change.state : null, transitionId: this.getTransition().id }; } /** * Determines whether two events triggered by the Location subscription are due to the same * navigation. The location subscription can fire two events (popstate and hashchange) for a * single navigation. The second one should be ignored, that is, we should not schedule another * navigation in the Router. */ shouldScheduleNavigation(previous, current) { if (!previous) return true; const sameDestination = current.urlTree.toString() === previous.urlTree.toString(); const eventsOccurredAtSameTime = current.transitionId === previous.transitionId; if (!eventsOccurredAtSameTime || !sameDestination) { return true; } if ((current.source === 'hashchange' && previous.source === 'popstate') || (current.source === 'popstate' && previous.source === 'hashchange')) { return false; } return true; } /** The current URL. */ get url() { return this.serializeUrl(this.currentUrlTree); } /** * Returns the current `Navigation` object when the router is navigating, * and `null` when idle. */ getCurrentNavigation() { return this.currentNavigation; } /** @internal */ triggerEvent(event) { this.events.next(event); } /** * Resets the route configuration used for navigation and generating links. * * @param config The route array for the new configuration. * * @usageNotes * * ``` * router.resetConfig([ * { path: 'team/:id', component: TeamCmp, children: [ * { path: 'simple', component: SimpleCmp }, * { path: 'user/:name', component: UserCmp } * ]} * ]); * ``` */ resetConfig(config) { validateConfig(config); this.config = config.map(standardizeConfig); this.navigated = false; this.lastSuccessfulId = -1; } /** @nodoc */ ngOnDestroy() { this.dispose(); } /** Disposes of the router. */ dispose() { this.transitions.complete(); if (this.locationSubscription) { this.locationSubscription.unsubscribe(); this.locationSubscription = undefined; } this.disposed = true; } /** * Appends URL segments to the current URL tree to create a new URL tree. * * @param commands An array of URL fragments with which to construct the new URL tree. * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path * segments, followed by the parameters for each segment. * The fragments are applied to the current URL tree or the one provided in the `relativeTo` * property of the options object, if supplied. * @param navigationExtras Options that control the navigation strategy. * @returns The new URL tree. * * @usageNotes * * ``` * // create /team/33/user/11 * router.createUrlTree(['/team', 33, 'user', 11]); * * // create /team/33;expand=true/user/11 * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]); * * // you can collapse static segments like this (this works only with the first passed-in value): * router.createUrlTree(['/team/33/user', userId]); * * // If the first segment can contain slashes, and you do not want the router to split it, * // you can do the following: * router.createUrlTree([{segmentPath: '/one/two'}]); * * // create /team/33/(user/11//right:chat) * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]); * * // remove the right secondary node * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]); * * // assuming the current url is `/team/33/user/11` and the route points to `user/11` * * // navigate to /team/33/user/11/details * router.createUrlTree(['details'], {relativeTo: route}); * * // navigate to /team/33/user/22 * router.createUrlTree(['../22'], {relativeTo: route}); * * // navigate to /team/44/user/22 * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route}); * * Note that a value of `null` or `undefined` for `relativeTo` indicates that the * tree should be created relative to the root. * ``` */ createUrlTree(commands, navigationExtras = {}) { const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras; const a = relativeTo || this.routerState.root; const f = preserveFragment ? this.currentUrlTree.fragment : fragment; let q = null; switch (queryParamsHandling) { case 'merge': q = Object.assign(Object.assign({}, this.currentUrlTree.queryParams), queryParams); break; case 'preserve': q = this.currentUrlTree.queryParams; break; default: q = queryParams || null; } if (q !== null) { q = this.removeEmptyProps(q); } return createUrlTree(a, this.currentUrlTree, commands, q, f); } /** * Navigates to a view using an absolute route path. * * @param url An absolute path for a defined route. The function does not apply any delta to the * current URL. * @param extras An object containing properties that modify the navigation strategy. * * @returns A Promise that resolves to 'true' when navigation succeeds, * to 'false' when navigation fails, or is rejected on error. * * @usageNotes * * The following calls request navigation to an absolute path. * * ``` * router.navigateByUrl("/team/33/user/11"); * * // Navigate without updating the URL * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true }); * ``` * * @see [Routing and Navigation guide](guide/router) * */ navigateByUrl(url, extras = { skipLocationChange: false }) { if (typeof ngDevMode === 'undefined' || ngDevMode && this.isNgZoneEnabled && !_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone()) { this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`); } const urlTree = isUrlTree(url) ? url : this.parseUrl(url); const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree); return this.scheduleNavigation(mergedTree, 'imperative', null, extras); } /** * Navigate based on the provided array of commands and a starting point. * If no starting route is provided, the navigation is absolute. * * @param commands An array of URL fragments with which to construct the target URL. * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path * segments, followed by the parameters for each segment. * The fragments are applied to the current URL or the one provided in the `relativeTo` property * of the options object, if supplied. * @param extras An options object that determines how the URL should be constructed or * interpreted. * * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation * fails, * or is rejected on error. * * @usageNotes * * The following calls request navigation to a dynamic route path relative to the current URL. * * ``` * router.navigate(['team', 33, 'user', 11], {relativeTo: route}); * * // Navigate without updating the URL, overriding the default behavior * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true}); * ``` * * @see [Routing and Navigation guide](guide/router) * */ navigate(commands, extras = { skipLocationChange: false }) { validateCommands(commands); return this.navigateByUrl(this.createUrlTree(commands, extras), extras); } /** Serializes a `UrlTree` into a string */ serializeUrl(url) { return this.urlSerializer.serialize(url); } /** Parses a string into a `UrlTree` */ parseUrl(url) { let urlTree; try { urlTree = this.urlSerializer.parse(url); } catch (e) { urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url); } return urlTree; } /** Returns whether the url is activated */ isActive(url, exact) { if (isUrlTree(url)) { return containsTree(this.currentUrlTree, url, exact); } const urlTree = this.parseUrl(url); return containsTree(this.currentUrlTree, urlTree, exact); } removeEmptyProps(params) { return Object.keys(params).reduce((result, key) => { const value = params[key]; if (value !== null && value !== undefined) { result[key] = value; } return result; }, {}); } processNavigations() { this.navigations.subscribe(t => { this.navigated = true; this.lastSuccessfulId = t.id; this.events .next(new NavigationEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree))); this.lastSuccessfulNavigation = this.currentNavigation; this.currentNavigation = null; t.resolve(true); }, e => { this.console.warn(`Unhandled Navigation Error: `); }); } scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) { if (this.disposed) { return Promise.resolve(false); } // * Imperative navigations (router.navigate) might trigger additional navigations to the same // URL via a popstate event and the locationChangeListener. We should skip these duplicate // navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router // states. // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If // the user follows that with a navigation using the back/forward button or manual URL change, // the destination may be the same as the previous imperative attempt. We should not skip // these navigations because it's a separate case from the one above -- it's not a duplicate // navigation. const lastNavigation = this.getTransition(); // We don't want to skip duplicate successful navs if they're imperative because // onSameUrlNavigation could be 'reload' (so the duplicate is intended). const browserNavPrecededByRouterNav = source !== 'imperative' && (lastNavigation === null || lastNavigation === void 0 ? void 0 : lastNavigation.source) === 'imperative'; const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id; // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison. // However, if it failed, we should compare to the final result (urlAfterRedirects). const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ? lastNavigation.rawUrl : lastNavigation.urlAfterRedirects; const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString(); if (browserNavPrecededByRouterNav && duplicateNav) { return Promise.resolve(true); // return value is not used } let resolve; let reject; let promise; if (priorPromise) { resolve = priorPromise.resolve; reject = priorPromise.reject; promise = priorPromise.promise; } else { promise = new Promise((res, rej) => { resolve = res; reject = rej; }); } const id = ++this.navigationId; this.setTransition({ id, source, restoredState, currentUrlTree: this.currentUrlTree, currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise, currentSnapshot: this.routerState.snapshot, currentRouterState: this.routerState }); // Make sure that the error is propagated even though `processNavigations` catch // handler does not rethrow return promise.catch((e) => { return Promise.reject(e); }); } setBrowserUrl(url, replaceUrl, id, state) { const path = this.urlSerializer.serialize(url); state = state || {}; if (this.location.isCurrentPathEqualTo(path) || replaceUrl) { // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace. this.location.replaceState(path, '', Object.assign(Object.assign({}, state), { navigationId: id })); } else { this.location.go(path, '', Object.assign(Object.assign({}, state), { navigationId: id })); } } resetStateAndUrl(storedState, storedUrl, rawUrl) { this.routerState = storedState; this.currentUrlTree = storedUrl; this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl); this.resetUrlToCurrentUrlTree(); } resetUrlToCurrentUrlTree() { this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId }); } } Router.ɵfac = function Router_Factory(t) { return new (t || Router)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](UrlSerializer), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](ChildrenOutletContexts), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](undefined)); }; Router.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: Router, factory: Router.ɵfac }); Router.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"] }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: undefined } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Router, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"] }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: undefined }]; }, null); })(); function validateCommands(commands) { for (let i = 0; i < commands.length; i++) { const cmd = commands[i]; if (cmd == null) { throw new Error(`The requested path contains ${cmd} segment at index ${i}`); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * When applied to an element in a template, makes that element a link * that initiates navigation to a route. Navigation opens one or more routed components * in one or more `<router-outlet>` locations on the page. * * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`, * the following creates a static link to the route: * `<a routerLink="/user/bob">link to user component</a>` * * You can use dynamic values to generate the link. * For a dynamic link, pass an array of path segments, * followed by the params for each segment. * For example, `['/team', teamId, 'user', userName, {details: true}]` * generates a link to `/team/11/user/bob;details=true`. * * Multiple static segments can be merged into one term and combined with dynamic segements. * For example, `['/team/11/user', userName, {details: true}]` * * The input that you provide to the link is treated as a delta to the current URL. * For instance, suppose the current URL is `/user/(box//aux:team)`. * The link `<a [routerLink]="['/user/jim']">Jim</a>` creates the URL * `/user/(jim//aux:team)`. * See {@link Router#createUrlTree createUrlTree} for more information. * * @usageNotes * * You can use absolute or relative paths in a link, set query parameters, * control how parameters are handled, and keep a history of navigation states. * * ### Relative link paths * * The first segment name can be prepended with `/`, `./`, or `../`. * * If the first segment begins with `/`, the router looks up the route from the root of the * app. * * If the first segment begins with `./`, or doesn't begin with a slash, the router * looks in the children of the current activated route. * * If the first segment begins with `../`, the router goes up one level in the route tree. * * ### Setting and handling query params and fragments * * The following link adds a query parameter and a fragment to the generated URL: * * ``` * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" fragment="education"> * link to user component * </a> * ``` * By default, the directive constructs the new URL using the given query parameters. * The example generates the link: `/user/bob?debug=true#education`. * * You can instruct the directive to handle query parameters differently * by specifying the `queryParamsHandling` option in the link. * Allowed values are: * * - `'merge'`: Merge the given `queryParams` into the current query params. * - `'preserve'`: Preserve the current query params. * * For example: * * ``` * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" queryParamsHandling="merge"> * link to user component * </a> * ``` * * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}. * * ### Preserving navigation history * * You can provide a `state` value to be persisted to the browser's * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). * For example: * * ``` * <a [routerLink]="['/user/bob']" [state]="{tracingId: 123}"> * link to user component * </a> * ``` * * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart` * event: * * ``` * // Get NavigationStart events * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => { * const navigation = router.getCurrentNavigation(); * tracingService.trace({id: navigation.extras.state.tracingId}); * }); * ``` * * @ngModule RouterModule * * @publicApi */ class RouterLink { constructor(router, route, tabIndex, renderer, el) { this.router = router; this.route = route; this.commands = []; /** @internal */ this.onChanges = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); if (tabIndex == null) { renderer.setAttribute(el.nativeElement, 'tabindex', '0'); } } /** @nodoc */ ngOnChanges(changes) { // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes // to the RouterLinks it's tracking. this.onChanges.next(this); } /** * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **string**: shorthand for array of commands with just the string, i.e. `['/route']` * - **null|undefined**: shorthand for an empty array of commands, i.e. `[]` * @see {@link Router#createUrlTree Router#createUrlTree} */ set routerLink(commands) { if (commands != null) { this.commands = Array.isArray(commands) ? commands : [commands]; } else { this.commands = []; } } /** @nodoc */ onClick() { const extras = { skipLocationChange: attrBoolValue(this.skipLocationChange), replaceUrl: attrBoolValue(this.replaceUrl), state: this.state, }; this.router.navigateByUrl(this.urlTree, extras); return true; } get urlTree() { return this.router.createUrlTree(this.commands, { // If the `relativeTo` input is not defined, we want to use `this.route` by default. // Otherwise, we should use the value provided by the user in the input. relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route, queryParams: this.queryParams, fragment: this.fragment, queryParamsHandling: this.queryParamsHandling, preserveFragment: attrBoolValue(this.preserveFragment), }); } } RouterLink.ɵfac = function RouterLink_Factory(t) { return new (t || RouterLink)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('tabindex'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"])); }; RouterLink.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterLink, selectors: [["", "routerLink", "", 5, "a", 5, "area"]], hostBindings: function RouterLink_HostBindings(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function RouterLink_click_HostBindingHandler() { return ctx.onClick(); }); } }, inputs: { routerLink: "routerLink", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]] }); RouterLink.ctorParameters = () => [ { type: Router }, { type: ActivatedRoute }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['tabindex',] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] } ]; RouterLink.propDecorators = { queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLink, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: ':not(a):not(area)[routerLink]' }] }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['tabindex'] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] }]; }, { routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], /** @nodoc */ onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click'] }], queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }] }); })(); /** * @description * * Lets you link to specific routes in your app. * * See `RouterLink` for more information. * * @ngModule RouterModule * * @publicApi */ class RouterLinkWithHref { constructor(router, route, locationStrategy) { this.router = router; this.route = route; this.locationStrategy = locationStrategy; this.commands = []; /** @internal */ this.onChanges = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); this.subscription = router.events.subscribe((s) => { if (s instanceof NavigationEnd) { this.updateTargetUrlAndHref(); } }); } /** * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **string**: shorthand for array of commands with just the string, i.e. `['/route']` * - **null|undefined**: shorthand for an empty array of commands, i.e. `[]` * @see {@link Router#createUrlTree Router#createUrlTree} */ set routerLink(commands) { if (commands != null) { this.commands = Array.isArray(commands) ? commands : [commands]; } else { this.commands = []; } } /** @nodoc */ ngOnChanges(changes) { this.updateTargetUrlAndHref(); this.onChanges.next(this); } /** @nodoc */ ngOnDestroy() { this.subscription.unsubscribe(); } /** @nodoc */ onClick(button, ctrlKey, shiftKey, altKey, metaKey) { if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) { return true; } if (typeof this.target === 'string' && this.target != '_self') { return true; } const extras = { skipLocationChange: attrBoolValue(this.skipLocationChange), replaceUrl: attrBoolValue(this.replaceUrl), state: this.state }; this.router.navigateByUrl(this.urlTree, extras); return false; } updateTargetUrlAndHref() { this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)); } get urlTree() { return this.router.createUrlTree(this.commands, { // If the `relativeTo` input is not defined, we want to use `this.route` by default. // Otherwise, we should use the value provided by the user in the input. relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route, queryParams: this.queryParams, fragment: this.fragment, queryParamsHandling: this.queryParamsHandling, preserveFragment: attrBoolValue(this.preserveFragment), }); } } RouterLinkWithHref.ɵfac = function RouterLinkWithHref_Factory(t) { return new (t || RouterLinkWithHref)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"])); }; RouterLinkWithHref.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterLinkWithHref, selectors: [["a", "routerLink", ""], ["area", "routerLink", ""]], hostVars: 2, hostBindings: function RouterLinkWithHref_HostBindings(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function RouterLinkWithHref_click_HostBindingHandler($event) { return ctx.onClick($event.button, $event.ctrlKey, $event.shiftKey, $event.altKey, $event.metaKey); }); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵhostProperty"]("href", ctx.href, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsanitizeUrl"]); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("target", ctx.target); } }, inputs: { routerLink: "routerLink", target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]] }); RouterLinkWithHref.ctorParameters = () => [ { type: Router }, { type: ActivatedRoute }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"] } ]; RouterLinkWithHref.propDecorators = { target: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"], args: ['attr.target',] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], href: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"] }], routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'],] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLinkWithHref, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: 'a[routerLink],area[routerLink]' }] }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"] }]; }, { routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], /** @nodoc */ onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']] }], href: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"] }], target: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"], args: ['attr.target'] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }] }); })(); function attrBoolValue(s) { return s === '' || !!s; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * @description * * Tracks whether the linked route of an element is currently active, and allows you * to specify one or more CSS classes to add to the element when the linked route * is active. * * Use this directive to create a visual distinction for elements associated with an active route. * For example, the following code highlights the word "Bob" when the router * activates the associated route: * * ``` * <a routerLink="/user/bob" routerLinkActive="active-link">Bob</a> * ``` * * Whenever the URL is either '/user' or '/user/bob', the "active-link" class is * added to the anchor tag. If the URL changes, the class is removed. * * You can set more than one class using a space-separated string or an array. * For example: * * ``` * <a routerLink="/user/bob" routerLinkActive="class1 class2">Bob</a> * <a routerLink="/user/bob" [routerLinkActive]="['class1', 'class2']">Bob</a> * ``` * * To add the classes only when the URL matches the link exactly, add the option `exact: true`: * * ``` * <a routerLink="/user/bob" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: * true}">Bob</a> * ``` * * To directly check the `isActive` status of the link, assign the `RouterLinkActive` * instance to a template variable. * For example, the following checks the status without assigning any CSS classes: * * ``` * <a routerLink="/user/bob" routerLinkActive #rla="routerLinkActive"> * Bob {{ rla.isActive ? '(already open)' : ''}} * </a> * ``` * * You can apply the `RouterLinkActive` directive to an ancestor of linked elements. * For example, the following sets the active-link class on the `<div>` parent tag * when the URL is either '/user/jim' or '/user/bob'. * * ``` * <div routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: true}"> * <a routerLink="/user/jim">Jim</a> * <a routerLink="/user/bob">Bob</a> * </div> * ``` * * @ngModule RouterModule * * @publicApi */ class RouterLinkActive { constructor(router, element, renderer, cdr, link, linkWithHref) { this.router = router; this.element = element; this.renderer = renderer; this.cdr = cdr; this.link = link; this.linkWithHref = linkWithHref; this.classes = []; this.isActive = false; this.routerLinkActiveOptions = { exact: false }; this.routerEventsSubscription = router.events.subscribe((s) => { if (s instanceof NavigationEnd) { this.update(); } }); } /** @nodoc */ ngAfterContentInit() { // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`). Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(this.links.changes, this.linksWithHrefs.changes, Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])()).subscribe(_ => { this.update(); this.subscribeToEachLinkOnChanges(); }); } subscribeToEachLinkOnChanges() { var _a; (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe(); const allLinkChanges = [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref] .filter((link) => !!link) .map(link => link.onChanges); this.linkInputChangesSubscription = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(allLinkChanges).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])()).subscribe(link => { if (this.isActive !== this.isLinkActive(this.router)(link)) { this.update(); } }); } set routerLinkActive(data) { const classes = Array.isArray(data) ? data : data.split(' '); this.classes = classes.filter(c => !!c); } /** @nodoc */ ngOnChanges(changes) { this.update(); } /** @nodoc */ ngOnDestroy() { var _a; this.routerEventsSubscription.unsubscribe(); (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe(); } update() { if (!this.links || !this.linksWithHrefs || !this.router.navigated) return; Promise.resolve().then(() => { const hasActiveLinks = this.hasActiveLinks(); if (this.isActive !== hasActiveLinks) { this.isActive = hasActiveLinks; this.cdr.markForCheck(); this.classes.forEach((c) => { if (hasActiveLinks) { this.renderer.addClass(this.element.nativeElement, c); } else { this.renderer.removeClass(this.element.nativeElement, c); } }); } }); } isLinkActive(router) { return (link) => router.isActive(link.urlTree, this.routerLinkActiveOptions.exact); } hasActiveLinks() { const isActiveCheckFn = this.isLinkActive(this.router); return this.link && isActiveCheckFn(this.link) || this.linkWithHref && isActiveCheckFn(this.linkWithHref) || this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn); } } RouterLinkActive.ɵfac = function RouterLinkActive_Factory(t) { return new (t || RouterLinkActive)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](RouterLink, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](RouterLinkWithHref, 8)); }; RouterLinkActive.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterLinkActive, selectors: [["", "routerLinkActive", ""]], contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, RouterLink, 1); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, RouterLinkWithHref, 1); } if (rf & 2) { let _t; _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.links = _t); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.linksWithHrefs = _t); } }, inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", routerLinkActive: "routerLinkActive" }, exportAs: ["routerLinkActive"], features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]] }); RouterLinkActive.ctorParameters = () => [ { type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] }, { type: RouterLink, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }, { type: RouterLinkWithHref, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] } ]; RouterLinkActive.propDecorators = { links: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLink, { descendants: true },] }], linksWithHrefs: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLinkWithHref, { descendants: true },] }], routerLinkActiveOptions: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], routerLinkActive: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLinkActive, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[routerLinkActive]', exportAs: 'routerLinkActive' }] }], function () { return [{ type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] }, { type: RouterLink, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }, { type: RouterLinkWithHref, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }]; }, { routerLinkActiveOptions: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], routerLinkActive: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], links: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLink, { descendants: true }] }], linksWithHrefs: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLinkWithHref, { descendants: true }] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Acts as a placeholder that Angular dynamically fills based on the current router state. * * Each outlet can have a unique name, determined by the optional `name` attribute. * The name cannot be set or changed dynamically. If not set, default value is "primary". * * ``` * <router-outlet></router-outlet> * <router-outlet name='left'></router-outlet> * <router-outlet name='right'></router-outlet> * ``` * * Named outlets can be the targets of secondary routes. * The `Route` object for a secondary route has an `outlet` property to identify the target outlet: * * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}` * * Using named outlets and secondary routes, you can target multiple outlets in * the same `RouterLink` directive. * * The router keeps track of separate branches in a navigation tree for each named outlet and * generates a representation of that tree in the URL. * The URL for a secondary route uses the following syntax to specify both the primary and secondary * routes at the same time: * * `http://base-path/primary-route-path(outlet-name:route-path)` * * A router outlet emits an activate event when a new component is instantiated, * and a deactivate event when a component is destroyed. * * ``` * <router-outlet * (activate)='onActivate($event)' * (deactivate)='onDeactivate($event)'></router-outlet> * ``` * * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets "Example of a named * outlet and secondary route configuration"). * @see `RouterLink` * @see `Route` * @ngModule RouterModule * * @publicApi */ class RouterOutlet { constructor(parentContexts, location, resolver, name, changeDetector) { this.parentContexts = parentContexts; this.location = location; this.resolver = resolver; this.changeDetector = changeDetector; this.activated = null; this._activatedRoute = null; this.activateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"](); this.deactivateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"](); this.name = name || PRIMARY_OUTLET; parentContexts.onChildOutletCreated(this.name, this); } /** @nodoc */ ngOnDestroy() { this.parentContexts.onChildOutletDestroyed(this.name); } /** @nodoc */ ngOnInit() { if (!this.activated) { // If the outlet was not instantiated at the time the route got activated we need to populate // the outlet when it is initialized (ie inside a NgIf) const context = this.parentContexts.getContext(this.name); if (context && context.route) { if (context.attachRef) { // `attachRef` is populated when there is an existing component to mount this.attach(context.attachRef, context.route); } else { // otherwise the component defined in the configuration is created this.activateWith(context.route, context.resolver || null); } } } } get isActivated() { return !!this.activated; } get component() { if (!this.activated) throw new Error('Outlet is not activated'); return this.activated.instance; } get activatedRoute() { if (!this.activated) throw new Error('Outlet is not activated'); return this._activatedRoute; } get activatedRouteData() { if (this._activatedRoute) { return this._activatedRoute.snapshot.data; } return {}; } /** * Called when the `RouteReuseStrategy` instructs to detach the subtree */ detach() { if (!this.activated) throw new Error('Outlet is not activated'); this.location.detach(); const cmp = this.activated; this.activated = null; this._activatedRoute = null; return cmp; } /** * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree */ attach(ref, activatedRoute) { this.activated = ref; this._activatedRoute = activatedRoute; this.location.insert(ref.hostView); } deactivate() { if (this.activated) { const c = this.component; this.activated.destroy(); this.activated = null; this._activatedRoute = null; this.deactivateEvents.emit(c); } } activateWith(activatedRoute, resolver) { if (this.isActivated) { throw new Error('Cannot activate an already activated outlet'); } this._activatedRoute = activatedRoute; const snapshot = activatedRoute._futureSnapshot; const component = snapshot.routeConfig.component; resolver = resolver || this.resolver; const factory = resolver.resolveComponentFactory(component); const childContexts = this.parentContexts.getOrCreateContext(this.name).children; const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector); this.activated = this.location.createComponent(factory, this.location.length, injector); // Calling `markForCheck` to make sure we will run the change detection when the // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component. this.changeDetector.markForCheck(); this.activateEvents.emit(this.activated.instance); } } RouterOutlet.ɵfac = function RouterOutlet_Factory(t) { return new (t || RouterOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ChildrenOutletContexts), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('name'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"])); }; RouterOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterOutlet, selectors: [["router-outlet"]], outputs: { activateEvents: "activate", deactivateEvents: "deactivate" }, exportAs: ["outlet"] }); RouterOutlet.ctorParameters = () => [ { type: ChildrenOutletContexts }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['name',] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] } ]; RouterOutlet.propDecorators = { activateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['activate',] }], deactivateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['deactivate',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterOutlet, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: 'router-outlet', exportAs: 'outlet' }] }], function () { return [{ type: ChildrenOutletContexts }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['name'] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] }]; }, { activateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['activate'] }], deactivateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['deactivate'] }] }); })(); class OutletInjector { constructor(route, childContexts, parent) { this.route = route; this.childContexts = childContexts; this.parent = parent; } get(token, notFoundValue) { if (token === ActivatedRoute) { return this.route; } if (token === ChildrenOutletContexts) { return this.childContexts; } return this.parent.get(token, notFoundValue); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Provides a preloading strategy. * * @publicApi */ class PreloadingStrategy { } /** * @description * * Provides a preloading strategy that preloads all modules as quickly as possible. * * ``` * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules}) * ``` * * @publicApi */ class PreloadAllModules { preload(route, fn) { return fn().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(() => Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null))); } } /** * @description * * Provides a preloading strategy that does not preload any modules. * * This strategy is enabled by default. * * @publicApi */ class NoPreloading { preload(route, fn) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } } /** * The preloader optimistically loads all router configurations to * make navigations into lazily-loaded sections of the application faster. * * The preloader runs in the background. When the router bootstraps, the preloader * starts listening to all navigation events. After every such event, the preloader * will check if any configurations can be loaded lazily. * * If a route is protected by `canLoad` guards, the preloaded will not load it. * * @publicApi */ class RouterPreloader { constructor(router, moduleLoader, compiler, injector, preloadingStrategy) { this.router = router; this.injector = injector; this.preloadingStrategy = preloadingStrategy; const onStartLoad = (r) => router.triggerEvent(new RouteConfigLoadStart(r)); const onEndLoad = (r) => router.triggerEvent(new RouteConfigLoadEnd(r)); this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad); } setUpPreloading() { this.subscription = this.router.events .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])((e) => e instanceof NavigationEnd), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(() => this.preload())) .subscribe(() => { }); } preload() { const ngModule = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]); return this.processRoutes(ngModule, this.router.config); } /** @nodoc */ ngOnDestroy() { if (this.subscription) { this.subscription.unsubscribe(); } } processRoutes(ngModule, routes) { const res = []; for (const route of routes) { // we already have the config loaded, just recurse if (route.loadChildren && !route.canLoad && route._loadedConfig) { const childConfig = route._loadedConfig; res.push(this.processRoutes(childConfig.module, childConfig.routes)); // no config loaded, fetch the config } else if (route.loadChildren && !route.canLoad) { res.push(this.preloadConfig(ngModule, route)); // recurse into children } else if (route.children) { res.push(this.processRoutes(ngModule, route.children)); } } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(res).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((_) => void 0)); } preloadConfig(ngModule, route) { return this.preloadingStrategy.preload(route, () => { const loaded$ = route._loadedConfig ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig) : this.loader.load(ngModule.injector, route); return loaded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((config) => { route._loadedConfig = config; return this.processRoutes(config.module, config.routes); })); }); } } RouterPreloader.ɵfac = function RouterPreloader_Factory(t) { return new (t || RouterPreloader)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](PreloadingStrategy)); }; RouterPreloader.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: RouterPreloader, factory: RouterPreloader.ɵfac }); RouterPreloader.ctorParameters = () => [ { type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: PreloadingStrategy } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterPreloader, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: PreloadingStrategy }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class RouterScroller { constructor(router, /** @docsNotRequired */ viewportScroller, options = {}) { this.router = router; this.viewportScroller = viewportScroller; this.options = options; this.lastId = 0; this.lastSource = 'imperative'; this.restoredId = 0; this.store = {}; // Default both options to 'disabled' options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled'; options.anchorScrolling = options.anchorScrolling || 'disabled'; } init() { // we want to disable the automatic scrolling because having two places // responsible for scrolling results race conditions, especially given // that browser don't implement this behavior consistently if (this.options.scrollPositionRestoration !== 'disabled') { this.viewportScroller.setHistoryScrollRestoration('manual'); } this.routerEventsSubscription = this.createScrollEvents(); this.scrollEventsSubscription = this.consumeScrollEvents(); } createScrollEvents() { return this.router.events.subscribe(e => { if (e instanceof NavigationStart) { // store the scroll position of the current stable navigations. this.store[this.lastId] = this.viewportScroller.getScrollPosition(); this.lastSource = e.navigationTrigger; this.restoredId = e.restoredState ? e.restoredState.navigationId : 0; } else if (e instanceof NavigationEnd) { this.lastId = e.id; this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment); } }); } consumeScrollEvents() { return this.router.events.subscribe(e => { if (!(e instanceof Scroll)) return; // a popstate event. The pop state event will always ignore anchor scrolling. if (e.position) { if (this.options.scrollPositionRestoration === 'top') { this.viewportScroller.scrollToPosition([0, 0]); } else if (this.options.scrollPositionRestoration === 'enabled') { this.viewportScroller.scrollToPosition(e.position); } // imperative navigation "forward" } else { if (e.anchor && this.options.anchorScrolling === 'enabled') { this.viewportScroller.scrollToAnchor(e.anchor); } else if (this.options.scrollPositionRestoration !== 'disabled') { this.viewportScroller.scrollToPosition([0, 0]); } } }); } scheduleScrollEvent(routerEvent, anchor) { this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor)); } /** @nodoc */ ngOnDestroy() { if (this.routerEventsSubscription) { this.routerEventsSubscription.unsubscribe(); } if (this.scrollEventsSubscription) { this.scrollEventsSubscription.unsubscribe(); } } } RouterScroller.ɵfac = function RouterScroller_Factory(t) { return new (t || RouterScroller)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](undefined)); }; RouterScroller.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: RouterScroller, factory: RouterScroller.ɵfac }); RouterScroller.ctorParameters = () => [ { type: Router }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"] }, { type: undefined } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterScroller, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: Router }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"] }, { type: undefined }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The directives defined in the `RouterModule`. */ const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent]; /** * A [DI token](guide/glossary/#di-token) for the router service. * * @publicApi */ const ROUTER_CONFIGURATION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_CONFIGURATION'); /** * @docsNotRequired */ const ROUTER_FORROOT_GUARD = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_FORROOT_GUARD'); const ɵ0 = { enableTracing: false }; const ROUTER_PROVIDERS = [ _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"], { provide: UrlSerializer, useClass: DefaultUrlSerializer }, { provide: Router, useFactory: setupRouter, deps: [ UrlSerializer, ChildrenOutletContexts, _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], [RouteReuseStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()] ] }, ChildrenOutletContexts, { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], useClass: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SystemJsNgModuleLoader"] }, RouterPreloader, NoPreloading, PreloadAllModules, { provide: ROUTER_CONFIGURATION, useValue: ɵ0 }, ]; function routerNgProbeToken() { return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"]('Router', Router); } /** * @description * * Adds directives and providers for in-app navigation among views defined in an application. * Use the Angular `Router` service to declaratively specify application states and manage state * transitions. * * You can import this NgModule multiple times, once for each lazy-loaded bundle. * However, only one `Router` service can be active. * To ensure this, there are two ways to register routes when importing this module: * * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given * routes, and the `Router` service itself. * * The `forChild()` method creates an `NgModule` that contains all the directives and the given * routes, but does not include the `Router` service. * * @see [Routing and Navigation guide](guide/router) for an * overview of how the `Router` service should be used. * * @publicApi */ class RouterModule { // Note: We are injecting the Router so it gets created eagerly... constructor(guard, router) { } /** * Creates and configures a module with all the router providers and directives. * Optionally sets up an application listener to perform an initial navigation. * * When registering the NgModule at the root, import as follows: * * ``` * @NgModule({ * imports: [RouterModule.forRoot(ROUTES)] * }) * class MyNgModule {} * ``` * * @param routes An array of `Route` objects that define the navigation paths for the application. * @param config An `ExtraOptions` configuration object that controls how navigation is performed. * @return The new `NgModule`. * */ static forRoot(routes, config) { return { ngModule: RouterModule, providers: [ ROUTER_PROVIDERS, provideRoutes(routes), { provide: ROUTER_FORROOT_GUARD, useFactory: provideForRootGuard, deps: [[Router, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]()]] }, { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} }, { provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"], useFactory: provideLocationStrategy, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["PlatformLocation"], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["APP_BASE_HREF"]), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], ROUTER_CONFIGURATION] }, { provide: RouterScroller, useFactory: createRouterScroller, deps: [Router, _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"], ROUTER_CONFIGURATION] }, { provide: PreloadingStrategy, useExisting: config && config.preloadingStrategy ? config.preloadingStrategy : NoPreloading }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], multi: true, useFactory: routerNgProbeToken }, provideRouterInitializer(), ], }; } /** * Creates a module with all the router directives and a provider registering routes, * without creating a new Router service. * When registering for submodules and lazy-loaded submodules, create the NgModule as follows: * * ``` * @NgModule({ * imports: [RouterModule.forChild(ROUTES)] * }) * class MyNgModule {} * ``` * * @param routes An array of `Route` objects that define the navigation paths for the submodule. * @return The new NgModule. * */ static forChild(routes) { return { ngModule: RouterModule, providers: [provideRoutes(routes)] }; } } RouterModule.ɵfac = function RouterModule_Factory(t) { return new (t || RouterModule)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](ROUTER_FORROOT_GUARD, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router, 8)); }; RouterModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: RouterModule }); RouterModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({}); RouterModule.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [ROUTER_FORROOT_GUARD,] }] }, { type: Router, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] } ]; (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](RouterModule, { declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ declarations: ROUTER_DIRECTIVES, exports: ROUTER_DIRECTIVES, entryComponents: [ɵEmptyOutletComponent] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [ROUTER_FORROOT_GUARD] }] }, { type: Router, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }]; }, null); })(); function createRouterScroller(router, viewportScroller, config) { if (config.scrollOffset) { viewportScroller.setOffset(config.scrollOffset); } return new RouterScroller(router, viewportScroller, config); } function provideLocationStrategy(platformLocationStrategy, baseHref, options = {}) { return options.useHash ? new _angular_common__WEBPACK_IMPORTED_MODULE_0__["HashLocationStrategy"](platformLocationStrategy, baseHref) : new _angular_common__WEBPACK_IMPORTED_MODULE_0__["PathLocationStrategy"](platformLocationStrategy, baseHref); } function provideForRootGuard(router) { if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) { throw new Error(`RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`); } return 'guarded'; } /** * Registers a [DI provider](guide/glossary#provider) for a set of routes. * @param routes The route configuration to provide. * * @usageNotes * * ``` * @NgModule({ * imports: [RouterModule.forChild(ROUTES)], * providers: [provideRoutes(EXTRA_ROUTES)] * }) * class MyNgModule {} * ``` * * @publicApi */ function provideRoutes(routes) { return [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"], multi: true, useValue: routes }, { provide: ROUTES, multi: true, useValue: routes }, ]; } function setupRouter(urlSerializer, contexts, location, injector, loader, compiler, config, opts = {}, urlHandlingStrategy, routeReuseStrategy) { const router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config)); if (urlHandlingStrategy) { router.urlHandlingStrategy = urlHandlingStrategy; } if (routeReuseStrategy) { router.routeReuseStrategy = routeReuseStrategy; } assignExtraOptionsToRouter(opts, router); if (opts.enableTracing) { const dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])(); router.events.subscribe((e) => { dom.logGroup(`Router Event: ${e.constructor.name}`); dom.log(e.toString()); dom.log(e); dom.logGroupEnd(); }); } return router; } function assignExtraOptionsToRouter(opts, router) { if (opts.errorHandler) { router.errorHandler = opts.errorHandler; } if (opts.malformedUriErrorHandler) { router.malformedUriErrorHandler = opts.malformedUriErrorHandler; } if (opts.onSameUrlNavigation) { router.onSameUrlNavigation = opts.onSameUrlNavigation; } if (opts.paramsInheritanceStrategy) { router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy; } if (opts.relativeLinkResolution) { router.relativeLinkResolution = opts.relativeLinkResolution; } if (opts.urlUpdateStrategy) { router.urlUpdateStrategy = opts.urlUpdateStrategy; } } function rootRoute(router) { return router.routerState.root; } /** * Router initialization requires two steps: * * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if * a resolver or a guard executes asynchronously. * * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the * `afterPreactivation` hook provided by the router. * The router navigation starts, reaches the point when preactivation is done, and then * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener. */ class RouterInitializer { constructor(injector) { this.injector = injector; this.initNavigation = false; this.resultOfPreactivationDone = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); } appInitializer() { const p = this.injector.get(_angular_common__WEBPACK_IMPORTED_MODULE_0__["LOCATION_INITIALIZED"], Promise.resolve(null)); return p.then(() => { let resolve = null; const res = new Promise(r => resolve = r); const router = this.injector.get(Router); const opts = this.injector.get(ROUTER_CONFIGURATION); if (opts.initialNavigation === 'disabled') { router.setUpLocationChangeListener(); resolve(true); } else if ( // TODO: enabled is deprecated as of v11, can be removed in v13 opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') { router.hooks.afterPreactivation = () => { // only the initial navigation should be delayed if (!this.initNavigation) { this.initNavigation = true; resolve(true); return this.resultOfPreactivationDone; // subsequent navigations should not be delayed } else { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } }; router.initialNavigation(); } else { resolve(true); } return res; }); } bootstrapListener(bootstrappedComponentRef) { const opts = this.injector.get(ROUTER_CONFIGURATION); const preloader = this.injector.get(RouterPreloader); const routerScroller = this.injector.get(RouterScroller); const router = this.injector.get(Router); const ref = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]); if (bootstrappedComponentRef !== ref.components[0]) { return; } // Default case if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) { router.initialNavigation(); } preloader.setUpPreloading(); routerScroller.init(); router.resetRootComponentType(ref.componentTypes[0]); this.resultOfPreactivationDone.next(null); this.resultOfPreactivationDone.complete(); } } RouterInitializer.ɵfac = function RouterInitializer_Factory(t) { return new (t || RouterInitializer)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"])); }; RouterInitializer.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: RouterInitializer, factory: RouterInitializer.ɵfac }); RouterInitializer.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterInitializer, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }]; }, null); })(); function getAppInitializer(r) { return r.appInitializer.bind(r); } function getBootstrapListener(r) { return r.bootstrapListener.bind(r); } /** * A [DI token](guide/glossary/#di-token) for the router initializer that * is called after the app is bootstrapped. * * @publicApi */ const ROUTER_INITIALIZER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('Router Initializer'); function provideRouterInitializer() { return [ RouterInitializer, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"], multi: true, useFactory: getAppInitializer, deps: [RouterInitializer] }, { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_BOOTSTRAP_LISTENER"], multi: true, useExisting: ROUTER_INITIALIZER }, ]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=router.js.map /***/ }), /***/ "uD/i": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/constant.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "uQ0a": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ece7f2a6bddb2b8cbe", "f1eef6bdc9e174a9cf0570b0", "f1eef6bdc9e174a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "uTdr": /*!****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js ***! \****************************************************************************/ /*! exports provided: onErrorResumeNext, onErrorResumeNextStatic */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; }); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function onErrorResumeNext(...nextSources) { if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(nextSources[0])) { nextSources = nextSources[0]; } return (source) => source.lift(new OnErrorResumeNextOperator(nextSources)); } function onErrorResumeNextStatic(...nextSources) { let source = undefined; if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(nextSources[0])) { nextSources = nextSources[0]; } source = nextSources.shift(); return Object(_observable_from__WEBPACK_IMPORTED_MODULE_0__["from"])(source).lift(new OnErrorResumeNextOperator(nextSources)); } class OnErrorResumeNextOperator { constructor(nextSources) { this.nextSources = nextSources; } call(subscriber, source) { return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources)); } } class OnErrorResumeNextSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, nextSources) { super(destination); this.destination = destination; this.nextSources = nextSources; } notifyError() { this.subscribeToNextSource(); } notifyComplete() { this.subscribeToNextSource(); } _error(err) { this.subscribeToNextSource(); this.unsubscribe(); } _complete() { this.subscribeToNextSource(); this.unsubscribe(); } subscribeToNextSource() { const next = this.nextSources.shift(); if (!!next) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(next, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } else { this.destination.complete(); } } } //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), /***/ "uV4M": /*!*************************************************!*\ !*** ./node_modules/d3-polygon/src/contains.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { var n = polygon.length, p = polygon[n - 1], x = point[0], y = point[1], x0 = p[0], y0 = p[1], x1, y1, inside = false; for (var i = 0; i < n; ++i) { p = polygon[i], x1 = p[0], y1 = p[1]; if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside; x0 = x1, y0 = y1; } return inside; }); /***/ }), /***/ "uc95": /*!*********************************************!*\ !*** ./node_modules/d3-ease/src/elastic.js ***! \*********************************************/ /*! exports provided: elasticIn, elasticOut, elasticInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticIn", function() { return elasticIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticOut", function() { return elasticOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticInOut", function() { return elasticInOut; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "6ZHU"); var tau = 2 * Math.PI, amplitude = 1, period = 0.3; var elasticIn = (function custom(a, p) { var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); function elasticIn(t) { return a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(-(--t)) * Math.sin((s - t) / p); } elasticIn.amplitude = function(a) { return custom(a, p * tau); }; elasticIn.period = function(p) { return custom(a, p); }; return elasticIn; })(amplitude, period); var elasticOut = (function custom(a, p) { var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); function elasticOut(t) { return 1 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t = +t) * Math.sin((t + s) / p); } elasticOut.amplitude = function(a) { return custom(a, p * tau); }; elasticOut.period = function(p) { return custom(a, p); }; return elasticOut; })(amplitude, period); var elasticInOut = (function custom(a, p) { var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); function elasticInOut(t) { return ((t = t * 2 - 1) < 0 ? a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(-t) * Math.sin((s - t) / p) : 2 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t) * Math.sin((s + t) / p)) / 2; } elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; elasticInOut.period = function(p) { return custom(a, p); }; return elasticInOut; })(amplitude, period); /***/ }), /***/ "umZI": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/sort.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(compare) { return this.eachBefore(function(node) { if (node.children) { node.children.sort(compare); } }); }); /***/ }), /***/ "un/a": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/retry.js ***! \****************************************************************/ /*! exports provided: retry */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function retry(count = -1) { return (source) => source.lift(new RetryOperator(count, source)); } class RetryOperator { constructor(count, source) { this.count = count; this.source = source; } call(subscriber, source) { return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source)); } } class RetrySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, count, source) { super(destination); this.count = count; this.source = source; } error(err) { if (!this.isStopped) { const { source, count } = this; if (count === 0) { return super.error(err); } else if (count > -1) { this.count = count - 1; } source.subscribe(this._unsubscribeAndRecycle()); } } } //# sourceMappingURL=retry.js.map /***/ }), /***/ "uvNp": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/select.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ "b9Oj"); /* harmony default export */ __webpack_exports__["default"] = (function(select) { if (typeof select !== "function") select = Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(select); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { if ("__data__" in node) subnode.__data__ = node.__data__; subgroup[i] = subnode; } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); }); /***/ }), /***/ "v/rI": /*!***********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/leaves.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var leaves = []; this.eachBefore(function(node) { if (!node.children) { leaves.push(node); } }); return leaves; }); /***/ }), /***/ "v7Le": /*!******************************************************!*\ !*** ./node_modules/d3-time-format/src/isoFormat.js ***! \******************************************************/ /*! exports provided: isoSpecifier, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isoSpecifier", function() { return isoSpecifier; }); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "TCOF"); var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; function formatIsoNative(date) { return date.toISOString(); } var formatIso = Date.prototype.toISOString ? formatIsoNative : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"])(isoSpecifier); /* harmony default export */ __webpack_exports__["default"] = (formatIso); /***/ }), /***/ "vAb3": /*!********************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***! \********************************************************************/ /*! exports provided: cylindricalEqualAreaRaw */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cylindricalEqualAreaRaw", function() { return cylindricalEqualAreaRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); function cylindricalEqualAreaRaw(phi0) { var cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi0); function forward(lambda, phi) { return [lambda * cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi) / cosPhi0]; } forward.invert = function(x, y) { return [x / cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(y * cosPhi0)]; }; return forward; } /***/ }), /***/ "vBe5": /*!********************************************!*\ !*** ./node_modules/d3-array/src/index.js ***! \********************************************/ /*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect.js */ "h8nK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectLeft"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectCenter"]; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return _ascending_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector.js */ "Ki0a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return _bisector_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./count.js */ "hiel"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _count_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cross.js */ "9j6y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return _cross_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _cumsum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cumsum.js */ "UPWK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cumsum", function() { return _cumsum_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descending.js */ "0sQp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return _descending_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deviation.js */ "CcBx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return _deviation_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ "wz8V"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return _extent_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _fsum_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./fsum.js */ "xOP2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["Adder"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fsum", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["fsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fcumsum", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["fcumsum"]; }); /* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./group.js */ "4TqM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "group", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["groups"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "index", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["index"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["indexes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["rollup"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["rollups"]; }); /* harmony import */ var _groupSort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./groupSort.js */ "CXbD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupSort", function() { return _groupSort_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _bin_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./bin.js */ "PuQ0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bin", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./threshold/freedmanDiaconis.js */ "wjRQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./threshold/scott.js */ "Y7ZM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./threshold/sturges.js */ "Nl5w"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./max.js */ "gj+k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./maxIndex.js */ "cvkC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxIndex", function() { return _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./mean.js */ "V183"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./median.js */ "wKoq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return _median_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./merge.js */ "FTmn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./min.js */ "mrVq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./minIndex.js */ "JQqb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minIndex", function() { return _minIndex_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./nice.js */ "GWx9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nice", function() { return _nice_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./pairs.js */ "R9CD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _pairs_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./permute.js */ "MiBC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return _permute_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./quantile.js */ "GHWt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_26__["quantileSorted"]; }); /* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./quickselect.js */ "WHjf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quickselect", function() { return _quickselect_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./range.js */ "NltA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _range_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _least_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./least.js */ "tAAF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "least", function() { return _least_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./leastIndex.js */ "/CzE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "leastIndex", function() { return _leastIndex_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _greatest_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./greatest.js */ "1SON"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatest", function() { return _greatest_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _greatestIndex_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./greatestIndex.js */ "yb6d"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatestIndex", function() { return _greatestIndex_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./scan.js */ "Ok6N"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./shuffle.js */ "QK7T"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_34__["shuffler"]; }); /* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sum.js */ "OWWo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./ticks.js */ "7ssf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_36__["tickIncrement"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_36__["tickStep"]; }); /* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./transpose.js */ "cyYV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./variance.js */ "7sdT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return _variance_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./zip.js */ "+y6k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _every_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./every.js */ "JYaH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _every_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _some_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./some.js */ "SSHS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "some", function() { return _some_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./filter.js */ "AgzO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./map.js */ "J0SQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map_js__WEBPACK_IMPORTED_MODULE_43__["default"]; }); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./reduce.js */ "3Ryo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_44__["default"]; }); /* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./reverse.js */ "LXyZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reverse", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_45__["default"]; }); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./sort.js */ "Exv/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_46__["default"]; }); /* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./difference.js */ "3oVi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_47__["default"]; }); /* harmony import */ var _disjoint_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./disjoint.js */ "xtnD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "disjoint", function() { return _disjoint_js__WEBPACK_IMPORTED_MODULE_48__["default"]; }); /* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./intersection.js */ "Z5Ne"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_49__["default"]; }); /* harmony import */ var _subset_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./subset.js */ "jIxI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subset", function() { return _subset_js__WEBPACK_IMPORTED_MODULE_50__["default"]; }); /* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./superset.js */ "3O/B"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "superset", function() { return _superset_js__WEBPACK_IMPORTED_MODULE_51__["default"]; }); /* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./union.js */ "fAVw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return _union_js__WEBPACK_IMPORTED_MODULE_52__["default"]; }); /* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! internmap */ "vobT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternMap", function() { return internmap__WEBPACK_IMPORTED_MODULE_53__["InternMap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternSet", function() { return internmap__WEBPACK_IMPORTED_MODULE_53__["InternSet"]; }); // Deprecated; use bin. // Deprecated; use leastIndex. /***/ }), /***/ "vHEj": /*!***********************************************!*\ !*** ./node_modules/d3-geo/src/path/index.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity.js */ "IYKK"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream.js */ "tepu"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area.js */ "rBOd"); /* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds.js */ "SMTj"); /* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid.js */ "5D8y"); /* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context.js */ "ikcO"); /* harmony import */ var _measure_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure.js */ "EyUX"); /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string.js */ "mLep"); /* harmony default export */ __webpack_exports__["default"] = (function(projection, context) { var pointRadius = 4.5, projectionStream, contextStream; function path(object) { if (object) { if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(contextStream)); } return contextStream.result(); } path.area = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_area_js__WEBPACK_IMPORTED_MODULE_2__["default"])); return _area_js__WEBPACK_IMPORTED_MODULE_2__["default"].result(); }; path.measure = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_measure_js__WEBPACK_IMPORTED_MODULE_6__["default"])); return _measure_js__WEBPACK_IMPORTED_MODULE_6__["default"].result(); }; path.bounds = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"])); return _bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"].result(); }; path.centroid = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"])); return _centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"].result(); }; path.projection = function(_) { return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"]) : (projection = _).stream, path) : projection; }; path.context = function(_) { if (!arguments.length) return context; contextStream = _ == null ? (context = null, new _string_js__WEBPACK_IMPORTED_MODULE_7__["default"]) : new _context_js__WEBPACK_IMPORTED_MODULE_5__["default"](context = _); if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); return path; }; path.pointRadius = function(_) { if (!arguments.length) return pointRadius; pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); return path; }; return path.projection(projection).context(context); }); /***/ }), /***/ "vL4l": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***! \*************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e5f5e0a1d99b31a354", "edf8e9bae4b374c476238b45", "edf8e9bae4b374c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "vNJl": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/circle.js ***! \*******************************************/ /*! exports provided: circleStream, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleStream", function() { return circleStream; }); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian.js */ "YzSS"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "uD/i"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation.js */ "cwsO"); // Generates a circle centered at [0°, 0°], with a given radius and precision. function circleStream(stream, radius, delta, direction, t0, t1) { if (!delta) return; var cosRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), sinRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(radius), step = direction * delta; if (t0 == null) { t0 = radius + direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; t1 = radius - step / 2; } else { t0 = circleRadius(cosRadius, t0); t1 = circleRadius(cosRadius, t1); if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; } for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])([cosRadius, -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(t), -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(t)]); stream.point(point[0], point[1]); } } // Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. function circleRadius(cosRadius, point) { point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(point), point[0] -= cosRadius; Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianNormalizeInPlace"])(point); var radius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])(-point[1]); return ((-point[2] < 0 ? -radius : radius) + _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; } /* harmony default export */ __webpack_exports__["default"] = (function() { var center = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([0, 0]), radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(90), precision = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(6), ring, rotate, stream = {point: point}; function point(x, y) { ring.push(x = rotate(x, y)); x[0] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"], x[1] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"]; } function circle() { var c = center.apply(this, arguments), r = radius.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], p = precision.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]; ring = []; rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_3__["rotateRadians"])(-c[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], -c[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], 0).invert; circleStream(stream, r, p, 1); c = {type: "Polygon", coordinates: [ring]}; ring = rotate = null; return c; } circle.center = function(_) { return arguments.length ? (center = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([+_[0], +_[1]]), circle) : center; }; circle.radius = function(_) { return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : radius; }; circle.precision = function(_) { return arguments.length ? (precision = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : precision; }; return circle; }); /***/ }), /***/ "vkgz": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/tap.js ***! \**************************************************************/ /*! exports provided: tap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ "KqfI"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "n6bG"); function tap(nextOrObserver, error, complete) { return function tapOperatorFunction(source) { return source.lift(new DoOperator(nextOrObserver, error, complete)); }; } class DoOperator { constructor(nextOrObserver, error, complete) { this.nextOrObserver = nextOrObserver; this.error = error; this.complete = complete; } call(subscriber, source) { return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete)); } } class TapSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, observerOrNext, error, complete) { super(destination); this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(observerOrNext)) { this._context = this; this._tapNext = observerOrNext; } else if (observerOrNext) { this._context = observerOrNext; this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; } } _next(value) { try { this._tapNext.call(this._context, value); } catch (err) { this.destination.error(err); return; } this.destination.next(value); } _error(err) { try { this._tapError.call(this._context, err); } catch (err) { this.destination.error(err); return; } this.destination.error(err); } _complete() { try { this._tapComplete.call(this._context); } catch (err) { this.destination.error(err); return; } return this.destination.complete(); } } //# sourceMappingURL=tap.js.map /***/ }), /***/ "vobT": /*!*********************************************!*\ !*** ./node_modules/internmap/src/index.js ***! \*********************************************/ /*! exports provided: InternMap, InternSet */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternMap", function() { return InternMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternSet", function() { return InternSet; }); class InternMap extends Map { constructor(entries, key = keyof) { super(); Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}}); if (entries != null) for (const [key, value] of entries) this.set(key, value); } get(key) { return super.get(intern_get(this, key)); } has(key) { return super.has(intern_get(this, key)); } set(key, value) { return super.set(intern_set(this, key), value); } delete(key) { return super.delete(intern_delete(this, key)); } } class InternSet extends Set { constructor(values, key = keyof) { super(); Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}}); if (values != null) for (const value of values) this.add(value); } has(value) { return super.has(intern_get(this, value)); } add(value) { return super.add(intern_set(this, value)); } delete(value) { return super.delete(intern_delete(this, value)); } } function intern_get({_intern, _key}, value) { const key = _key(value); return _intern.has(key) ? _intern.get(key) : value; } function intern_set({_intern, _key}, value) { const key = _key(value); if (_intern.has(key)) return _intern.get(key); _intern.set(key, value); return value; } function intern_delete({_intern, _key}, value) { const key = _key(value); if (_intern.has(key)) { value = _intern.get(value); _intern.delete(key); } return value; } function keyof(value) { return value !== null && typeof value === "object" ? value.valueOf() : value; } /***/ }), /***/ "vqkR": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skipUntil.js ***! \********************************************************************/ /*! exports provided: skipUntil */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function skipUntil(notifier) { return (source) => source.lift(new SkipUntilOperator(notifier)); } class SkipUntilOperator { constructor(notifier) { this.notifier = notifier; } call(destination, source) { return source.subscribe(new SkipUntilSubscriber(destination, this.notifier)); } } class SkipUntilSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, notifier) { super(destination); this.hasValue = false; const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); this.add(innerSubscriber); this.innerSubscription = innerSubscriber; const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(notifier, innerSubscriber); if (innerSubscription !== innerSubscriber) { this.add(innerSubscription); this.innerSubscription = innerSubscription; } } _next(value) { if (this.hasValue) { super._next(value); } } notifyNext() { this.hasValue = true; if (this.innerSubscription) { this.innerSubscription.unsubscribe(); } } notifyComplete() { } } //# sourceMappingURL=skipUntil.js.map /***/ }), /***/ "w1tV": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/share.js ***! \****************************************************************/ /*! exports provided: share */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; }); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multicast */ "oB13"); /* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./refCount */ "x+ZX"); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subject */ "XNiG"); function shareSubjectFactory() { return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"](); } function share() { return (source) => Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); } //# sourceMappingURL=share.js.map /***/ }), /***/ "w5vR": /*!*******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Paired.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")); /***/ }), /***/ "w6Z2": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***! \*****************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fc8d59ffffbf91bfdb", "d7191cfdae61abd9e92c7bb6", "d7191cfdae61ffffbfabd9e92c7bb6", "d73027fc8d59fee090e0f3f891bfdb4575b4", "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "wC0G": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/symlog.js ***! \*********************************************/ /*! exports provided: symlogish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symlogish", function() { return symlogish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symlog; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function transformSymlog(c) { return function(x) { return Math.sign(x) * Math.log1p(Math.abs(x / c)); }; } function transformSymexp(c) { return function(x) { return Math.sign(x) * Math.expm1(Math.abs(x)) * c; }; } function symlogish(transform) { var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); scale.constant = function(_) { return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; }; return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); } function symlog() { var scale = symlogish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, symlog()).constant(scale.constant()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); } /***/ }), /***/ "wG9p": /*!**********************************************!*\ !*** ./node_modules/d3-random/src/pareto.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomPareto(source) { function randomPareto(alpha) { if ((alpha = +alpha) < 0) throw new RangeError("invalid alpha"); alpha = 1 / -alpha; return function() { return Math.pow(1 - source(), alpha); }; } randomPareto.source = sourceRandomPareto; return randomPareto; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "wIsI": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/stack.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ "0T5i"); /* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ "qqpY"); function stackValue(d, key) { return d[key]; } function stackSeries(key) { const series = []; series.key = key; return series; } /* harmony default export */ __webpack_exports__["default"] = (function() { var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([]), order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"], offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"], value = stackValue; function stack(data) { var sz = Array.from(keys.apply(this, arguments), stackSeries), i, n = sz.length, j = -1, oz; for (const d of data) { for (i = 0, ++j; i < n; ++i) { (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d; } } for (i = 0, oz = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(order(sz)); i < n; ++i) { sz[oz[i]].index = i; } offset(sz, oz); return sz; } stack.keys = function(_) { return arguments.length ? (keys = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Array.from(_)), stack) : keys; }; stack.value = function(_) { return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), stack) : value; }; stack.order = function(_) { return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"] : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Array.from(_)), stack) : order; }; stack.offset = function(_) { return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"] : _, stack) : offset; }; return stack; }); /***/ }), /***/ "wKaL": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/gnomonic.js ***! \********************************************************/ /*! exports provided: gnomonicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gnomonicRaw", function() { return gnomonicRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function gnomonicRaw(x, y) { var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; } gnomonicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"]); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(gnomonicRaw) .scale(144.049) .clipAngle(60); }); /***/ }), /***/ "wKoq": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/median.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quantile.js */ "GHWt"); /* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { return Object(_quantile_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, 0.5, valueof); }); /***/ }), /***/ "wMLG": /*!********************************************!*\ !*** ./node_modules/d3-array/src/array.js ***! \********************************************/ /*! exports provided: slice, map */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); var array = Array.prototype; var slice = array.slice; var map = array.map; /***/ }), /***/ "wO+i": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/pluck.js ***! \****************************************************************/ /*! exports provided: pluck */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); function pluck(...properties) { const length = properties.length; if (length === 0) { throw new Error('list of properties cannot be empty.'); } return (source) => Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); } function plucker(props, length) { const mapper = (x) => { let currentProp = x; for (let i = 0; i < length; i++) { const p = currentProp != null ? currentProp[props[i]] : undefined; if (p !== void 0) { currentProp = p; } else { return undefined; } } return currentProp; }; return mapper; } //# sourceMappingURL=pluck.js.map /***/ }), /***/ "wQ3i": /*!***********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(t) { t = Math.max(0, Math.min(1, t)); return "rgb(" + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) + ")"; }); /***/ }), /***/ "wWUp": /*!****************************************!*\ !*** ./node_modules/d3-dsv/src/tsv.js ***! \****************************************/ /*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return tsvParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return tsvParseRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return tsvFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return tsvFormatBody; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return tsvFormatRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return tsvFormatRow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return tsvFormatValue; }); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "NRL+"); var tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])("\t"); var tsvParse = tsv.parse; var tsvParseRows = tsv.parseRows; var tsvFormat = tsv.format; var tsvFormatBody = tsv.formatBody; var tsvFormatRows = tsv.formatRows; var tsvFormatRow = tsv.formatRow; var tsvFormatValue = tsv.formatValue; /***/ }), /***/ "wibz": /*!************************************************!*\ !*** ./node_modules/d3-selection/src/array.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like : Array.from(x); // Map, Set, iterable, string, or anything else }); /***/ }), /***/ "wjRQ": /*!*****************************************************************!*\ !*** ./node_modules/d3-array/src/threshold/freedmanDiaconis.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "hiel"); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../quantile.js */ "GHWt"); /* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { return Math.ceil((max - min) / (2 * (Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, 0.75) - Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, 0.25)) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values), -1 / 3))); }); /***/ }), /***/ "wvSV": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/size.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var size = 0; this.visit(function(node) { if (!node.length) do ++size; while (node = node.next) }); return size; }); /***/ }), /***/ "wz8V": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/extent.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { let min; let max; if (valueof === undefined) { for (const value of values) { if (value != null) { if (min === undefined) { if (value >= value) min = max = value; } else { if (min > value) min = value; if (max < value) max = value; } } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null) { if (min === undefined) { if (value >= value) min = max = value; } else { if (min > value) min = value; if (max < value) max = value; } } } } return [min, max]; }); /***/ }), /***/ "x+ZX": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/refCount.js ***! \*******************************************************************/ /*! exports provided: refCount */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function refCount() { return function refCountOperatorFunction(source) { return source.lift(new RefCountOperator(source)); }; } class RefCountOperator { constructor(connectable) { this.connectable = connectable; } call(subscriber, source) { const { connectable } = this; connectable._refCount++; const refCounter = new RefCountSubscriber(subscriber, connectable); const subscription = source.subscribe(refCounter); if (!refCounter.closed) { refCounter.connection = connectable.connect(); } return subscription; } } class RefCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, connectable) { super(destination); this.connectable = connectable; } _unsubscribe() { const { connectable } = this; if (!connectable) { this.connection = null; return; } this.connectable = null; const refCount = connectable._refCount; if (refCount <= 0) { this.connection = null; return; } connectable._refCount = refCount - 1; if (refCount > 1) { this.connection = null; return; } const { connection } = this; const sharedConnection = connectable._connection; this.connection = null; if (sharedConnection && (!connection || sharedConnection === connection)) { sharedConnection.unsubscribe(); } } } //# sourceMappingURL=refCount.js.map /***/ }), /***/ "xD94": /*!********************************************!*\ !*** ./node_modules/d3-random/src/beta.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gamma.js */ "b54z"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBeta(source) { var G = _gamma_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomBeta(alpha, beta) { var X = G(alpha), Y = G(beta); return function() { var x = X(); return x === 0 ? 0 : x / (x + Y()); }; } randomBeta.source = sourceRandomBeta; return randomBeta; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "xJQu": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/wye.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var c = -0.5, s = Math.sqrt(3) / 2, k = 1 / Math.sqrt(12), a = (k / 2 + 1) * 3; /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size / a), x0 = r / 2, y0 = r * k, x1 = x0, y1 = r * k + r, x2 = -x1, y2 = y1; context.moveTo(x0, y0); context.lineTo(x1, y1); context.lineTo(x2, y2); context.lineTo(c * x0 - s * y0, s * x0 + c * y0); context.lineTo(c * x1 - s * y1, s * x1 + c * y1); context.lineTo(c * x2 - s * y2, s * x2 + c * y2); context.lineTo(c * x0 + s * y0, c * y0 - s * x0); context.lineTo(c * x1 + s * y1, c * y1 - s * x1); context.lineTo(c * x2 + s * y2, c * y2 - s * x2); context.closePath(); } }); /***/ }), /***/ "xOP2": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/fsum.js ***! \*******************************************/ /*! exports provided: Adder, fsum, fcumsum */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return Adder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fsum", function() { return fsum; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fcumsum", function() { return fcumsum; }); // https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 class Adder { constructor() { this._partials = new Float64Array(32); this._n = 0; } add(x) { const p = this._partials; let i = 0; for (let j = 0; j < this._n && j < 32; j++) { const y = p[j], hi = x + y, lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); if (lo) p[i++] = lo; x = hi; } p[i] = x; this._n = i + 1; return this; } valueOf() { const p = this._partials; let n = this._n, x, y, lo, hi = 0; if (n > 0) { hi = p[--n]; while (n > 0) { x = hi; y = p[--n]; hi = x + y; lo = y - (hi - x); if (lo) break; } if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) { y = lo * 2; x = hi + y; if (y == x - hi) hi = x; } } return hi; } } function fsum(values, valueof) { const adder = new Adder(); if (valueof === undefined) { for (let value of values) { if (value = +value) { adder.add(value); } } } else { let index = -1; for (let value of values) { if (value = +valueof(value, ++index, values)) { adder.add(value); } } } return +adder; } function fcumsum(values, valueof) { const adder = new Adder(); let index = -1; return Float64Array.from(values, valueof === undefined ? v => adder.add(+v || 0) : v => adder.add(+valueof(v, ++index, values) || 0) ); } /***/ }), /***/ "xP+1": /*!*********************************************!*\ !*** ./node_modules/d3-contour/src/area.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(ring) { var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1]; while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1]; return area; }); /***/ }), /***/ "xbPD": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js ***! \*************************************************************************/ /*! exports provided: defaultIfEmpty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function defaultIfEmpty(defaultValue = null) { return (source) => source.lift(new DefaultIfEmptyOperator(defaultValue)); } class DefaultIfEmptyOperator { constructor(defaultValue) { this.defaultValue = defaultValue; } call(subscriber, source) { return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue)); } } class DefaultIfEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, defaultValue) { super(destination); this.defaultValue = defaultValue; this.isEmpty = true; } _next(value) { this.isEmpty = false; this.destination.next(value); } _complete() { if (this.isEmpty) { this.destination.next(this.defaultValue); } this.destination.complete(); } } //# sourceMappingURL=defaultIfEmpty.js.map /***/ }), /***/ "xgIS": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js ***! \*********************************************************************/ /*! exports provided: fromEvent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "n6bG"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "lJxs"); const toString = (() => Object.prototype.toString)(); function fromEvent(target, eventName, options, resultSelector) { if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) { resultSelector = options; options = undefined; } if (resultSelector) { return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { function handler(e) { if (arguments.length > 1) { subscriber.next(Array.prototype.slice.call(arguments)); } else { subscriber.next(e); } } setupSubscription(target, eventName, handler, subscriber, options); }); } function setupSubscription(sourceObj, eventName, handler, subscriber, options) { let unsubscribe; if (isEventTarget(sourceObj)) { const source = sourceObj; sourceObj.addEventListener(eventName, handler, options); unsubscribe = () => source.removeEventListener(eventName, handler, options); } else if (isJQueryStyleEventEmitter(sourceObj)) { const source = sourceObj; sourceObj.on(eventName, handler); unsubscribe = () => source.off(eventName, handler); } else if (isNodeStyleEventEmitter(sourceObj)) { const source = sourceObj; sourceObj.addListener(eventName, handler); unsubscribe = () => source.removeListener(eventName, handler); } else if (sourceObj && sourceObj.length) { for (let i = 0, len = sourceObj.length; i < len; i++) { setupSubscription(sourceObj[i], eventName, handler, subscriber, options); } } else { throw new TypeError('Invalid event target'); } subscriber.add(unsubscribe); } function isNodeStyleEventEmitter(sourceObj) { return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function'; } function isJQueryStyleEventEmitter(sourceObj) { return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function'; } function isEventTarget(sourceObj) { return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function'; } //# sourceMappingURL=fromEvent.js.map /***/ }), /***/ "xkTb": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")); /***/ }), /***/ "xo8x": /*!**************************************************!*\ !*** ./node_modules/d3-dispatch/src/dispatch.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var noop = {value: () => {}}; function dispatch() { for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); _[t] = []; } return new Dispatch(_); } function Dispatch(_) { this._ = _; } function parseTypenames(typenames, types) { return typenames.trim().split(/^|\s+/).map(function(t) { var name = "", i = t.indexOf("."); if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); return {type: t, name: name}; }); } Dispatch.prototype = dispatch.prototype = { constructor: Dispatch, on: function(typename, callback) { var _ = this._, T = parseTypenames(typename + "", _), t, i = -1, n = T.length; // If no callback was specified, return the callback of the given type and name. if (arguments.length < 2) { while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; return; } // If a type was specified, set the callback for the given type and name. // Otherwise, if a null callback was specified, remove callbacks of the given name. if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); while (++i < n) { if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); } return this; }, copy: function() { var copy = {}, _ = this._; for (var t in _) copy[t] = _[t].slice(); return new Dispatch(copy); }, call: function(type, that) { if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); }, apply: function(type, that, args) { if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); } }; function get(type, name) { for (var i = 0, n = type.length, c; i < n; ++i) { if ((c = type[i]).name === name) { return c.value; } } } function set(type, name, callback) { for (var i = 0, n = type.length; i < n; ++i) { if (type[i].name === name) { type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); break; } } if (callback != null) type.push({name: name, value: callback}); return type; } /* harmony default export */ __webpack_exports__["default"] = (dispatch); /***/ }), /***/ "xpj1": /*!*****************************************************!*\ !*** ./node_modules/d3-interpolate/src/constant.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "xtnD": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/disjoint.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return disjoint; }); function disjoint(values, other) { const iterator = other[Symbol.iterator](), set = new Set(); for (const v of values) { if (set.has(v)) return false; let value, done; while (({value, done} = iterator.next())) { if (done) break; if (Object.is(v, value)) return false; set.add(value); } } return true; } /***/ }), /***/ "yAGa": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/datum.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(value) { return arguments.length ? this.property("__data__", value) : this.node().__data__; }); /***/ }), /***/ "yCtX": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/fromArray.js ***! \*********************************************************************/ /*! exports provided: fromArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToArray */ "ngJS"); /* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduleArray */ "jZKg"); function fromArray(input, scheduler) { if (!scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input)); } else { return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler); } } //# sourceMappingURL=fromArray.js.map /***/ }), /***/ "yE6J": /*!*************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/iterator.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function*() { var node = this, current, next = [node], children, i, n; do { current = next.reverse(), next = []; while (node = current.pop()) { yield node; if (children = node.children) { for (i = 0, n = children.length; i < n; ++i) { next.push(children[i]); } } } } while (next.length); }); /***/ }), /***/ "yEp2": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/basis.js ***! \**************************************************/ /*! exports provided: basis, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); function basis(t1, v0, v1, v2, v3) { var t2 = t1 * t1, t3 = t2 * t1; return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6; } /* harmony default export */ __webpack_exports__["default"] = (function(values) { var n = values.length - 1; return function(t) { var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), v1 = values[i], v2 = values[i + 1], v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; return basis((t - i / n) * n, v0, v1, v2, v3); }; }); /***/ }), /***/ "yI9Y": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/max.js ***! \**************************************************************/ /*! exports provided: max */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); function max(comparer) { const max = (typeof comparer === 'function') ? (x, y) => comparer(x, y) > 0 ? x : y : (x, y) => x > y ? x : y; return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max); } //# sourceMappingURL=max.js.map /***/ }), /***/ "yPTl": /*!**********************************************!*\ !*** ./node_modules/d3-random/src/cauchy.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomCauchy(source) { function randomCauchy(a, b) { a = a == null ? 0 : +a; b = b == null ? 1 : +b; return function() { return a + b * Math.tan(Math.PI * source()); }; } randomCauchy.source = sourceRandomCauchy; return randomCauchy; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "yUfG": /*!************************************************!*\ !*** ./node_modules/d3-hierarchy/src/index.js ***! \************************************************/ /*! exports provided: cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cluster_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cluster.js */ "zpdH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return _cluster_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "a8tM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _pack_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pack/index.js */ "I3Nq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return _pack_index_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pack/siblings.js */ "W+J7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pack/enclose.js */ "7Mu7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./partition.js */ "+Nd1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _stratify_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stratify.js */ "NU5n"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return _stratify_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree.js */ "UHDu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return _tree_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./treemap/index.js */ "tvR+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treemap/binary.js */ "ivMv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treemap/dice.js */ "FPPI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treemap/slice.js */ "7IPS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./treemap/sliceDice.js */ "CDC2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./treemap/squarify.js */ "I4jL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./treemap/resquarify.js */ "1Cbu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /***/ }), /***/ "yUst": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fee8c8fdbb84e34a33", "fef0d9fdcc8afc8d59d7301f", "fef0d9fdcc8afc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "yWPb": /*!****************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conicEquidistant.js ***! \****************************************************************/ /*! exports provided: conicEquidistantRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEquidistantRaw", function() { return conicEquidistantRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "bN2o"); /* harmony import */ var _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular.js */ "VXJj"); function conicEquidistantRaw(y0, y1) { var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : (cy0 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / (y1 - y0), g = cy0 / n + y0; if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__["equirectangularRaw"]; function project(x, y) { var gy = g - y, nx = n * x; return [gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(nx), g - gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(nx)]; } project.invert = function(x, y) { var gy = g - y, l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(gy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(gy); if (gy * n < 0) l -= _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(gy); return [l / n, g - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + gy * gy)]; }; return project; } /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEquidistantRaw) .scale(131.154) .center([0, 13.9389]); }); /***/ }), /***/ "yb6d": /*!****************************************************!*\ !*** ./node_modules/d3-array/src/greatestIndex.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return greatestIndex; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maxIndex.js */ "cvkC"); function greatestIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { if (compare.length === 1) return Object(_maxIndex_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, compare); let maxValue; let max = -1; let index = -1; for (const value of values) { ++index; if (max < 0 ? compare(value, value) === 0 : compare(value, maxValue) > 0) { maxValue = value; max = index; } } return max; } /***/ }), /***/ "yhWi": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/empty.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return !this.node(); }); /***/ }), /***/ "yp+X": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/sort.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(compare) { if (!compare) compare = ascending; function compareNode(a, b) { return a && b ? compare(a.__data__, b.__data__) : !a - !b; } for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group[i]) { sortgroup[i] = node; } } sortgroup.sort(compareNode); } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](sortgroups, this._parents).order(); }); function ascending(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; } /***/ }), /***/ "yuhW": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/throttle.js ***! \*******************************************************************/ /*! exports provided: defaultThrottleConfig, throttle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); const defaultThrottleConfig = { leading: true, trailing: false }; function throttle(durationSelector, config = defaultThrottleConfig) { return (source) => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing)); } class ThrottleOperator { constructor(durationSelector, leading, trailing) { this.durationSelector = durationSelector; this.leading = leading; this.trailing = trailing; } call(subscriber, source) { return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing)); } } class ThrottleSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, durationSelector, _leading, _trailing) { super(destination); this.destination = destination; this.durationSelector = durationSelector; this._leading = _leading; this._trailing = _trailing; this._hasValue = false; } _next(value) { this._hasValue = true; this._sendValue = value; if (!this._throttled) { if (this._leading) { this.send(); } else { this.throttle(value); } } } send() { const { _hasValue, _sendValue } = this; if (_hasValue) { this.destination.next(_sendValue); this.throttle(_sendValue); } this._hasValue = false; this._sendValue = undefined; } throttle(value) { const duration = this.tryDurationSelector(value); if (!!duration) { this.add(this._throttled = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } } tryDurationSelector(value) { try { return this.durationSelector(value); } catch (err) { this.destination.error(err); return null; } } throttlingDone() { const { _throttled, _trailing } = this; if (_throttled) { _throttled.unsubscribe(); } this._throttled = undefined; if (_trailing) { this.send(); } } notifyNext() { this.throttlingDone(); } notifyComplete() { this.throttlingDone(); } } //# sourceMappingURL=throttle.js.map /***/ }), /***/ "z+Ro": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isScheduler.js ***! \*****************************************************************/ /*! exports provided: isScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; }); function isScheduler(value) { return value && typeof value.schedule === 'function'; } //# sourceMappingURL=isScheduler.js.map /***/ }), /***/ "z6FA": /*!**************************************************!*\ !*** ./node_modules/d3-quadtree/src/quadtree.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quadtree; }); /* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "9l1u"); /* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ "9ABZ"); /* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ "LMxf"); /* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "H7P7"); /* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ "HZff"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ "G0FW"); /* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ "RQVR"); /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ "wvSV"); /* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ "EVP4"); /* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ "tSfe"); /* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ "m7tx"); /* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ "Nv8T"); function quadtree(nodes, x, y) { var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__["defaultX"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__["defaultY"] : y, NaN, NaN, NaN, NaN); return nodes == null ? tree : tree.addAll(nodes); } function Quadtree(x, y, x0, y0, x1, y1) { this._x = x; this._y = y; this._x0 = x0; this._y0 = y0; this._x1 = x1; this._y1 = y1; this._root = undefined; } function leaf_copy(leaf) { var copy = {data: leaf.data}, next = copy; while (leaf = leaf.next) next = next.next = {data: leaf.data}; return copy; } var treeProto = quadtree.prototype = Quadtree.prototype; treeProto.copy = function() { var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), node = this._root, nodes, child; if (!node) return copy; if (!node.length) return copy._root = leaf_copy(node), copy; nodes = [{source: node, target: copy._root = new Array(4)}]; while (node = nodes.pop()) { for (var i = 0; i < 4; ++i) { if (child = node.source[i]) { if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); else node.target[i] = leaf_copy(child); } } } return copy; }; treeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__["default"]; treeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__["addAll"]; treeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__["default"]; treeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__["default"]; treeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]; treeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__["default"]; treeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__["default"]; treeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__["removeAll"]; treeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__["default"]; treeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__["default"]; treeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__["default"]; treeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__["default"]; treeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__["default"]; treeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__["default"]; /***/ }), /***/ "z6cu": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/throwError.js ***! \**********************************************************************/ /*! exports provided: throwError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); function throwError(error, scheduler) { if (!scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => subscriber.error(error)); } else { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => scheduler.schedule(dispatch, 0, { error, subscriber })); } } function dispatch({ error, subscriber }) { subscriber.error(error); } //# sourceMappingURL=throwError.js.map /***/ }), /***/ "z8qe": /*!***********************************************!*\ !*** ./node_modules/d3-delaunay/src/index.js ***! \***********************************************/ /*! exports provided: Delaunay, Voronoi */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _delaunay_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./delaunay.js */ "4JcG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Delaunay", function() { return _delaunay_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _voronoi_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./voronoi.js */ "3Ygs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Voronoi", function() { return _voronoi_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /***/ }), /***/ "zD5G": /*!*********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/linearClosed.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "0K5P"); function LinearClosed(context) { this._context = context; } LinearClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._point) this._context.closePath(); }, point: function(x, y) { x = +x, y = +y; if (this._point) this._context.lineTo(x, y); else this._point = 1, this._context.moveTo(x, y); } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new LinearClosed(context); }); /***/ }), /***/ "zMfI": /*!**********************************************!*\ !*** ./node_modules/d3-contour/src/index.js ***! \**********************************************/ /*! exports provided: contours, contourDensity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _contours_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contours.js */ "gy+j"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return _contours_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _density_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./density.js */ "Sf2A"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return _density_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /***/ }), /***/ "zP0r": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skip.js ***! \***************************************************************/ /*! exports provided: skip */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function skip(count) { return (source) => source.lift(new SkipOperator(count)); } class SkipOperator { constructor(total) { this.total = total; } call(subscriber, source) { return source.subscribe(new SkipSubscriber(subscriber, this.total)); } } class SkipSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, total) { super(destination); this.total = total; this.count = 0; } _next(x) { if (++this.count > this.total) { this.destination.next(x); } } } //# sourceMappingURL=skip.js.map /***/ }), /***/ "zcMM": /*!*************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/property.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function propertyRemove(name) { return function() { delete this[name]; }; } function propertyConstant(name, value) { return function() { this[name] = value; }; } function propertyFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) delete this[name]; else this[name] = v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name]; }); /***/ }), /***/ "ze3m": /*!********************************************************!*\ !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***! \********************************************************/ /*! exports provided: prefixExponent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefixExponent", function() { return prefixExponent; }); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); var prefixExponent; /* harmony default export */ __webpack_exports__["default"] = (function(x, p) { var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(x, p); if (!d) return x + ""; var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length; return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(x, Math.max(0, p + i - 1))[0]; // less than 1y! }); /***/ }), /***/ "ziQ1": /*!********************************************!*\ !*** ./node_modules/d3-scale/src/index.js ***! \********************************************/ /*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleRadial, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _band_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./band.js */ "sCaM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return _band_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return _band_js__WEBPACK_IMPORTED_MODULE_0__["point"]; }); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "1OKp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log.js */ "n0hd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return _log_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog.js */ "wC0G"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return _symlog_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _ordinal_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ordinal.js */ "3xmg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return _ordinal_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return _ordinal_js__WEBPACK_IMPORTED_MODULE_5__["implicit"]; }); /* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow.js */ "eJvb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return _pow_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return _pow_js__WEBPACK_IMPORTED_MODULE_6__["sqrt"]; }); /* harmony import */ var _radial_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./radial.js */ "OrLo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleRadial", function() { return _radial_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./quantile.js */ "cmp4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./quantize.js */ "f4CH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _threshold_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./threshold.js */ "aw+z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return _threshold_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./time.js */ "R0i0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return _time_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _utcTime_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcTime.js */ "O0DV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return _utcTime_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _sequential_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sequential.js */ "zmsm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialSymlog"]; }); /* harmony import */ var _sequentialQuantile_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sequentialQuantile.js */ "B/+g"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return _sequentialQuantile_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _diverging_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging.js */ "OP1V"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingSymlog"]; }); /* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tickFormat.js */ "ssni"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return _tickFormat_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /***/ }), /***/ "zmsm": /*!*************************************************!*\ !*** ./node_modules/d3-scale/src/sequential.js ***! \*************************************************/ /*! exports provided: copy, default, sequentialLog, sequentialSymlog, sequentialPow, sequentialSqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequential; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialLog", function() { return sequentialLog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSymlog", function() { return sequentialSymlog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialPow", function() { return sequentialPow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSqrt", function() { return sequentialSqrt; }); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./log.js */ "n0hd"); /* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symlog.js */ "wC0G"); /* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow.js */ "eJvb"); function transformer() { var x0 = 0, x1 = 1, t0, t1, k10, transform, interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], clamp = false, unknown; function scale(x) { return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); } scale.domain = function(_) { return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; }; scale.clamp = function(_) { return arguments.length ? (clamp = !!_, scale) : clamp; }; scale.interpolator = function(_) { return arguments.length ? (interpolator = _, scale) : interpolator; }; function range(interpolate) { return function(_) { var r0, r1; return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)]; }; } scale.range = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolate"]); scale.rangeRound = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRound"]); scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; return function(t) { transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); return scale; }; } function copy(source, target) { return target .domain(source.domain()) .interpolator(source.interpolator()) .clamp(source.clamp()) .unknown(source.unknown()); } function sequential() { var scale = Object(_linear_js__WEBPACK_IMPORTED_MODULE_3__["linearish"])(transformer()(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"])); scale.copy = function() { return copy(scale, sequential()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialLog() { var scale = Object(_log_js__WEBPACK_IMPORTED_MODULE_4__["loggish"])(transformer()).domain([1, 10]); scale.copy = function() { return copy(scale, sequentialLog()).base(scale.base()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialSymlog() { var scale = Object(_symlog_js__WEBPACK_IMPORTED_MODULE_5__["symlogish"])(transformer()); scale.copy = function() { return copy(scale, sequentialSymlog()).constant(scale.constant()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialPow() { var scale = Object(_pow_js__WEBPACK_IMPORTED_MODULE_6__["powish"])(transformer()); scale.copy = function() { return copy(scale, sequentialPow()).exponent(scale.exponent()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialSqrt() { return sequentialPow.apply(null, arguments).exponent(0.5); } /***/ }), /***/ "znLP": /*!**********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameScheduler.js ***! \**********************************************************************************/ /*! exports provided: AnimationFrameScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; }); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class AnimationFrameScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { flush(action) { this.active = true; this.scheduled = undefined; const { actions } = this; let error; let index = -1; let count = actions.length; action = action || actions.shift(); do { if (error = action.execute(action.state, action.delay)) { break; } } while (++index < count && (action = actions.shift())); this.active = false; if (error) { while (++index < count && (action = actions.shift())) { action.unsubscribe(); } throw error; } } } //# sourceMappingURL=AnimationFrameScheduler.js.map /***/ }), /***/ "znUM": /*!*************************************************!*\ !*** ./node_modules/d3-interpolate/src/zoom.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var epsilon2 = 1e-12; function cosh(x) { return ((x = Math.exp(x)) + 1 / x) / 2; } function sinh(x) { return ((x = Math.exp(x)) - 1 / x) / 2; } function tanh(x) { return ((x = Math.exp(2 * x)) - 1) / (x + 1); } /* harmony default export */ __webpack_exports__["default"] = ((function zoomRho(rho, rho2, rho4) { // p0 = [ux0, uy0, w0] // p1 = [ux1, uy1, w1] function zoom(p0, p1) { var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S; // Special case for u0 ≅ u1. if (d2 < epsilon2) { S = Math.log(w1 / w0) / rho; i = function(t) { return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S) ]; } } // General case. else { var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); S = (r1 - r0) / rho; i = function(t) { var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0) ]; } } i.duration = S * 1000 * rho / Math.SQRT2; return i; } zoom.rho = function(_) { var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2; return zoomRho(_1, _2, _4); }; return zoom; })(Math.SQRT2, 2, 4)); /***/ }), /***/ "zp1y": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/withLatestFrom.js ***! \*************************************************************************/ /*! exports provided: withLatestFrom */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; }); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function withLatestFrom(...args) { return (source) => { let project; if (typeof args[args.length - 1] === 'function') { project = args.pop(); } const observables = args; return source.lift(new WithLatestFromOperator(observables, project)); }; } class WithLatestFromOperator { constructor(observables, project) { this.observables = observables; this.project = project; } call(subscriber, source) { return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project)); } } class WithLatestFromSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"] { constructor(destination, observables, project) { super(destination); this.observables = observables; this.project = project; this.toRespond = []; const len = observables.length; this.values = new Array(len); for (let i = 0; i < len; i++) { this.toRespond.push(i); } for (let i = 0; i < len; i++) { let observable = observables[i]; this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, observable, undefined, i)); } } notifyNext(_outerValue, innerValue, outerIndex) { this.values[outerIndex] = innerValue; const toRespond = this.toRespond; if (toRespond.length > 0) { const found = toRespond.indexOf(outerIndex); if (found !== -1) { toRespond.splice(found, 1); } } } notifyComplete() { } _next(value) { if (this.toRespond.length === 0) { const args = [value, ...this.values]; if (this.project) { this._tryProject(args); } else { this.destination.next(args); } } } _tryProject(args) { let result; try { result = this.project.apply(this, args); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } //# sourceMappingURL=withLatestFrom.js.map /***/ }), /***/ "zpdH": /*!**************************************************!*\ !*** ./node_modules/d3-hierarchy/src/cluster.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function defaultSeparation(a, b) { return a.parent === b.parent ? 1 : 2; } function meanX(children) { return children.reduce(meanXReduce, 0) / children.length; } function meanXReduce(x, c) { return x + c.x; } function maxY(children) { return 1 + children.reduce(maxYReduce, 0); } function maxYReduce(y, c) { return Math.max(y, c.y); } function leafLeft(node) { var children; while (children = node.children) node = children[0]; return node; } function leafRight(node) { var children; while (children = node.children) node = children[children.length - 1]; return node; } /* harmony default export */ __webpack_exports__["default"] = (function() { var separation = defaultSeparation, dx = 1, dy = 1, nodeSize = false; function cluster(root) { var previousNode, x = 0; // First walk, computing the initial x & y values. root.eachAfter(function(node) { var children = node.children; if (children) { node.x = meanX(children); node.y = maxY(children); } else { node.x = previousNode ? x += separation(node, previousNode) : 0; node.y = 0; previousNode = node; } }); var left = leafLeft(root), right = leafRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2; // Second walk, normalizing x & y to the desired size. return root.eachAfter(nodeSize ? function(node) { node.x = (node.x - root.x) * dx; node.y = (root.y - node.y) * dy; } : function(node) { node.x = (node.x - x0) / (x1 - x0) * dx; node.y = (1 - (root.y ? node.y / root.y : 1)) * dy; }); } cluster.separation = function(x) { return arguments.length ? (separation = x, cluster) : separation; }; cluster.size = function(x) { return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]); }; cluster.nodeSize = function(x) { return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null); }; return cluster; }); /***/ }), /***/ "zt7V": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaust.js ***! \******************************************************************/ /*! exports provided: exhaust */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function exhaust() { return (source) => source.lift(new SwitchFirstOperator()); } class SwitchFirstOperator { call(subscriber, source) { return source.subscribe(new SwitchFirstSubscriber(subscriber)); } } class SwitchFirstSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination) { super(destination); this.hasCompleted = false; this.hasSubscription = false; } _next(value) { if (!this.hasSubscription) { this.hasSubscription = true; this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(value, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } } _complete() { this.hasCompleted = true; if (!this.hasSubscription) { this.destination.complete(); } } notifyComplete() { this.hasSubscription = false; if (this.hasCompleted) { this.destination.complete(); } } } //# sourceMappingURL=exhaust.js.map /***/ }), /***/ "zv5K": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/each.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback) { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { if (node = group[i]) callback.call(node, node.__data__, i, group); } } return this; }); /***/ }), /***/ "zx2A": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/innerSubscribe.js ***! \***************************************************************/ /*! exports provided: SimpleInnerSubscriber, ComplexInnerSubscriber, SimpleOuterSubscriber, ComplexOuterSubscriber, innerSubscribe */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleInnerSubscriber", function() { return SimpleInnerSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComplexInnerSubscriber", function() { return ComplexInnerSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleOuterSubscriber", function() { return SimpleOuterSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComplexOuterSubscriber", function() { return ComplexOuterSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "innerSubscribe", function() { return innerSubscribe; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observable */ "HDdC"); /* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/subscribeTo */ "SeVD"); class SimpleInnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent) { super(); this.parent = parent; } _next(value) { this.parent.notifyNext(value); } _error(error) { this.parent.notifyError(error); this.unsubscribe(); } _complete() { this.parent.notifyComplete(); this.unsubscribe(); } } class ComplexInnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent, outerValue, outerIndex) { super(); this.parent = parent; this.outerValue = outerValue; this.outerIndex = outerIndex; } _next(value) { this.parent.notifyNext(this.outerValue, value, this.outerIndex, this); } _error(error) { this.parent.notifyError(error); this.unsubscribe(); } _complete() { this.parent.notifyComplete(this); this.unsubscribe(); } } class SimpleOuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { notifyNext(innerValue) { this.destination.next(innerValue); } notifyError(err) { this.destination.error(err); } notifyComplete() { this.destination.complete(); } } class ComplexOuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { notifyNext(_outerValue, innerValue, _outerIndex, _innerSub) { this.destination.next(innerValue); } notifyError(error) { this.destination.error(error); } notifyComplete(_innerSub) { this.destination.complete(); } } function innerSubscribe(result, innerSubscriber) { if (innerSubscriber.closed) { return undefined; } if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]) { return result.subscribe(innerSubscriber); } let subscription; try { subscription = Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__["subscribeTo"])(result)(innerSubscriber); } catch (error) { innerSubscriber.error(error); } return subscription; } //# sourceMappingURL=innerSubscribe.js.map /***/ }), /***/ "zyLn": /*!*************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/filter.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony default export */ __webpack_exports__["default"] = (function(match) { if (typeof match !== "function") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["matcher"])(match); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { if ((node = group[i]) && match.call(node, node.__data__, i, group)) { subgroup.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, this._name, this._id); }); /***/ }), /***/ "zz/+": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/length.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "mPOO"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "tepu"); var lengthSum, lambda0, sinPhi0, cosPhi0; var lengthStream = { sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: lengthLineStart, lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"] }; function lengthLineStart() { lengthStream.point = lengthPointFirst; lengthStream.lineEnd = lengthLineEnd; } function lengthLineEnd() { lengthStream.point = lengthStream.lineEnd = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; } function lengthPointFirst(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; lambda0 = lambda, sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); lengthStream.point = lengthPoint; } function lengthPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda - lambda0), cosDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(delta), sinDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(delta), x = cosPhi * sinDelta, y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta, z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta; lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x * x + y * y), z)); lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi; } /* harmony default export */ __webpack_exports__["default"] = (function(object) { lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, lengthStream); return +lengthSum; }); /***/ }) }]); //# sourceMappingURL=vendor.js.mapEvidence <form>Solution Phase: Architecture and Design
Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
For example, use anti-CSRF packages such as the OWASP CSRFGuard.
Phase: Implementation
Ensure that your application is free of cross-site scripting issues, because most CSRF defenses can be bypassed using attacker-controlled script.
Phase: Architecture and Design
Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330).
Note that this can be bypassed using XSS.
Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
Note that this can be bypassed using XSS.
Use the ESAPI Session Management control.
This control includes a component for CSRF.
Do not use the GET method for any request that triggers a state change.
Phase: Implementation
Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.
-
-
-
Risk=Low, Confidence=Medium (2)
-
http://localhost:3000 (2)
-
Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s) (1)
GET http://localhost:3000
Alert tags Alert description The web/application server is leaking information via one or more "X-Powered-By" HTTP response headers. Access to such information may facilitate attackers identifying other frameworks/components your web application is reliant upon and the vulnerabilities such components may be subject to.
Request Request line and header section (195 bytes)
GET http://localhost:3000 HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cacheRequest body (0 bytes)
Response Status line and header section (316 bytes)
HTTP/1.1 200 OK X-Powered-By: Express Accept-Ranges: bytes Cache-Control: public, max-age=0 Last-Modified: Fri, 08 Apr 2022 13:22:54 GMT ETag: W/"1e7-18009578ef9" Content-Type: text/html; charset=UTF-8 Content-Length: 487 Date: Fri, 08 Apr 2022 13:24:07 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (487 bytes)
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>D3</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="stylesheet" href="styles.css"></head> <body> <app-root></app-root> <script src="runtime.js" defer></script><script src="polyfills.js" defer></script><script src="vendor.js" defer></script><script src="main.js" defer></script></body> </html>Evidence X-Powered-By: ExpressSolution Ensure that your web server, application server, load balancer, etc. is configured to suppress "X-Powered-By" headers.
-
X-Content-Type-Options Header Missing (1)
GET http://localhost:3000
Alert tags Alert description The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.
Other info This issue still applies to error type pages (401, 403, 500, etc.) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.
At "High" threshold this scan rule will not alert on client or server error responses.
Request Request line and header section (195 bytes)
GET http://localhost:3000 HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cacheRequest body (0 bytes)
Response Status line and header section (316 bytes)
HTTP/1.1 200 OK X-Powered-By: Express Accept-Ranges: bytes Cache-Control: public, max-age=0 Last-Modified: Fri, 08 Apr 2022 13:22:54 GMT ETag: W/"1e7-18009578ef9" Content-Type: text/html; charset=UTF-8 Content-Length: 487 Date: Fri, 08 Apr 2022 13:24:07 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (487 bytes)
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>D3</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="stylesheet" href="styles.css"></head> <body> <app-root></app-root> <script src="runtime.js" defer></script><script src="polyfills.js" defer></script><script src="vendor.js" defer></script><script src="main.js" defer></script></body> </html>Parameter X-Content-Type-OptionsSolution Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.
If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.
-
-
-
Risk=Low, Confidence=Low (1)
-
http://localhost:3000 (1)
-
Timestamp Disclosure - Unix (1)
GET http://localhost:3000/vendor.js
Alert tags Alert description A timestamp was disclosed by the application/web server - Unix
Other info 0009765625, which evaluates to: 1970-04-23 19:40:25
Request Request line and header section (237 bytes)
GET http://localhost:3000/vendor.js HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cache Referer: http://localhost:3000Request body (0 bytes)
Response Status line and header section (336 bytes)
HTTP/1.1 200 OK X-Powered-By: Express Accept-Ranges: bytes Cache-Control: public, max-age=0 Last-Modified: Fri, 08 Apr 2022 12:35:28 GMT ETag: W/"3a1f58-180092c200f" Content-Type: application/javascript; charset=UTF-8 Content-Length: 3809112 Date: Fri, 08 Apr 2022 13:24:08 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (3809112 bytes)
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"],{ /***/ "+3eq": /*!*******************************************!*\ !*** ./node_modules/d3-ease/src/index.js ***! \*******************************************/ /*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "ZRP+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__["linear"]; }); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ "TXIv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); /* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ "iSFD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); /* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ "5Xrj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); /* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ "62fh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); /* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ "LOX7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); /* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ "tIkd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); /* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ "MHiR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceInOut"]; }); /* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ "iUY2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); /* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ "uc95"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticInOut"]; }); /***/ }), /***/ "+HKQ": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/attr.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace.js */ "bNSl"); function attrRemove(name) { return function() { this.removeAttribute(name); }; } function attrRemoveNS(fullname) { return function() { this.removeAttributeNS(fullname.space, fullname.local); }; } function attrConstant(name, value) { return function() { this.setAttribute(name, value); }; } function attrConstantNS(fullname, value) { return function() { this.setAttributeNS(fullname.space, fullname.local, value); }; } function attrFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttribute(name); else this.setAttribute(name, v); }; } function attrFunctionNS(fullname, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttributeNS(fullname.space, fullname.local); else this.setAttributeNS(fullname.space, fullname.local, v); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name); if (arguments.length < 2) { var node = this.node(); return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname); } return this.each((value == null ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction) : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); }); /***/ }), /***/ "+Nd1": /*!****************************************************!*\ !*** ./node_modules/d3-hierarchy/src/partition.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _treemap_round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round.js */ "DdT1"); /* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice.js */ "FPPI"); /* harmony default export */ __webpack_exports__["default"] = (function() { var dx = 1, dy = 1, padding = 0, round = false; function partition(root) { var n = root.height + 1; root.x0 = root.y0 = padding; root.x1 = dx; root.y1 = dy / n; root.eachBefore(positionNode(dy, n)); if (round) root.eachBefore(_treemap_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); return root; } function positionNode(dy, n) { return function(node) { if (node.children) { Object(_treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); } var x0 = node.x0, y0 = node.y0, x1 = node.x1 - padding, y1 = node.y1 - padding; if (x1 < x0) x0 = x1 = (x0 + x1) / 2; if (y1 < y0) y0 = y1 = (y0 + y1) / 2; node.x0 = x0; node.y0 = y0; node.x1 = x1; node.y1 = y1; }; } partition.round = function(x) { return arguments.length ? (round = !!x, partition) : round; }; partition.size = function(x) { return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy]; }; partition.padding = function(x) { return arguments.length ? (padding = +x, partition) : padding; }; return partition; }); /***/ }), /***/ "+O7D": /*!***********************************************!*\ !*** ./node_modules/d3-time/src/utcMinute.js ***! \***********************************************/ /*! exports provided: default, utcMinutes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return utcMinutes; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCSeconds(0, 0); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; }, function(date) { return date.getUTCMinutes(); }); /* harmony default export */ __webpack_exports__["default"] = (utcMinute); var utcMinutes = utcMinute.range; /***/ }), /***/ "+Tjx": /*!****************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/descendants.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return Array.from(this); }); /***/ }), /***/ "+WWN": /*!**********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/equalEarth.js ***! \**********************************************************/ /*! exports provided: equalEarthRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equalEarthRaw", function() { return equalEarthRaw; }); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "1ibS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); var A1 = 1.340264, A2 = -0.081106, A3 = 0.000893, A4 = 0.003796, M = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(3) / 2, iterations = 12; function equalEarthRaw(lambda, phi) { var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(M * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi)), l2 = l * l, l6 = l2 * l2 * l2; return [ lambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) ]; } equalEarthRaw.invert = function(x, y) { var l = y, l2 = l * l, l6 = l2 * l2 * l2; for (var i = 0, delta, fy, fpy; i < iterations; ++i) { fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) break; } return [ M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(l) / M) ]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equalEarthRaw) .scale(177.158); }); /***/ }), /***/ "+s1I": /*!*******************************************!*\ !*** ./node_modules/d3-axis/src/array.js ***! \*******************************************/ /*! exports provided: slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var slice = Array.prototype.slice; /***/ }), /***/ "+u7/": /*!********************************************!*\ !*** ./node_modules/d3-chord/src/index.js ***! \********************************************/ /*! exports provided: chord, chordTranspose, chordDirected, ribbon, ribbonArrow */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _chord_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chord.js */ "22Jt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordTranspose", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__["chordTranspose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordDirected", function() { return _chord_js__WEBPACK_IMPORTED_MODULE_0__["chordDirected"]; }); /* harmony import */ var _ribbon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ribbon.js */ "SKGk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return _ribbon_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbonArrow", function() { return _ribbon_js__WEBPACK_IMPORTED_MODULE_1__["ribbonArrow"]; }); /***/ }), /***/ "+ugm": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/line.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curve/linear.js */ "SDD1"); /* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ "/aQN"); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { var defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(true), context = null, curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__["default"], output = null; x = typeof x === "function" ? x : (x === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_4__["x"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x); y = typeof y === "function" ? y : (y === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_4__["y"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(y); function line(data) { var i, n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data)).length, d, defined0 = false, buffer; if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); for (i = 0; i <= n; ++i) { if (!(i < n && defined(d = data[i], i, data)) === defined0) { if (defined0 = !defined0) output.lineStart(); else output.lineEnd(); } if (defined0) output.point(+x(d, i, data), +y(d, i, data)); } if (buffer) return output = null, buffer + "" || null; } line.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), line) : x; }; line.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), line) : y; }; line.defined = function(_) { return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(!!_), line) : defined; }; line.curve = function(_) { return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; }; line.context = function(_) { return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; }; return line; }); /***/ }), /***/ "+w/h": /*!**************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/selectAll.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "wibz"); /* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../selectorAll.js */ "QjDJ"); function arrayAll(select) { return function() { var group = select.apply(this, arguments); return group == null ? [] : Object(_array_js__WEBPACK_IMPORTED_MODULE_1__["default"])(group); }; } /* harmony default export */ __webpack_exports__["default"] = (function(select) { if (typeof select === "function") select = arrayAll(select); else select = Object(_selectorAll_js__WEBPACK_IMPORTED_MODULE_2__["default"])(select); for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { subgroups.push(select.call(node, node.__data__, i, group)); parents.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, parents); }); /***/ }), /***/ "+y6k": /*!******************************************!*\ !*** ./node_modules/d3-array/src/zip.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose.js */ "cyYV"); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_transpose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments); }); /***/ }), /***/ "/+7g": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/attr.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ "Nehl"); /* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ "5aFE"); function attrRemove(name) { return function() { this.removeAttribute(name); }; } function attrRemoveNS(fullname) { return function() { this.removeAttributeNS(fullname.space, fullname.local); }; } function attrConstant(name, interpolate, value1) { var string00, string1 = value1 + "", interpolate0; return function() { var string0 = this.getAttribute(name); return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1); }; } function attrConstantNS(fullname, interpolate, value1) { var string00, string1 = value1 + "", interpolate0; return function() { var string0 = this.getAttributeNS(fullname.space, fullname.local); return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1); }; } function attrFunction(name, interpolate, value) { var string00, string10, interpolate0; return function() { var string0, value1 = value(this), string1; if (value1 == null) return void this.removeAttribute(name); string0 = this.getAttribute(name); string1 = value1 + ""; return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; } function attrFunctionNS(fullname, interpolate, value) { var string00, string10, interpolate0; return function() { var string0, value1 = value(this), string1; if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); string0 = this.getAttributeNS(fullname.space, fullname.local); string1 = value1 + ""; return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["namespace"])(name), i = fullname === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformSvg"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__["default"]; return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__["tweenValue"])(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); }); /***/ }), /***/ "/CzE": /*!*************************************************!*\ !*** ./node_modules/d3-array/src/leastIndex.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return leastIndex; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minIndex.js */ "JQqb"); function leastIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { if (compare.length === 1) return Object(_minIndex_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, compare); let minValue; let min = -1; let index = -1; for (const value of values) { ++index; if (min < 0 ? compare(value, value) === 0 : compare(value, minValue) < 0) { minValue = value; min = index; } } return min; } /***/ }), /***/ "/KiP": /*!*************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/remove.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function removeFunction(id) { return function() { var parent = this.parentNode; for (var i in this.__transition) if (+i !== id) return; if (parent) parent.removeChild(this); }; } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.on("end.remove", removeFunction(this._id)); }); /***/ }), /***/ "/TIM": /*!************************************************!*\ !*** ./node_modules/d3-selection/src/index.js ***! \************************************************/ /*! exports provided: create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create.js */ "qLhn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return _create_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator.js */ "V/Wt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return _creator_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _local_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local.js */ "HFJB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return _local_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher.js */ "Cnj1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return _matcher_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./namespace.js */ "bNSl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return _namespace_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespaces.js */ "4xGt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return _namespaces_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointer.js */ "XoFe"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointer", function() { return _pointer_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _pointers_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pointers.js */ "90/1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointers", function() { return _pointers_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select.js */ "AKWm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return _select_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll.js */ "Enya"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return _selectAll_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index.js */ "5Iso"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return _selection_index_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector.js */ "b9Oj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return _selector_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll.js */ "QjDJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return _selectorAll_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _selection_style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style.js */ "Nkvg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return _selection_style_js__WEBPACK_IMPORTED_MODULE_13__["styleValue"]; }); /* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./window.js */ "oxeV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _window_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /***/ }), /***/ "/aQN": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/point.js ***! \********************************************/ /*! exports provided: x, y */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); function x(p) { return p[0]; } function y(p) { return p[1]; } /***/ }), /***/ "/d8p": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/repeat.js ***! \*****************************************************************/ /*! exports provided: repeat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); function repeat(count = -1) { return (source) => { if (count === 0) { return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_1__["empty"])(); } else if (count < 0) { return source.lift(new RepeatOperator(-1, source)); } else { return source.lift(new RepeatOperator(count - 1, source)); } }; } class RepeatOperator { constructor(count, source) { this.count = count; this.source = source; } call(subscriber, source) { return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source)); } } class RepeatSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, count, source) { super(destination); this.count = count; this.source = source; } complete() { if (!this.isStopped) { const { source, count } = this; if (count === 0) { return super.complete(); } else if (count > -1) { this.count = count - 1; } source.subscribe(this._unsubscribeAndRecycle()); } } } //# sourceMappingURL=repeat.js.map /***/ }), /***/ "/uUt": /*!*******************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilChanged.js ***! \*******************************************************************************/ /*! exports provided: distinctUntilChanged */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function distinctUntilChanged(compare, keySelector) { return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector)); } class DistinctUntilChangedOperator { constructor(compare, keySelector) { this.compare = compare; this.keySelector = keySelector; } call(subscriber, source) { return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector)); } } class DistinctUntilChangedSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, compare, keySelector) { super(destination); this.keySelector = keySelector; this.hasKey = false; if (typeof compare === 'function') { this.compare = compare; } } compare(x, y) { return x === y; } _next(value) { let key; try { const { keySelector } = this; key = keySelector ? keySelector(value) : value; } catch (err) { return this.destination.error(err); } let result = false; if (this.hasKey) { try { const { compare } = this; result = compare(this.key, key); } catch (err) { return this.destination.error(err); } } else { this.hasKey = true; } if (!result) { this.key = key; this.destination.next(value); } } } //# sourceMappingURL=distinctUntilChanged.js.map /***/ }), /***/ "02Lk": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/distinct.js ***! \*******************************************************************/ /*! exports provided: distinct, DistinctSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function distinct(keySelector, flushes) { return (source) => source.lift(new DistinctOperator(keySelector, flushes)); } class DistinctOperator { constructor(keySelector, flushes) { this.keySelector = keySelector; this.flushes = flushes; } call(subscriber, source) { return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes)); } } class DistinctSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, keySelector, flushes) { super(destination); this.keySelector = keySelector; this.values = new Set(); if (flushes) { this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(flushes, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } } notifyNext() { this.values.clear(); } notifyError(error) { this._error(error); } _next(value) { if (this.keySelector) { this._useKeySelector(value); } else { this._finalizeNext(value, value); } } _useKeySelector(value) { let key; const { destination } = this; try { key = this.keySelector(value); } catch (err) { destination.error(err); return; } this._finalizeNext(key, value); } _finalizeNext(key, value) { const { values } = this; if (!values.has(key)) { values.add(key); this.destination.next(value); } } } //# sourceMappingURL=distinct.js.map /***/ }), /***/ "04ZW": /*!****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEventPattern.js ***! \****************************************************************************/ /*! exports provided: fromEventPattern */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "n6bG"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "lJxs"); function fromEventPattern(addHandler, removeHandler, resultSelector) { if (resultSelector) { return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const handler = (...e) => subscriber.next(e.length === 1 ? e[0] : e); let retValue; try { retValue = addHandler(handler); } catch (err) { subscriber.error(err); return undefined; } if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) { return undefined; } return () => removeHandler(handler, retValue); }); } //# sourceMappingURL=fromEventPattern.js.map /***/ }), /***/ "05l1": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publishReplay.js ***! \************************************************************************/ /*! exports provided: publishReplay */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; }); /* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "jtHE"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) { if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') { scheduler = selectorOrScheduler; } const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined; const subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler); return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(() => subject, selector)(source); } //# sourceMappingURL=publishReplay.js.map /***/ }), /***/ "0EUg": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concatAll.js ***! \********************************************************************/ /*! exports provided: concatAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; }); /* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeAll */ "bHdf"); function concatAll() { return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1); } //# sourceMappingURL=concatAll.js.map /***/ }), /***/ "0K5P": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/noop.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() {}); /***/ }), /***/ "0LFD": /*!*********************************************!*\ !*** ./node_modules/d3-force/src/center.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { var nodes, strength = 1; if (x == null) x = 0; if (y == null) y = 0; function force() { var i, n = nodes.length, node, sx = 0, sy = 0; for (i = 0; i < n; ++i) { node = nodes[i], sx += node.x, sy += node.y; } for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) { node = nodes[i], node.x -= sx, node.y -= sy; } } force.initialize = function(_) { nodes = _; }; force.x = function(_) { return arguments.length ? (x = +_, force) : x; }; force.y = function(_) { return arguments.length ? (y = +_, force) : y; }; force.strength = function(_) { return arguments.length ? (strength = +_, force) : strength; }; return force; }); /***/ }), /***/ "0ND3": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/style.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ "Nehl"); /* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ "5aFE"); function styleNull(name, interpolate) { var string00, string10, interpolate0; return function() { var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1); }; } function styleRemove(name) { return function() { this.style.removeProperty(name); }; } function styleConstant(name, interpolate, value1) { var string00, string1 = value1 + "", interpolate0; return function() { var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name); return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1); }; } function styleFunction(name, interpolate, value) { var string00, string10, interpolate0; return function() { var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), value1 = value(this), string1 = value1 + ""; if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); }; } function styleMaybeRemove(id, name) { var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; return function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["set"])(this, id), on = schedule.on, listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; // If this node shared a dispatch with the previous node, // just assign the updated shared dispatch and we’re done! // Otherwise, copy-on-write. if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); schedule.on = on1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { var i = (name += "") === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformCss"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__["default"]; return value == null ? this .styleTween(name, styleNull(name, i)) .on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__["tweenValue"])(this, "style." + name, value))) .each(styleMaybeRemove(this._id, name)) : this .styleTween(name, styleConstant(name, i, value), priority) .on("end.style." + name, null); }); /***/ }), /***/ "0Pi8": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/endWith.js ***! \******************************************************************/ /*! exports provided: endWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; }); /* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); /* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/of */ "LRne"); function endWith(...array) { return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(...array)); } //# sourceMappingURL=endWith.js.map /***/ }), /***/ "0RZX": /*!*****************************************************!*\ !*** ./node_modules/d3-random/src/defaultSource.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (Math.random); /***/ }), /***/ "0T5i": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/offset/none.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 1)) return; for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { s0 = s1, s1 = series[order[i]]; for (j = 0; j < m; ++j) { s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; } } }); /***/ }), /***/ "0W9s": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/index.js ***! \************************************************************/ /*! exports provided: Transition, default, newId */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transition", function() { return Transition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newId", function() { return newId; }); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ "/+7g"); /* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ "DF+l"); /* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ "hl/D"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ "8nbz"); /* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ "WFWS"); /* harmony import */ var _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./easeVarying.js */ "KpFn"); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filter.js */ "zyLn"); /* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./merge.js */ "qR3b"); /* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./on.js */ "aNk7"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./remove.js */ "/KiP"); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./select.js */ "r5Py"); /* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectAll.js */ "7VZX"); /* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection.js */ "cKk/"); /* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.js */ "0ND3"); /* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./styleTween.js */ "D/GG"); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./text.js */ "31Y3"); /* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./textTween.js */ "Xl5i"); /* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./transition.js */ "4bGx"); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tween.js */ "Nehl"); /* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./end.js */ "mKzq"); var id = 0; function Transition(groups, parents, name, id) { this._groups = groups; this._parents = parents; this._name = name; this._id = id; } function transition(name) { return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"])().transition(name); } function newId() { return ++id; } var selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype; Transition.prototype = transition.prototype = { constructor: Transition, select: _select_js__WEBPACK_IMPORTED_MODULE_11__["default"], selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_12__["default"], filter: _filter_js__WEBPACK_IMPORTED_MODULE_7__["default"], merge: _merge_js__WEBPACK_IMPORTED_MODULE_8__["default"], selection: _selection_js__WEBPACK_IMPORTED_MODULE_13__["default"], transition: _transition_js__WEBPACK_IMPORTED_MODULE_18__["default"], call: selection_prototype.call, nodes: selection_prototype.nodes, node: selection_prototype.node, size: selection_prototype.size, empty: selection_prototype.empty, each: selection_prototype.each, on: _on_js__WEBPACK_IMPORTED_MODULE_9__["default"], attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__["default"], attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__["default"], style: _style_js__WEBPACK_IMPORTED_MODULE_14__["default"], styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_15__["default"], text: _text_js__WEBPACK_IMPORTED_MODULE_16__["default"], textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_17__["default"], remove: _remove_js__WEBPACK_IMPORTED_MODULE_10__["default"], tween: _tween_js__WEBPACK_IMPORTED_MODULE_19__["default"], delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__["default"], duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__["default"], ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__["default"], easeVarying: _easeVarying_js__WEBPACK_IMPORTED_MODULE_6__["default"], end: _end_js__WEBPACK_IMPORTED_MODULE_20__["default"], [Symbol.iterator]: selection_prototype[Symbol.iterator] }; /***/ }), /***/ "0llg": /*!***************************************************!*\ !*** ./node_modules/d3-selection/src/constant.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "0rNn": /*!****************************************!*\ !*** ./node_modules/d3-force/src/y.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony default export */ __webpack_exports__["default"] = (function(y) { var strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), nodes, strengths, yz; if (typeof y !== "function") y = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(y == null ? 0 : +y); function force(alpha) { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; } } function initialize() { if (!nodes) return; var i, n = nodes.length; strengths = new Array(n); yz = new Array(n); for (i = 0; i < n; ++i) { strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); } } force.initialize = function(_) { nodes = _; initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; }; force.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : y; }; return force; }); /***/ }), /***/ "0sQp": /*!*************************************************!*\ !*** ./node_modules/d3-array/src/descending.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; }); /***/ }), /***/ "0xxc": /*!***************************************************************!*\ !*** ./node_modules/d3-transition/src/selection/interrupt.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ "dW/k"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { return this.each(function() { Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, name); }); }); /***/ }), /***/ "128B": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/reduce.js ***! \*****************************************************************/ /*! exports provided: reduce */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; }); /* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scan */ "Kqap"); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./takeLast */ "BFxc"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/pipe */ "mCNh"); function reduce(accumulator, seed) { if (arguments.length >= 2) { return function reduceOperatorFunctionWithSeed(source) { return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source); }; } return function reduceOperatorFunction(source) { return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])((acc, value, index) => accumulator(acc, value, index + 1)), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source); }; } //# sourceMappingURL=reduce.js.map /***/ }), /***/ "1Cbu": /*!*************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/resquarify.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "FPPI"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "7IPS"); /* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify.js */ "I4jL"); /* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { function resquarify(parent, x0, y0, x1, y1) { if ((rows = parent._squarify) && (rows.ratio === ratio)) { var rows, row, nodes, i, j = -1, n, m = rows.length, value = parent.value; while (++j < m) { row = rows[j], nodes = row.children; for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1); else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1); value -= row.value; } } else { parent._squarify = rows = Object(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["squarifyRatio"])(ratio, parent, x0, y0, x1, y1); rows.ratio = ratio; } } resquarify.ratio = function(x) { return custom((x = +x) > 1 ? x : 1); }; return resquarify; })(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["phi"])); /***/ }), /***/ "1G5W": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/takeUntil.js ***! \********************************************************************/ /*! exports provided: takeUntil */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function takeUntil(notifier) { return (source) => source.lift(new TakeUntilOperator(notifier)); } class TakeUntilOperator { constructor(notifier) { this.notifier = notifier; } call(subscriber, source) { const takeUntilSubscriber = new TakeUntilSubscriber(subscriber); const notifierSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](takeUntilSubscriber)); if (notifierSubscription && !takeUntilSubscriber.seenValue) { takeUntilSubscriber.add(notifierSubscription); return source.subscribe(takeUntilSubscriber); } return takeUntilSubscriber; } } class TakeUntilSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination) { super(destination); this.seenValue = false; } notifyNext() { this.seenValue = true; this.complete(); } notifyComplete() { } } //# sourceMappingURL=takeUntil.js.map /***/ }), /***/ "1Ix/": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/init.js ***! \*******************************************/ /*! exports provided: initRange, initInterpolator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initRange", function() { return initRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initInterpolator", function() { return initInterpolator; }); function initRange(domain, range) { switch (arguments.length) { case 0: break; case 1: this.range(domain); break; default: this.range(range).domain(domain); break; } return this; } function initInterpolator(domain, interpolator) { switch (arguments.length) { case 0: break; case 1: { if (typeof domain === "function") this.interpolator(domain); else this.range(domain); break; } default: { this.domain(domain); if (typeof interpolator === "function") this.interpolator(interpolator); else this.range(interpolator); break; } } return this; } /***/ }), /***/ "1OKp": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/identity.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return identity; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number.js */ "4m7i"); function identity(domain) { var unknown; function scale(x) { return x == null || isNaN(x = +x) ? unknown : x; } scale.invert = scale; scale.domain = scale.range = function(_) { return arguments.length ? (domain = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_1__["default"]), scale) : domain.slice(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return identity(domain).unknown(unknown); }; domain = arguments.length ? Array.from(domain, _number_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : [0, 1]; return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); } /***/ }), /***/ "1SON": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/greatest.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return greatest; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); function greatest(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { let max; let defined = false; if (compare.length === 1) { let maxValue; for (const element of values) { const value = compare(element); if (defined ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, maxValue) > 0 : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, value) === 0) { max = element; maxValue = value; defined = true; } } } else { for (const value of values) { if (defined ? compare(value, max) > 0 : compare(value, value) === 0) { max = value; defined = true; } } } return max; } /***/ }), /***/ "1Ykd": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/sampleTime.js ***! \*********************************************************************/ /*! exports provided: sampleTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); function sampleTime(period, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { return (source) => source.lift(new SampleTimeOperator(period, scheduler)); } class SampleTimeOperator { constructor(period, scheduler) { this.period = period; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler)); } } class SampleTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, period, scheduler) { super(destination); this.period = period; this.scheduler = scheduler; this.hasValue = false; this.add(scheduler.schedule(dispatchNotification, period, { subscriber: this, period })); } _next(value) { this.lastValue = value; this.hasValue = true; } notifyNext() { if (this.hasValue) { this.hasValue = false; this.destination.next(this.lastValue); } } } function dispatchNotification(state) { let { subscriber, period } = state; subscriber.notifyNext(); this.schedule(state, period); } //# sourceMappingURL=sampleTime.js.map /***/ }), /***/ "1afE": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/square.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var w = Math.sqrt(size), x = -w / 2; context.rect(x, x, w, w); } }); /***/ }), /***/ "1byx": /*!***********************************************!*\ !*** ./node_modules/d3-timer/src/interval.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "dPRQ"); /* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"], total = delay; if (delay == null) return t.restart(callback, delay, time), t; t._restart = t.restart; t.restart = function(callback, delay, time) { delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__["now"])() : +time; t._restart(function tick(elapsed) { elapsed += total; t._restart(tick, total += delay, time); callback(elapsed); }, delay, time); } t.restart(callback, delay, time); return t; }); /***/ }), /***/ "1ibS": /*!*****************************************************!*\ !*** ./node_modules/d3-geo/src/projection/index.js ***! \*****************************************************/ /*! exports provided: default, projectionMutator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return projection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projectionMutator", function() { return projectionMutator; }); /* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian.js */ "9ZWv"); /* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle.js */ "PQSO"); /* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle.js */ "F2eR"); /* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose.js */ "pbho"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity.js */ "IYKK"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation.js */ "cwsO"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform.js */ "t9E6"); /* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit.js */ "XAaG"); /* harmony import */ var _resample_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample.js */ "TKDR"); var transformRadians = Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ point: function(x, y) { this.stream.point(x * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], y * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); } }); function transformRotate(rotate) { return Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({ point: function(x, y) { var r = rotate(x, y); return this.stream.point(r[0], r[1]); } }); } function scaleTranslate(k, dx, dy, sx, sy) { function transform(x, y) { x *= sx; y *= sy; return [dx + k * x, dy - k * y]; } transform.invert = function(x, y) { return [(x - dx) / k * sx, (dy - y) / k * sy]; }; return transform; } function scaleTranslateRotate(k, dx, dy, sx, sy, alpha) { if (!alpha) return scaleTranslate(k, dx, dy, sx, sy); var cosAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["cos"])(alpha), sinAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sin"])(alpha), a = cosAlpha * k, b = sinAlpha * k, ai = cosAlpha / k, bi = sinAlpha / k, ci = (sinAlpha * dy - cosAlpha * dx) / k, fi = (sinAlpha * dx + cosAlpha * dy) / k; function transform(x, y) { x *= sx; y *= sy; return [a * x - b * y + dx, dy - b * x - a * y]; } transform.invert = function(x, y) { return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)]; }; return transform; } function projection(project) { return projectionMutator(function() { return project; })(); } function projectionMutator(projectAt) { var project, k = 150, // scale x = 480, y = 250, // translate lambda = 0, phi = 0, // center deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate alpha = 0, // post-rotate angle sx = 1, // reflectX sy = 1, // reflectX theta = null, preclip = _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"], // pre-clip angle x0 = null, y0, x1, y1, postclip = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], // post-clip extent delta2 = 0.5, // precision projectResample, projectTransform, projectRotateTransform, cache, cacheStream; function projection(point) { return projectRotateTransform(point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]); } function invert(point) { point = projectRotateTransform.invert(point[0], point[1]); return point && [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; } projection.stream = function(stream) { return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); }; projection.preclip = function(_) { return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; }; projection.postclip = function(_) { return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; }; projection.clipAngle = function(_) { return arguments.length ? (preclip = +_ ? Object(_clip_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(theta = _ * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]) : (theta = null, _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"]), reset()) : theta * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; }; projection.clipExtent = function(_) { return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; }; projection.scale = function(_) { return arguments.length ? (k = +_, recenter()) : k; }; projection.translate = function(_) { return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; }; projection.center = function(_) { return arguments.length ? (lambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], phi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : [lambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], phi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; }; projection.rotate = function(_) { return arguments.length ? (deltaLambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaPhi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaGamma = _.length > 2 ? _[2] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"] : 0, recenter()) : [deltaLambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaPhi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaGamma * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]]; }; projection.angle = function(_) { return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]; }; projection.reflectX = function(_) { return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0; }; projection.reflectY = function(_) { return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0; }; projection.precision = function(_) { return arguments.length ? (projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2 = _ * _), reset()) : Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sqrt"])(delta2); }; projection.fitExtent = function(extent, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitExtent"])(projection, extent, object); }; projection.fitSize = function(size, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitSize"])(projection, size, object); }; projection.fitWidth = function(width, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitWidth"])(projection, width, object); }; projection.fitHeight = function(height, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitHeight"])(projection, height, object); }; function recenter() { var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha); rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_6__["rotateRadians"])(deltaLambda, deltaPhi, deltaGamma); projectTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(project, transform); projectRotateTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(rotate, projectTransform); projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2); return reset(); } function reset() { cache = cacheStream = null; return projection; } return function() { project = projectAt.apply(this, arguments); projection.invert = project.invert && invert; return recenter(); }; } /***/ }), /***/ "1jur": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Set1.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999")); /***/ }), /***/ "1nUc": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/curve/basisOpen.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "jICm"); function BasisOpen(context) { this._context = context; } BasisOpen.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN; this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; case 3: this._point = 4; // proceed default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new BasisOpen(context); }); /***/ }), /***/ "1uah": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/zip.js ***! \***************************************************************/ /*! exports provided: zip, ZipOperator, ZipSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; }); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fromArray */ "yCtX"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../internal/symbol/iterator */ "Lhse"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function zip(...observables) { const resultSelector = observables[observables.length - 1]; if (typeof resultSelector === 'function') { observables.pop(); } return Object(_fromArray__WEBPACK_IMPORTED_MODULE_0__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector)); } class ZipOperator { constructor(resultSelector) { this.resultSelector = resultSelector; } call(subscriber, source) { return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector)); } } class ZipSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, resultSelector, values = Object.create(null)) { super(destination); this.resultSelector = resultSelector; this.iterators = []; this.active = 0; this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined; } _next(value) { const iterators = this.iterators; if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(value)) { iterators.push(new StaticArrayIterator(value)); } else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]] === 'function') { iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]())); } else { iterators.push(new ZipBufferIterator(this.destination, this, value)); } } _complete() { const iterators = this.iterators; const len = iterators.length; this.unsubscribe(); if (len === 0) { this.destination.complete(); return; } this.active = len; for (let i = 0; i < len; i++) { let iterator = iterators[i]; if (iterator.stillUnsubscribed) { const destination = this.destination; destination.add(iterator.subscribe()); } else { this.active--; } } } notifyInactive() { this.active--; if (this.active === 0) { this.destination.complete(); } } checkIterators() { const iterators = this.iterators; const len = iterators.length; const destination = this.destination; for (let i = 0; i < len; i++) { let iterator = iterators[i]; if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) { return; } } let shouldComplete = false; const args = []; for (let i = 0; i < len; i++) { let iterator = iterators[i]; let result = iterator.next(); if (iterator.hasCompleted()) { shouldComplete = true; } if (result.done) { destination.complete(); return; } args.push(result.value); } if (this.resultSelector) { this._tryresultSelector(args); } else { destination.next(args); } if (shouldComplete) { destination.complete(); } } _tryresultSelector(args) { let result; try { result = this.resultSelector.apply(this, args); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } class StaticIterator { constructor(iterator) { this.iterator = iterator; this.nextResult = iterator.next(); } hasValue() { return true; } next() { const result = this.nextResult; this.nextResult = this.iterator.next(); return result; } hasCompleted() { const nextResult = this.nextResult; return Boolean(nextResult && nextResult.done); } } class StaticArrayIterator { constructor(array) { this.array = array; this.index = 0; this.length = 0; this.length = array.length; } [_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]() { return this; } next(value) { const i = this.index++; const array = this.array; return i < this.length ? { value: array[i], done: false } : { value: null, done: true }; } hasValue() { return this.array.length > this.index; } hasCompleted() { return this.array.length === this.index; } } class ZipBufferIterator extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleOuterSubscriber"] { constructor(destination, parent, observable) { super(destination); this.parent = parent; this.observable = observable; this.stillUnsubscribed = true; this.buffer = []; this.isComplete = false; } [_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_3__["iterator"]]() { return this; } next() { const buffer = this.buffer; if (buffer.length === 0 && this.isComplete) { return { value: null, done: true }; } else { return { value: buffer.shift(), done: false }; } } hasValue() { return this.buffer.length > 0; } hasCompleted() { return this.buffer.length === 0 && this.isComplete; } notifyComplete() { if (this.buffer.length > 0) { this.isComplete = true; this.parent.notifyInactive(); } else { this.destination.complete(); } } notifyNext(innerValue) { this.buffer.push(innerValue); this.parent.checkIterators(); } subscribe() { return Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["innerSubscribe"])(this.observable, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_4__["SimpleInnerSubscriber"](this)); } } //# sourceMappingURL=zip.js.map /***/ }), /***/ "2/3s": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/selection/transition.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ "0W9s"); /* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ "rtYu"); /* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ "+3eq"); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ "ta7q"); var defaultTiming = { time: null, // Set on use. delay: 0, duration: 250, ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__["easeCubicInOut"] }; function inherit(node, id) { var timing; while (!(timing = node.__transition) || !(timing = timing[id])) { if (!(node = node.parentNode)) { throw new Error(`transition ${id} not found`); } } return timing; } /* harmony default export */ __webpack_exports__["default"] = (function(name) { var id, timing; if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]) { id = name._id, name = name._name; } else { id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), name = name == null ? null : name + ""; } for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id, i, group, timing || inherit(node, id)); } } } return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id); }); /***/ }), /***/ "22Jt": /*!********************************************!*\ !*** ./node_modules/d3-chord/src/chord.js ***! \********************************************/ /*! exports provided: default, chordTranspose, chordDirected */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chordTranspose", function() { return chordTranspose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "chordDirected", function() { return chordDirected; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "mJZf"); function range(i, j) { return Array.from({length: j - i}, (_, k) => i + k); } function compareValue(compare) { return function(a, b) { return compare( a.source.value + a.target.value, b.source.value + b.target.value ); }; } /* harmony default export */ __webpack_exports__["default"] = (function() { return chord(false, false); }); function chordTranspose() { return chord(false, true); } function chordDirected() { return chord(true, false); } function chord(directed, transpose) { var padAngle = 0, sortGroups = null, sortSubgroups = null, sortChords = null; function chord(matrix) { var n = matrix.length, groupSums = new Array(n), groupIndex = range(0, n), chords = new Array(n * n), groups = new Array(n), k = 0, dx; matrix = Float64Array.from({length: n * n}, transpose ? (_, i) => matrix[i % n][i / n | 0] : (_, i) => matrix[i / n | 0][i % n]); // Compute the scaling factor from value to angle in [0, 2pi]. for (let i = 0; i < n; ++i) { let x = 0; for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i]; k += groupSums[i] = x; } k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["max"])(0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] - padAngle * n) / k; dx = k ? padAngle : _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / n; // Compute the angles for each group and constituent chord. { let x = 0; if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b])); for (const i of groupIndex) { const x0 = x; if (directed) { const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]); if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b])); for (const j of subgroupIndex) { if (j < 0) { const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null}); chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]}; } else { const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; } } groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; } else { const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]); if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b])); for (const j of subgroupIndex) { let chord; if (i < j) { chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; } else { chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null}); chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; if (i === j) chord.source = chord.target; } if (chord.source && chord.target && chord.source.value < chord.target.value) { const source = chord.source; chord.source = chord.target; chord.target = source; } } groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; } x += dx; } } // Remove empty chords. chords = Object.values(chords); chords.groups = groups; return sortChords ? chords.sort(sortChords) : chords; } chord.padAngle = function(_) { return arguments.length ? (padAngle = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["max"])(0, _), chord) : padAngle; }; chord.sortGroups = function(_) { return arguments.length ? (sortGroups = _, chord) : sortGroups; }; chord.sortSubgroups = function(_) { return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups; }; chord.sortChords = function(_) { return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._; }; return chord; } /***/ }), /***/ "230S": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/append.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ "V/Wt"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { var create = typeof name === "function" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name); return this.select(function() { return this.appendChild(create.apply(this, arguments)); }); }); /***/ }), /***/ "2K37": /*!***********************************************!*\ !*** ./node_modules/d3-shape/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function constant() { return x; }; }); /***/ }), /***/ "2QA8": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/symbol/rxSubscriber.js ***! \********************************************************************/ /*! exports provided: rxSubscriber, $$rxSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; }); const rxSubscriber = (() => typeof Symbol === 'function' ? Symbol('rxSubscriber') : '@@rxSubscriber_' + Math.random())(); const $$rxSubscriber = rxSubscriber; //# sourceMappingURL=rxSubscriber.js.map /***/ }), /***/ "2QGa": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/partition.js ***! \*********************************************************************/ /*! exports provided: partition */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; }); /* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/not */ "F97/"); /* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeTo */ "SeVD"); /* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/filter */ "pLZG"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ "HDdC"); function partition(source, predicate, thisArg) { return [ Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))), Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))) ]; } //# sourceMappingURL=partition.js.map /***/ }), /***/ "2TPD": /*!*******************************************************!*\ !*** ./node_modules/d3-format/src/precisionPrefix.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony default export */ __webpack_exports__["default"] = (function(step, value) { return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); }); /***/ }), /***/ "2TRZ": /*!*******************************************!*\ !*** ./node_modules/d3-zoom/src/index.js ***! \*******************************************/ /*! exports provided: zoom, zoomTransform, zoomIdentity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoom.js */ "hkWm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ "hjfa"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["identity"]; }); /***/ }), /***/ "2Vo4": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/BehaviorSubject.js ***! \****************************************************************/ /*! exports provided: BehaviorSubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); /* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); class BehaviorSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor(_value) { super(); this._value = _value; } get value() { return this.getValue(); } _subscribe(subscriber) { const subscription = super._subscribe(subscriber); if (subscription && !subscription.closed) { subscriber.next(this._value); } return subscription; } getValue() { if (this.hasError) { throw this.thrownError; } else if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__["ObjectUnsubscribedError"](); } else { return this._value; } } next(value) { super.next(this._value = value); } } //# sourceMappingURL=BehaviorSubject.js.map /***/ }), /***/ "2Ynt": /*!******************************************************!*\ !*** ./node_modules/d3-format/src/precisionRound.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony default export */ __webpack_exports__["default"] = (function(step, max) { step = Math.abs(step), max = Math.abs(max) - step; return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(step)) + 1; }); /***/ }), /***/ "2YwT": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "f7fcb9addd8e31a354", "ffffccc2e69978c679238443", "ffffccc2e69978c67931a354006837", "ffffccd9f0a3addd8e78c67931a354006837", "ffffccd9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "2bil": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "2fFW": /*!*******************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/config.js ***! \*******************************************************/ /*! exports provided: config */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; }); let _enable_super_gross_mode_that_will_cause_bad_things = false; const config = { Promise: undefined, set useDeprecatedSynchronousErrorHandling(value) { if (value) { const error = new Error(); console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack); } else if (_enable_super_gross_mode_that_will_cause_bad_things) { console.log('RxJS: Back to a better error behavior. Thank you. <3'); } _enable_super_gross_mode_that_will_cause_bad_things = value; }, get useDeprecatedSynchronousErrorHandling() { return _enable_super_gross_mode_that_will_cause_bad_things; }, }; //# sourceMappingURL=config.js.map /***/ }), /***/ "2kEi": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fff7bcfec44fd95f0e", "ffffd4fed98efe9929cc4c02", "ffffd4fed98efe9929d95f0e993404", "ffffd4fee391fec44ffe9929d95f0e993404", "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "2nV0": /*!************************************************************!*\ !*** ./node_modules/d3-interpolate/src/transform/parse.js ***! \************************************************************/ /*! exports provided: parseCss, parseSvg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCss", function() { return parseCss; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSvg", function() { return parseSvg; }); /* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ "Mlif"); var svgNode; /* eslint-disable no-undef */ function parseCss(value) { const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); return m.isIdentity ? _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"] : Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(m.a, m.b, m.c, m.d, m.e, m.f); } function parseSvg(value) { if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); svgNode.setAttribute("transform", value); if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"]; value = value.matrix; return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value.a, value.b, value.c, value.d, value.e, value.f); } /***/ }), /***/ "2tFh": /*!******************************************************!*\ !*** ./node_modules/d3-format/src/precisionFixed.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony default export */ __webpack_exports__["default"] = (function(step) { return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step))); }); /***/ }), /***/ "30U6": /*!***********************************************!*\ !*** ./node_modules/d3-dispatch/src/index.js ***! \***********************************************/ /*! exports provided: dispatch */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ "xo8x"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /***/ }), /***/ "31Y3": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/text.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ "Nehl"); function textConstant(value) { return function() { this.textContent = value; }; } function textFunction(value) { return function() { var value1 = value(this); this.textContent = value1 == null ? "" : value1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { return this.tween("text", typeof value === "function" ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__["tweenValue"])(this, "text", value)) : textConstant(value == null ? "" : value + "")); }); /***/ }), /***/ "32Ea": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skipWhile.js ***! \********************************************************************/ /*! exports provided: skipWhile */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function skipWhile(predicate) { return (source) => source.lift(new SkipWhileOperator(predicate)); } class SkipWhileOperator { constructor(predicate) { this.predicate = predicate; } call(subscriber, source) { return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate)); } } class SkipWhileSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate) { super(destination); this.predicate = predicate; this.skipping = true; this.index = 0; } _next(value) { const destination = this.destination; if (this.skipping) { this.tryCallPredicate(value); } if (!this.skipping) { destination.next(value); } } tryCallPredicate(value) { try { const result = this.predicate(value, this.index++); this.skipping = Boolean(result); } catch (err) { this.destination.error(err); } } } //# sourceMappingURL=skipWhile.js.map /***/ }), /***/ "3E0/": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/delay.js ***! \****************************************************************/ /*! exports provided: delay */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isDate */ "mlxB"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Notification */ "WMd4"); function delay(delay, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { const absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__["isDate"])(delay); const delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay); return (source) => source.lift(new DelayOperator(delayFor, scheduler)); } class DelayOperator { constructor(delay, scheduler) { this.delay = delay; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler)); } } class DelaySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, delay, scheduler) { super(destination); this.delay = delay; this.scheduler = scheduler; this.queue = []; this.active = false; this.errored = false; } static dispatch(state) { const source = state.source; const queue = source.queue; const scheduler = state.scheduler; const destination = state.destination; while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) { queue.shift().notification.observe(destination); } if (queue.length > 0) { const delay = Math.max(0, queue[0].time - scheduler.now()); this.schedule(state, delay); } else { this.unsubscribe(); source.active = false; } } _schedule(scheduler) { this.active = true; const destination = this.destination; destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, { source: this, destination: this.destination, scheduler: scheduler })); } scheduleNotification(notification) { if (this.errored === true) { return; } const scheduler = this.scheduler; const message = new DelayMessage(scheduler.now() + this.delay, notification); this.queue.push(message); if (this.active === false) { this._schedule(scheduler); } } _next(value) { this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createNext(value)); } _error(err) { this.errored = true; this.queue = []; this.destination.error(err); this.unsubscribe(); } _complete() { this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_3__["Notification"].createComplete()); this.unsubscribe(); } } class DelayMessage { constructor(time, notification) { this.time = time; this.notification = notification; } } //# sourceMappingURL=delay.js.map /***/ }), /***/ "3N8a": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncAction.js ***! \**********************************************************************/ /*! exports provided: AsyncAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; }); /* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ "7ve7"); class AsyncAction extends _Action__WEBPACK_IMPORTED_MODULE_0__["Action"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; this.pending = false; } schedule(state, delay = 0) { if (this.closed) { return this; } this.state = state; const id = this.id; const scheduler = this.scheduler; if (id != null) { this.id = this.recycleAsyncId(scheduler, id, delay); } this.pending = true; this.delay = delay; this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); return this; } requestAsyncId(scheduler, id, delay = 0) { return setInterval(scheduler.flush.bind(scheduler, this), delay); } recycleAsyncId(scheduler, id, delay = 0) { if (delay !== null && this.delay === delay && this.pending === false) { return id; } clearInterval(id); return undefined; } execute(state, delay) { if (this.closed) { return new Error('executing a cancelled action'); } this.pending = false; const error = this._execute(state, delay); if (error) { return error; } else if (this.pending === false && this.id != null) { this.id = this.recycleAsyncId(this.scheduler, this.id, null); } } _execute(state, delay) { let errored = false; let errorValue = undefined; try { this.work(state); } catch (e) { errored = true; errorValue = !!e && e || new Error(e); } if (errored) { this.unsubscribe(); return errorValue; } } _unsubscribe() { const id = this.id; const scheduler = this.scheduler; const actions = scheduler.actions; const index = actions.indexOf(this); this.work = null; this.state = null; this.pending = false; this.scheduler = null; if (index !== -1) { actions.splice(index, 1); } if (id != null) { this.id = this.recycleAsyncId(scheduler, id, null); } this.delay = null; } } //# sourceMappingURL=AsyncAction.js.map /***/ }), /***/ "3O/B": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/superset.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return superset; }); function superset(values, other) { const iterator = values[Symbol.iterator](), set = new Set(); for (const o of other) { if (set.has(o)) continue; let value, done; while (({value, done} = iterator.next())) { if (done) return false; set.add(value); if (Object.is(o, value)) break; } } return true; } /***/ }), /***/ "3Ryo": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/reduce.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return reduce; }); function reduce(values, reducer, value) { if (typeof reducer !== "function") throw new TypeError("reducer is not a function"); const iterator = values[Symbol.iterator](); let done, next, index = -1; if (arguments.length < 3) { ({done, value} = iterator.next()); if (done) return; ++index; } while (({done, value: next} = iterator.next()), !done) { value = reducer(value, next, ++index, values); } return value; } /***/ }), /***/ "3UWI": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/auditTime.js ***! \********************************************************************/ /*! exports provided: auditTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./audit */ "tnsW"); /* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/timer */ "PqYM"); function auditTime(duration, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(() => Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler)); } //# sourceMappingURL=auditTime.js.map /***/ }), /***/ "3Ygs": /*!*************************************************!*\ !*** ./node_modules/d3-delaunay/src/voronoi.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Voronoi; }); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "8SsQ"); /* harmony import */ var _polygon_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./polygon.js */ "WDTS"); class Voronoi { constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) { if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error("invalid bounds"); this.delaunay = delaunay; this._circumcenters = new Float64Array(delaunay.points.length * 2); this.vectors = new Float64Array(delaunay.points.length * 2); this.xmax = xmax, this.xmin = xmin; this.ymax = ymax, this.ymin = ymin; this._init(); } update() { this.delaunay.update(); this._init(); return this; } _init() { const {delaunay: {points, hull, triangles}, vectors} = this; // Compute circumcenters. const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2); for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) { const t1 = triangles[i] * 2; const t2 = triangles[i + 1] * 2; const t3 = triangles[i + 2] * 2; const x1 = points[t1]; const y1 = points[t1 + 1]; const x2 = points[t2]; const y2 = points[t2 + 1]; const x3 = points[t3]; const y3 = points[t3 + 1]; const dx = x2 - x1; const dy = y2 - y1; const ex = x3 - x1; const ey = y3 - y1; const bl = dx * dx + dy * dy; const cl = ex * ex + ey * ey; const ab = (dx * ey - dy * ex) * 2; if (!ab) { // degenerate case (collinear diagram) x = (x1 + x3) / 2 - 1e8 * ey; y = (y1 + y3) / 2 + 1e8 * ex; } else if (Math.abs(ab) < 1e-8) { // almost equal points (degenerate triangle) x = (x1 + x3) / 2; y = (y1 + y3) / 2; } else { const d = 1 / ab; x = x1 + (ey * bl - dy * cl) * d; y = y1 + (dx * cl - ex * bl) * d; } circumcenters[j] = x; circumcenters[j + 1] = y; } // Compute exterior cell rays. let h = hull[hull.length - 1]; let p0, p1 = h * 4; let x0, x1 = points[2 * h]; let y0, y1 = points[2 * h + 1]; vectors.fill(0); for (let i = 0; i < hull.length; ++i) { h = hull[i]; p0 = p1, x0 = x1, y0 = y1; p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1]; vectors[p0 + 2] = vectors[p1] = y0 - y1; vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0; } } render(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__["default"] : undefined; const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this; if (hull.length <= 1) return null; for (let i = 0, n = halfedges.length; i < n; ++i) { const j = halfedges[i]; if (j < i) continue; const ti = Math.floor(i / 3) * 2; const tj = Math.floor(j / 3) * 2; const xi = circumcenters[ti]; const yi = circumcenters[ti + 1]; const xj = circumcenters[tj]; const yj = circumcenters[tj + 1]; this._renderSegment(xi, yi, xj, yj, context); } let h0, h1 = hull[hull.length - 1]; for (let i = 0; i < hull.length; ++i) { h0 = h1, h1 = hull[i]; const t = Math.floor(inedges[h1] / 3) * 2; const x = circumcenters[t]; const y = circumcenters[t + 1]; const v = h0 * 4; const p = this._project(x, y, vectors[v + 2], vectors[v + 3]); if (p) this._renderSegment(x, y, p[0], p[1], context); } return buffer && buffer.value(); } renderBounds(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__["default"] : undefined; context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin); return buffer && buffer.value(); } renderCell(i, context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_0__["default"] : undefined; const points = this._clip(i); if (points === null || !points.length) return; context.moveTo(points[0], points[1]); let n = points.length; while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2; for (let i = 2; i < n; i += 2) { if (points[i] !== points[i-2] || points[i+1] !== points[i-1]) context.lineTo(points[i], points[i + 1]); } context.closePath(); return buffer && buffer.value(); } *cellPolygons() { const {delaunay: {points}} = this; for (let i = 0, n = points.length / 2; i < n; ++i) { const cell = this.cellPolygon(i); if (cell) cell.index = i, yield cell; } } cellPolygon(i) { const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_1__["default"]; this.renderCell(i, polygon); return polygon.value(); } _renderSegment(x0, y0, x1, y1, context) { let S; const c0 = this._regioncode(x0, y0); const c1 = this._regioncode(x1, y1); if (c0 === 0 && c1 === 0) { context.moveTo(x0, y0); context.lineTo(x1, y1); } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) { context.moveTo(S[0], S[1]); context.lineTo(S[2], S[3]); } } contains(i, x, y) { if ((x = +x, x !== x) || (y = +y, y !== y)) return false; return this.delaunay._step(i, x, y) === i; } *neighbors(i) { const ci = this._clip(i); if (ci) for (const j of this.delaunay.neighbors(i)) { const cj = this._clip(j); // find the common edge if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) { for (let aj = 0, lj = cj.length; aj < lj; aj += 2) { if (ci[ai] == cj[aj] && ci[ai + 1] == cj[aj + 1] && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj] && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj] ) { yield j; break loop; } } } } } _cell(i) { const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this; const e0 = inedges[i]; if (e0 === -1) return null; // coincident point const points = []; let e = e0; do { const t = Math.floor(e / 3); points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]); e = e % 3 === 2 ? e - 2 : e + 1; if (triangles[e] !== i) break; // bad triangulation e = halfedges[e]; } while (e !== e0 && e !== -1); return points; } _clip(i) { // degenerate case (1 valid point: return the box) if (i === 0 && this.delaunay.hull.length === 1) { return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; } const points = this._cell(i); if (points === null) return null; const {vectors: V} = this; const v = i * 4; return V[v] || V[v + 1] ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) : this._clipFinite(i, points); } _clipFinite(i, points) { const n = points.length; let P = null; let x0, y0, x1 = points[n - 2], y1 = points[n - 1]; let c0, c1 = this._regioncode(x1, y1); let e0, e1; for (let j = 0; j < n; j += 2) { x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1]; c0 = c1, c1 = this._regioncode(x1, y1); if (c0 === 0 && c1 === 0) { e0 = e1, e1 = 0; if (P) P.push(x1, y1); else P = [x1, y1]; } else { let S, sx0, sy0, sx1, sy1; if (c0 === 0) { if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue; [sx0, sy0, sx1, sy1] = S; } else { if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue; [sx1, sy1, sx0, sy0] = S; e0 = e1, e1 = this._edgecode(sx0, sy0); if (e0 && e1) this._edge(i, e0, e1, P, P.length); if (P) P.push(sx0, sy0); else P = [sx0, sy0]; } e0 = e1, e1 = this._edgecode(sx1, sy1); if (e0 && e1) this._edge(i, e0, e1, P, P.length); if (P) P.push(sx1, sy1); else P = [sx1, sy1]; } } if (P) { e0 = e1, e1 = this._edgecode(P[0], P[1]); if (e0 && e1) this._edge(i, e0, e1, P, P.length); } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; } return P; } _clipSegment(x0, y0, x1, y1, c0, c1) { while (true) { if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1]; if (c0 & c1) return null; let x, y, c = c0 || c1; if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax; else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin; else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax; else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin; if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0); else x1 = x, y1 = y, c1 = this._regioncode(x1, y1); } } _clipInfinite(i, points, vx0, vy0, vxn, vyn) { let P = Array.from(points), p; if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]); if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]); if (P = this._clipFinite(i, P)) { for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) { c0 = c1, c1 = this._edgecode(P[j], P[j + 1]); if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length; } } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]; } return P; } _edge(i, e0, e1, P, j) { while (e0 !== e1) { let x, y; switch (e0) { case 0b0101: e0 = 0b0100; continue; // top-left case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top case 0b0110: e0 = 0b0010; continue; // top-right case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right case 0b1010: e0 = 0b1000; continue; // bottom-right case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom case 0b1001: e0 = 0b0001; continue; // bottom-left case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left } if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) { P.splice(j, 0, x, y), j += 2; } } if (P.length > 4) { for (let i = 0; i < P.length; i+= 2) { const j = (i + 2) % P.length, k = (i + 4) % P.length; if (P[i] === P[j] && P[j] === P[k] || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) P.splice(j, 2), i -= 2; } } return j; } _project(x0, y0, vx, vy) { let t = Infinity, c, x, y; if (vy < 0) { // top if (y0 <= this.ymin) return null; if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx; } else if (vy > 0) { // bottom if (y0 >= this.ymax) return null; if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx; } if (vx > 0) { // right if (x0 >= this.xmax) return null; if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy; } else if (vx < 0) { // left if (x0 <= this.xmin) return null; if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy; } return [x, y]; } _edgecode(x, y) { return (x === this.xmin ? 0b0001 : x === this.xmax ? 0b0010 : 0b0000) | (y === this.ymin ? 0b0100 : y === this.ymax ? 0b1000 : 0b0000); } _regioncode(x, y) { return (x < this.xmin ? 0b0001 : x > this.xmax ? 0b0010 : 0b0000) | (y < this.ymin ? 0b0100 : y > this.ymax ? 0b1000 : 0b0000); } } /***/ }), /***/ "3oVi": /*!*************************************************!*\ !*** ./node_modules/d3-array/src/difference.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return difference; }); function difference(values, ...others) { values = new Set(values); for (const other of others) { for (const value of other) { values.delete(value); } } return values; } /***/ }), /***/ "3pBD": /*!**********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/count.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function count(node) { var sum = 0, children = node.children, i = children && children.length; if (!i) sum = 1; else while (--i >= 0) sum += children[i].value; node.value = sum; } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.eachAfter(count); }); /***/ }), /***/ "3xmg": /*!**********************************************!*\ !*** ./node_modules/d3-scale/src/ordinal.js ***! \**********************************************/ /*! exports provided: implicit, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "implicit", function() { return implicit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ordinal; }); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./init.js */ "1Ix/"); const implicit = Symbol("implicit"); function ordinal() { var index = new Map(), domain = [], range = [], unknown = implicit; function scale(d) { var key = d + "", i = index.get(key); if (!i) { if (unknown !== implicit) return unknown; index.set(key, i = domain.push(d)); } return range[(i - 1) % range.length]; } scale.domain = function(_) { if (!arguments.length) return domain.slice(); domain = [], index = new Map(); for (const value of _) { const key = value + ""; if (index.has(key)) continue; index.set(key, domain.push(value)); } return scale; }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), scale) : range.slice(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return ordinal(domain, range).unknown(unknown); }; _init_js__WEBPACK_IMPORTED_MODULE_0__["initRange"].apply(scale, arguments); return scale; } /***/ }), /***/ "42CK": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/rgb.js ***! \************************************************/ /*! exports provided: default, rgbBasis, rgbBasisClosed */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasis", function() { return rgbBasis; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasisClosed", function() { return rgbBasisClosed; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "yEp2"); /* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ "S83q"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ "sFV2"); /* harmony default export */ __webpack_exports__["default"] = ((function rgbGamma(y) { var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["gamma"])(y); function rgb(start, end) { var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(end)).r), g = color(start.g, end.g), b = color(start.b, end.b), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["default"])(start.opacity, end.opacity); return function(t) { start.r = r(t); start.g = g(t); start.b = b(t); start.opacity = opacity(t); return start + ""; }; } rgb.gamma = rgbGamma; return rgb; })(1)); function rgbSpline(spline) { return function(colors) { var n = colors.length, r = new Array(n), g = new Array(n), b = new Array(n), i, color; for (i = 0; i < n; ++i) { color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(colors[i]); r[i] = color.r || 0; g[i] = color.g || 0; b[i] = color.b || 0; } r = spline(r); g = spline(g); b = spline(b); color.opacity = 1; return function(t) { color.r = r(t); color.g = g(t); color.b = b(t); return color + ""; }; }; } var rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__["default"]); var rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__["default"]); /***/ }), /***/ "44y/": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/area.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curve/linear.js */ "SDD1"); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./line.js */ "+ugm"); /* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./point.js */ "/aQN"); /* harmony default export */ __webpack_exports__["default"] = (function(x0, y0, y1) { var x1 = null, defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(true), context = null, curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_3__["default"], output = null; x0 = typeof x0 === "function" ? x0 : (x0 === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_5__["x"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+x0); y0 = typeof y0 === "function" ? y0 : (y0 === undefined) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(0) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+y0); y1 = typeof y1 === "function" ? y1 : (y1 === undefined) ? _point_js__WEBPACK_IMPORTED_MODULE_5__["y"] : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+y1); function area(data) { var i, j, k, n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data)).length, d, defined0 = false, buffer, x0z = new Array(n), y0z = new Array(n); if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); for (i = 0; i <= n; ++i) { if (!(i < n && defined(d = data[i], i, data)) === defined0) { if (defined0 = !defined0) { j = i; output.areaStart(); output.lineStart(); } else { output.lineEnd(); output.lineStart(); for (k = i - 1; k >= j; --k) { output.point(x0z[k], y0z[k]); } output.lineEnd(); output.areaEnd(); } } if (defined0) { x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); } } if (buffer) return output = null, buffer + "" || null; } function arealine() { return Object(_line_js__WEBPACK_IMPORTED_MODULE_4__["default"])().defined(defined).curve(curve).context(context); } area.x = function(_) { return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), x1 = null, area) : x0; }; area.x0 = function(_) { return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : x0; }; area.x1 = function(_) { return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : x1; }; area.y = function(_) { return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), y1 = null, area) : y0; }; area.y0 = function(_) { return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : y0; }; area.y1 = function(_) { return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), area) : y1; }; area.lineX0 = area.lineY0 = function() { return arealine().x(x0).y(y0); }; area.lineY1 = function() { return arealine().x(x0).y(y1); }; area.lineX1 = function() { return arealine().x(x1).y(y0); }; area.defined = function(_) { return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(!!_), area) : defined; }; area.curve = function(_) { return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; }; area.context = function(_) { return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; }; return area; }); /***/ }), /***/ "4A3s": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/ignoreElements.js ***! \*************************************************************************/ /*! exports provided: ignoreElements */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function ignoreElements() { return function ignoreElementsOperatorFunction(source) { return source.lift(new IgnoreElementsOperator()); }; } class IgnoreElementsOperator { call(subscriber, source) { return source.subscribe(new IgnoreElementsSubscriber(subscriber)); } } class IgnoreElementsSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { _next(unused) { } } //# sourceMappingURL=ignoreElements.js.map /***/ }), /***/ "4I5i": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/ArgumentOutOfRangeError.js ***! \*****************************************************************************/ /*! exports provided: ArgumentOutOfRangeError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; }); const ArgumentOutOfRangeErrorImpl = (() => { function ArgumentOutOfRangeErrorImpl() { Error.call(this); this.message = 'argument out of range'; this.name = 'ArgumentOutOfRangeError'; return this; } ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype); return ArgumentOutOfRangeErrorImpl; })(); const ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; //# sourceMappingURL=ArgumentOutOfRangeError.js.map /***/ }), /***/ "4JcG": /*!**************************************************!*\ !*** ./node_modules/d3-delaunay/src/delaunay.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Delaunay; }); /* harmony import */ var delaunator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! delaunator */ "jqAh"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "8SsQ"); /* harmony import */ var _polygon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polygon.js */ "WDTS"); /* harmony import */ var _voronoi_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./voronoi.js */ "3Ygs"); const tau = 2 * Math.PI, pow = Math.pow; function pointX(p) { return p[0]; } function pointY(p) { return p[1]; } // A triangulation is collinear if all its triangles have a non-null area function collinear(d) { const {triangles, coords} = d; for (let i = 0; i < triangles.length; i += 3) { const a = 2 * triangles[i], b = 2 * triangles[i + 1], c = 2 * triangles[i + 2], cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]); if (cross > 1e-10) return false; } return true; } function jitter(x, y, r) { return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r]; } class Delaunay { static from(points, fx = pointX, fy = pointY, that) { return new Delaunay("length" in points ? flatArray(points, fx, fy, that) : Float64Array.from(flatIterable(points, fx, fy, that))); } constructor(points) { this._delaunator = new delaunator__WEBPACK_IMPORTED_MODULE_0__["default"](points); this.inedges = new Int32Array(points.length / 2); this._hullIndex = new Int32Array(points.length / 2); this.points = this._delaunator.coords; this._init(); } update() { this._delaunator.update(); this._init(); return this; } _init() { const d = this._delaunator, points = this.points; // check for collinear if (d.hull && d.hull.length > 2 && collinear(d)) { this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i) .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors const e = this.collinear[0], f = this.collinear[this.collinear.length - 1], bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ], r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]); for (let i = 0, n = points.length / 2; i < n; ++i) { const p = jitter(points[2 * i], points[2 * i + 1], r); points[2 * i] = p[0]; points[2 * i + 1] = p[1]; } this._delaunator = new delaunator__WEBPACK_IMPORTED_MODULE_0__["default"](points); } else { delete this.collinear; } const halfedges = this.halfedges = this._delaunator.halfedges; const hull = this.hull = this._delaunator.hull; const triangles = this.triangles = this._delaunator.triangles; const inedges = this.inedges.fill(-1); const hullIndex = this._hullIndex.fill(-1); // Compute an index from each point to an (arbitrary) incoming halfedge // Used to give the first neighbor of each point; for this reason, // on the hull we give priority to exterior halfedges for (let e = 0, n = halfedges.length; e < n; ++e) { const p = triangles[e % 3 === 2 ? e - 2 : e + 1]; if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e; } for (let i = 0, n = hull.length; i < n; ++i) { hullIndex[hull[i]] = i; } // degenerate case: 1 or 2 (distinct) points if (hull.length <= 2 && hull.length > 0) { this.triangles = new Int32Array(3).fill(-1); this.halfedges = new Int32Array(3).fill(-1); this.triangles[0] = hull[0]; this.triangles[1] = hull[1]; this.triangles[2] = hull[1]; inedges[hull[0]] = 1; if (hull.length === 2) inedges[hull[1]] = 0; } } voronoi(bounds) { return new _voronoi_js__WEBPACK_IMPORTED_MODULE_3__["default"](this, bounds); } *neighbors(i) { const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this; // degenerate case with several collinear points if (collinear) { const l = collinear.indexOf(i); if (l > 0) yield collinear[l - 1]; if (l < collinear.length - 1) yield collinear[l + 1]; return; } const e0 = inedges[i]; if (e0 === -1) return; // coincident point let e = e0, p0 = -1; do { yield p0 = triangles[e]; e = e % 3 === 2 ? e - 2 : e + 1; if (triangles[e] !== i) return; // bad triangulation e = halfedges[e]; if (e === -1) { const p = hull[(_hullIndex[i] + 1) % hull.length]; if (p !== p0) yield p; return; } } while (e !== e0); } find(x, y, i = 0) { if ((x = +x, x !== x) || (y = +y, y !== y)) return -1; const i0 = i; let c; while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c; return c; } _step(i, x, y) { const {inedges, hull, _hullIndex, halfedges, triangles, points} = this; if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1); let c = i; let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2); const e0 = inedges[i]; let e = e0; do { let t = triangles[e]; const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2); if (dt < dc) dc = dt, c = t; e = e % 3 === 2 ? e - 2 : e + 1; if (triangles[e] !== i) break; // bad triangulation e = halfedges[e]; if (e === -1) { e = hull[(_hullIndex[i] + 1) % hull.length]; if (e !== t) { if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e; } break; } } while (e !== e0); return c; } render(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {points, halfedges, triangles} = this; for (let i = 0, n = halfedges.length; i < n; ++i) { const j = halfedges[i]; if (j < i) continue; const ti = triangles[i] * 2; const tj = triangles[j] * 2; context.moveTo(points[ti], points[ti + 1]); context.lineTo(points[tj], points[tj + 1]); } this.renderHull(context); return buffer && buffer.value(); } renderPoints(context, r = 2) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {points} = this; for (let i = 0, n = points.length; i < n; i += 2) { const x = points[i], y = points[i + 1]; context.moveTo(x + r, y); context.arc(x, y, r, 0, tau); } return buffer && buffer.value(); } renderHull(context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {hull, points} = this; const h = hull[0] * 2, n = hull.length; context.moveTo(points[h], points[h + 1]); for (let i = 1; i < n; ++i) { const h = 2 * hull[i]; context.lineTo(points[h], points[h + 1]); } context.closePath(); return buffer && buffer.value(); } hullPolygon() { const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_2__["default"]; this.renderHull(polygon); return polygon.value(); } renderTriangle(i, context) { const buffer = context == null ? context = new _path_js__WEBPACK_IMPORTED_MODULE_1__["default"] : undefined; const {points, triangles} = this; const t0 = triangles[i *= 3] * 2; const t1 = triangles[i + 1] * 2; const t2 = triangles[i + 2] * 2; context.moveTo(points[t0], points[t0 + 1]); context.lineTo(points[t1], points[t1 + 1]); context.lineTo(points[t2], points[t2 + 1]); context.closePath(); return buffer && buffer.value(); } *trianglePolygons() { const {triangles} = this; for (let i = 0, n = triangles.length / 3; i < n; ++i) { yield this.trianglePolygon(i); } } trianglePolygon(i) { const polygon = new _polygon_js__WEBPACK_IMPORTED_MODULE_2__["default"]; this.renderTriangle(i, polygon); return polygon.value(); } } function flatArray(points, fx, fy, that) { const n = points.length; const array = new Float64Array(n * 2); for (let i = 0; i < n; ++i) { const p = points[i]; array[i * 2] = fx.call(that, p, i, points); array[i * 2 + 1] = fy.call(that, p, i, points); } return array; } function* flatIterable(points, fx, fy, that) { let i = 0; for (const p of points) { yield fx.call(that, p, i, points); yield fy.call(that, p, i, points); ++i; } } /***/ }), /***/ "4O5X": /*!****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/bindNodeCallback.js ***! \****************************************************************************/ /*! exports provided: bindNodeCallback */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); /* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "8Qeq"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); function bindNodeCallback(callbackFunc, resultSelector, scheduler) { if (resultSelector) { if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) { scheduler = resultSelector; } else { return (...args) => bindNodeCallback(callbackFunc, scheduler)(...args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } } return function (...args) { const params = { subject: undefined, args, callbackFunc, scheduler, context: this, }; return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const { context } = params; let { subject } = params; if (!scheduler) { if (!subject) { subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { const err = innerArgs.shift(); if (err) { subject.error(err); return; } subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); subject.complete(); }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) { subject.error(err); } else { console.warn(err); } } } return subject.subscribe(subscriber); } else { return scheduler.schedule(dispatch, 0, { params, subscriber, context }); } }); }; } function dispatch(state) { const { params, subscriber, context } = state; const { callbackFunc, args, scheduler } = params; let subject = params.subject; if (!subject) { subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { const err = innerArgs.shift(); if (err) { this.add(scheduler.schedule(dispatchError, 0, { err, subject })); } else { const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; this.add(scheduler.schedule(dispatchNext, 0, { value, subject })); } }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { this.add(scheduler.schedule(dispatchError, 0, { err, subject })); } } this.add(subject.subscribe(subscriber)); } function dispatchNext(arg) { const { value, subject } = arg; subject.next(value); subject.complete(); } function dispatchError(arg) { const { err, subject } = arg; subject.error(err); } //# sourceMappingURL=bindNodeCallback.js.map /***/ }), /***/ "4S0P": /*!***********************************************!*\ !*** ./node_modules/d3-random/src/poisson.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _binomial_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./binomial.js */ "BTWs"); /* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gamma.js */ "b54z"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomPoisson(source) { var G = _gamma_js__WEBPACK_IMPORTED_MODULE_2__["default"].source(source), B = _binomial_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomPoisson(lambda) { return function() { var acc = 0, l = lambda; while (l > 16) { var n = Math.floor(0.875 * l), t = G(n)(); if (t > l) return acc + B(n - 1, l / t)(); acc += n; l -= t; } for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source()); return acc + k; }; } randomPoisson.source = sourceRandomPoisson; return randomPoisson; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "4TqM": /*!********************************************!*\ !*** ./node_modules/d3-array/src/group.js ***! \********************************************/ /*! exports provided: default, groups, rollup, rollups, index, indexes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return group; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return groups; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return rollup; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return rollups; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "index", function() { return index; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return indexes; }); /* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! internmap */ "vobT"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "i202"); function group(values, ...keys) { return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], keys); } function groups(values, ...keys) { return nest(values, Array.from, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], keys); } function rollup(values, reduce, ...keys) { return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], reduce, keys); } function rollups(values, reduce, ...keys) { return nest(values, Array.from, reduce, keys); } function index(values, ...keys) { return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], unique, keys); } function indexes(values, ...keys) { return nest(values, Array.from, unique, keys); } function unique(values) { if (values.length !== 1) throw new Error("duplicate key"); return values[0]; } function nest(values, map, reduce, keys) { return (function regroup(values, i) { if (i >= keys.length) return reduce(values); const groups = new internmap__WEBPACK_IMPORTED_MODULE_0__["InternMap"](); const keyof = keys[i++]; let index = -1; for (const value of values) { const key = keyof(value, ++index, values); const group = groups.get(key); if (group) group.push(value); else groups.set(key, [value]); } for (const [key, values] of groups) { groups.set(key, regroup(values, i)); } return map(groups); })(values, 0); } /***/ }), /***/ "4bGx": /*!*****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/transition.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function() { var name = this._name, id0 = this._id, id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(); for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["get"])(node, id0); Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id1, i, group, { time: inherit.time + inherit.delay + inherit.duration, delay: 0, duration: inherit.duration, ease: inherit.ease }); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id1); }); /***/ }), /***/ "4bmp": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/offset/diverging.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0)) return; for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { for (yp = yn = 0, i = 0; i < n; ++i) { if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { d[0] = yp, d[1] = yp += dy; } else if (dy < 0) { d[1] = yn, d[0] = yn += dy; } else { d[0] = 0, d[1] = dy; } } } }); /***/ }), /***/ "4f8F": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/race.js ***! \***************************************************************/ /*! exports provided: race */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/race */ "Nv8m"); function race(...observables) { return function raceOperatorFunction(source) { if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { observables = observables[0]; } return source.lift.call(Object(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"])(source, ...observables)); }; } //# sourceMappingURL=race.js.map /***/ }), /***/ "4hIw": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timeInterval.js ***! \***********************************************************************/ /*! exports provided: timeInterval, TimeInterval */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scan */ "Kqap"); /* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/defer */ "NXyV"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map */ "lJxs"); function timeInterval(scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return (source) => Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(() => { return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(({ current }, value) => ({ value, current: scheduler.now(), last: current }), { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(({ current, last, value }) => new TimeInterval(value, current - last))); }); } class TimeInterval { constructor(value, interval) { this.value = value; this.interval = interval; } } //# sourceMappingURL=timeInterval.js.map /***/ }), /***/ "4jfb": /*!**************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conicConformal.js ***! \**************************************************************/ /*! exports provided: conicConformalRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicConformalRaw", function() { return conicConformalRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "bN2o"); /* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator.js */ "LZ5Q"); function tany(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + y) / 2); } function conicConformalRaw(y0, y1) { var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(cy0 / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(tany(y1) / tany(y0)), f = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y0), n) / n; if (!n) return _mercator_js__WEBPACK_IMPORTED_MODULE_2__["mercatorRaw"]; function project(x, y) { if (f > 0) { if (y < -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } else { if (y > _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; } var r = f / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y), n); return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(n * x), f - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(n * x)]; } project.invert = function(x, y) { var fy = f - y, r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + fy * fy), l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(fy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(fy); if (fy * n < 0) l -= _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(fy); return [l / n, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(f / r, 1 / n)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; }; return project; } /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicConformalRaw) .scale(109.5) .parallels([30, 30]); }); /***/ }), /***/ "4m7i": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/number.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return number; }); function number(x) { return +x; } /***/ }), /***/ "4xGt": /*!*****************************************************!*\ !*** ./node_modules/d3-selection/src/namespaces.js ***! \*****************************************************/ /*! exports provided: xhtml, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xhtml", function() { return xhtml; }); var xhtml = "http://www.w3.org/1999/xhtml"; /* harmony default export */ __webpack_exports__["default"] = ({ svg: "http://www.w3.org/2000/svg", xhtml: xhtml, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" }); /***/ }), /***/ "4xfg": /*!***************************************************!*\ !*** ./node_modules/d3-interpolate/src/number.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a = +a, b = +b, function(t) { return a * (1 - t) + b * t; }; }); /***/ }), /***/ "4yVj": /*!**************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/schedulePromise.js ***! \**************************************************************************/ /*! exports provided: schedulePromise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function schedulePromise(input, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); sub.add(scheduler.schedule(() => input.then(value => { sub.add(scheduler.schedule(() => { subscriber.next(value); sub.add(scheduler.schedule(() => subscriber.complete())); })); }, err => { sub.add(scheduler.schedule(() => subscriber.error(err))); }))); return sub; }); } //# sourceMappingURL=schedulePromise.js.map /***/ }), /***/ "5+tZ": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMap.js ***! \*******************************************************************/ /*! exports provided: mergeMap, MergeMapOperator, MergeMapSubscriber, flatMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return flatMap; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) { if (typeof resultSelector === 'function') { return (source) => source.pipe(mergeMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))), concurrent)); } else if (typeof resultSelector === 'number') { concurrent = resultSelector; } return (source) => source.lift(new MergeMapOperator(project, concurrent)); } class MergeMapOperator { constructor(project, concurrent = Number.POSITIVE_INFINITY) { this.project = project; this.concurrent = concurrent; } call(observer, source) { return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent)); } } class MergeMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) { super(destination); this.project = project; this.concurrent = concurrent; this.hasCompleted = false; this.buffer = []; this.active = 0; this.index = 0; } _next(value) { if (this.active < this.concurrent) { this._tryNext(value); } else { this.buffer.push(value); } } _tryNext(value) { let result; const index = this.index++; try { result = this.project(value, index); } catch (err) { this.destination.error(err); return; } this.active++; this._innerSub(result); } _innerSub(ish) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(ish, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } _complete() { this.hasCompleted = true; if (this.active === 0 && this.buffer.length === 0) { this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { this.destination.next(innerValue); } notifyComplete() { const buffer = this.buffer; this.active--; if (buffer.length > 0) { this._next(buffer.shift()); } else if (this.active === 0 && this.hasCompleted) { this.destination.complete(); } } } const flatMap = mergeMap; //# sourceMappingURL=mergeMap.js.map /***/ }), /***/ "5/wc": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/extent.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle.js */ "F2eR"); /* harmony default export */ __webpack_exports__["default"] = (function() { var x0 = 0, y0 = 0, x1 = 960, y1 = 500, cache, cacheStream, clip; return clip = { stream: function(stream) { return cache && cacheStream === stream ? cache : cache = Object(_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0, y0, x1, y1)(cacheStream = stream); }, extent: function(_) { return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]]; } }; }); /***/ }), /***/ "50A1": /*!***********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***! \***********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fee0d2fc9272de2d26", "fee5d9fcae91fb6a4acb181d", "fee5d9fcae91fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "51Bx": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeScan.js ***! \********************************************************************/ /*! exports provided: mergeScan, MergeScanOperator, MergeScanSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function mergeScan(accumulator, seed, concurrent = Number.POSITIVE_INFINITY) { return (source) => source.lift(new MergeScanOperator(accumulator, seed, concurrent)); } class MergeScanOperator { constructor(accumulator, seed, concurrent) { this.accumulator = accumulator; this.seed = seed; this.concurrent = concurrent; } call(subscriber, source) { return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent)); } } class MergeScanSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, accumulator, acc, concurrent) { super(destination); this.accumulator = accumulator; this.acc = acc; this.concurrent = concurrent; this.hasValue = false; this.hasCompleted = false; this.buffer = []; this.active = 0; this.index = 0; } _next(value) { if (this.active < this.concurrent) { const index = this.index++; const destination = this.destination; let ish; try { const { accumulator } = this; ish = accumulator(this.acc, value, index); } catch (e) { return destination.error(e); } this.active++; this._innerSub(ish); } else { this.buffer.push(value); } } _innerSub(ish) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(ish, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } _complete() { this.hasCompleted = true; if (this.active === 0 && this.buffer.length === 0) { if (this.hasValue === false) { this.destination.next(this.acc); } this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { const { destination } = this; this.acc = innerValue; this.hasValue = true; destination.next(innerValue); } notifyComplete() { const buffer = this.buffer; this.active--; if (buffer.length > 0) { this._next(buffer.shift()); } else if (this.active === 0 && this.hasCompleted) { if (this.hasValue === false) { this.destination.next(this.acc); } this.destination.complete(); } } } //# sourceMappingURL=mergeScan.js.map /***/ }), /***/ "51Dv": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/InnerSubscriber.js ***! \****************************************************************/ /*! exports provided: InnerSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); class InnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent, outerValue, outerIndex) { super(); this.parent = parent; this.outerValue = outerValue; this.outerIndex = outerIndex; this.index = 0; } _next(value) { this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this); } _error(error) { this.parent.notifyError(error, this); this.unsubscribe(); } _complete() { this.parent.notifyComplete(this); this.unsubscribe(); } } //# sourceMappingURL=InnerSubscriber.js.map /***/ }), /***/ "5B2Y": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleObservable.js ***! \*****************************************************************************/ /*! exports provided: scheduleObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); function scheduleObservable(input, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); sub.add(scheduler.schedule(() => { const observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]](); sub.add(observable.subscribe({ next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); }, error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); }, complete() { sub.add(scheduler.schedule(() => subscriber.complete())); }, })); })); return sub; }); } //# sourceMappingURL=scheduleObservable.js.map /***/ }), /***/ "5D8y": /*!**************************************************!*\ !*** ./node_modules/d3-geo/src/path/centroid.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); // TODO Enforce positive area for exterior, negative area for interior? var X0 = 0, Y0 = 0, Z0 = 0, X1 = 0, Y1 = 0, Z1 = 0, X2 = 0, Y2 = 0, Z2 = 0, x00, y00, x0, y0; var centroidStream = { point: centroidPoint, lineStart: centroidLineStart, lineEnd: centroidLineEnd, polygonStart: function() { centroidStream.lineStart = centroidRingStart; centroidStream.lineEnd = centroidRingEnd; }, polygonEnd: function() { centroidStream.point = centroidPoint; centroidStream.lineStart = centroidLineStart; centroidStream.lineEnd = centroidLineEnd; }, result: function() { var centroid = Z2 ? [X2 / Z2, Y2 / Z2] : Z1 ? [X1 / Z1, Y1 / Z1] : Z0 ? [X0 / Z0, Y0 / Z0] : [NaN, NaN]; X0 = Y0 = Z0 = X1 = Y1 = Z1 = X2 = Y2 = Z2 = 0; return centroid; } }; function centroidPoint(x, y) { X0 += x; Y0 += y; ++Z0; } function centroidLineStart() { centroidStream.point = centroidPointFirstLine; } function centroidPointFirstLine(x, y) { centroidStream.point = centroidPointLine; centroidPoint(x0 = x, y0 = y); } function centroidPointLine(x, y) { var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); X1 += z * (x0 + x) / 2; Y1 += z * (y0 + y) / 2; Z1 += z; centroidPoint(x0 = x, y0 = y); } function centroidLineEnd() { centroidStream.point = centroidPoint; } function centroidRingStart() { centroidStream.point = centroidPointFirstRing; } function centroidRingEnd() { centroidPointRing(x00, y00); } function centroidPointFirstRing(x, y) { centroidStream.point = centroidPointRing; centroidPoint(x00 = x0 = x, y00 = y0 = y); } function centroidPointRing(x, y) { var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy); X1 += z * (x0 + x) / 2; Y1 += z * (y0 + y) / 2; Z1 += z; z = y0 * x - x0 * y; X2 += z * (x0 + x); Y2 += z * (y0 + y); Z2 += z * 3; centroidPoint(x0 = x, y0 = y); } /* harmony default export */ __webpack_exports__["default"] = (centroidStream); /***/ }), /***/ "5Iso": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/index.js ***! \**********************************************************/ /*! exports provided: root, Selection, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "root", function() { return root; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; }); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select.js */ "uvNp"); /* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll.js */ "+w/h"); /* harmony import */ var _selectChild_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./selectChild.js */ "sb9E"); /* harmony import */ var _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectChildren.js */ "bBIG"); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./filter.js */ "DN/c"); /* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data.js */ "EgnQ"); /* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./enter.js */ "9om9"); /* harmony import */ var _exit_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./exit.js */ "87ba"); /* harmony import */ var _join_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./join.js */ "P3dq"); /* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./merge.js */ "i3vF"); /* harmony import */ var _order_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./order.js */ "oUm1"); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sort.js */ "yp+X"); /* harmony import */ var _call_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./call.js */ "Ct04"); /* harmony import */ var _nodes_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./nodes.js */ "mwYI"); /* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./node.js */ "luAU"); /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./size.js */ "mrS5"); /* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./empty.js */ "yhWi"); /* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./each.js */ "zv5K"); /* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./attr.js */ "+HKQ"); /* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./style.js */ "Nkvg"); /* harmony import */ var _property_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./property.js */ "zcMM"); /* harmony import */ var _classed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./classed.js */ "ULlS"); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./text.js */ "YbCY"); /* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./html.js */ "skEf"); /* harmony import */ var _raise_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./raise.js */ "GRP9"); /* harmony import */ var _lower_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./lower.js */ "F8PK"); /* harmony import */ var _append_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./append.js */ "230S"); /* harmony import */ var _insert_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./insert.js */ "WmHh"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./remove.js */ "JZGO"); /* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./clone.js */ "6hMD"); /* harmony import */ var _datum_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./datum.js */ "yAGa"); /* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./on.js */ "AWXE"); /* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./dispatch.js */ "TisH"); /* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./iterator.js */ "oAyw"); var root = [null]; function Selection(groups, parents) { this._groups = groups; this._parents = parents; } function selection() { return new Selection([[document.documentElement]], root); } function selection_selection() { return this; } Selection.prototype = selection.prototype = { constructor: Selection, select: _select_js__WEBPACK_IMPORTED_MODULE_0__["default"], selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_1__["default"], selectChild: _selectChild_js__WEBPACK_IMPORTED_MODULE_2__["default"], selectChildren: _selectChildren_js__WEBPACK_IMPORTED_MODULE_3__["default"], filter: _filter_js__WEBPACK_IMPORTED_MODULE_4__["default"], data: _data_js__WEBPACK_IMPORTED_MODULE_5__["default"], enter: _enter_js__WEBPACK_IMPORTED_MODULE_6__["default"], exit: _exit_js__WEBPACK_IMPORTED_MODULE_7__["default"], join: _join_js__WEBPACK_IMPORTED_MODULE_8__["default"], merge: _merge_js__WEBPACK_IMPORTED_MODULE_9__["default"], selection: selection_selection, order: _order_js__WEBPACK_IMPORTED_MODULE_10__["default"], sort: _sort_js__WEBPACK_IMPORTED_MODULE_11__["default"], call: _call_js__WEBPACK_IMPORTED_MODULE_12__["default"], nodes: _nodes_js__WEBPACK_IMPORTED_MODULE_13__["default"], node: _node_js__WEBPACK_IMPORTED_MODULE_14__["default"], size: _size_js__WEBPACK_IMPORTED_MODULE_15__["default"], empty: _empty_js__WEBPACK_IMPORTED_MODULE_16__["default"], each: _each_js__WEBPACK_IMPORTED_MODULE_17__["default"], attr: _attr_js__WEBPACK_IMPORTED_MODULE_18__["default"], style: _style_js__WEBPACK_IMPORTED_MODULE_19__["default"], property: _property_js__WEBPACK_IMPORTED_MODULE_20__["default"], classed: _classed_js__WEBPACK_IMPORTED_MODULE_21__["default"], text: _text_js__WEBPACK_IMPORTED_MODULE_22__["default"], html: _html_js__WEBPACK_IMPORTED_MODULE_23__["default"], raise: _raise_js__WEBPACK_IMPORTED_MODULE_24__["default"], lower: _lower_js__WEBPACK_IMPORTED_MODULE_25__["default"], append: _append_js__WEBPACK_IMPORTED_MODULE_26__["default"], insert: _insert_js__WEBPACK_IMPORTED_MODULE_27__["default"], remove: _remove_js__WEBPACK_IMPORTED_MODULE_28__["default"], clone: _clone_js__WEBPACK_IMPORTED_MODULE_29__["default"], datum: _datum_js__WEBPACK_IMPORTED_MODULE_30__["default"], on: _on_js__WEBPACK_IMPORTED_MODULE_31__["default"], dispatch: _dispatch_js__WEBPACK_IMPORTED_MODULE_32__["default"], [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_33__["default"] }; /* harmony default export */ __webpack_exports__["default"] = (selection); /***/ }), /***/ "5NTL": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/curve/bump.js ***! \*************************************************/ /*! exports provided: bumpX, bumpY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bumpX", function() { return bumpX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bumpY", function() { return bumpY; }); class Bump { constructor(context, x) { this._context = context; this._x = x; } areaStart() { this._line = 0; } areaEnd() { this._line = NaN; } lineStart() { this._point = 0; } lineEnd() { if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; } point(x, y) { x = +x, y = +y; switch (this._point) { case 0: { this._point = 1; if (this._line) this._context.lineTo(x, y); else this._context.moveTo(x, y); break; } case 1: this._point = 2; // proceed default: { if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y); else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y); break; } } this._x0 = x, this._y0 = y; } } function bumpX(context) { return new Bump(context, true); } function bumpY(context) { return new Bump(context, false); } /***/ }), /***/ "5Xrj": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/poly.js ***! \******************************************/ /*! exports provided: polyIn, polyOut, polyInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyIn", function() { return polyIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyOut", function() { return polyOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyInOut", function() { return polyInOut; }); var exponent = 3; var polyIn = (function custom(e) { e = +e; function polyIn(t) { return Math.pow(t, e); } polyIn.exponent = custom; return polyIn; })(exponent); var polyOut = (function custom(e) { e = +e; function polyOut(t) { return 1 - Math.pow(1 - t, e); } polyOut.exponent = custom; return polyOut; })(exponent); var polyInOut = (function custom(e) { e = +e; function polyInOut(t) { return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; } polyInOut.exponent = custom; return polyInOut; })(exponent); /***/ }), /***/ "5aFE": /*!******************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/interpolate.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var c; return (typeof b === "number" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"] : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"] : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"]) : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateString"])(a, b); }); /***/ }), /***/ "5xK/": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/rejoin.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual.js */ "fnXD"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); function Intersection(point, points, other, entry) { this.x = point; this.z = points; this.o = other; // another intersection this.e = entry; // is an entry? this.v = false; // visited this.n = this.p = null; // next & previous } // A generalized polygon clipping algorithm: given a polygon that has been cut // into its visible line segments, and rejoins the segments by interpolating // along the clip edge. /* harmony default export */ __webpack_exports__["default"] = (function(segments, compareIntersection, startInside, interpolate, stream) { var subject = [], clip = [], i, n; segments.forEach(function(segment) { if ((n = segment.length - 1) <= 0) return; var n, p0 = segment[0], p1 = segment[n], x; if (Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__["default"])(p0, p1)) { if (!p0[2] && !p1[2]) { stream.lineStart(); for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); stream.lineEnd(); return; } // handle degenerate cases by moving the point p1[0] += 2 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; } subject.push(x = new Intersection(p0, segment, null, true)); clip.push(x.o = new Intersection(p0, null, x, false)); subject.push(x = new Intersection(p1, segment, null, false)); clip.push(x.o = new Intersection(p1, null, x, true)); }); if (!subject.length) return; clip.sort(compareIntersection); link(subject); link(clip); for (i = 0, n = clip.length; i < n; ++i) { clip[i].e = startInside = !startInside; } var start = subject[0], points, point; while (1) { // Find first unvisited intersection. var current = start, isSubject = true; while (current.v) if ((current = current.n) === start) return; points = current.z; stream.lineStart(); do { current.v = current.o.v = true; if (current.e) { if (isSubject) { for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); } else { interpolate(current.x, current.n.x, 1, stream); } current = current.n; } else { if (isSubject) { points = current.p.z; for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); } else { interpolate(current.x, current.p.x, -1, stream); } current = current.p; } current = current.o; points = current.z; isSubject = !isSubject; } while (!current.v); stream.lineEnd(); } }); function link(array) { if (!(n = array.length)) return; var n, i = 0, a = array[0], b; while (++i < n) { a.n = b = array[i]; b.p = a; a = b; } a.n = b = array[0]; b.p = a; } /***/ }), /***/ "5yfJ": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/never.js ***! \*****************************************************************/ /*! exports provided: NEVER, never */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ "KqfI"); const NEVER = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]); function never() { return NEVER; } //# sourceMappingURL=never.js.map /***/ }), /***/ "62fh": /*!*****************************************!*\ !*** ./node_modules/d3-ease/src/sin.js ***! \*****************************************/ /*! exports provided: sinIn, sinOut, sinInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinIn", function() { return sinIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinOut", function() { return sinOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinInOut", function() { return sinInOut; }); var pi = Math.PI, halfPi = pi / 2; function sinIn(t) { return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi); } function sinOut(t) { return Math.sin(t * halfPi); } function sinInOut(t) { return (1 - Math.cos(pi * t)) / 2; } /***/ }), /***/ "6YF4": /*!*************************************************!*\ !*** ./node_modules/d3-scale/src/continuous.js ***! \*************************************************/ /*! exports provided: identity, copy, transformer, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return continuous; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "TfGn"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ "4m7i"); var unit = [0, 1]; function identity(x) { return x; } function normalize(a, b) { return (b -= (a = +a)) ? function(x) { return (x - a) / b; } : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(isNaN(b) ? NaN : 0.5); } function clamper(a, b) { var t; if (a > b) t = a, a = b, b = t; return function(x) { return Math.max(a, Math.min(b, x)); }; } // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. function bimap(domain, range, interpolate) { var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); return function(x) { return r0(d0(x)); }; } function polymap(domain, range, interpolate) { var j = Math.min(domain.length, range.length) - 1, d = new Array(j), r = new Array(j), i = -1; // Reverse descending domains. if (domain[j] < domain[0]) { domain = domain.slice().reverse(); range = range.slice().reverse(); } while (++i < j) { d[i] = normalize(domain[i], domain[i + 1]); r[i] = interpolate(range[i], range[i + 1]); } return function(x) { var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 1, j) - 1; return r[i](d[i](x)); }; } function copy(source, target) { return target .domain(source.domain()) .range(source.range()) .interpolate(source.interpolate()) .clamp(source.clamp()) .unknown(source.unknown()); } function transformer() { var domain = unit, range = unit, interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolate"], transform, untransform, unknown, clamp = identity, piecewise, output, input; function rescale() { var n = Math.min(domain.length, range.length); if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]); piecewise = n > 2 ? polymap : bimap; output = input = null; return scale; } function scale(x) { return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); } scale.invert = function(y) { return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"])))(y))); }; scale.domain = function(_) { return arguments.length ? (domain = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_3__["default"]), rescale()) : domain.slice(); }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); }; scale.rangeRound = function(_) { return range = Array.from(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRound"], rescale(); }; scale.clamp = function(_) { return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; }; scale.interpolate = function(_) { return arguments.length ? (interpolate = _, rescale()) : interpolate; }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; return function(t, u) { transform = t, untransform = u; return rescale(); }; } function continuous() { return transformer()(identity, identity); } /***/ }), /***/ "6ZHU": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/math.js ***! \******************************************/ /*! exports provided: tpmt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tpmt", function() { return tpmt; }); // tpmt is two power minus ten times t scaled to [0,1] function tpmt(x) { return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494; } /***/ }), /***/ "6eBy": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/debounce.js ***! \*******************************************************************/ /*! exports provided: debounce */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function debounce(durationSelector) { return (source) => source.lift(new DebounceOperator(durationSelector)); } class DebounceOperator { constructor(durationSelector) { this.durationSelector = durationSelector; } call(subscriber, source) { return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector)); } } class DebounceSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, durationSelector) { super(destination); this.durationSelector = durationSelector; this.hasValue = false; } _next(value) { try { const result = this.durationSelector.call(this, value); if (result) { this._tryNext(value, result); } } catch (err) { this.destination.error(err); } } _complete() { this.emitValue(); this.destination.complete(); } _tryNext(value, duration) { let subscription = this.durationSubscription; this.value = value; this.hasValue = true; if (subscription) { subscription.unsubscribe(); this.remove(subscription); } subscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)); if (subscription && !subscription.closed) { this.add(this.durationSubscription = subscription); } } notifyNext() { this.emitValue(); } notifyComplete() { this.emitValue(); } emitValue() { if (this.hasValue) { const value = this.value; const subscription = this.durationSubscription; if (subscription) { this.durationSubscription = undefined; subscription.unsubscribe(); this.remove(subscription); } this.value = undefined; this.hasValue = false; super._next(value); } } } //# sourceMappingURL=debounce.js.map /***/ }), /***/ "6h3Y": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/value.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ "42CK"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ "ZzDG"); /* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "G21l"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ "4xfg"); /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ "cb2h"); /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ "kO9b"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ "xpj1"); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "Ud7J"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var t = typeof b, c; return b == null || t === "boolean" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__["default"])(b) : (t === "number" ? _number_js__WEBPACK_IMPORTED_MODULE_4__["default"] : t === "string" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__["default"]) : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"] : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__["default"] : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"] : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__["genericArray"] : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__["default"] : _number_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b); }); /***/ }), /***/ "6hMD": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/clone.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function selection_cloneShallow() { var clone = this.cloneNode(false), parent = this.parentNode; return parent ? parent.insertBefore(clone, this.nextSibling) : clone; } function selection_cloneDeep() { var clone = this.cloneNode(true), parent = this.parentNode; return parent ? parent.insertBefore(clone, this.nextSibling) : clone; } /* harmony default export */ __webpack_exports__["default"] = (function(deep) { return this.select(deep ? selection_cloneDeep : selection_cloneShallow); }); /***/ }), /***/ "6hg5": /*!*********************************************!*\ !*** ./node_modules/d3-dsv/src/autoType.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoType; }); function autoType(object) { for (var key in object) { var value = object[key].trim(), number, m; if (!value) value = null; else if (value === "true") value = true; else if (value === "false") value = false; else if (value === "NaN") value = NaN; else if (!isNaN(number = +value)) value = number; else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); value = new Date(value); } else continue; object[key] = value; } return object; } // https://github.com/d3/d3-dsv/issues/45 const fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); /***/ }), /***/ "6nXi": /*!**************************************************!*\ !*** ./node_modules/d3-transition/src/active.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ "0W9s"); /* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ "rtYu"); var root = [null]; /* harmony default export */ __webpack_exports__["default"] = (function(node, name) { var schedules = node.__transition, schedule, i; if (schedules) { name = name == null ? null : name + ""; for (i in schedules) { if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["SCHEDULED"] && schedule.name === name) { return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]([[node]], root, name, +i); } } } return null; }); /***/ }), /***/ "6txh": /*!******************************************!*\ !*** ./node_modules/d3-path/src/path.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); const pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon; function Path() { this._x0 = this._y0 = // start of current subpath this._x1 = this._y1 = null; // end of current subpath this._ = ""; } function path() { return new Path; } Path.prototype = path.prototype = { constructor: Path, moveTo: function(x, y) { this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); }, closePath: function() { if (this._x1 !== null) { this._x1 = this._x0, this._y1 = this._y0; this._ += "Z"; } }, lineTo: function(x, y) { this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); }, quadraticCurveTo: function(x1, y1, x, y) { this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); }, bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); }, arcTo: function(x1, y1, x2, y2, r) { x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01; // Is the radius negative? Error. if (r < 0) throw new Error("negative radius: " + r); // Is this path empty? Move to (x1,y1). if (this._x1 === null) { this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); } // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. else if (!(l01_2 > epsilon)); // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? // Equivalently, is (x1,y1) coincident with (x2,y2)? // Or, is the radius zero? Line to (x1,y1). else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); } // Otherwise, draw an arc! else { var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21; // If the start tangent is not coincident with (x0,y0), line to. if (Math.abs(t01 - 1) > epsilon) { this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); } this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); } }, arc: function(x, y, r, a0, a1, ccw) { x = +x, y = +y, r = +r, ccw = !!ccw; var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x + dx, y0 = y + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0; // Is the radius negative? Error. if (r < 0) throw new Error("negative radius: " + r); // Is this path empty? Move to (x0,y0). if (this._x1 === null) { this._ += "M" + x0 + "," + y0; } // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { this._ += "L" + x0 + "," + y0; } // Is this arc empty? We’re done. if (!r) return; // Does the angle go the wrong way? Flip the direction. if (da < 0) da = da % tau + tau; // Is this a complete circle? Draw two arcs to complete the circle. if (da > tauEpsilon) { this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); } // Is this arc non-empty? Draw an arc! else if (da > epsilon) { this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); } }, rect: function(x, y, w, h) { this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; }, toString: function() { return this._; } }; /* harmony default export */ __webpack_exports__["default"] = (path); /***/ }), /***/ "6x6I": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/each.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { let index = -1; for (const node of this) { callback.call(that, node, ++index, this); } return this; }); /***/ }), /***/ "7+OI": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isObservable.js ***! \******************************************************************/ /*! exports provided: isObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); function isObservable(obj) { return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function')); } //# sourceMappingURL=isObservable.js.map /***/ }), /***/ "7FHc": /*!****************************************************!*\ !*** ./node_modules/d3-geo/src/polygonContains.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian.js */ "YzSS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "R0y8"); function longitude(point) { if (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) <= _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) return point[0]; else return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sign"])(point[0]) * ((Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) + _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]); } /* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { var lambda = longitude(point), phi = point[1], sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi), normal = [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(lambda), -Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda), 0], angle = 0, winding = 0; var sum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); if (sinPhi === 1) phi = _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; else if (sinPhi === -1) phi = -_math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; for (var i = 0, n = polygon.length; i < n; ++i) { if (!(m = (ring = polygon[i]).length)) continue; var ring, m, point0 = ring[m - 1], lambda0 = longitude(point0), phi0 = point0[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi0), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi0); for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { var point1 = ring[j], lambda1 = longitude(point1), phi1 = point1[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"], sinPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi1), cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi1), delta = lambda1 - lambda0, sign = delta >= 0 ? 1 : -1, absDelta = sign * delta, antimeridian = absDelta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], k = sinPhi0 * sinPhi1; sum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(k * sign * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(absDelta))); angle += antimeridian ? delta + sign * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] : delta; // Are the longitudes either side of the point’s meridian (lambda), // and are the latitudes smaller than the parallel (phi)? if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { var arc = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point0), Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point1)); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(arc); var intersection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(normal, arc); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(intersection); var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(intersection[2]); if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { winding += antimeridian ^ delta >= 0 ? 1 : -1; } } } } // First, determine whether the South pole is inside or outside: // // It is inside if: // * the polygon winds around it in a clockwise direction. // * the polygon does not (cumulatively) wind around it, but has a negative // (counter-clockwise) area. // // Second, count the (signed) number of times a segment crosses a lambda // from the point to the South pole. If it is zero, then the point is the // same side as the South pole. return (angle < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] || angle < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] && sum < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon2"]) ^ (winding & 1); }); /***/ }), /***/ "7HRe": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduled.js ***! \********************************************************************/ /*! exports provided: scheduled */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; }); /* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scheduleObservable */ "5B2Y"); /* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedulePromise */ "4yVj"); /* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scheduleArray */ "jZKg"); /* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scheduleIterable */ "MBAA"); /* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isInteropObservable */ "QIAL"); /* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isPromise */ "c2HN"); /* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/isArrayLike */ "I55L"); /* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/isIterable */ "CMyj"); function scheduled(input, scheduler) { if (input != null) { if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) { return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler); } else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) { return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler); } else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) { return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler); } else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') { return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler); } } throw new TypeError((input !== null && typeof input || input) + ' is not observable'); } //# sourceMappingURL=scheduled.js.map /***/ }), /***/ "7Hc7": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/asap.js ***! \***************************************************************/ /*! exports provided: asapScheduler, asap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return asapScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; }); /* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsapAction */ "Pz8W"); /* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsapScheduler */ "RUbi"); const asapScheduler = new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]); const asap = asapScheduler; //# sourceMappingURL=asap.js.map /***/ }), /***/ "7IPS": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/slice.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { var nodes = parent.children, node, i = -1, n = nodes.length, k = parent.value && (y1 - y0) / parent.value; while (++i < n) { node = nodes[i], node.x0 = x0, node.x1 = x1; node.y0 = y0, node.y1 = y0 += node.value * k; } }); /***/ }), /***/ "7MRl": /*!*********************************************!*\ !*** ./node_modules/d3-random/src/index.js ***! \*********************************************/ /*! exports provided: randomUniform, randomInt, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, randomPareto, randomBernoulli, randomGeometric, randomBinomial, randomGamma, randomBeta, randomWeibull, randomCauchy, randomLogistic, randomPoisson, randomLcg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _uniform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniform.js */ "NScU"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return _uniform_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _int_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./int.js */ "m+hS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomInt", function() { return _int_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./normal.js */ "ptze"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return _normal_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _logNormal_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logNormal.js */ "G4XB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return _logNormal_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _bates_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bates.js */ "XJJ9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return _bates_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _irwinHall_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./irwinHall.js */ "hSnb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return _irwinHall_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _exponential_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./exponential.js */ "eTLM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return _exponential_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _pareto_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pareto.js */ "wG9p"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPareto", function() { return _pareto_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _bernoulli_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./bernoulli.js */ "Ijfk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBernoulli", function() { return _bernoulli_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _geometric_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./geometric.js */ "FWfd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGeometric", function() { return _geometric_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _binomial_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./binomial.js */ "BTWs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBinomial", function() { return _binomial_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./gamma.js */ "b54z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGamma", function() { return _gamma_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _beta_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./beta.js */ "xD94"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBeta", function() { return _beta_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _weibull_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./weibull.js */ "e94d"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomWeibull", function() { return _weibull_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _cauchy_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./cauchy.js */ "yPTl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomCauchy", function() { return _cauchy_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _logistic_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./logistic.js */ "G3Uy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogistic", function() { return _logistic_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _poisson_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./poisson.js */ "4S0P"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPoisson", function() { return _poisson_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _lcg_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./lcg.js */ "ofxX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLcg", function() { return _lcg_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /***/ }), /***/ "7Mu7": /*!*******************************************************!*\ !*** ./node_modules/d3-hierarchy/src/pack/enclose.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ "j1BO"); /* harmony default export */ __webpack_exports__["default"] = (function(circles) { var i = 0, n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["shuffle"])(Array.from(circles))).length, B = [], p, e; while (i < n) { p = circles[i]; if (e && enclosesWeak(e, p)) ++i; else e = encloseBasis(B = extendBasis(B, p)), i = 0; } return e; }); function extendBasis(B, p) { var i, j; if (enclosesWeakAll(p, B)) return [p]; // If we get here then B must have at least one element. for (i = 0; i < B.length; ++i) { if (enclosesNot(p, B[i]) && enclosesWeakAll(encloseBasis2(B[i], p), B)) { return [B[i], p]; } } // If we get here then B must have at least two elements. for (i = 0; i < B.length - 1; ++i) { for (j = i + 1; j < B.length; ++j) { if (enclosesNot(encloseBasis2(B[i], B[j]), p) && enclosesNot(encloseBasis2(B[i], p), B[j]) && enclosesNot(encloseBasis2(B[j], p), B[i]) && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) { return [B[i], B[j], p]; } } } // If we get here then something is very wrong. throw new Error; } function enclosesNot(a, b) { var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y; return dr < 0 || dr * dr < dx * dx + dy * dy; } function enclosesWeak(a, b) { var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y; return dr > 0 && dr * dr > dx * dx + dy * dy; } function enclosesWeakAll(a, B) { for (var i = 0; i < B.length; ++i) { if (!enclosesWeak(a, B[i])) { return false; } } return true; } function encloseBasis(B) { switch (B.length) { case 1: return encloseBasis1(B[0]); case 2: return encloseBasis2(B[0], B[1]); case 3: return encloseBasis3(B[0], B[1], B[2]); } } function encloseBasis1(a) { return { x: a.x, y: a.y, r: a.r }; } function encloseBasis2(a, b) { var x1 = a.x, y1 = a.y, r1 = a.r, x2 = b.x, y2 = b.y, r2 = b.r, x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, l = Math.sqrt(x21 * x21 + y21 * y21); return { x: (x1 + x2 + x21 / l * r21) / 2, y: (y1 + y2 + y21 / l * r21) / 2, r: (l + r1 + r2) / 2 }; } function encloseBasis3(a, b, c) { var x1 = a.x, y1 = a.y, r1 = a.r, x2 = b.x, y2 = b.y, r2 = b.r, x3 = c.x, y3 = c.y, r3 = c.r, a2 = x1 - x2, a3 = x1 - x3, b2 = y1 - y2, b3 = y1 - y3, c2 = r2 - r1, c3 = r3 - r1, d1 = x1 * x1 + y1 * y1 - r1 * r1, d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, ab = a3 * b2 - a2 * b3, xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, xb = (b3 * c2 - b2 * c3) / ab, ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, yb = (a2 * c3 - a3 * c2) / ab, A = xb * xb + yb * yb - 1, B = 2 * (r1 + xa * xb + ya * yb), C = xa * xa + ya * ya - r1 * r1, r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B); return { x: x1 + xa + xb * r, y: y1 + ya + yb * r, r: r }; } /***/ }), /***/ "7NYn": /*!*******************************************!*\ !*** ./node_modules/d3-fetch/src/text.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseText(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); return response.text(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseText); }); /***/ }), /***/ "7VZX": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/selectAll.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function(select) { var name = this._name, id = this._id; if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selectorAll"])(select); for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id), k = 0, l = children.length; k < l; ++k) { if (child = children[k]) { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(child, name, id, k, children, inherit); } } subgroups.push(children); parents.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, parents, name, id); }); /***/ }), /***/ "7o/Q": /*!***********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Subscriber.js ***! \***********************************************************/ /*! exports provided: Subscriber, SafeSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; }); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isFunction */ "n6bG"); /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observer */ "gRHU"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); /* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "2QA8"); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "2fFW"); /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/hostReportError */ "NJ4a"); class Subscriber extends _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"] { constructor(destinationOrNext, error, complete) { super(); this.syncErrorValue = null; this.syncErrorThrown = false; this.syncErrorThrowable = false; this.isStopped = false; switch (arguments.length) { case 0: this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]; break; case 1: if (!destinationOrNext) { this.destination = _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]; break; } if (typeof destinationOrNext === 'object') { if (destinationOrNext instanceof Subscriber) { this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; this.destination = destinationOrNext; destinationOrNext.add(this); } else { this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext); } break; } default: this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, destinationOrNext, error, complete); break; } } [_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_3__["rxSubscriber"]]() { return this; } static create(next, error, complete) { const subscriber = new Subscriber(next, error, complete); subscriber.syncErrorThrowable = false; return subscriber; } next(value) { if (!this.isStopped) { this._next(value); } } error(err) { if (!this.isStopped) { this.isStopped = true; this._error(err); } } complete() { if (!this.isStopped) { this.isStopped = true; this._complete(); } } unsubscribe() { if (this.closed) { return; } this.isStopped = true; super.unsubscribe(); } _next(value) { this.destination.next(value); } _error(err) { this.destination.error(err); this.unsubscribe(); } _complete() { this.destination.complete(); this.unsubscribe(); } _unsubscribeAndRecycle() { const { _parentOrParents } = this; this._parentOrParents = null; this.unsubscribe(); this.closed = false; this.isStopped = false; this._parentOrParents = _parentOrParents; return this; } } class SafeSubscriber extends Subscriber { constructor(_parentSubscriber, observerOrNext, error, complete) { super(); this._parentSubscriber = _parentSubscriber; let next; let context = this; if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(observerOrNext)) { next = observerOrNext; } else if (observerOrNext) { next = observerOrNext.next; error = observerOrNext.error; complete = observerOrNext.complete; if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_1__["empty"]) { context = Object.create(observerOrNext); if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(context.unsubscribe)) { this.add(context.unsubscribe.bind(context)); } context.unsubscribe = this.unsubscribe.bind(this); } } this._context = context; this._next = next; this._error = error; this._complete = complete; } next(value) { if (!this.isStopped && this._next) { const { _parentSubscriber } = this; if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(this._next, value); } else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { this.unsubscribe(); } } } error(err) { if (!this.isStopped) { const { _parentSubscriber } = this; const { useDeprecatedSynchronousErrorHandling } = _config__WEBPACK_IMPORTED_MODULE_4__["config"]; if (this._error) { if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(this._error, err); this.unsubscribe(); } else { this.__tryOrSetError(_parentSubscriber, this._error, err); this.unsubscribe(); } } else if (!_parentSubscriber.syncErrorThrowable) { this.unsubscribe(); if (useDeprecatedSynchronousErrorHandling) { throw err; } Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); } else { if (useDeprecatedSynchronousErrorHandling) { _parentSubscriber.syncErrorValue = err; _parentSubscriber.syncErrorThrown = true; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); } this.unsubscribe(); } } } complete() { if (!this.isStopped) { const { _parentSubscriber } = this; if (this._complete) { const wrappedComplete = () => this._complete.call(this._context); if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { this.__tryOrUnsub(wrappedComplete); this.unsubscribe(); } else { this.__tryOrSetError(_parentSubscriber, wrappedComplete); this.unsubscribe(); } } else { this.unsubscribe(); } } } __tryOrUnsub(fn, value) { try { fn.call(this._context, value); } catch (err) { this.unsubscribe(); if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { throw err; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); } } } __tryOrSetError(parent, fn, value) { if (!_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { throw new Error('bad call'); } try { fn.call(this._context, value); } catch (err) { if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { parent.syncErrorValue = err; parent.syncErrorThrown = true; return true; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_5__["hostReportError"])(err); return true; } } return false; } _unsubscribe() { const { _parentSubscriber } = this; this._context = null; this._parentSubscriber = null; _parentSubscriber.unsubscribe(); } } //# sourceMappingURL=Subscriber.js.map /***/ }), /***/ "7sdT": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/variance.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return variance; }); function variance(values, valueof) { let count = 0; let delta; let mean = 0; let sum = 0; if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { delta = value - mean; mean += delta / ++count; sum += delta * (value - mean); } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { delta = value - mean; mean += delta / ++count; sum += delta * (value - mean); } } } if (count > 1) return sum / (count - 1); } /***/ }), /***/ "7ssf": /*!********************************************!*\ !*** ./node_modules/d3-array/src/ticks.js ***! \********************************************/ /*! exports provided: default, tickIncrement, tickStep */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return tickIncrement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return tickStep; }); var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2); /* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count) { var reverse, i = -1, n, ticks, step; stop = +stop, start = +start, count = +count; if (start === stop && count > 0) return [start]; if (reverse = stop < start) n = start, start = stop, stop = n; if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; if (step > 0) { let r0 = Math.round(start / step), r1 = Math.round(stop / step); if (r0 * step < start) ++r0; if (r1 * step > stop) --r1; ticks = new Array(n = r1 - r0 + 1); while (++i < n) ticks[i] = (r0 + i) * step; } else { step = -step; let r0 = Math.round(start * step), r1 = Math.round(stop * step); if (r0 / step < start) ++r0; if (r1 / step > stop) --r1; ticks = new Array(n = r1 - r0 + 1); while (++i < n) ticks[i] = (r0 + i) / step; } if (reverse) ticks.reverse(); return ticks; }); function tickIncrement(start, stop, count) { var step = (stop - start) / Math.max(0, count), power = Math.floor(Math.log(step) / Math.LN10), error = step / Math.pow(10, power); return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); } function tickStep(start, stop, count) { var step0 = Math.abs(stop - start) / Math.max(0, count), step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), error = step0 / step1; if (error >= e10) step1 *= 10; else if (error >= e5) step1 *= 5; else if (error >= e2) step1 *= 2; return stop < start ? -step1 : step1; } /***/ }), /***/ "7ve7": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/Action.js ***! \*****************************************************************/ /*! exports provided: Action */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); class Action extends _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"] { constructor(scheduler, work) { super(); } schedule(state, delay = 0) { return this; } } //# sourceMappingURL=Action.js.map /***/ }), /***/ "7wxJ": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/combineAll.js ***! \*********************************************************************/ /*! exports provided: combineAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; }); /* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/combineLatest */ "itXk"); function combineAll(project) { return (source) => source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); } //# sourceMappingURL=combineAll.js.map /***/ }), /***/ "83xM": /*!*******************************************!*\ !*** ./node_modules/d3-path/src/index.js ***! \*******************************************/ /*! exports provided: path */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "6txh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /***/ }), /***/ "87ba": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/exit.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ "aY1w"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function() { return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._exit || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); }); /***/ }), /***/ "89eD": /*!*******************************************!*\ !*** ./node_modules/d3-force/src/link.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle.js */ "QupR"); function index(d) { return d.index; } function find(nodeById, nodeId) { var node = nodeById.get(nodeId); if (!node) throw new Error("node not found: " + nodeId); return node; } /* harmony default export */ __webpack_exports__["default"] = (function(links) { var id = index, strength = defaultStrength, strengths, distance = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(30), distances, nodes, count, bias, random, iterations = 1; if (links == null) links = []; function defaultStrength(link) { return 1 / Math.min(count[link.source.index], count[link.target.index]); } function force(alpha) { for (var k = 0, n = links.length; k < iterations; ++k) { for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { link = links[i], source = link.source, target = link.target; x = target.x + target.vx - source.x - source.vx || Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(random); y = target.y + target.vy - source.y - source.vy || Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(random); l = Math.sqrt(x * x + y * y); l = (l - distances[i]) / l * alpha * strengths[i]; x *= l, y *= l; target.vx -= x * (b = bias[i]); target.vy -= y * b; source.vx += x * (b = 1 - b); source.vy += y * b; } } } function initialize() { if (!nodes) return; var i, n = nodes.length, m = links.length, nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])), link; for (i = 0, count = new Array(n); i < m; ++i) { link = links[i], link.index = i; if (typeof link.source !== "object") link.source = find(nodeById, link.source); if (typeof link.target !== "object") link.target = find(nodeById, link.target); count[link.source.index] = (count[link.source.index] || 0) + 1; count[link.target.index] = (count[link.target.index] || 0) + 1; } for (i = 0, bias = new Array(m); i < m; ++i) { link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); } strengths = new Array(m), initializeStrength(); distances = new Array(m), initializeDistance(); } function initializeStrength() { if (!nodes) return; for (var i = 0, n = links.length; i < n; ++i) { strengths[i] = +strength(links[i], i, links); } } function initializeDistance() { if (!nodes) return; for (var i = 0, n = links.length; i < n; ++i) { distances[i] = +distance(links[i], i, links); } } force.initialize = function(_nodes, _random) { nodes = _nodes; random = _random; initialize(); }; force.links = function(_) { return arguments.length ? (links = _, initialize(), force) : links; }; force.id = function(_) { return arguments.length ? (id = _, force) : id; }; force.iterations = function(_) { return arguments.length ? (iterations = +_, force) : iterations; }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeStrength(), force) : strength; }; force.distance = function(_) { return arguments.length ? (distance = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeDistance(), force) : distance; }; return force; }); /***/ }), /***/ "8F7Y": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e0f3dba8ddb543a2ca", "f0f9e8bae4bc7bccc42b8cbe", "f0f9e8bae4bc7bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "8Qeq": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/canReportError.js ***! \********************************************************************/ /*! exports provided: canReportError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function canReportError(observer) { while (observer) { const { closed, destination, isStopped } = observer; if (closed || isStopped) { return false; } else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) { observer = destination; } else { observer = null; } } return true; } //# sourceMappingURL=canReportError.js.map /***/ }), /***/ "8SsQ": /*!**********************************************!*\ !*** ./node_modules/d3-delaunay/src/path.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Path; }); const epsilon = 1e-6; class Path { constructor() { this._x0 = this._y0 = // start of current subpath this._x1 = this._y1 = null; // end of current subpath this._ = ""; } moveTo(x, y) { this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`; } closePath() { if (this._x1 !== null) { this._x1 = this._x0, this._y1 = this._y0; this._ += "Z"; } } lineTo(x, y) { this._ += `L${this._x1 = +x},${this._y1 = +y}`; } arc(x, y, r) { x = +x, y = +y, r = +r; const x0 = x + r; const y0 = y; if (r < 0) throw new Error("negative radius"); if (this._x1 === null) this._ += `M${x0},${y0}`; else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += "L" + x0 + "," + y0; if (!r) return; this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`; } rect(x, y, w, h) { this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`; } value() { return this._ || null; } } /***/ }), /***/ "8XJe": /*!******************************************!*\ !*** ./node_modules/d3-array/src/set.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return set; }); function set(values) { return values instanceof Set ? values : new Set(values); } /***/ }), /***/ "8cru": /*!******************************************!*\ !*** ./node_modules/d3-fetch/src/dsv.js ***! \******************************************/ /*! exports provided: default, csv, tsv */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dsv; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return csv; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return tsv; }); /* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ "Ri0D"); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text.js */ "7NYn"); function dsvParse(parse) { return function(input, init, row) { if (arguments.length === 2 && typeof init === "function") row = init, init = undefined; return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { return parse(response, row); }); }; } function dsv(delimiter, input, init, row) { if (arguments.length === 3 && typeof init === "function") row = init, init = undefined; var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["dsvFormat"])(delimiter); return Object(_text_js__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) { return format.parse(response, row); }); } var csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["csvParse"]); var tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["tsvParse"]); /***/ }), /***/ "8d86": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/index.js ***! \********************************************/ /*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBumpX, curveBumpY, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ "ZQwz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "44y/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "+ugm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ "iPFw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ "GpRi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ "TI0E"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ "EyRP"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ "Goif"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkHorizontal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkVertical"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkRadial"]; }); /* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ "kVCJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["symbols"]; }); /* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ "GvAG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ "oKyY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ "ms7Z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ "1afE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ "CAOx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ "rkAg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ "xJQu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ "muaG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ "1nUc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ "jICm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bump.js */ "5NTL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpX", function() { return _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__["bumpX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpY", function() { return _curve_bump_js__WEBPACK_IMPORTED_MODULE_19__["bumpY"]; }); /* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/bundle.js */ "d4SJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ "O03L"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ "sK06"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/cardinal.js */ "d5JU"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ "VkQ2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ "Q43v"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/catmullRom.js */ "Kcim"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linearClosed.js */ "zD5G"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/linear.js */ "SDD1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/monotone.js */ "pL0w"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__["monotoneX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_29__["monotoneY"]; }); /* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/natural.js */ "qE0H"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./curve/step.js */ "e9ab"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__["stepAfter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_31__["stepBefore"]; }); /* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stack.js */ "wIsI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/expand.js */ "GjTP"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/diverging.js */ "4bmp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/none.js */ "0T5i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/silhouette.js */ "NtxT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./offset/wiggle.js */ "8eK0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/appearance.js */ "T17Z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/ascending.js */ "WuDp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/descending.js */ "9c/f"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/insideOut.js */ "Oo5A"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/none.js */ "qqpY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./order/reverse.js */ "UFbn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_43__["default"]; }); // Note: radialArea is deprecated! // Note: radialLine is deprecated! /***/ }), /***/ "8eK0": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/offset/wiggle.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "0T5i"); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; for (var y = 0, j = 1, s0, m, n; j < m; ++j) { for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { var si = series[order[i]], sij0 = si[j][1] || 0, sij1 = si[j - 1][1] || 0, s3 = (sij0 - sij1) / 2; for (var k = 0; k < i; ++k) { var sk = series[order[k]], skj0 = sk[j][1] || 0, skj1 = sk[j - 1][1] || 0; s3 += skj0 - skj1; } s1 += sij0, s2 += s3 * sij0; } s0[j - 1][1] += s0[j - 1][0] = y; if (s1) y -= s2 / s1; } s0[j - 1][1] += s0[j - 1][0] = y; Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), /***/ "8efb": /*!********************************************!*\ !*** ./node_modules/d3-chord/src/array.js ***! \********************************************/ /*! exports provided: slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var slice = Array.prototype.slice; /***/ }), /***/ "8moF": /*!******************************************!*\ !*** ./node_modules/d3-fetch/src/xml.js ***! \******************************************/ /*! exports provided: default, html, svg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html", function() { return html; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return svg; }); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text.js */ "7NYn"); function parser(type) { return (input, init) => Object(_text_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input, init) .then(text => (new DOMParser).parseFromString(text, type)); } /* harmony default export */ __webpack_exports__["default"] = (parser("application/xml")); var html = parser("text/html"); var svg = parser("image/svg+xml"); /***/ }), /***/ "8nOX": /*!*************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/naturalEarth1.js ***! \*************************************************************/ /*! exports provided: naturalEarth1Raw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "naturalEarth1Raw", function() { return naturalEarth1Raw; }); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "1ibS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); function naturalEarth1Raw(lambda, phi) { var phi2 = phi * phi, phi4 = phi2 * phi2; return [ lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) ]; } naturalEarth1Raw.invert = function(x, y) { var phi = y, i = 25, delta; do { var phi2 = phi * phi, phi4 = phi2 * phi2; phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4))); } while (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && --i > 0); return [ x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), phi ]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(naturalEarth1Raw) .scale(175.295); }); /***/ }), /***/ "8nbz": /*!***************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/duration.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function durationFunction(id, value) { return function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = +value.apply(this, arguments); }; } function durationConstant(id, value) { return value = +value, function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = value; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var id = this._id; return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).duration; }); /***/ }), /***/ "90/1": /*!***************************************************!*\ !*** ./node_modules/d3-selection/src/pointers.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pointer.js */ "XoFe"); /* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sourceEvent.js */ "T9TN"); /* harmony default export */ __webpack_exports__["default"] = (function(events, node) { if (events.target) { // i.e., instanceof Event, not TouchList or iterable events = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_1__["default"])(events); if (node === undefined) node = events.currentTarget; events = events.touches || [events]; } return Array.from(events, event => Object(_pointer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(event, node)); }); /***/ }), /***/ "9ABZ": /*!***********************************************!*\ !*** ./node_modules/d3-quadtree/src/cover.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points var x0 = this._x0, y0 = this._y0, x1 = this._x1, y1 = this._y1; // If the quadtree has no extent, initialize them. // Integer extent are necessary so that if we later double the extent, // the existing quadrant boundaries don’t change due to floating point error! if (isNaN(x0)) { x1 = (x0 = Math.floor(x)) + 1; y1 = (y0 = Math.floor(y)) + 1; } // Otherwise, double repeatedly to cover. else { var z = x1 - x0 || 1, node = this._root, parent, i; while (x0 > x || x >= x1 || y0 > y || y >= y1) { i = (y < y0) << 1 | (x < x0); parent = new Array(4), parent[i] = node, node = parent, z *= 2; switch (i) { case 0: x1 = x0 + z, y1 = y0 + z; break; case 1: x0 = x1 - z, y1 = y0 + z; break; case 2: x1 = x0 + z, y0 = y1 - z; break; case 3: x0 = x1 - z, y0 = y1 - z; break; } } if (this._root && this._root.length) this._root = node; } this._x0 = x0; this._y0 = y0; this._x1 = x1; this._y1 = y1; return this; }); /***/ }), /***/ "9M8c": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferCount.js ***! \**********************************************************************/ /*! exports provided: bufferCount */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function bufferCount(bufferSize, startBufferEvery = null) { return function bufferCountOperatorFunction(source) { return source.lift(new BufferCountOperator(bufferSize, startBufferEvery)); }; } class BufferCountOperator { constructor(bufferSize, startBufferEvery) { this.bufferSize = bufferSize; this.startBufferEvery = startBufferEvery; if (!startBufferEvery || bufferSize === startBufferEvery) { this.subscriberClass = BufferCountSubscriber; } else { this.subscriberClass = BufferSkipCountSubscriber; } } call(subscriber, source) { return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery)); } } class BufferCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, bufferSize) { super(destination); this.bufferSize = bufferSize; this.buffer = []; } _next(value) { const buffer = this.buffer; buffer.push(value); if (buffer.length == this.bufferSize) { this.destination.next(buffer); this.buffer = []; } } _complete() { const buffer = this.buffer; if (buffer.length > 0) { this.destination.next(buffer); } super._complete(); } } class BufferSkipCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, bufferSize, startBufferEvery) { super(destination); this.bufferSize = bufferSize; this.startBufferEvery = startBufferEvery; this.buffers = []; this.count = 0; } _next(value) { const { bufferSize, startBufferEvery, buffers, count } = this; this.count++; if (count % startBufferEvery === 0) { buffers.push([]); } for (let i = buffers.length; i--;) { const buffer = buffers[i]; buffer.push(value); if (buffer.length === bufferSize) { buffers.splice(i, 1); this.destination.next(buffer); } } } _complete() { const { buffers, destination } = this; while (buffers.length > 0) { let buffer = buffers.shift(); if (buffer.length > 0) { destination.next(buffer); } } super._complete(); } } //# sourceMappingURL=bufferCount.js.map /***/ }), /***/ "9ZWv": /*!******************************************************!*\ !*** ./node_modules/d3-geo/src/clip/antimeridian.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "pb3N"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])( function() { return true; }, clipAntimeridianLine, clipAntimeridianInterpolate, [-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]] )); // Takes a line and cuts into visible segments. Return values: 0 - there were // intersections or the line was empty; 1 - no intersections; 2 - there were // intersections, and the first and last segments should be rejoined. function clipAntimeridianLine(stream) { var lambda0 = NaN, phi0 = NaN, sign0 = NaN, clean; // no intersections return { lineStart: function() { stream.lineStart(); clean = 1; }, point: function(lambda1, phi1) { var sign1 = lambda1 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - lambda0); if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { // line crosses a pole stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]); stream.point(sign0, phi0); stream.lineEnd(); stream.lineStart(); stream.point(sign1, phi0); stream.point(lambda1, phi0); clean = 0; } else if (sign0 !== sign1 && delta >= _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) { // line crosses antimeridian if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - sign0) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda0 -= sign0 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; // handle degeneracies if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - sign1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda1 -= sign1 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); stream.point(sign0, phi0); stream.lineEnd(); stream.lineStart(); stream.point(sign1, phi0); clean = 0; } stream.point(lambda0 = lambda1, phi0 = phi1); sign0 = sign1; }, lineEnd: function() { stream.lineEnd(); lambda0 = phi0 = NaN; }, clean: function() { return 2 - clean; // if intersections, rejoin first and last segments } }; } function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { var cosPhi0, cosPhi1, sinLambda0Lambda1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0 - lambda1); return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(sinLambda0Lambda1) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan"])((Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi0) * (cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi1)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda1) - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi1) * (cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi0)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0)) / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) : (phi0 + phi1) / 2; } function clipAntimeridianInterpolate(from, to, direction, stream) { var phi; if (from == null) { phi = direction * _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]; stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); stream.point(0, phi); stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); stream.point(0, -phi); stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi); stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0); stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi); } else if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(from[0] - to[0]) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { var lambda = from[0] < to[0] ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]; phi = direction * lambda / 2; stream.point(-lambda, phi); stream.point(0, phi); stream.point(lambda, phi); } else { stream.point(to[0], to[1]); } } /***/ }), /***/ "9c/f": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/order/descending.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "WuDp"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); }); /***/ }), /***/ "9iN3": /*!*********************************************!*\ !*** ./node_modules/d3-time/src/utcHour.js ***! \*********************************************/ /*! exports provided: default, utcHours */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return utcHours; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCMinutes(0, 0, 0); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; }, function(date) { return date.getUTCHours(); }); /* harmony default export */ __webpack_exports__["default"] = (utcHour); var utcHours = utcHour.range; /***/ }), /***/ "9ihq": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/elementAt.js ***! \********************************************************************/ /*! exports provided: elementAt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; }); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); /* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./take */ "IzEk"); function elementAt(index, defaultValue) { if (index < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); } const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => i === index), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(() => new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]())); } //# sourceMappingURL=elementAt.js.map /***/ }), /***/ "9j6y": /*!********************************************!*\ !*** ./node_modules/d3-array/src/cross.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cross; }); function length(array) { return array.length | 0; } function empty(length) { return !(length > 0); } function arrayify(values) { return typeof values !== "object" || "length" in values ? values : Array.from(values); } function reducer(reduce) { return values => reduce(...values); } function cross(...values) { const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop()); values = values.map(arrayify); const lengths = values.map(length); const j = values.length - 1; const index = new Array(j + 1).fill(0); const product = []; if (j < 0 || lengths.some(empty)) return product; while (true) { product.push(index.map((j, i) => values[i][j])); let i = j; while (++index[i] === lengths[i]) { if (i === 0) return reduce ? product.map(reduce) : product; index[i--] = 0; } } } /***/ }), /***/ "9l1u": /*!*********************************************!*\ !*** ./node_modules/d3-quadtree/src/add.js ***! \*********************************************/ /*! exports provided: default, addAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAll", function() { return addAll; }); /* harmony default export */ __webpack_exports__["default"] = (function(d) { const x = +this._x.call(null, d), y = +this._y.call(null, d); return add(this.cover(x, y), x, y, d); }); function add(tree, x, y, d) { if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points var parent, node = tree._root, leaf = {data: d}, x0 = tree._x0, y0 = tree._y0, x1 = tree._x1, y1 = tree._y1, xm, ym, xp, yp, right, bottom, i, j; // If the tree is empty, initialize the root as a leaf. if (!node) return tree._root = leaf, tree; // Find the existing leaf for the new point, or add it. while (node.length) { if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; } // Is the new point is exactly coincident with the existing point? xp = +tree._x.call(null, node.data); yp = +tree._y.call(null, node.data); if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; // Otherwise, split the leaf node until the old and new point are separated. do { parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); return parent[j] = node, parent[i] = leaf, tree; } function addAll(data) { var d, i, n = data.length, x, y, xz = new Array(n), yz = new Array(n), x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity; // Compute the points and their extent. for (i = 0; i < n; ++i) { if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; xz[i] = x; yz[i] = y; if (x < x0) x0 = x; if (x > x1) x1 = x; if (y < y0) y0 = y; if (y > y1) y1 = y; } // If there were no (valid) points, abort. if (x0 > x1 || y0 > y1) return this; // Expand the tree to cover the new points. this.cover(x0, y0).cover(x1, y1); // Add the new points. for (i = 0; i < n; ++i) { add(this, xz[i], yz[i], data[i]); } return this; } /***/ }), /***/ "9om9": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/enter.js ***! \**********************************************************/ /*! exports provided: default, EnterNode */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnterNode", function() { return EnterNode; }); /* harmony import */ var _sparse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse.js */ "aY1w"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function() { return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._enter || this._groups.map(_sparse_js__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); }); function EnterNode(parent, datum) { this.ownerDocument = parent.ownerDocument; this.namespaceURI = parent.namespaceURI; this._next = null; this._parent = parent; this.__data__ = datum; } EnterNode.prototype = { constructor: EnterNode, appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, querySelector: function(selector) { return this._parent.querySelector(selector); }, querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } }; /***/ }), /***/ "9ppp": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/ObjectUnsubscribedError.js ***! \*****************************************************************************/ /*! exports provided: ObjectUnsubscribedError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; }); const ObjectUnsubscribedErrorImpl = (() => { function ObjectUnsubscribedErrorImpl() { Error.call(this); this.message = 'object unsubscribed'; this.name = 'ObjectUnsubscribedError'; return this; } ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype); return ObjectUnsubscribedErrorImpl; })(); const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; //# sourceMappingURL=ObjectUnsubscribedError.js.map /***/ }), /***/ "A3iJ": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/partition.js ***! \********************************************************************/ /*! exports provided: partition */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; }); /* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/not */ "F97/"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); function partition(predicate, thisArg) { return (source) => [ Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source), Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source) ]; } //# sourceMappingURL=partition.js.map /***/ }), /***/ "AHz+": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "998ec3f7f7f7f1a340", "5e3c99b2abd2fdb863e66101", "5e3c99b2abd2f7f7f7fdb863e66101", "542788998ec3d8daebfee0b6f1a340b35806", "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "AJ/N": /*!******************************************!*\ !*** ./node_modules/d3-drag/src/drag.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ "tU+D"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ "cdIC"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ "OqQA"); /* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ "TKo5"); // Ignore right-click, since that should open the context menu. function defaultFilter(event) { return !event.ctrlKey && !event.button; } function defaultContainer() { return this.parentNode; } function defaultSubject(event, d) { return d == null ? {x: event.x, y: event.y} : d; } function defaultTouchable() { return navigator.maxTouchPoints || ("ontouchstart" in this); } /* harmony default export */ __webpack_exports__["default"] = (function() { var filter = defaultFilter, container = defaultContainer, subject = defaultSubject, touchable = defaultTouchable, gestures = {}, listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "drag", "end"), active = 0, mousedownx, mousedowny, mousemoving, touchending, clickDistance2 = 0; function drag(selection) { selection .on("mousedown.drag", mousedowned) .filter(touchable) .on("touchstart.drag", touchstarted) .on("touchmove.drag", touchmoved) .on("touchend.drag touchcancel.drag", touchended) .style("touch-action", "none") .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } function mousedowned(event, d) { if (touchending || !filter.call(this, event, d)) return; var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse"); if (!gesture) return; Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["default"])(event.view); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(event); mousemoving = false; mousedownx = event.clientX; mousedowny = event.clientY; gesture("start", event); } function mousemoved(event) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(event); if (!mousemoving) { var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; mousemoving = dx * dx + dy * dy > clickDistance2; } gestures.mouse("drag", event); } function mouseupped(event) { Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(event.view).on("mousemove.drag mouseup.drag", null); Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["yesdrag"])(event.view, mousemoving); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(event); gestures.mouse("end", event); } function touchstarted(event, d) { if (!filter.call(this, event, d)) return; var touches = event.changedTouches, c = container.call(this, event, d), n = touches.length, i, gesture; for (i = 0; i < n; ++i) { if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(event); gesture("start", event, touches[i]); } } } function touchmoved(event) { var touches = event.changedTouches, n = touches.length, i, gesture; for (i = 0; i < n; ++i) { if (gesture = gestures[touches[i].identifier]) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])(event); gesture("drag", event, touches[i]); } } } function touchended(event) { var touches = event.changedTouches, n = touches.length, i, gesture; if (touchending) clearTimeout(touchending); touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! for (i = 0; i < n; ++i) { if (gesture = gestures[touches[i].identifier]) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])(event); gesture("end", event, touches[i]); } } } function beforestart(that, container, event, d, identifier, touch) { var dispatch = listeners.copy(), p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["pointer"])(touch || event, container), dx, dy, s; if ((s = subject.call(that, new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"]("beforestart", { sourceEvent: event, target: drag, identifier, active, x: p[0], y: p[1], dx: 0, dy: 0, dispatch }), d)) == null) return; dx = s.x - p[0] || 0; dy = s.y - p[1] || 0; return function gesture(type, event, touch) { var p0 = p, n; switch (type) { case "start": gestures[identifier] = gesture, n = active++; break; case "end": delete gestures[identifier], --active; // nobreak case "drag": p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["pointer"])(touch || event, container), n = active; break; } dispatch.call( type, that, new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](type, { sourceEvent: event, subject: s, target: drag, identifier, active: n, x: p[0] + dx, y: p[1] + dy, dx: p[0] - p0[0], dy: p[1] - p0[1], dispatch }), d ); }; } drag.filter = function(_) { return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : filter; }; drag.container = function(_) { return arguments.length ? (container = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : container; }; drag.subject = function(_) { return arguments.length ? (subject = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : subject; }; drag.touchable = function(_) { return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : touchable; }; drag.on = function() { var value = listeners.on.apply(listeners, arguments); return value === listeners ? drag : value; }; drag.clickDistance = function(_) { return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); }; return drag; }); /***/ }), /***/ "AKWm": /*!*************************************************!*\ !*** ./node_modules/d3-selection/src/select.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return typeof selector === "string" ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[document.querySelector(selector)]], [document.documentElement]) : new _selection_index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[selector]], _selection_index_js__WEBPACK_IMPORTED_MODULE_0__["root"]); }); /***/ }), /***/ "APuy": /*!************************************************!*\ !*** ./node_modules/d3-array/src/ascending.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; }); /***/ }), /***/ "AUoe": /*!******************************************************!*\ !*** ./node_modules/d3-format/src/formatNumerals.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(numerals) { return function(value) { return value.replace(/[0-9]/g, function(i) { return numerals[+i]; }); }; }); /***/ }), /***/ "AWXE": /*!*******************************************************!*\ !*** ./node_modules/d3-selection/src/selection/on.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function contextListener(listener) { return function(event) { listener.call(this, event, this.__data__); }; } function parseTypenames(typenames) { return typenames.trim().split(/^|\s+/).map(function(t) { var name = "", i = t.indexOf("."); if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); return {type: t, name: name}; }); } function onRemove(typename) { return function() { var on = this.__on; if (!on) return; for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { this.removeEventListener(o.type, o.listener, o.options); } else { on[++i] = o; } } if (++i) on.length = i; else delete this.__on; }; } function onAdd(typename, value, options) { return function() { var on = this.__on, o, listener = contextListener(value); if (on) for (var j = 0, m = on.length; j < m; ++j) { if ((o = on[j]).type === typename.type && o.name === typename.name) { this.removeEventListener(o.type, o.listener, o.options); this.addEventListener(o.type, o.listener = listener, o.options = options); o.value = value; return; } } this.addEventListener(typename.type, listener, options); o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options}; if (!on) this.__on = [o]; else on.push(o); }; } /* harmony default export */ __webpack_exports__["default"] = (function(typename, value, options) { var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; if (arguments.length < 2) { var on = this.node().__on; if (on) for (var j = 0, m = on.length, o; j < m; ++j) { for (i = 0, o = on[j]; i < n; ++i) { if ((t = typenames[i]).type === o.type && t.name === o.name) { return o.value; } } } return; } on = value ? onAdd : onRemove; for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options)); return this; }); /***/ }), /***/ "AgzO": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/filter.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return filter; }); function filter(values, test) { if (typeof test !== "function") throw new TypeError("test is not a function"); const array = []; let index = -1; for (const value of values) { if (test(value, ++index, values)) { array.push(value); } } return array; } /***/ }), /***/ "B/+g": /*!*********************************************************!*\ !*** ./node_modules/d3-scale/src/sequentialQuantile.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequentialQuantile; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function sequentialQuantile() { var domain = [], interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"]; function scale(x) { if (x != null && !isNaN(x = +x)) return interpolator((Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 1) - 1) / (domain.length - 1)); } scale.domain = function(_) { if (!arguments.length) return domain.slice(); domain = []; for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); return scale; }; scale.interpolator = function(_) { return arguments.length ? (interpolator = _, scale) : interpolator; }; scale.range = function() { return domain.map((d, i) => interpolator(i / (domain.length - 1))); }; scale.quantiles = function(n) { return Array.from({length: n + 1}, (_, i) => Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["quantile"])(domain, i / n)); }; scale.copy = function() { return sequentialQuantile(interpolator).domain(domain); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } /***/ }), /***/ "BFxc": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/takeLast.js ***! \*******************************************************************/ /*! exports provided: takeLast */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); function takeLast(count) { return function takeLastOperatorFunction(source) { if (count === 0) { return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); } else { return source.lift(new TakeLastOperator(count)); } }; } class TakeLastOperator { constructor(total) { this.total = total; if (this.total < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; } } call(subscriber, source) { return source.subscribe(new TakeLastSubscriber(subscriber, this.total)); } } class TakeLastSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, total) { super(destination); this.total = total; this.ring = new Array(); this.count = 0; } _next(value) { const ring = this.ring; const total = this.total; const count = this.count++; if (ring.length < total) { ring.push(value); } else { const index = count % total; ring[index] = value; } } _complete() { const destination = this.destination; let count = this.count; if (count > 0) { const total = this.count >= this.total ? this.total : this.count; const ring = this.ring; for (let i = 0; i < total; i++) { const idx = (count++) % total; destination.next(ring[idx]); } } destination.complete(); } } //# sourceMappingURL=takeLast.js.map /***/ }), /***/ "BTWs": /*!************************************************!*\ !*** ./node_modules/d3-random/src/binomial.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _beta_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./beta.js */ "xD94"); /* harmony import */ var _geometric_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./geometric.js */ "FWfd"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBinomial(source) { var G = _geometric_js__WEBPACK_IMPORTED_MODULE_2__["default"].source(source), B = _beta_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomBinomial(n, p) { n = +n; if ((p = +p) >= 1) return () => n; if (p <= 0) return () => 0; return function() { var acc = 0, nn = n, pp = p; while (nn * pp > 16 && nn * (1 - pp) > 16) { var i = Math.floor((nn + 1) * pp), y = B(i, nn - i + 1)(); if (y <= pp) { acc += i; nn -= i; pp = (pp - y) / (1 - y); } else { nn = i - 1; pp /= y; } } var sign = pp < 0.5, pFinal = sign ? pp : 1 - pp, g = G(pFinal); for (var s = g(), k = 0; s <= nn; ++k) s += g(); return acc + (sign ? k : nn - k); }; } randomBinomial.source = sourceRandomBinomial; return randomBinomial; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "BvdE": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(), pi_1_3 = Math.PI / 3, pi_2_3 = Math.PI * 2 / 3; /* harmony default export */ __webpack_exports__["default"] = (function(t) { var x; t = (0.5 - t) * Math.PI; c.r = 255 * (x = Math.sin(t)) * x; c.g = 255 * (x = Math.sin(t + pi_1_3)) * x; c.b = 255 * (x = Math.sin(t + pi_2_3)) * x; return c + ""; }); /***/ }), /***/ "C33F": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Set3.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f")); /***/ }), /***/ "CAOx": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/star.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "CYYh"); var ka = 0.89081309152928522810, kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10), kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr, ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr; /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size * ka), x = kx * r, y = ky * r; context.moveTo(0, -r); context.lineTo(x, y); for (var i = 1; i < 5; ++i) { var a = _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] * i / 5, c = Math.cos(a), s = Math.sin(a); context.lineTo(s * r, -c * r); context.lineTo(c * x - s * y, s * x + c * y); } context.closePath(); } }); /***/ }), /***/ "CDC2": /*!************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/sliceDice.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "FPPI"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "7IPS"); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { (parent.depth & 1 ? _slice_js__WEBPACK_IMPORTED_MODULE_1__["default"] : _dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(parent, x0, y0, x1, y1); }); /***/ }), /***/ "CKiT": /*!*******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***! \*******************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fc8d59ffffbf99d594", "d7191cfdae61abdda42b83ba", "d7191cfdae61ffffbfabdda42b83ba", "d53e4ffc8d59fee08be6f59899d5943288bd", "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "CMyj": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isIterable.js ***! \****************************************************************/ /*! exports provided: isIterable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; }); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); function isIterable(input) { return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function'; } //# sourceMappingURL=isIterable.js.map /***/ }), /***/ "CRDf": /*!***************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToObservable.js ***! \***************************************************************************/ /*! exports provided: subscribeToObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; }); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); const subscribeToObservable = (obj) => (subscriber) => { const obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]](); if (typeof obs.subscribe !== 'function') { throw new TypeError('Provided object does not correctly implement Symbol.observable'); } else { return obs.subscribe(subscriber); } }; //# sourceMappingURL=subscribeToObservable.js.map /***/ }), /***/ "CSvP": /*!***************************************************!*\ !*** ./node_modules/d3-hierarchy/src/constant.js ***! \***************************************************/ /*! exports provided: constantZero, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "constantZero", function() { return constantZero; }); function constantZero() { return 0; } /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "CXbD": /*!************************************************!*\ !*** ./node_modules/d3-array/src/groupSort.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return groupSort; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./group.js */ "4TqM"); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sort.js */ "Exv/"); function groupSort(values, reduce, key) { return (reduce.length === 1 ? Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__["rollup"])(values, reduce, key), (([ak, av], [bk, bv]) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ak, bk))) : Object(_sort_js__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_group_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ak, bk)))) .map(([key]) => key); } /***/ }), /***/ "CYYh": /*!*******************************************!*\ !*** ./node_modules/d3-shape/src/math.js ***! \*******************************************/ /*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); var abs = Math.abs; var atan2 = Math.atan2; var cos = Math.cos; var max = Math.max; var min = Math.min; var sin = Math.sin; var sqrt = Math.sqrt; var epsilon = 1e-12; var pi = Math.PI; var halfPi = pi / 2; var tau = 2 * pi; function acos(x) { return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); } function asin(x) { return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); } /***/ }), /***/ "CbjS": /*!*******************************************************!*\ !*** ./node_modules/d3-format/src/formatSpecifier.js ***! \*******************************************************/ /*! exports provided: default, FormatSpecifier */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatSpecifier; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return FormatSpecifier; }); // [[fill]align][sign][symbol][0][width][,][.precision][~][type] var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; function formatSpecifier(specifier) { if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); var match; return new FormatSpecifier({ fill: match[1], align: match[2], sign: match[3], symbol: match[4], zero: match[5], width: match[6], comma: match[7], precision: match[8] && match[8].slice(1), trim: match[9], type: match[10] }); } formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof function FormatSpecifier(specifier) { this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; this.align = specifier.align === undefined ? ">" : specifier.align + ""; this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; this.zero = !!specifier.zero; this.width = specifier.width === undefined ? undefined : +specifier.width; this.comma = !!specifier.comma; this.precision = specifier.precision === undefined ? undefined : +specifier.precision; this.trim = !!specifier.trim; this.type = specifier.type === undefined ? "" : specifier.type + ""; } FormatSpecifier.prototype.toString = function() { return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type; }; /***/ }), /***/ "CcBx": /*!************************************************!*\ !*** ./node_modules/d3-array/src/deviation.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return deviation; }); /* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance.js */ "7sdT"); function deviation(values, valueof) { const v = Object(_variance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, valueof); return v ? Math.sqrt(v) : v; } /***/ }), /***/ "Cfvw": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/from.js ***! \****************************************************************/ /*! exports provided: from */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeTo */ "SeVD"); /* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduled */ "7HRe"); function from(input, scheduler) { if (!scheduler) { if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) { return input; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input)); } else { return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler); } } //# sourceMappingURL=from.js.map /***/ }), /***/ "CiDq": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/number.js ***! \*********************************************/ /*! exports provided: default, numbers */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "numbers", function() { return numbers; }); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x === null ? NaN : +x; }); function* numbers(values, valueof) { if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { yield value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { yield value; } } } } /***/ }), /***/ "Ckr6": /*!********************************************!*\ !*** ./node_modules/d3-force/src/index.js ***! \********************************************/ /*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _center_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center.js */ "0LFD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return _center_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _collide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collide.js */ "iQ9W"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return _collide_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link.js */ "89eD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return _link_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _manyBody_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./manyBody.js */ "Z9Ww"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return _manyBody_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _radial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./radial.js */ "Wtxg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return _radial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _simulation_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./simulation.js */ "VIHS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return _simulation_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./x.js */ "cnUW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return _x_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./y.js */ "0rNn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return _y_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /***/ }), /***/ "Cnj1": /*!**************************************************!*\ !*** ./node_modules/d3-selection/src/matcher.js ***! \**************************************************/ /*! exports provided: default, childMatcher */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "childMatcher", function() { return childMatcher; }); /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return function() { return this.matches(selector); }; }); function childMatcher(selector) { return function(node) { return node.matches(selector); }; } /***/ }), /***/ "CqXF": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mapTo.js ***! \****************************************************************/ /*! exports provided: mapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function mapTo(value) { return (source) => source.lift(new MapToOperator(value)); } class MapToOperator { constructor(value) { this.value = value; } call(subscriber, source) { return source.subscribe(new MapToSubscriber(subscriber, this.value)); } } class MapToSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, value) { super(destination); this.value = value; } _next(x) { this.destination.next(this.value); } } //# sourceMappingURL=mapTo.js.map /***/ }), /***/ "Ct04": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/call.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var callback = arguments[0]; arguments[0] = this; callback.apply(null, arguments); return this; }); /***/ }), /***/ "Cuxv": /*!********************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***! \********************************************************************/ /*! exports provided: azimuthalEquidistantRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEquidistantRaw", function() { return azimuthalEquidistantRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); var azimuthalEquidistantRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(c) { return (c = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["acos"])(c)) && c / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c); }); azimuthalEquidistantRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { return z; }); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEquidistantRaw) .scale(79.4188) .clipAngle(180 - 1e-3); }); /***/ }), /***/ "D/GG": /*!*****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/styleTween.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function styleInterpolate(name, i, priority) { return function(t) { this.style.setProperty(name, i.call(this, t), priority); }; } function styleTween(name, value, priority) { var t, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority); return t; } tween._value = value; return tween; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { var key = "style." + (name += ""); if (arguments.length < 2) return (key = this.tween(key)) && key._value; if (value == null) return this.tween(key, null); if (typeof value !== "function") throw new Error; return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); }); /***/ }), /***/ "D0XW": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/async.js ***! \****************************************************************/ /*! exports provided: asyncScheduler, async */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return asyncScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); const asyncScheduler = new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]); const async = asyncScheduler; //# sourceMappingURL=async.js.map /***/ }), /***/ "DF+l": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/attrTween.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); function attrInterpolate(name, i) { return function(t) { this.setAttribute(name, i.call(this, t)); }; } function attrInterpolateNS(fullname, i) { return function(t) { this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); }; } function attrTweenNS(fullname, value) { var t0, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i); return t0; } tween._value = value; return tween; } function attrTween(name, value) { var t0, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i); return t0; } tween._value = value; return tween; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var key = "attr." + name; if (arguments.length < 2) return (key = this.tween(key)) && key._value; if (value == null) return this.tween(key, null); if (typeof value !== "function") throw new Error; var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["namespace"])(name); return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); }); /***/ }), /***/ "DH7j": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isArray.js ***! \*************************************************************/ /*! exports provided: isArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; }); const isArray = (() => Array.isArray || ((x) => x && typeof x.length === 'number'))(); //# sourceMappingURL=isArray.js.map /***/ }), /***/ "DHg+": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ece2f0a6bddb1c9099", "f6eff7bdc9e167a9cf02818a", "f6eff7bdc9e167a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "DN/c": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/filter.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher.js */ "Cnj1"); /* harmony default export */ __webpack_exports__["default"] = (function(match) { if (typeof match !== "function") match = Object(_matcher_js__WEBPACK_IMPORTED_MODULE_1__["default"])(match); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { if ((node = group[i]) && match.call(node, node.__data__, i, group)) { subgroup.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); }); /***/ }), /***/ "DdT1": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/round.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(node) { node.x0 = Math.round(node.x0); node.y0 = Math.round(node.y0); node.x1 = Math.round(node.x1); node.y1 = Math.round(node.y1); }); /***/ }), /***/ "DiG6": /*!*************************************************!*\ !*** ./node_modules/d3-contour/src/constant.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "E//B": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "edf8b17fcdbb2c7fb8", "ffffcca1dab441b6c4225ea8", "ffffcca1dab441b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c42c7fb8253494", "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "EQ5u": /*!*********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/ConnectableObservable.js ***! \*********************************************************************************/ /*! exports provided: ConnectableObservable, connectableObservableDescriptor */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../operators/refCount */ "x+ZX"); class ConnectableObservable extends _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"] { constructor(source, subjectFactory) { super(); this.source = source; this.subjectFactory = subjectFactory; this._refCount = 0; this._isComplete = false; } _subscribe(subscriber) { return this.getSubject().subscribe(subscriber); } getSubject() { const subject = this._subject; if (!subject || subject.isStopped) { this._subject = this.subjectFactory(); } return this._subject; } connect() { let connection = this._connection; if (!connection) { this._isComplete = false; connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"](); connection.add(this.source .subscribe(new ConnectableSubscriber(this.getSubject(), this))); if (connection.closed) { this._connection = null; connection = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY; } } return connection; } refCount() { return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_4__["refCount"])()(this); } } const connectableObservableDescriptor = (() => { const connectableProto = ConnectableObservable.prototype; return { operator: { value: null }, _refCount: { value: 0, writable: true }, _subject: { value: null, writable: true }, _connection: { value: null, writable: true }, _subscribe: { value: connectableProto._subscribe }, _isComplete: { value: connectableProto._isComplete, writable: true }, getSubject: { value: connectableProto.getSubject }, connect: { value: connectableProto.connect }, refCount: { value: connectableProto.refCount } }; })(); class ConnectableSubscriber extends _Subject__WEBPACK_IMPORTED_MODULE_0__["SubjectSubscriber"] { constructor(destination, connectable) { super(destination); this.connectable = connectable; } _error(err) { this._unsubscribe(); super._error(err); } _complete() { this.connectable._isComplete = true; this._unsubscribe(); super._complete(); } _unsubscribe() { const connectable = this.connectable; if (connectable) { this.connectable = null; const connection = connectable._connection; connectable._refCount = 0; connectable._subject = null; connectable._connection = null; if (connection) { connection.unsubscribe(); } } } } class RefCountOperator { constructor(connectable) { this.connectable = connectable; } call(subscriber, source) { const { connectable } = this; connectable._refCount++; const refCounter = new RefCountSubscriber(subscriber, connectable); const subscription = source.subscribe(refCounter); if (!refCounter.closed) { refCounter.connection = connectable.connect(); } return subscription; } } class RefCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, connectable) { super(destination); this.connectable = connectable; } _unsubscribe() { const { connectable } = this; if (!connectable) { this.connection = null; return; } this.connectable = null; const refCount = connectable._refCount; if (refCount <= 0) { this.connection = null; return; } connectable._refCount = refCount - 1; if (refCount > 1) { this.connection = null; return; } const { connection } = this; const sharedConnection = connectable._connection; this.connection = null; if (sharedConnection && (!connection || sharedConnection === connection)) { sharedConnection.unsubscribe(); } } } //# sourceMappingURL=ConnectableObservable.js.map /***/ }), /***/ "EUnC": /*!************************************************!*\ !*** ./node_modules/d3-format/src/identity.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x; }); /***/ }), /***/ "EVP4": /*!***********************************************!*\ !*** ./node_modules/d3-quadtree/src/visit.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "p/7N"); /* harmony default export */ __webpack_exports__["default"] = (function(callback) { var quads = [], q, node = this._root, child, x0, y0, x1, y1; if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, this._x0, this._y0, this._x1, this._y1)); while (q = quads.pop()) { if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); } } return this; }); /***/ }), /***/ "EY2u": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/empty.js ***! \*****************************************************************/ /*! exports provided: EMPTY, empty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); const EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => subscriber.complete()); function empty(scheduler) { return scheduler ? emptyScheduled(scheduler) : EMPTY; } function emptyScheduled(scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => scheduler.schedule(() => subscriber.complete())); } //# sourceMappingURL=empty.js.map /***/ }), /***/ "EgnQ": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/data.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _enter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter.js */ "9om9"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../array.js */ "wibz"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ "0llg"); function bindIndex(parent, group, enter, update, exit, data) { var i = 0, node, groupLength = group.length, dataLength = data.length; // Put any non-null nodes that fit into update. // Put any null nodes into enter. // Put any remaining data into enter. for (; i < dataLength; ++i) { if (node = group[i]) { node.__data__ = data[i]; update[i] = node; } else { enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); } } // Put any non-null nodes that don’t fit into exit. for (; i < groupLength; ++i) { if (node = group[i]) { exit[i] = node; } } } function bindKey(parent, group, enter, update, exit, data, key) { var i, node, nodeByKeyValue = new Map, groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; // Compute the key for each node. // If multiple nodes have the same key, the duplicates are added to exit. for (i = 0; i < groupLength; ++i) { if (node = group[i]) { keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; if (nodeByKeyValue.has(keyValue)) { exit[i] = node; } else { nodeByKeyValue.set(keyValue, node); } } } // Compute the key for each datum. // If there a node associated with this key, join and add it to update. // If there is not (or the key is a duplicate), add it to enter. for (i = 0; i < dataLength; ++i) { keyValue = key.call(parent, data[i], i, data) + ""; if (node = nodeByKeyValue.get(keyValue)) { update[i] = node; node.__data__ = data[i]; nodeByKeyValue.delete(keyValue); } else { enter[i] = new _enter_js__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); } } // Add any remaining nodes that were not bound to data to exit. for (i = 0; i < groupLength; ++i) { if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) { exit[i] = node; } } } function datum(node) { return node.__data__; } /* harmony default export */ __webpack_exports__["default"] = (function(value, key) { if (!arguments.length) return Array.from(this, datum); var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups; if (typeof value !== "function") value = Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(value); for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { var parent = parents[j], group = groups[j], groupLength = group.length, data = Object(_array_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength); bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); // Now connect the enter nodes to their following update node, such that // appendChild can insert the materialized enter node before this node, // rather than at the end of the parent node. for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { if (previous = enterGroup[i0]) { if (i0 >= i1) i1 = i0 + 1; while (!(next = updateGroup[i1]) && ++i1 < dataLength); previous._next = next || null; } } } update = new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](update, parents); update._enter = enter; update._exit = exit; return update; }); /***/ }), /***/ "EjHT": /*!*****************************************************!*\ !*** ./node_modules/d3-format/src/defaultLocale.js ***! \*****************************************************/ /*! exports provided: format, formatPrefix, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return formatPrefix; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "sXBl"); var locale; var format; var formatPrefix; defaultLocale({ thousands: ",", grouping: [3], currency: ["$", ""] }); function defaultLocale(definition) { locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); format = locale.format; formatPrefix = locale.formatPrefix; return locale; } /***/ }), /***/ "El5h": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/lab.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function lab(start, end) { var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(end)).l), a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.a, end.a), b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.b, end.b), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.l = l(t); start.a = a(t); start.b = b(t); start.opacity = opacity(t); return start + ""; }; } /***/ }), /***/ "Enya": /*!****************************************************!*\ !*** ./node_modules/d3-selection/src/selectAll.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "wibz"); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selection/index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return typeof selector === "string" ? new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"]([document.querySelectorAll(selector)], [document.documentElement]) : new _selection_index_js__WEBPACK_IMPORTED_MODULE_1__["Selection"]([selector == null ? [] : Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(selector)], _selection_index_js__WEBPACK_IMPORTED_MODULE_1__["root"]); }); /***/ }), /***/ "Exv/": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/sort.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sort; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./permute.js */ "MiBC"); function sort(values, ...F) { if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); values = Array.from(values); let [f = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]] = F; if (f.length === 1 || F.length > 1) { const index = Uint32Array.from(values, (d, i) => i); if (F.length > 1) { F = F.map(f => values.map(f)); index.sort((i, j) => { for (const f of F) { const c = Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(f[i], f[j]); if (c) return c; } }); } else { f = values.map(f); index.sort((i, j) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(f[i], f[j])); } return Object(_permute_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, index); } return values.sort(f); } /***/ }), /***/ "EyRP": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/pointRadial.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x, y) { return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; }); /***/ }), /***/ "EyUX": /*!*************************************************!*\ !*** ./node_modules/d3-geo/src/path/measure.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "mPOO"); var lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), lengthRing, x00, y00, x0, y0; var lengthStream = { point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: function() { lengthStream.point = lengthPointFirst; }, lineEnd: function() { if (lengthRing) lengthPoint(x00, y00); lengthStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }, polygonStart: function() { lengthRing = true; }, polygonEnd: function() { lengthRing = null; }, result: function() { var length = +lengthSum; lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); return length; } }; function lengthPointFirst(x, y) { lengthStream.point = lengthPoint; x00 = x0 = x, y00 = y0 = y; } function lengthPoint(x, y) { x0 -= x, y0 -= y; lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x0 * x0 + y0 * y0)); x0 = x, y0 = y; } /* harmony default export */ __webpack_exports__["default"] = (lengthStream); /***/ }), /***/ "F2eR": /*!***************************************************!*\ !*** ./node_modules/d3-geo/src/clip/rectangle.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return clipRectangle; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ "ODVu"); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "SGTC"); /* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin.js */ "5xK/"); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "vBe5"); var clipMax = 1e9, clipMin = -clipMax; // TODO Use d3-polygon’s polygonContains here for the ring check? // TODO Eliminate duplicate buffering in clipBuffer and polygon.push? function clipRectangle(x0, y0, x1, y1) { function visible(x, y) { return x0 <= x && x <= x1 && y0 <= y && y <= y1; } function interpolate(from, to, direction, stream) { var a = 0, a1 = 0; if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoint(from, to) < 0 ^ direction > 0) { do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); while ((a = (a + direction + 4) % 4) !== a1); } else { stream.point(to[0], to[1]); } } function corner(p, direction) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 0 : 3 : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x1) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 2 : 1 : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[1] - y0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon } function compareIntersection(a, b) { return comparePoint(a.x, b.x); } function comparePoint(a, b) { var ca = corner(a, 1), cb = corner(b, 1); return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0]; } return function(stream) { var activeStream = stream, bufferStream = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), segments, polygon, ring, x__, y__, v__, // first point x_, y_, v_, // previous point first, clean; var clipStream = { point: point, lineStart: lineStart, lineEnd: lineEnd, polygonStart: polygonStart, polygonEnd: polygonEnd }; function point(x, y) { if (visible(x, y)) activeStream.point(x, y); } function polygonInside() { var winding = 0; for (var i = 0, n = polygon.length; i < n; ++i) { for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } } } return winding; } // Buffer geometry within a polygon and then clip it en masse. function polygonStart() { activeStream = bufferStream, segments = [], polygon = [], clean = true; } function polygonEnd() { var startInside = polygonInside(), cleanInside = clean && startInside, visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments)).length; if (cleanInside || visible) { stream.polygonStart(); if (cleanInside) { stream.lineStart(); interpolate(null, null, 1, stream); stream.lineEnd(); } if (visible) { Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_3__["default"])(segments, compareIntersection, startInside, interpolate, stream); } stream.polygonEnd(); } activeStream = stream, segments = polygon = ring = null; } function lineStart() { clipStream.point = linePoint; if (polygon) polygon.push(ring = []); first = true; v_ = false; x_ = y_ = NaN; } // TODO rather than special-case polygons, simply handle them separately. // Ideally, coincident intersection points should be jittered to avoid // clipping issues. function lineEnd() { if (segments) { linePoint(x__, y__); if (v__ && v_) bufferStream.rejoin(); segments.push(bufferStream.result()); } clipStream.point = point; if (v_) activeStream.lineEnd(); } function linePoint(x, y) { var v = visible(x, y); if (polygon) ring.push([x, y]); if (first) { x__ = x, y__ = y, v__ = v; first = false; if (v) { activeStream.lineStart(); activeStream.point(x, y); } } else { if (v && v_) activeStream.point(x, y); else { var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; if (Object(_line_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b, x0, y0, x1, y1)) { if (!v_) { activeStream.lineStart(); activeStream.point(a[0], a[1]); } activeStream.point(b[0], b[1]); if (!v) activeStream.lineEnd(); clean = false; } else if (v) { activeStream.lineStart(); activeStream.point(x, y); clean = false; } } } x_ = x, y_ = y, v_ = v; } return clipStream; }; } /***/ }), /***/ "F8PK": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/lower.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function lower() { if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.each(lower); }); /***/ }), /***/ "F97/": /*!*********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/not.js ***! \*********************************************************/ /*! exports provided: not */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; }); function not(pred, thisArg) { function notPred() { return !(notPred.pred.apply(notPred.thisArg, arguments)); } notPred.pred = pred; notPred.thisArg = thisArg; return notPred; } //# sourceMappingURL=not.js.map /***/ }), /***/ "FD9M": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferToggle.js ***! \***********************************************************************/ /*! exports provided: bufferToggle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); function bufferToggle(openings, closingSelector) { return function bufferToggleOperatorFunction(source) { return source.lift(new BufferToggleOperator(openings, closingSelector)); }; } class BufferToggleOperator { constructor(openings, closingSelector) { this.openings = openings; this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector)); } } class BufferToggleSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, openings, closingSelector) { super(destination); this.closingSelector = closingSelector; this.contexts = []; this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, openings)); } _next(value) { const contexts = this.contexts; const len = contexts.length; for (let i = 0; i < len; i++) { contexts[i].buffer.push(value); } } _error(err) { const contexts = this.contexts; while (contexts.length > 0) { const context = contexts.shift(); context.subscription.unsubscribe(); context.buffer = null; context.subscription = null; } this.contexts = null; super._error(err); } _complete() { const contexts = this.contexts; while (contexts.length > 0) { const context = contexts.shift(); this.destination.next(context.buffer); context.subscription.unsubscribe(); context.buffer = null; context.subscription = null; } this.contexts = null; super._complete(); } notifyNext(outerValue, innerValue) { outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue); } notifyComplete(innerSub) { this.closeBuffer(innerSub.context); } openBuffer(value) { try { const closingSelector = this.closingSelector; const closingNotifier = closingSelector.call(this, value); if (closingNotifier) { this.trySubscribe(closingNotifier); } } catch (err) { this._error(err); } } closeBuffer(context) { const contexts = this.contexts; if (contexts && context) { const { buffer, subscription } = context; this.destination.next(buffer); contexts.splice(contexts.indexOf(context), 1); this.remove(subscription); subscription.unsubscribe(); } } trySubscribe(closingNotifier) { const contexts = this.contexts; const buffer = []; const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"](); const context = { buffer, subscription }; contexts.push(context); const innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, closingNotifier, context); if (!innerSubscription || innerSubscription.closed) { this.closeBuffer(context); } else { innerSubscription.context = context; this.add(innerSubscription); subscription.add(innerSubscription); } } } //# sourceMappingURL=bufferToggle.js.map /***/ }), /***/ "FPPI": /*!*******************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/dice.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { var nodes = parent.children, node, i = -1, n = nodes.length, k = parent.value && (x1 - x0) / parent.value; while (++i < n) { node = nodes[i], node.y0 = y0, node.y1 = y1; node.x0 = x0, node.x1 = x0 += node.value * k; } }); /***/ }), /***/ "FQpF": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/expand.js ***! \*****************************************************************/ /*! exports provided: expand, ExpandOperator, ExpandSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler) { concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent; return (source) => source.lift(new ExpandOperator(project, concurrent, scheduler)); } class ExpandOperator { constructor(project, concurrent, scheduler) { this.project = project; this.concurrent = concurrent; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler)); } } class ExpandSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, project, concurrent, scheduler) { super(destination); this.project = project; this.concurrent = concurrent; this.scheduler = scheduler; this.index = 0; this.active = 0; this.hasCompleted = false; if (concurrent < Number.POSITIVE_INFINITY) { this.buffer = []; } } static dispatch(arg) { const { subscriber, result, value, index } = arg; subscriber.subscribeToProjection(result, value, index); } _next(value) { const destination = this.destination; if (destination.closed) { this._complete(); return; } const index = this.index++; if (this.active < this.concurrent) { destination.next(value); try { const { project } = this; const result = project(value, index); if (!this.scheduler) { this.subscribeToProjection(result, value, index); } else { const state = { subscriber: this, result, value, index }; const destination = this.destination; destination.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state)); } } catch (e) { destination.error(e); } } else { this.buffer.push(value); } } subscribeToProjection(result, value, index) { this.active++; const destination = this.destination; destination.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } _complete() { this.hasCompleted = true; if (this.hasCompleted && this.active === 0) { this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { this._next(innerValue); } notifyComplete() { const buffer = this.buffer; this.active--; if (buffer && buffer.length > 0) { this._next(buffer.shift()); } if (this.hasCompleted && this.active === 0) { this.destination.complete(); } } } //# sourceMappingURL=expand.js.map /***/ }), /***/ "FTmn": /*!********************************************!*\ !*** ./node_modules/d3-array/src/merge.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return merge; }); function* flatten(arrays) { for (const array of arrays) { yield* array; } } function merge(arrays) { return Array.from(flatten(arrays)); } /***/ }), /***/ "FWfd": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/geometric.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomGeometric(source) { function randomGeometric(p) { if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); if (p === 0) return () => Infinity; if (p === 1) return () => 1; p = Math.log1p(-p); return function() { return 1 + Math.floor(Math.log1p(-source()) / p); }; } randomGeometric.source = sourceRandomGeometric; return randomGeometric; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "FZB8": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/min.js ***! \**************************************************************/ /*! exports provided: min */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); function min(comparer) { const min = (typeof comparer === 'function') ? (x, y) => comparer(x, y) < 0 ? x : y : (x, y) => x < y ? x : y; return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min); } //# sourceMappingURL=min.js.map /***/ }), /***/ "Faen": /*!************************************************!*\ !*** ./node_modules/d3-color/src/cubehelix.js ***! \************************************************/ /*! exports provided: default, Cubehelix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cubehelix; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubehelix", function() { return Cubehelix; }); /* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "Y62N"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "FmoU"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "Uwo/"); var A = -0.14861, B = +1.78277, C = -0.29227, D = -0.90649, E = +1.97294, ED = E * D, EB = E * B, BC_DA = B * C - D * A; function cubehelixConvert(o) { if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); var r = o.r / 255, g = o.g / 255, b = o.b / 255, l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), bl = b - l, k = (E * (g - l) - C * bl) / D, s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"] - 120 : NaN; return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); } function cubehelix(h, s, l, opacity) { return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); } function Cubehelix(h, s, l, opacity) { this.h = +h; this.s = +s; this.l = +l; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { brighter: function(k) { k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"], k); return new Cubehelix(this.h, this.s, this.l * k, this.opacity); }, darker: function(k) { k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["darker"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["darker"], k); return new Cubehelix(this.h, this.s, this.l * k, this.opacity); }, rgb: function() { var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], l = +this.l, a = isNaN(this.s) ? 0 : this.s * l * (1 - l), cosh = Math.cos(h), sinh = Math.sin(h); return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( 255 * (l + a * (A * cosh + B * sinh)), 255 * (l + a * (C * cosh + D * sinh)), 255 * (l + a * (E * cosh)), this.opacity ); } })); /***/ }), /***/ "FmoU": /*!********************************************!*\ !*** ./node_modules/d3-color/src/color.js ***! \********************************************/ /*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darker", function() { return darker; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brighter", function() { return brighter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return color; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbConvert", function() { return rgbConvert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rgb", function() { return Rgb; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslConvert", function() { return hslConvert; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; }); /* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "Y62N"); function Color() {} var darker = 0.7; var brighter = 1 / darker; var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); var named = { aliceblue: 0xf0f8ff, antiquewhite: 0xfaebd7, aqua: 0x00ffff, aquamarine: 0x7fffd4, azure: 0xf0ffff, beige: 0xf5f5dc, bisque: 0xffe4c4, black: 0x000000, blanchedalmond: 0xffebcd, blue: 0x0000ff, blueviolet: 0x8a2be2, brown: 0xa52a2a, burlywood: 0xdeb887, cadetblue: 0x5f9ea0, chartreuse: 0x7fff00, chocolate: 0xd2691e, coral: 0xff7f50, cornflowerblue: 0x6495ed, cornsilk: 0xfff8dc, crimson: 0xdc143c, cyan: 0x00ffff, darkblue: 0x00008b, darkcyan: 0x008b8b, darkgoldenrod: 0xb8860b, darkgray: 0xa9a9a9, darkgreen: 0x006400, darkgrey: 0xa9a9a9, darkkhaki: 0xbdb76b, darkmagenta: 0x8b008b, darkolivegreen: 0x556b2f, darkorange: 0xff8c00, darkorchid: 0x9932cc, darkred: 0x8b0000, darksalmon: 0xe9967a, darkseagreen: 0x8fbc8f, darkslateblue: 0x483d8b, darkslategray: 0x2f4f4f, darkslategrey: 0x2f4f4f, darkturquoise: 0x00ced1, darkviolet: 0x9400d3, deeppink: 0xff1493, deepskyblue: 0x00bfff, dimgray: 0x696969, dimgrey: 0x696969, dodgerblue: 0x1e90ff, firebrick: 0xb22222, floralwhite: 0xfffaf0, forestgreen: 0x228b22, fuchsia: 0xff00ff, gainsboro: 0xdcdcdc, ghostwhite: 0xf8f8ff, gold: 0xffd700, goldenrod: 0xdaa520, gray: 0x808080, green: 0x008000, greenyellow: 0xadff2f, grey: 0x808080, honeydew: 0xf0fff0, hotpink: 0xff69b4, indianred: 0xcd5c5c, indigo: 0x4b0082, ivory: 0xfffff0, khaki: 0xf0e68c, lavender: 0xe6e6fa, lavenderblush: 0xfff0f5, lawngreen: 0x7cfc00, lemonchiffon: 0xfffacd, lightblue: 0xadd8e6, lightcoral: 0xf08080, lightcyan: 0xe0ffff, lightgoldenrodyellow: 0xfafad2, lightgray: 0xd3d3d3, lightgreen: 0x90ee90, lightgrey: 0xd3d3d3, lightpink: 0xffb6c1, lightsalmon: 0xffa07a, lightseagreen: 0x20b2aa, lightskyblue: 0x87cefa, lightslategray: 0x778899, lightslategrey: 0x778899, lightsteelblue: 0xb0c4de, lightyellow: 0xffffe0, lime: 0x00ff00, limegreen: 0x32cd32, linen: 0xfaf0e6, magenta: 0xff00ff, maroon: 0x800000, mediumaquamarine: 0x66cdaa, mediumblue: 0x0000cd, mediumorchid: 0xba55d3, mediumpurple: 0x9370db, mediumseagreen: 0x3cb371, mediumslateblue: 0x7b68ee, mediumspringgreen: 0x00fa9a, mediumturquoise: 0x48d1cc, mediumvioletred: 0xc71585, midnightblue: 0x191970, mintcream: 0xf5fffa, mistyrose: 0xffe4e1, moccasin: 0xffe4b5, navajowhite: 0xffdead, navy: 0x000080, oldlace: 0xfdf5e6, olive: 0x808000, olivedrab: 0x6b8e23, orange: 0xffa500, orangered: 0xff4500, orchid: 0xda70d6, palegoldenrod: 0xeee8aa, palegreen: 0x98fb98, paleturquoise: 0xafeeee, palevioletred: 0xdb7093, papayawhip: 0xffefd5, peachpuff: 0xffdab9, peru: 0xcd853f, pink: 0xffc0cb, plum: 0xdda0dd, powderblue: 0xb0e0e6, purple: 0x800080, rebeccapurple: 0x663399, red: 0xff0000, rosybrown: 0xbc8f8f, royalblue: 0x4169e1, saddlebrown: 0x8b4513, salmon: 0xfa8072, sandybrown: 0xf4a460, seagreen: 0x2e8b57, seashell: 0xfff5ee, sienna: 0xa0522d, silver: 0xc0c0c0, skyblue: 0x87ceeb, slateblue: 0x6a5acd, slategray: 0x708090, slategrey: 0x708090, snow: 0xfffafa, springgreen: 0x00ff7f, steelblue: 0x4682b4, tan: 0xd2b48c, teal: 0x008080, thistle: 0xd8bfd8, tomato: 0xff6347, turquoise: 0x40e0d0, violet: 0xee82ee, wheat: 0xf5deb3, white: 0xffffff, whitesmoke: 0xf5f5f5, yellow: 0xffff00, yellowgreen: 0x9acd32 }; Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, { copy: function(channels) { return Object.assign(new this.constructor, this, channels); }, displayable: function() { return this.rgb().displayable(); }, hex: color_formatHex, // Deprecated! Use color.formatHex. formatHex: color_formatHex, formatHsl: color_formatHsl, formatRgb: color_formatRgb, toString: color_formatRgb }); function color_formatHex() { return this.rgb().formatHex(); } function color_formatHsl() { return hslConvert(this).formatHsl(); } function color_formatRgb() { return this.rgb().formatRgb(); } function color(format) { var m, l; format = (format + "").trim().toLowerCase(); return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 : null) // invalid hex : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; } function rgbn(n) { return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); } function rgba(r, g, b, a) { if (a <= 0) r = g = b = NaN; return new Rgb(r, g, b, a); } function rgbConvert(o) { if (!(o instanceof Color)) o = color(o); if (!o) return new Rgb; o = o.rgb(); return new Rgb(o.r, o.g, o.b, o.opacity); } function rgb(r, g, b, opacity) { return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); } function Rgb(r, g, b, opacity) { this.r = +r; this.g = +g; this.b = +b; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { brighter: function(k) { k = k == null ? brighter : Math.pow(brighter, k); return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); }, darker: function(k) { k = k == null ? darker : Math.pow(darker, k); return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); }, rgb: function() { return this; }, displayable: function() { return (-0.5 <= this.r && this.r < 255.5) && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1); }, hex: rgb_formatHex, // Deprecated! Use color.formatHex. formatHex: rgb_formatHex, formatRgb: rgb_formatRgb, toString: rgb_formatRgb })); function rgb_formatHex() { return "#" + hex(this.r) + hex(this.g) + hex(this.b); } function rgb_formatRgb() { var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")"); } function hex(value) { value = Math.max(0, Math.min(255, Math.round(value) || 0)); return (value < 16 ? "0" : "") + value.toString(16); } function hsla(h, s, l, a) { if (a <= 0) h = s = l = NaN; else if (l <= 0 || l >= 1) h = s = NaN; else if (s <= 0) h = NaN; return new Hsl(h, s, l, a); } function hslConvert(o) { if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); if (!(o instanceof Color)) o = color(o); if (!o) return new Hsl; if (o instanceof Hsl) return o; o = o.rgb(); var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h = NaN, s = max - min, l = (max + min) / 2; if (s) { if (r === max) h = (g - b) / s + (g < b) * 6; else if (g === max) h = (b - r) / s + 2; else h = (r - g) / s + 4; s /= l < 0.5 ? max + min : 2 - max - min; h *= 60; } else { s = l > 0 && l < 1 ? 0 : h; } return new Hsl(h, s, l, o.opacity); } function hsl(h, s, l, opacity) { return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); } function Hsl(h, s, l, opacity) { this.h = +h; this.s = +s; this.l = +l; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { brighter: function(k) { k = k == null ? brighter : Math.pow(brighter, k); return new Hsl(this.h, this.s, this.l * k, this.opacity); }, darker: function(k) { k = k == null ? darker : Math.pow(darker, k); return new Hsl(this.h, this.s, this.l * k, this.opacity); }, rgb: function() { var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < 0.5 ? l : 1 - l) * s, m1 = 2 * l - m2; return new Rgb( hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity ); }, displayable: function() { return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && (0 <= this.l && this.l <= 1) && (0 <= this.opacity && this.opacity <= 1); }, formatHsl: function() { var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")"); } })); /* From FvD 13.37, CSS Color Module Level 3 */ function hsl2rgb(h, m1, m2) { return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; } /***/ }), /***/ "Fzhe": /*!**********************************************!*\ !*** ./node_modules/d3-time/src/duration.js ***! \**********************************************/ /*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationSecond", function() { return durationSecond; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationMinute", function() { return durationMinute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationHour", function() { return durationHour; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationDay", function() { return durationDay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationWeek", function() { return durationWeek; }); var durationSecond = 1e3; var durationMinute = 6e4; var durationHour = 36e5; var durationDay = 864e5; var durationWeek = 6048e5; /***/ }), /***/ "G0FW": /*!************************************************!*\ !*** ./node_modules/d3-quadtree/src/remove.js ***! \************************************************/ /*! exports provided: default, removeAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAll", function() { return removeAll; }); /* harmony default export */ __webpack_exports__["default"] = (function(d) { if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points var parent, node = this._root, retainer, previous, next, x0 = this._x0, y0 = this._y0, x1 = this._x1, y1 = this._y1, x, y, xm, ym, right, bottom, i, j; // If the tree is empty, initialize the root as a leaf. if (!node) return this; // Find the leaf node for the point. // While descending, also retain the deepest parent with a non-removed sibling. if (node.length) while (true) { if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; if (!(parent = node, node = node[i = bottom << 1 | right])) return this; if (!node.length) break; if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; } // Find the point to remove. while (node.data !== d) if (!(previous = node, node = node.next)) return this; if (next = node.next) delete node.next; // If there are multiple coincident points, remove just the point. if (previous) return (next ? previous.next = next : delete previous.next), this; // If this is the root point, remove it. if (!parent) return this._root = next, this; // Remove this leaf. next ? parent[i] = next : delete parent[i]; // If the parent now contains exactly one leaf, collapse superfluous parents. if ((node = parent[0] || parent[1] || parent[2] || parent[3]) && node === (parent[3] || parent[2] || parent[1] || parent[0]) && !node.length) { if (retainer) retainer[j] = node; else this._root = node; } return this; }); function removeAll(data) { for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); return this; } /***/ }), /***/ "G21l": /*!*************************************************!*\ !*** ./node_modules/d3-interpolate/src/date.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var d = new Date; return a = +a, b = +b, function(t) { return d.setTime(a * (1 - t) + b * t), d; }; }); /***/ }), /***/ "G3Uy": /*!************************************************!*\ !*** ./node_modules/d3-random/src/logistic.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomLogistic(source) { function randomLogistic(a, b) { a = a == null ? 0 : +a; b = b == null ? 1 : +b; return function() { var u = source(); return a + b * Math.log(u / (1 - u)); }; } randomLogistic.source = sourceRandomLogistic; return randomLogistic; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "G4XB": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/logNormal.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal.js */ "ptze"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomLogNormal(source) { var N = _normal_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomLogNormal() { var randomNormal = N.apply(this, arguments); return function() { return Math.exp(randomNormal()); }; } randomLogNormal.source = sourceRandomLogNormal; return randomLogNormal; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "GAlb": /*!*************************************************!*\ !*** ./node_modules/d3-time/src/millisecond.js ***! \*************************************************/ /*! exports provided: default, milliseconds */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "milliseconds", function() { return milliseconds; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function() { // noop }, function(date, step) { date.setTime(+date + step); }, function(start, end) { return end - start; }); // An optimized implementation for this simple case. millisecond.every = function(k) { k = Math.floor(k); if (!isFinite(k) || !(k > 0)) return null; if (!(k > 1)) return millisecond; return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(Math.floor(date / k) * k); }, function(date, step) { date.setTime(+date + step * k); }, function(start, end) { return (end - start) / k; }); }; /* harmony default export */ __webpack_exports__["default"] = (millisecond); var milliseconds = millisecond.range; /***/ }), /***/ "GHWt": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/quantile.js ***! \***********************************************/ /*! exports provided: default, quantileSorted */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return quantileSorted; }); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./max.js */ "gj+k"); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ "mrVq"); /* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quickselect.js */ "WHjf"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ "CiDq"); function quantile(values, p, valueof) { values = Float64Array.from(Object(_number_js__WEBPACK_IMPORTED_MODULE_3__["numbers"])(values, valueof)); if (!(n = values.length)) return; if ((p = +p) <= 0 || n < 2) return Object(_min_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values); if (p >= 1) return Object(_max_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values); var n, i = (n - 1) * p, i0 = Math.floor(i), value0 = Object(_max_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_quickselect_js__WEBPACK_IMPORTED_MODULE_2__["default"])(values, i0).subarray(0, i0 + 1)), value1 = Object(_min_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values.subarray(i0 + 1)); return value0 + (value1 - value0) * (i - i0); } function quantileSorted(values, p, valueof = _number_js__WEBPACK_IMPORTED_MODULE_3__["default"]) { if (!(n = values.length)) return; if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); if (p >= 1) return +valueof(values[n - 1], n - 1, values); var n, i = (n - 1) * p, i0 = Math.floor(i), value0 = +valueof(values[i0], i0, values), value1 = +valueof(values[i0 + 1], i0 + 1, values); return value0 + (value1 - value0) * (i - i0); } /***/ }), /***/ "GJmQ": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/takeWhile.js ***! \********************************************************************/ /*! exports provided: takeWhile */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function takeWhile(predicate, inclusive = false) { return (source) => source.lift(new TakeWhileOperator(predicate, inclusive)); } class TakeWhileOperator { constructor(predicate, inclusive) { this.predicate = predicate; this.inclusive = inclusive; } call(subscriber, source) { return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive)); } } class TakeWhileSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, inclusive) { super(destination); this.predicate = predicate; this.inclusive = inclusive; this.index = 0; } _next(value) { const destination = this.destination; let result; try { result = this.predicate(value, this.index++); } catch (err) { destination.error(err); return; } this.nextOrComplete(value, result); } nextOrComplete(value, predicateResult) { const destination = this.destination; if (Boolean(predicateResult)) { destination.next(value); } else { if (this.inclusive) { destination.next(value); } destination.complete(); } } } //# sourceMappingURL=takeWhile.js.map /***/ }), /***/ "GOKn": /*!**********************************************!*\ !*** ./node_modules/d3-time/src/interval.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return newInterval; }); var t0 = new Date, t1 = new Date; function newInterval(floori, offseti, count, field) { function interval(date) { return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; } interval.floor = function(date) { return floori(date = new Date(+date)), date; }; interval.ceil = function(date) { return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; }; interval.round = function(date) { var d0 = interval(date), d1 = interval.ceil(date); return date - d0 < d1 - date ? d0 : d1; }; interval.offset = function(date, step) { return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; }; interval.range = function(start, stop, step) { var range = [], previous; start = interval.ceil(start); step = step == null ? 1 : Math.floor(step); if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date do range.push(previous = new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop); return range; }; interval.filter = function(test) { return newInterval(function(date) { if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); }, function(date, step) { if (date >= date) { if (step < 0) while (++step <= 0) { while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty } else while (--step >= 0) { while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty } } }); }; if (count) { interval.count = function(start, end) { t0.setTime(+start), t1.setTime(+end); floori(t0), floori(t1); return Math.floor(count(t0, t1)); }; interval.every = function(step) { step = Math.floor(step); return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function(d) { return field(d) % step === 0; } : function(d) { return interval.count(0, d) % step === 0; }); }; } return interval; } /***/ }), /***/ "GQZn": /*!***********************************************!*\ !*** ./node_modules/d3-shape/src/identity.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(d) { return d; }); /***/ }), /***/ "GRP9": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/raise.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function raise() { if (this.nextSibling) this.parentNode.appendChild(this); } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.each(raise); }); /***/ }), /***/ "GWx9": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/nice.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nice; }); /* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ticks.js */ "7ssf"); function nice(start, stop, count) { let prestep; while (true) { const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); if (step === prestep || step === 0 || !isFinite(step)) { return [start, stop]; } else if (step > 0) { start = Math.floor(start / step) * step; stop = Math.ceil(stop / step) * step; } else if (step < 0) { start = Math.ceil(start * step) / step; stop = Math.floor(stop * step) / step; } prestep = step; } } /***/ }), /***/ "Gi4w": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/every.js ***! \****************************************************************/ /*! exports provided: every */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function every(predicate, thisArg) { return (source) => source.lift(new EveryOperator(predicate, thisArg, source)); } class EveryOperator { constructor(predicate, thisArg, source) { this.predicate = predicate; this.thisArg = thisArg; this.source = source; } call(observer, source) { return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source)); } } class EverySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, thisArg, source) { super(destination); this.predicate = predicate; this.thisArg = thisArg; this.source = source; this.index = 0; this.thisArg = thisArg || this; } notifyComplete(everyValueMatch) { this.destination.next(everyValueMatch); this.destination.complete(); } _next(value) { let result = false; try { result = this.predicate.call(this.thisArg, value, this.index++, this.source); } catch (err) { this.destination.error(err); return; } if (!result) { this.notifyComplete(false); } } _complete() { this.notifyComplete(true); } } //# sourceMappingURL=every.js.map /***/ }), /***/ "GjHo": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/zip.js ***! \**************************************************************/ /*! exports provided: zip */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; }); /* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "1uah"); function zip(...observables) { return function zipOperatorFunction(source) { return source.lift.call(Object(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"])(source, ...observables)); }; } //# sourceMappingURL=zip.js.map /***/ }), /***/ "GjTP": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/offset/expand.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "0T5i"); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0)) return; for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; } Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), /***/ "Goif": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/link/index.js ***! \*************************************************/ /*! exports provided: linkHorizontal, linkVertical, linkRadial */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return linkHorizontal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return linkVertical; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return linkRadial; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "2K37"); /* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ "/aQN"); /* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ "EyRP"); function linkSource(d) { return d.source; } function linkTarget(d) { return d.target; } function link(curve) { var source = linkSource, target = linkTarget, x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], context = null; function link() { var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); if (buffer) return context = null, buffer + "" || null; } link.source = function(_) { return arguments.length ? (source = _, link) : source; }; link.target = function(_) { return arguments.length ? (target = _, link) : target; }; link.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : x; }; link.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : y; }; link.context = function(_) { return arguments.length ? ((context = _ == null ? null : _), link) : context; }; return link; } function curveHorizontal(context, x0, y0, x1, y1) { context.moveTo(x0, y0); context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); } function curveVertical(context, x0, y0, x1, y1) { context.moveTo(x0, y0); context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); } function curveRadial(context, x0, y0, x1, y1) { var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0), p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0 = (y0 + y1) / 2), p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y0), p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y1); context.moveTo(p0[0], p0[1]); context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); } function linkHorizontal() { return link(curveHorizontal); } function linkVertical() { return link(curveVertical); } function linkRadial() { var l = link(curveRadial); l.angle = l.x, delete l.x; l.radius = l.y, delete l.y; return l; } /***/ }), /***/ "GpRi": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/areaRadial.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "JnD7"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "44y/"); /* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ "TI0E"); /* harmony default export */ __webpack_exports__["default"] = (function() { var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"]), c = a.curve, x0 = a.lineX0, x1 = a.lineX1, y0 = a.lineY0, y1 = a.lineY1; a.angle = a.x, delete a.x; a.startAngle = a.x0, delete a.x0; a.endAngle = a.x1, delete a.x1; a.radius = a.y, delete a.y; a.innerRadius = a.y0, delete a.y0; a.outerRadius = a.y1, delete a.y1; a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x0()); }, delete a.lineX0; a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x1()); }, delete a.lineX1; a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y0()); }, delete a.lineY0; a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y1()); }, delete a.lineY1; a.curve = function(_) { return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; }; return a; }); /***/ }), /***/ "Gqsl": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/repeatWhen.js ***! \*********************************************************************/ /*! exports provided: repeatWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function repeatWhen(notifier) { return (source) => source.lift(new RepeatWhenOperator(notifier)); } class RepeatWhenOperator { constructor(notifier) { this.notifier = notifier; } call(subscriber, source) { return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source)); } } class RepeatWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination, notifier, source) { super(destination); this.notifier = notifier; this.source = source; this.sourceIsBeingSubscribedTo = true; } notifyNext() { this.sourceIsBeingSubscribedTo = true; this.source.subscribe(this); } notifyComplete() { if (this.sourceIsBeingSubscribedTo === false) { return super.complete(); } } complete() { this.sourceIsBeingSubscribedTo = false; if (!this.isStopped) { if (!this.retries) { this.subscribeToRetries(); } if (!this.retriesSubscription || this.retriesSubscription.closed) { return super.complete(); } this._unsubscribeAndRecycle(); this.notifications.next(undefined); } } _unsubscribe() { const { notifications, retriesSubscription } = this; if (notifications) { notifications.unsubscribe(); this.notifications = undefined; } if (retriesSubscription) { retriesSubscription.unsubscribe(); this.retriesSubscription = undefined; } this.retries = undefined; } _unsubscribeAndRecycle() { const { _unsubscribe } = this; this._unsubscribe = null; super._unsubscribeAndRecycle(); this._unsubscribe = _unsubscribe; return this; } subscribeToRetries() { this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); let retries; try { const { notifier } = this; retries = notifier(this.notifications); } catch (e) { return super.complete(); } this.retries = retries; this.retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this)); } } //# sourceMappingURL=repeatWhen.js.map /***/ }), /***/ "GvAG": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/circle.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "CYYh"); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"]); context.moveTo(r, 0); context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); } }); /***/ }), /***/ "Gvn4": /*!*****************************************************!*\ !*** ./node_modules/d3-interpolate/src/quantize.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(interpolator, n) { var samples = new Array(n); for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); return samples; }); /***/ }), /***/ "GyhO": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/concat.js ***! \******************************************************************/ /*! exports provided: concat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; }); /* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./of */ "LRne"); /* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../operators/concatAll */ "0EUg"); function concat(...observables) { return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(Object(_of__WEBPACK_IMPORTED_MODULE_0__["of"])(...observables)); } //# sourceMappingURL=concat.js.map /***/ }), /***/ "H39o": /*!*************************************************!*\ !*** ./node_modules/d3-polygon/src/centroid.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon) { var i = -1, n = polygon.length, x = 0, y = 0, a, b = polygon[n - 1], c, k = 0; while (++i < n) { a = b; b = polygon[i]; k += c = a[0] * b[1] - b[0] * a[1]; x += (a[0] + b[0]) * c; y += (a[1] + b[1]) * c; } return k *= 3, [x / k, y / k]; }); /***/ }), /***/ "H7P7": /*!************************************************!*\ !*** ./node_modules/d3-quadtree/src/extent.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(_) { return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; }); /***/ }), /***/ "HDdC": /*!***********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Observable.js ***! \***********************************************************/ /*! exports provided: Observable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; }); /* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/canReportError */ "8Qeq"); /* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/toSubscriber */ "WyKG"); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/observable */ "kJWO"); /* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/pipe */ "mCNh"); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ "2fFW"); class Observable { constructor(subscribe) { this._isScalar = false; if (subscribe) { this._subscribe = subscribe; } } lift(operator) { const observable = new Observable(); observable.source = this; observable.operator = operator; return observable; } subscribe(observerOrNext, error, complete) { const { operator } = this; const sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete); if (operator) { sink.add(operator.call(sink, this.source)); } else { sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? this._subscribe(sink) : this._trySubscribe(sink)); } if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { if (sink.syncErrorThrowable) { sink.syncErrorThrowable = false; if (sink.syncErrorThrown) { throw sink.syncErrorValue; } } } return sink; } _trySubscribe(sink) { try { return this._subscribe(sink); } catch (err) { if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) { sink.syncErrorThrown = true; sink.syncErrorValue = err; } if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) { sink.error(err); } else { console.warn(err); } } } forEach(next, promiseCtor) { promiseCtor = getPromiseCtor(promiseCtor); return new promiseCtor((resolve, reject) => { let subscription; subscription = this.subscribe((value) => { try { next(value); } catch (err) { reject(err); if (subscription) { subscription.unsubscribe(); } } }, reject, resolve); }); } _subscribe(subscriber) { const { source } = this; return source && source.subscribe(subscriber); } [_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]() { return this; } pipe(...operations) { if (operations.length === 0) { return this; } return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this); } toPromise(promiseCtor) { promiseCtor = getPromiseCtor(promiseCtor); return new promiseCtor((resolve, reject) => { let value; this.subscribe((x) => value = x, (err) => reject(err), () => resolve(value)); }); } } Observable.create = (subscribe) => { return new Observable(subscribe); }; function getPromiseCtor(promiseCtor) { if (!promiseCtor) { promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise; } if (!promiseCtor) { throw new Error('no Promise impl found'); } return promiseCtor; } //# sourceMappingURL=Observable.js.map /***/ }), /***/ "HFJB": /*!************************************************!*\ !*** ./node_modules/d3-selection/src/local.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return local; }); var nextId = 0; function local() { return new Local; } function Local() { this._ = "@" + (++nextId).toString(36); } Local.prototype = local.prototype = { constructor: Local, get: function(node) { var id = this._; while (!(id in node)) if (!(node = node.parentNode)) return; return node[id]; }, set: function(node, value) { return node[this._] = value; }, remove: function(node) { return this._ in node && delete node[this._]; }, toString: function() { return this._; } }; /***/ }), /***/ "HN8k": /*!********************************************!*\ !*** ./node_modules/d3-fetch/src/image.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return new Promise(function(resolve, reject) { var image = new Image; for (var key in init) image[key] = init[key]; image.onerror = reject; image.onload = function() { resolve(image); }; image.src = input; }); }); /***/ }), /***/ "HZff": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/find.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "p/7N"); /* harmony default export */ __webpack_exports__["default"] = (function(x, y, radius) { var data, x0 = this._x0, y0 = this._y0, x1, y1, x2, y2, x3 = this._x1, y3 = this._y1, quads = [], node = this._root, q, i; if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, x0, y0, x3, y3)); if (radius == null) radius = Infinity; else { x0 = x - radius, y0 = y - radius; x3 = x + radius, y3 = y + radius; radius *= radius; } while (q = quads.pop()) { // Stop searching if this quadrant can’t contain a closer node. if (!(node = q.node) || (x1 = q.x0) > x3 || (y1 = q.y0) > y3 || (x2 = q.x1) < x0 || (y2 = q.y1) < y0) continue; // Bisect the current quadrant. if (node.length) { var xm = (x1 + x2) / 2, ym = (y1 + y2) / 2; quads.push( new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[3], xm, ym, x2, y2), new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[2], x1, ym, xm, y2), new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[1], xm, y1, x2, ym), new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[0], x1, y1, xm, ym) ); // Visit the closest quadrant first. if (i = (y >= ym) << 1 | (x >= xm)) { q = quads[quads.length - 1]; quads[quads.length - 1] = quads[quads.length - 1 - i]; quads[quads.length - 1 - i] = q; } } // Visit this point. (Visiting coincident points isn’t necessary!) else { var dx = x - +this._x.call(null, node.data), dy = y - +this._y.call(null, node.data), d2 = dx * dx + dy * dy; if (d2 < radius) { var d = Math.sqrt(radius = d2); x0 = x - d, y0 = y - d; x3 = x + d, y3 = y + d; data = node.data; } } } return data; }); /***/ }), /***/ "Hd9g": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/contains.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains.js */ "7FHc"); /* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance.js */ "rgrl"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "R0y8"); var containsObjectType = { Feature: function(object, point) { return containsGeometry(object.geometry, point); }, FeatureCollection: function(object, point) { var features = object.features, i = -1, n = features.length; while (++i < n) if (containsGeometry(features[i].geometry, point)) return true; return false; } }; var containsGeometryType = { Sphere: function() { return true; }, Point: function(object, point) { return containsPoint(object.coordinates, point); }, MultiPoint: function(object, point) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) if (containsPoint(coordinates[i], point)) return true; return false; }, LineString: function(object, point) { return containsLine(object.coordinates, point); }, MultiLineString: function(object, point) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) if (containsLine(coordinates[i], point)) return true; return false; }, Polygon: function(object, point) { return containsPolygon(object.coordinates, point); }, MultiPolygon: function(object, point) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) if (containsPolygon(coordinates[i], point)) return true; return false; }, GeometryCollection: function(object, point) { var geometries = object.geometries, i = -1, n = geometries.length; while (++i < n) if (containsGeometry(geometries[i], point)) return true; return false; } }; function containsGeometry(geometry, point) { return geometry && containsGeometryType.hasOwnProperty(geometry.type) ? containsGeometryType[geometry.type](geometry, point) : false; } function containsPoint(coordinates, point) { return Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates, point) === 0; } function containsLine(coordinates, point) { var ao, bo, ab; for (var i = 0, n = coordinates.length; i < n; i++) { bo = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], point); if (bo === 0) return true; if (i > 0) { ab = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], coordinates[i - 1]); if ( ab > 0 && ao <= ab && bo <= ab && (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon2"] * ab ) return true; } ao = bo; } return false; } function containsPolygon(coordinates, point) { return !!Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_0__["default"])(coordinates.map(ringRadians), pointRadians(point)); } function ringRadians(ring) { return ring = ring.map(pointRadians), ring.pop(), ring; } function pointRadians(point) { return [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]]; } /* harmony default export */ __webpack_exports__["default"] = (function(object, point) { return (object && containsObjectType.hasOwnProperty(object.type) ? containsObjectType[object.type] : containsGeometry)(object, point); }); /***/ }), /***/ "Hh5Z": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueScheduler.js ***! \*************************************************************************/ /*! exports provided: QueueScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; }); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class QueueScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { } //# sourceMappingURL=QueueScheduler.js.map /***/ }), /***/ "Hkhx": /*!*****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/onErrorResumeNext.js ***! \*****************************************************************************/ /*! exports provided: onErrorResumeNext */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./empty */ "EY2u"); function onErrorResumeNext(...sources) { if (sources.length === 0) { return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"]; } const [first, ...remainder] = sources; if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) { return onErrorResumeNext(...first); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const subNext = () => subscriber.add(onErrorResumeNext(...remainder).subscribe(subscriber)); return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({ next(value) { subscriber.next(value); }, error: subNext, complete: subNext, }); }); } //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), /***/ "HpDs": /*!***********************************************!*\ !*** ./node_modules/d3-chord/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "HrJb": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/count.js ***! \****************************************************************/ /*! exports provided: count */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function count(predicate) { return (source) => source.lift(new CountOperator(predicate, source)); } class CountOperator { constructor(predicate, source) { this.predicate = predicate; this.source = source; } call(subscriber, source) { return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source)); } } class CountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, source) { super(destination); this.predicate = predicate; this.source = source; this.count = 0; this.index = 0; } _next(value) { if (this.predicate) { this._tryPredicate(value); } else { this.count++; } } _tryPredicate(value) { let result; try { result = this.predicate(value, this.index++, this.source); } catch (err) { this.destination.error(err); return; } if (result) { this.count++; } } _complete() { this.destination.next(this.count); this.destination.complete(); } } //# sourceMappingURL=count.js.map /***/ }), /***/ "I3Nq": /*!*****************************************************!*\ !*** ./node_modules/d3-hierarchy/src/pack/index.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _siblings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings.js */ "W+J7"); /* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors.js */ "IeU1"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "CSvP"); function defaultRadius(d) { return Math.sqrt(d.value); } /* harmony default export */ __webpack_exports__["default"] = (function() { var radius = null, dx = 1, dy = 1, padding = _constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"]; function pack(root) { root.x = dx / 2, root.y = dy / 2; if (radius) { root.eachBefore(radiusLeaf(radius)) .eachAfter(packChildren(padding, 0.5)) .eachBefore(translateChild(1)); } else { root.eachBefore(radiusLeaf(defaultRadius)) .eachAfter(packChildren(_constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"], 1)) .eachAfter(packChildren(padding, root.r / Math.min(dx, dy))) .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r))); } return root; } pack.radius = function(x) { return arguments.length ? (radius = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_1__["optional"])(x), pack) : radius; }; pack.size = function(x) { return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy]; }; pack.padding = function(x) { return arguments.length ? (padding = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+x), pack) : padding; }; return pack; }); function radiusLeaf(radius) { return function(node) { if (!node.children) { node.r = Math.max(0, +radius(node) || 0); } }; } function packChildren(padding, k) { return function(node) { if (children = node.children) { var children, i, n = children.length, r = padding(node) * k || 0, e; if (r) for (i = 0; i < n; ++i) children[i].r += r; e = Object(_siblings_js__WEBPACK_IMPORTED_MODULE_0__["packEnclose"])(children); if (r) for (i = 0; i < n; ++i) children[i].r -= r; node.r = e + r; } }; } function translateChild(k) { return function(node) { var parent = node.parent; node.r *= k; if (parent) { node.x = parent.x + k * node.x; node.y = parent.y + k * node.y; } }; } /***/ }), /***/ "I4jL": /*!***********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/squarify.js ***! \***********************************************************/ /*! exports provided: phi, squarifyRatio, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "phi", function() { return phi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squarifyRatio", function() { return squarifyRatio; }); /* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "FPPI"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "7IPS"); var phi = (1 + Math.sqrt(5)) / 2; function squarifyRatio(ratio, parent, x0, y0, x1, y1) { var rows = [], nodes = parent.children, row, nodeValue, i0 = 0, i1 = 0, n = nodes.length, dx, dy, value = parent.value, sumValue, minValue, maxValue, newRatio, minRatio, alpha, beta; while (i0 < n) { dx = x1 - x0, dy = y1 - y0; // Find the next non-empty node. do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); minValue = maxValue = sumValue; alpha = Math.max(dy / dx, dx / dy) / (value * ratio); beta = sumValue * sumValue * alpha; minRatio = Math.max(maxValue / beta, beta / minValue); // Keep adding nodes while the aspect ratio maintains or improves. for (; i1 < n; ++i1) { sumValue += nodeValue = nodes[i1].value; if (nodeValue < minValue) minValue = nodeValue; if (nodeValue > maxValue) maxValue = nodeValue; beta = sumValue * sumValue * alpha; newRatio = Math.max(maxValue / beta, beta / minValue); if (newRatio > minRatio) { sumValue -= nodeValue; break; } minRatio = newRatio; } // Position and record the row orientation. rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)}); if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1); else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1); value -= sumValue, i0 = i1; } return rows; } /* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) { function squarify(parent, x0, y0, x1, y1) { squarifyRatio(ratio, parent, x0, y0, x1, y1); } squarify.ratio = function(x) { return custom((x = +x) > 1 ? x : 1); }; return squarify; })(phi)); /***/ }), /***/ "I55L": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isArrayLike.js ***! \*****************************************************************/ /*! exports provided: isArrayLike */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; }); const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function'); //# sourceMappingURL=isArrayLike.js.map /***/ }), /***/ "IAdc": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/toArray.js ***! \******************************************************************/ /*! exports provided: toArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); function toArrayReducer(arr, item, index) { if (index === 0) { return [item]; } arr.push(item); return arr; } function toArray() { return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []); } //# sourceMappingURL=toArray.js.map /***/ }), /***/ "INn1": /*!***********************************************!*\ !*** ./node_modules/d3-polygon/src/length.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon) { var i = -1, n = polygon.length, b = polygon[n - 1], xa, ya, xb = b[0], yb = b[1], perimeter = 0; while (++i < n) { xa = xb; ya = yb; b = polygon[i]; xb = b[0]; yb = b[1]; xa -= xb; ya -= yb; perimeter += Math.hypot(xa, ya); } return perimeter; }); /***/ }), /***/ "IYKK": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/identity.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => x); /***/ }), /***/ "IeU1": /*!****************************************************!*\ !*** ./node_modules/d3-hierarchy/src/accessors.js ***! \****************************************************/ /*! exports provided: optional, required */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "optional", function() { return optional; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "required", function() { return required; }); function optional(f) { return f == null ? null : required(f); } function required(f) { if (typeof f !== "function") throw new Error; return f; } /***/ }), /***/ "Ijfk": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/bernoulli.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBernoulli(source) { function randomBernoulli(p) { if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); return function() { return Math.floor(source() + p); }; } randomBernoulli.source = sourceRandomBernoulli; return randomBernoulli; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "IjjT": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsyncScheduler.js ***! \*************************************************************************/ /*! exports provided: AsyncScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; }); /* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Scheduler */ "Y/cZ"); class AsyncScheduler extends _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"] { constructor(SchedulerAction, now = _Scheduler__WEBPACK_IMPORTED_MODULE_0__["Scheduler"].now) { super(SchedulerAction, () => { if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { return AsyncScheduler.delegate.now(); } else { return now(); } }); this.actions = []; this.active = false; this.scheduled = undefined; } schedule(work, delay = 0, state) { if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { return AsyncScheduler.delegate.schedule(work, delay, state); } else { return super.schedule(work, delay, state); } } flush(action) { const { actions } = this; if (this.active) { actions.push(action); return; } let error; this.active = true; do { if (error = action.execute(action.state, action.delay)) { break; } } while (action = actions.shift()); this.active = false; if (error) { while (action = actions.shift()) { action.unsubscribe(); } throw error; } } } //# sourceMappingURL=AsyncScheduler.js.map /***/ }), /***/ "IzEk": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/take.js ***! \***************************************************************/ /*! exports provided: take */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/empty */ "EY2u"); function take(count) { return (source) => { if (count === 0) { return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); } else { return source.lift(new TakeOperator(count)); } }; } class TakeOperator { constructor(total) { this.total = total; if (this.total < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; } } call(subscriber, source) { return source.subscribe(new TakeSubscriber(subscriber, this.total)); } } class TakeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, total) { super(destination); this.total = total; this.count = 0; } _next(value) { const total = this.total; const count = ++this.count; if (count <= total) { this.destination.next(value); if (count === total) { this.destination.complete(); this.unsubscribe(); } } } } //# sourceMappingURL=take.js.map /***/ }), /***/ "J0SQ": /*!******************************************!*\ !*** ./node_modules/d3-array/src/map.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return map; }); function map(values, mapper) { if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); return Array.from(values, (value, index) => mapper(value, index, values)); } /***/ }), /***/ "J27/": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/path.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(end) { var start = this, ancestor = leastCommonAncestor(start, end), nodes = [start]; while (start !== ancestor) { start = start.parent; nodes.push(start); } var k = nodes.length; while (end !== ancestor) { nodes.splice(k, 0, end); end = end.parent; } return nodes; }); function leastCommonAncestor(a, b) { if (a === b) return a; var aNodes = a.ancestors(), bNodes = b.ancestors(), c = null; a = aNodes.pop(); b = bNodes.pop(); while (a === b) { c = a; a = aNodes.pop(); b = bNodes.pop(); } return c; } /***/ }), /***/ "JIr8": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/catchError.js ***! \*********************************************************************/ /*! exports provided: catchError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function catchError(selector) { return function catchErrorOperatorFunction(source) { const operator = new CatchOperator(selector); const caught = source.lift(operator); return (operator.caught = caught); }; } class CatchOperator { constructor(selector) { this.selector = selector; } call(subscriber, source) { return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught)); } } class CatchSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, selector, caught) { super(destination); this.selector = selector; this.caught = caught; } error(err) { if (!this.isStopped) { let result; try { result = this.selector(err, this.caught); } catch (err2) { super.error(err2); return; } this._unsubscribeAndRecycle(); const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); this.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(result, innerSubscriber); if (innerSubscription !== innerSubscriber) { this.add(innerSubscription); } } } } //# sourceMappingURL=catchError.js.map /***/ }), /***/ "JMsZ": /*!******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666")); /***/ }), /***/ "JQqb": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/minIndex.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return minIndex; }); function minIndex(values, valueof) { let min; let minIndex = -1; let index = -1; if (valueof === undefined) { for (const value of values) { ++index; if (value != null && (min > value || (min === undefined && value >= value))) { min = value, minIndex = index; } } } else { for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (min > value || (min === undefined && value >= value))) { min = value, minIndex = index; } } } return minIndex; } /***/ }), /***/ "JX91": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/startWith.js ***! \********************************************************************/ /*! exports provided: startWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; }); /* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function startWith(...array) { const scheduler = array[array.length - 1]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) { array.pop(); return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); } else { return (source) => Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); } } //# sourceMappingURL=startWith.js.map /***/ }), /***/ "JYaH": /*!********************************************!*\ !*** ./node_modules/d3-array/src/every.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return every; }); function every(values, test) { if (typeof test !== "function") throw new TypeError("test is not a function"); let index = -1; for (const value of values) { if (!test(value, ++index, values)) { return false; } } return true; } /***/ }), /***/ "JZGO": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/remove.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function remove() { var parent = this.parentNode; if (parent) parent.removeChild(this); } /* harmony default export */ __webpack_exports__["default"] = (function() { return this.each(remove); }); /***/ }), /***/ "JmF6": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/zipAll.js ***! \*****************************************************************/ /*! exports provided: zipAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; }); /* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/zip */ "1uah"); function zipAll(project) { return (source) => source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); } //# sourceMappingURL=zipAll.js.map /***/ }), /***/ "JnD7": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/curve/radial.js ***! \***************************************************/ /*! exports provided: curveRadialLinear, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "curveRadialLinear", function() { return curveRadialLinear; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return curveRadial; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "SDD1"); var curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__["default"]); function Radial(curve) { this._curve = curve; } Radial.prototype = { areaStart: function() { this._curve.areaStart(); }, areaEnd: function() { this._curve.areaEnd(); }, lineStart: function() { this._curve.lineStart(); }, lineEnd: function() { this._curve.lineEnd(); }, point: function(a, r) { this._curve.point(r * Math.sin(a), r * -Math.cos(a)); } }; function curveRadial(curve) { function radial(context) { return new Radial(curve(context)); } radial._curve = curve; return radial; } /***/ }), /***/ "Jzny": /*!*********************************************!*\ !*** ./node_modules/d3-time/src/utcWeek.js ***! \*********************************************/ /*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return utcSunday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return utcMonday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return utcTuesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return utcWednesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return utcThursday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return utcFriday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return utcSaturday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return utcSundays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return utcMondays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return utcTuesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return utcWednesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return utcThursdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return utcFridays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return utcSaturdays; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); function utcWeekday(i) { return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCDate(date.getUTCDate() + step * 7); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; }); } var utcSunday = utcWeekday(0); var utcMonday = utcWeekday(1); var utcTuesday = utcWeekday(2); var utcWednesday = utcWeekday(3); var utcThursday = utcWeekday(4); var utcFriday = utcWeekday(5); var utcSaturday = utcWeekday(6); var utcSundays = utcSunday.range; var utcMondays = utcMonday.range; var utcTuesdays = utcTuesday.range; var utcWednesdays = utcWednesday.range; var utcThursdays = utcThursday.range; var utcFridays = utcFriday.range; var utcSaturdays = utcSaturday.range; /***/ }), /***/ "K7De": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/findIndex.js ***! \********************************************************************/ /*! exports provided: findIndex */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; }); /* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/find */ "cBqT"); function findIndex(predicate, thisArg) { return (source) => source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); } //# sourceMappingURL=findIndex.js.map /***/ }), /***/ "Kcim": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/curve/catmullRom.js ***! \*******************************************************/ /*! exports provided: point, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "CYYh"); /* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "d5JU"); function point(that, x, y) { var x1 = that._x1, y1 = that._y1, x2 = that._x2, y2 = that._y2; if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a); x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; } if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a); x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; } that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); } function CatmullRom(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRom.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: this.point(this._x2, this._y2); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; if (this._point) { var x23 = this._x2 - x, y23 = this._y2 - y; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; // proceed default: point(this, x, y); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a; this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { function catmullRom(context) { return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__["Cardinal"](context, 0); } catmullRom.alpha = function(alpha) { return custom(+alpha); }; return catmullRom; })(0.5)); /***/ }), /***/ "Ki0a": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/bisector.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony default export */ __webpack_exports__["default"] = (function(f) { let delta = f; let compare = f; if (f.length === 1) { delta = (d, x) => f(d) - x; compare = ascendingComparator(f); } function left(a, x, lo, hi) { if (lo == null) lo = 0; if (hi == null) hi = a.length; while (lo < hi) { const mid = (lo + hi) >>> 1; if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid; } return lo; } function right(a, x, lo, hi) { if (lo == null) lo = 0; if (hi == null) hi = a.length; while (lo < hi) { const mid = (lo + hi) >>> 1; if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1; } return lo; } function center(a, x, lo, hi) { if (lo == null) lo = 0; if (hi == null) hi = a.length; const i = left(a, x, lo, hi - 1); return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; } return {left, center, right}; }); function ascendingComparator(f) { return (d, x) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(f(d), x); } /***/ }), /***/ "Kj3r": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/debounceTime.js ***! \***********************************************************************/ /*! exports provided: debounceTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); function debounceTime(dueTime, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { return (source) => source.lift(new DebounceTimeOperator(dueTime, scheduler)); } class DebounceTimeOperator { constructor(dueTime, scheduler) { this.dueTime = dueTime; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler)); } } class DebounceTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, dueTime, scheduler) { super(destination); this.dueTime = dueTime; this.scheduler = scheduler; this.debouncedSubscription = null; this.lastValue = null; this.hasValue = false; } _next(value) { this.clearDebounce(); this.lastValue = value; this.hasValue = true; this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this)); } _complete() { this.debouncedNext(); this.destination.complete(); } debouncedNext() { this.clearDebounce(); if (this.hasValue) { const { lastValue } = this; this.lastValue = null; this.hasValue = false; this.destination.next(lastValue); } } clearDebounce() { const debouncedSubscription = this.debouncedSubscription; if (debouncedSubscription !== null) { this.remove(debouncedSubscription); debouncedSubscription.unsubscribe(); this.debouncedSubscription = null; } } } function dispatchNext(subscriber) { subscriber.debouncedNext(); } //# sourceMappingURL=debounceTime.js.map /***/ }), /***/ "KpFn": /*!******************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/easeVarying.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function easeVarying(id, value) { return function() { var v = value.apply(this, arguments); if (typeof v !== "function") throw new Error; Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { if (typeof value !== "function") throw new Error; return this.each(easeVarying(this._id, value)); }); /***/ }), /***/ "Kqap": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/scan.js ***! \***************************************************************/ /*! exports provided: scan */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function scan(accumulator, seed) { let hasSeed = false; if (arguments.length >= 2) { hasSeed = true; } return function scanOperatorFunction(source) { return source.lift(new ScanOperator(accumulator, seed, hasSeed)); }; } class ScanOperator { constructor(accumulator, seed, hasSeed = false) { this.accumulator = accumulator; this.seed = seed; this.hasSeed = hasSeed; } call(subscriber, source) { return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed)); } } class ScanSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, accumulator, _seed, hasSeed) { super(destination); this.accumulator = accumulator; this._seed = _seed; this.hasSeed = hasSeed; this.index = 0; } get seed() { return this._seed; } set seed(value) { this.hasSeed = true; this._seed = value; } _next(value) { if (!this.hasSeed) { this.seed = value; this.destination.next(value); } else { return this._tryNext(value); } } _tryNext(value) { const index = this.index++; let result; try { result = this.accumulator(this.seed, value, index); } catch (err) { this.destination.error(err); } this.seed = result; this.destination.next(result); } } //# sourceMappingURL=scan.js.map /***/ }), /***/ "KqfI": /*!**********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/noop.js ***! \**********************************************************/ /*! exports provided: noop */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; }); function noop() { } //# sourceMappingURL=noop.js.map /***/ }), /***/ "L+rq": /*!*****************************************!*\ !*** ./node_modules/d3/dist/package.js ***! \*****************************************/ /*! exports provided: name, version, description, keywords, homepage, license, author, main, unpkg, jsdelivr, module, repository, files, scripts, devDependencies, dependencies */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "description", function() { return description; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keywords", function() { return keywords; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "homepage", function() { return homepage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "license", function() { return license; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "author", function() { return author; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "main", function() { return main; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unpkg", function() { return unpkg; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsdelivr", function() { return jsdelivr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "module", function() { return module; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repository", function() { return repository; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "files", function() { return files; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scripts", function() { return scripts; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "devDependencies", function() { return devDependencies; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dependencies", function() { return dependencies; }); var name = "d3"; var version = "6.6.2"; var description = "Data-Driven Documents"; var keywords = ["dom","visualization","svg","animation","canvas"]; var homepage = "https://d3js.org"; var license = "BSD-3-Clause"; var author = {"name":"Mike Bostock","url":"https://bost.ocks.org/mike"}; var main = "dist/d3.node.js"; var unpkg = "dist/d3.min.js"; var jsdelivr = "dist/d3.min.js"; var module = "index.js"; var repository = {"type":"git","url":"https://github.com/d3/d3.git"}; var files = ["dist/**/*.js","index.js"]; var scripts = {"pretest":"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test","postpublish":"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v${npm_package_version%%.*}.js && cp ../d3/dist/d3.min.js d3.v${npm_package_version%%.*}.min.js && git add d3.v${npm_package_version%%.*}.js d3.v${npm_package_version%%.*}.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"}; var devDependencies = {"json2module":"0.0","rimraf":"3","rollup":"2","rollup-plugin-ascii":"0.0","rollup-plugin-node-resolve":"5","rollup-plugin-terser":"7","tape":"4","tape-await":"0.1"}; var dependencies = {"d3-array":"2","d3-axis":"2","d3-brush":"2","d3-chord":"2","d3-color":"2","d3-contour":"2","d3-delaunay":"5","d3-dispatch":"2","d3-drag":"2","d3-dsv":"2","d3-ease":"2","d3-fetch":"2","d3-force":"2","d3-format":"2","d3-geo":"2","d3-hierarchy":"2","d3-interpolate":"2","d3-path":"2","d3-polygon":"2","d3-quadtree":"2","d3-random":"2","d3-scale":"3","d3-scale-chromatic":"2","d3-selection":"2","d3-shape":"2","d3-time":"2","d3-time-format":"3","d3-timer":"2","d3-transition":"2","d3-zoom":"2"}; /***/ }), /***/ "LDjW": /*!********************************************!*\ !*** ./node_modules/d3-time/src/minute.js ***! \********************************************/ /*! exports provided: default, minutes */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minutes", function() { return minutes; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]; }, function(date) { return date.getMinutes(); }); /* harmony default export */ __webpack_exports__["default"] = (minute); var minutes = minute.range; /***/ }), /***/ "LMxf": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/data.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var data = []; this.visit(function(node) { if (!node.length) do data.push(node.data); while (node = node.next) }); return data; }); /***/ }), /***/ "LOX7": /*!*****************************************!*\ !*** ./node_modules/d3-ease/src/exp.js ***! \*****************************************/ /*! exports provided: expIn, expOut, expInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expIn", function() { return expIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expOut", function() { return expOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expInOut", function() { return expInOut; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "6ZHU"); function expIn(t) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(1 - +t); } function expOut(t) { return 1 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t); } function expInOut(t) { return ((t *= 2) <= 1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(1 - t) : 2 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t - 1)) / 2; } /***/ }), /***/ "LP84": /*!************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/orthographic.js ***! \************************************************************/ /*! exports provided: orthographicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orthographicRaw", function() { return orthographicRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function orthographicRaw(x, y) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)]; } orthographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"]); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(orthographicRaw) .scale(249.5) .clipAngle(90 + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]); }); /***/ }), /***/ "LRne": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/of.js ***! \**************************************************************/ /*! exports provided: of */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; }); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "yCtX"); /* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduleArray */ "jZKg"); function of(...args) { let scheduler = args[args.length - 1]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) { args.pop(); return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler); } else { return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args); } } //# sourceMappingURL=of.js.map /***/ }), /***/ "LSUK": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ef8a62ffffff999999", "ca0020f4a582bababa404040", "ca0020f4a582ffffffbababa404040", "b2182bef8a62fddbc7e0e0e09999994d4d4d", "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "LXyZ": /*!**********************************************!*\ !*** ./node_modules/d3-array/src/reverse.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return reverse; }); function reverse(values) { if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); return Array.from(values).reverse(); } /***/ }), /***/ "LZ5Q": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/mercator.js ***! \********************************************************/ /*! exports provided: mercatorRaw, default, mercatorProjection */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorRaw", function() { return mercatorRaw; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorProjection", function() { return mercatorProjection; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation.js */ "cwsO"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function mercatorRaw(lambda, phi) { return [lambda, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2))]; } mercatorRaw.invert = function(x, y) { return [x, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(y)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { return mercatorProjection(mercatorRaw) .scale(961 / _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); }); function mercatorProjection(project) { var m = Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(project), center = m.center, scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, x0 = null, y0, x1, y1; // clip extent m.scale = function(_) { return arguments.length ? (scale(_), reclip()) : scale(); }; m.translate = function(_) { return arguments.length ? (translate(_), reclip()) : translate(); }; m.center = function(_) { return arguments.length ? (center(_), reclip()) : center(); }; m.clipExtent = function(_) { return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]]; }; function reclip() { var k = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * scale(), t = m(Object(_rotation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(m.rotate()).invert([0, 0])); return clipExtent(x0 == null ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]); } return reclip(); } /***/ }), /***/ "Lhse": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/symbol/iterator.js ***! \****************************************************************/ /*! exports provided: getSymbolIterator, iterator, $$iterator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; }); function getSymbolIterator() { if (typeof Symbol !== 'function' || !Symbol.iterator) { return '@@iterator'; } return Symbol.iterator; } const iterator = getSymbolIterator(); const $$iterator = iterator; //# sourceMappingURL=iterator.js.map /***/ }), /***/ "MBAA": /*!***************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleIterable.js ***! \***************************************************************************/ /*! exports provided: scheduleIterable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); function scheduleIterable(input, scheduler) { if (!input) { throw new Error('Iterable cannot be null'); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); let iterator; sub.add(() => { if (iterator && typeof iterator.return === 'function') { iterator.return(); } }); sub.add(scheduler.schedule(() => { iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]](); sub.add(scheduler.schedule(function () { if (subscriber.closed) { return; } let value; let done; try { const result = iterator.next(); value = result.value; done = result.done; } catch (err) { subscriber.error(err); return; } if (done) { subscriber.complete(); } else { subscriber.next(value); this.schedule(); } })); })); return sub; }); } //# sourceMappingURL=scheduleIterable.js.map /***/ }), /***/ "MHiR": /*!********************************************!*\ !*** ./node_modules/d3-ease/src/bounce.js ***! \********************************************/ /*! exports provided: bounceIn, bounceOut, bounceInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceIn", function() { return bounceIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceOut", function() { return bounceOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceInOut", function() { return bounceInOut; }); var b1 = 4 / 11, b2 = 6 / 11, b3 = 8 / 11, b4 = 3 / 4, b5 = 9 / 11, b6 = 10 / 11, b7 = 15 / 16, b8 = 21 / 22, b9 = 63 / 64, b0 = 1 / b1 / b1; function bounceIn(t) { return 1 - bounceOut(1 - t); } function bounceOut(t) { return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; } function bounceInOut(t) { return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; } /***/ }), /***/ "MLOY": /*!**********************************************!*\ !*** ./node_modules/d3-polygon/src/cross.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // Returns the 2D cross product of AB and AC vectors, i.e., the z-component of // the 3D cross product in a quadrant I Cartesian coordinate system (+x is // right, +y is up). Returns a positive value if ABC is counter-clockwise, // negative if clockwise, and zero if the points are collinear. /* harmony default export */ __webpack_exports__["default"] = (function(a, b, c) { return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); }); /***/ }), /***/ "MiBC": /*!**********************************************!*\ !*** ./node_modules/d3-array/src/permute.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(source, keys) { return Array.from(keys, key => source[key]); }); /***/ }), /***/ "Mlif": /*!****************************************************************!*\ !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***! \****************************************************************/ /*! exports provided: identity, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); var degrees = 180 / Math.PI; var identity = { translateX: 0, translateY: 0, rotate: 0, skewX: 0, scaleX: 1, scaleY: 1 }; /* harmony default export */ __webpack_exports__["default"] = (function(a, b, c, d, e, f) { var scaleX, scaleY, skewX; if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; return { translateX: e, translateY: f, rotate: Math.atan2(b, a) * degrees, skewX: Math.atan(skewX) * degrees, scaleX: scaleX, scaleY: scaleY }; }); /***/ }), /***/ "MtjB": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/retryWhen.js ***! \********************************************************************/ /*! exports provided: retryWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function retryWhen(notifier) { return (source) => source.lift(new RetryWhenOperator(notifier, source)); } class RetryWhenOperator { constructor(notifier, source) { this.notifier = notifier; this.source = source; } call(subscriber, source) { return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source)); } } class RetryWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination, notifier, source) { super(destination); this.notifier = notifier; this.source = source; } error(err) { if (!this.isStopped) { let errors = this.errors; let retries = this.retries; let retriesSubscription = this.retriesSubscription; if (!retries) { errors = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); try { const { notifier } = this; retries = notifier(errors); } catch (e) { return super.error(e); } retriesSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(retries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this)); } else { this.errors = undefined; this.retriesSubscription = undefined; } this._unsubscribeAndRecycle(); this.errors = errors; this.retries = retries; this.retriesSubscription = retriesSubscription; errors.next(err); } } _unsubscribe() { const { errors, retriesSubscription } = this; if (errors) { errors.unsubscribe(); this.errors = undefined; } if (retriesSubscription) { retriesSubscription.unsubscribe(); this.retriesSubscription = undefined; } this.retries = undefined; } notifyNext() { const { _unsubscribe } = this; this._unsubscribe = null; this._unsubscribeAndRecycle(); this._unsubscribe = _unsubscribe; this.source.subscribe(this); } } //# sourceMappingURL=retryWhen.js.map /***/ }), /***/ "NHP+": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/AsyncSubject.js ***! \*************************************************************/ /*! exports provided: AsyncSubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscription */ "quSY"); class AsyncSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor() { super(...arguments); this.value = null; this.hasNext = false; this.hasCompleted = false; } _subscribe(subscriber) { if (this.hasError) { subscriber.error(this.thrownError); return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY; } else if (this.hasCompleted && this.hasNext) { subscriber.next(this.value); subscriber.complete(); return _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"].EMPTY; } return super._subscribe(subscriber); } next(value) { if (!this.hasCompleted) { this.value = value; this.hasNext = true; } } error(error) { if (!this.hasCompleted) { super.error(error); } } complete() { this.hasCompleted = true; if (this.hasNext) { super.next(this.value); } super.complete(); } } //# sourceMappingURL=AsyncSubject.js.map /***/ }), /***/ "NJ4a": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/hostReportError.js ***! \*********************************************************************/ /*! exports provided: hostReportError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; }); function hostReportError(err) { setTimeout(() => { throw err; }, 0); } //# sourceMappingURL=hostReportError.js.map /***/ }), /***/ "NJ9Y": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/last.js ***! \***************************************************************/ /*! exports provided: last */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); /* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast */ "BFxc"); /* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function last(predicate, defaultValue) { const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]())); } //# sourceMappingURL=last.js.map /***/ }), /***/ "NNCq": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/range.js ***! \*****************************************************************/ /*! exports provided: range, dispatch */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); function range(start = 0, count, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { if (count === undefined) { count = start; start = 0; } let index = 0; let current = start; if (scheduler) { return scheduler.schedule(dispatch, 0, { index, count, start, subscriber }); } else { do { if (index++ >= count) { subscriber.complete(); break; } subscriber.next(current++); if (subscriber.closed) { break; } } while (true); } return undefined; }); } function dispatch(state) { const { start, index, count, subscriber } = state; if (index >= count) { subscriber.complete(); return; } subscriber.next(start); if (subscriber.closed) { return; } state.index = index + 1; state.start = start + 1; this.schedule(state); } //# sourceMappingURL=range.js.map /***/ }), /***/ "NRL+": /*!****************************************!*\ !*** ./node_modules/d3-dsv/src/dsv.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var EOL = {}, EOF = {}, QUOTE = 34, NEWLINE = 10, RETURN = 13; function objectConverter(columns) { return new Function("d", "return {" + columns.map(function(name, i) { return JSON.stringify(name) + ": d[" + i + "] || \"\""; }).join(",") + "}"); } function customConverter(columns, f) { var object = objectConverter(columns); return function(row, i) { return f(object(row), i, columns); }; } // Compute unique columns in order of discovery. function inferColumns(rows) { var columnSet = Object.create(null), columns = []; rows.forEach(function(row) { for (var column in row) { if (!(column in columnSet)) { columns.push(columnSet[column] = column); } } }); return columns; } function pad(value, width) { var s = value + "", length = s.length; return length < width ? new Array(width - length + 1).join(0) + s : s; } function formatYear(year) { return year < 0 ? "-" + pad(-year, 6) : year > 9999 ? "+" + pad(year, 6) : pad(year, 4); } function formatDate(date) { var hours = date.getUTCHours(), minutes = date.getUTCMinutes(), seconds = date.getUTCSeconds(), milliseconds = date.getUTCMilliseconds(); return isNaN(date) ? "Invalid Date" : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" : ""); } /* harmony default export */ __webpack_exports__["default"] = (function(delimiter) { var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), DELIMITER = delimiter.charCodeAt(0); function parse(text, f) { var convert, columns, rows = parseRows(text, function(row, i) { if (convert) return convert(row, i - 1); columns = row, convert = f ? customConverter(row, f) : objectConverter(row); }); rows.columns = columns || []; return rows; } function parseRows(text, f) { var rows = [], // output rows N = text.length, I = 0, // current character index n = 0, // current line number t, // current token eof = N <= 0, // current token followed by EOF? eol = false; // current token followed by EOL? // Strip the trailing newline. if (text.charCodeAt(N - 1) === NEWLINE) --N; if (text.charCodeAt(N - 1) === RETURN) --N; function token() { if (eof) return EOF; if (eol) return eol = false, EOL; // Unescape quotes. var i, j = I, c; if (text.charCodeAt(j) === QUOTE) { while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); if ((i = I) >= N) eof = true; else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } return text.slice(j + 1, i - 1).replace(/""/g, "\""); } // Find next delimiter or newline. while (I < N) { if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } else if (c !== DELIMITER) continue; return text.slice(j, i); } // Return last token before EOF. return eof = true, text.slice(j, N); } while ((t = token()) !== EOF) { var row = []; while (t !== EOL && t !== EOF) row.push(t), t = token(); if (f && (row = f(row, n++)) == null) continue; rows.push(row); } return rows; } function preformatBody(rows, columns) { return rows.map(function(row) { return columns.map(function(column) { return formatValue(row[column]); }).join(delimiter); }); } function format(rows, columns) { if (columns == null) columns = inferColumns(rows); return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); } function formatBody(rows, columns) { if (columns == null) columns = inferColumns(rows); return preformatBody(rows, columns).join("\n"); } function formatRows(rows) { return rows.map(formatRow).join("\n"); } function formatRow(row) { return row.map(formatValue).join(delimiter); } function formatValue(value) { return value == null ? "" : value instanceof Date ? formatDate(value) : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" : value; } return { parse: parse, parseRows: parseRows, format: format, formatBody: formatBody, formatRows: formatRows, formatRow: formatRow, formatValue: formatValue }; }); /***/ }), /***/ "NScU": /*!***********************************************!*\ !*** ./node_modules/d3-random/src/uniform.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomUniform(source) { function randomUniform(min, max) { min = min == null ? 0 : +min; max = max == null ? 1 : +max; if (arguments.length === 1) max = min, min = 0; else max -= min; return function() { return source() * max + min; }; } randomUniform.source = sourceRandomUniform; return randomUniform; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "NU5n": /*!***************************************************!*\ !*** ./node_modules/d3-hierarchy/src/stratify.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors.js */ "IeU1"); /* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "a8tM"); var preroot = {depth: -1}, ambiguous = {}; function defaultId(d) { return d.id; } function defaultParentId(d) { return d.parentId; } /* harmony default export */ __webpack_exports__["default"] = (function() { var id = defaultId, parentId = defaultParentId; function stratify(data) { var nodes = Array.from(data), n = nodes.length, d, i, root, parent, node, nodeId, nodeKey, nodeByKey = new Map; for (i = 0; i < n; ++i) { d = nodes[i], node = nodes[i] = new _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["Node"](d); if ((nodeId = id(d, i, data)) != null && (nodeId += "")) { nodeKey = node.id = nodeId; nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node); } if ((nodeId = parentId(d, i, data)) != null && (nodeId += "")) { node.parent = nodeId; } } for (i = 0; i < n; ++i) { node = nodes[i]; if (nodeId = node.parent) { parent = nodeByKey.get(nodeId); if (!parent) throw new Error("missing: " + nodeId); if (parent === ambiguous) throw new Error("ambiguous: " + nodeId); if (parent.children) parent.children.push(node); else parent.children = [node]; node.parent = parent; } else { if (root) throw new Error("multiple roots"); root = node; } } if (!root) throw new Error("no root"); root.parent = preroot; root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["computeHeight"]); root.parent = null; if (n > 0) throw new Error("cycle"); return root; } stratify.id = function(x) { return arguments.length ? (id = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : id; }; stratify.parentId = function(x) { return arguments.length ? (parentId = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : parentId; }; return stratify; }); /***/ }), /***/ "NXyV": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/defer.js ***! \*****************************************************************/ /*! exports provided: defer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "EY2u"); function defer(observableFactory) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { let input; try { input = observableFactory(); } catch (err) { subscriber.error(err); return undefined; } const source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])(); return source.subscribe(subscriber); }); } //# sourceMappingURL=defer.js.map /***/ }), /***/ "Nehl": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/tween.js ***! \************************************************************/ /*! exports provided: default, tweenValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tweenValue", function() { return tweenValue; }); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function tweenRemove(id, name) { var tween0, tween1; return function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), tween = schedule.tween; // If this node shared tween with the previous node, // just assign the updated shared tween and we’re done! // Otherwise, copy-on-write. if (tween !== tween0) { tween1 = tween0 = tween; for (var i = 0, n = tween1.length; i < n; ++i) { if (tween1[i].name === name) { tween1 = tween1.slice(); tween1.splice(i, 1); break; } } } schedule.tween = tween1; }; } function tweenFunction(id, name, value) { var tween0, tween1; if (typeof value !== "function") throw new Error; return function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), tween = schedule.tween; // If this node shared tween with the previous node, // just assign the updated shared tween and we’re done! // Otherwise, copy-on-write. if (tween !== tween0) { tween1 = (tween0 = tween).slice(); for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { if (tween1[i].name === name) { tween1[i] = t; break; } } if (i === n) tween1.push(t); } schedule.tween = tween1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var id = this._id; name += ""; if (arguments.length < 2) { var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).tween; for (var i = 0, n = tween.length, t; i < n; ++i) { if ((t = tween[i]).name === name) { return t.value; } } return null; } return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); }); function tweenValue(transition, name, value) { var id = transition._id; transition.each(function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id); (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); }); return function(node) { return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(node, id).value[name]; }; } /***/ }), /***/ "NfdI": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publish.js ***! \******************************************************************/ /*! exports provided: publish */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publish(selector) { return selector ? Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(() => new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](), selector) : Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]()); } //# sourceMappingURL=publish.js.map /***/ }), /***/ "NgI0": /*!******************************************!*\ !*** ./node_modules/d3-force/src/lcg.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use const a = 1664525; const c = 1013904223; const m = 4294967296; // 2^32 /* harmony default export */ __webpack_exports__["default"] = (function() { let s = 1; return () => (s = (a * s + c) % m) / m; }); /***/ }), /***/ "Nkvg": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/style.js ***! \**********************************************************/ /*! exports provided: default, styleValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleValue", function() { return styleValue; }); /* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ "oxeV"); function styleRemove(name) { return function() { this.style.removeProperty(name); }; } function styleConstant(name, value, priority) { return function() { this.style.setProperty(name, value, priority); }; } function styleFunction(name, value, priority) { return function() { var v = value.apply(this, arguments); if (v == null) this.style.removeProperty(name); else this.style.setProperty(name, v, priority); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name); }); function styleValue(node, name) { return node.style.getPropertyValue(name) || Object(_window_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node).getComputedStyle(node, null).getPropertyValue(name); } /***/ }), /***/ "Nl5w": /*!********************************************************!*\ !*** ./node_modules/d3-array/src/threshold/sturges.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "hiel"); /* harmony default export */ __webpack_exports__["default"] = (function(values) { return Math.ceil(Math.log(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values)) / Math.LN2) + 1; }); /***/ }), /***/ "NltA": /*!********************************************!*\ !*** ./node_modules/d3-array/src/range.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(start, stop, step) { start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; var i = -1, n = Math.max(0, Math.ceil((stop - start) / step)) | 0, range = new Array(n); while (++i < n) { range[i] = start + i * step; } return range; }); /***/ }), /***/ "NtxT": /*!********************************************************!*\ !*** ./node_modules/d3-shape/src/offset/silhouette.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "0T5i"); /* harmony default export */ __webpack_exports__["default"] = (function(series, order) { if (!((n = series.length) > 0)) return; for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; s0[j][1] += s0[j][0] = -y / 2; } Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); }); /***/ }), /***/ "Nv8T": /*!*******************************************!*\ !*** ./node_modules/d3-quadtree/src/y.js ***! \*******************************************/ /*! exports provided: defaultY, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultY", function() { return defaultY; }); function defaultY(d) { return d[1]; } /* harmony default export */ __webpack_exports__["default"] = (function(_) { return arguments.length ? (this._y = _, this) : this._y; }); /***/ }), /***/ "Nv8m": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/race.js ***! \****************************************************************/ /*! exports provided: race, RaceOperator, RaceSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fromArray */ "yCtX"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function race(...observables) { if (observables.length === 1) { if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { observables = observables[0]; } else { return observables[0]; } } return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new RaceOperator()); } class RaceOperator { call(subscriber, source) { return source.subscribe(new RaceSubscriber(subscriber)); } } class RaceSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination) { super(destination); this.hasFirst = false; this.observables = []; this.subscriptions = []; } _next(observable) { this.observables.push(observable); } _complete() { const observables = this.observables; const len = observables.length; if (len === 0) { this.destination.complete(); } else { for (let i = 0; i < len && !this.hasFirst; i++) { const observable = observables[i]; const subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, observable, undefined, i); if (this.subscriptions) { this.subscriptions.push(subscription); } this.add(subscription); } this.observables = null; } } notifyNext(_outerValue, innerValue, outerIndex) { if (!this.hasFirst) { this.hasFirst = true; for (let i = 0; i < this.subscriptions.length; i++) { if (i !== outerIndex) { let subscription = this.subscriptions[i]; subscription.unsubscribe(); this.remove(subscription); } } this.subscriptions = null; } this.destination.next(innerValue); } } //# sourceMappingURL=race.js.map /***/ }), /***/ "O03L": /*!***********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/cardinalClosed.js ***! \***********************************************************/ /*! exports provided: CardinalClosed, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalClosed", function() { return CardinalClosed; }); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "0K5P"); /* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "d5JU"); function CardinalClosed(context, tension) { this._context = context; this._k = (1 - tension) / 6; } CardinalClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x3, this._y3); this._context.closePath(); break; } case 2: { this._context.lineTo(this._x3, this._y3); this._context.closePath(); break; } case 3: { this.point(this._x3, this._y3); this.point(this._x4, this._y4); this.point(this._x5, this._y5); break; } } }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._x3 = x, this._y3 = y; break; case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; case 2: this._point = 3; this._x5 = x, this._y5 = y; break; default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { function cardinal(context) { return new CardinalClosed(context, tension); } cardinal.tension = function(tension) { return custom(+tension); }; return cardinal; })(0)); /***/ }), /***/ "O0DV": /*!**********************************************!*\ !*** ./node_modules/d3-scale/src/utcTime.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return utcTime; }); /* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time.js */ "R0i0"); /* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ "cOGN"); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ "tgfz"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function utcTime() { return _init_js__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_time_js__WEBPACK_IMPORTED_MODULE_0__["calendar"])(d3_time__WEBPACK_IMPORTED_MODULE_2__["utcYear"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMonth"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcWeek"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcDay"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcHour"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMinute"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcSecond"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__["utcFormat"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); } /***/ }), /***/ "O4y0": /*!*********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/SubscribeOnObservable.js ***! \*********************************************************************************/ /*! exports provided: SubscribeOnObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/asap */ "7Hc7"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); class SubscribeOnObservable extends _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] { constructor(source, delayTime = 0, scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]) { super(); this.source = source; this.delayTime = delayTime; this.scheduler = scheduler; if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(delayTime) || delayTime < 0) { this.delayTime = 0; } if (!scheduler || typeof scheduler.schedule !== 'function') { this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]; } } static create(source, delay = 0, scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_1__["asap"]) { return new SubscribeOnObservable(source, delay, scheduler); } static dispatch(arg) { const { source, subscriber } = arg; return this.add(source.subscribe(subscriber)); } _subscribe(subscriber) { const delay = this.delayTime; const source = this.source; const scheduler = this.scheduler; return scheduler.schedule(SubscribeOnObservable.dispatch, delay, { source, subscriber }); } } //# sourceMappingURL=SubscribeOnObservable.js.map /***/ }), /***/ "ODVu": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/buffer.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "mPOO"); /* harmony default export */ __webpack_exports__["default"] = (function() { var lines = [], line; return { point: function(x, y, m) { line.push([x, y, m]); }, lineStart: function() { lines.push(line = []); }, lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], rejoin: function() { if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); }, result: function() { var result = lines; lines = []; line = null; return result; } }; }); /***/ }), /***/ "OHKE": /*!******************************************************!*\ !*** ./node_modules/d3-interpolate/src/cubehelix.js ***! \******************************************************/ /*! exports provided: default, cubehelixLong */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubehelixLong", function() { return cubehelixLong; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function cubehelix(hue) { return (function cubehelixGamma(y) { y = +y; function cubehelix(start, end) { var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(end)).h), s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.h = h(t); start.s = s(t); start.l = l(Math.pow(t, y)); start.opacity = opacity(t); return start + ""; }; } cubehelix.gamma = cubehelixGamma; return cubehelix; })(1); } /* harmony default export */ __webpack_exports__["default"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); var cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "OP1V": /*!************************************************!*\ !*** ./node_modules/d3-scale/src/diverging.js ***! \************************************************/ /*! exports provided: default, divergingLog, divergingSymlog, divergingPow, divergingSqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return diverging; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingLog", function() { return divergingLog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSymlog", function() { return divergingSymlog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingPow", function() { return divergingPow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSqrt", function() { return divergingSqrt; }); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./log.js */ "n0hd"); /* harmony import */ var _sequential_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sequential.js */ "zmsm"); /* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symlog.js */ "wC0G"); /* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pow.js */ "eJvb"); function transformer() { var x0 = 0, x1 = 0.5, x2 = 1, s = 1, t0, t1, t2, k10, k21, interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], transform, clamp = false, unknown; function scale(x) { return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); } scale.domain = function(_) { return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2]; }; scale.clamp = function(_) { return arguments.length ? (clamp = !!_, scale) : clamp; }; scale.interpolator = function(_) { return arguments.length ? (interpolator = _, scale) : interpolator; }; function range(interpolate) { return function(_) { var r0, r1, r2; return arguments.length ? ([r0, r1, r2] = _, interpolator = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["piecewise"])(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)]; }; } scale.range = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolate"]); scale.rangeRound = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRound"]); scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; return function(t) { transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1; return scale; }; } function diverging() { var scale = Object(_linear_js__WEBPACK_IMPORTED_MODULE_3__["linearish"])(transformer()(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"])); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, diverging()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingLog() { var scale = Object(_log_js__WEBPACK_IMPORTED_MODULE_4__["loggish"])(transformer()).domain([0.1, 1, 10]); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, divergingLog()).base(scale.base()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingSymlog() { var scale = Object(_symlog_js__WEBPACK_IMPORTED_MODULE_6__["symlogish"])(transformer()); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, divergingSymlog()).constant(scale.constant()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingPow() { var scale = Object(_pow_js__WEBPACK_IMPORTED_MODULE_7__["powish"])(transformer()); scale.copy = function() { return Object(_sequential_js__WEBPACK_IMPORTED_MODULE_5__["copy"])(scale, divergingPow()).exponent(scale.exponent()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function divergingSqrt() { return divergingPow.apply(null, arguments).exponent(0.5); } /***/ }), /***/ "OQgR": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/groupBy.js ***! \******************************************************************/ /*! exports provided: groupBy, GroupedObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Subject */ "XNiG"); function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) { return (source) => source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector)); } class GroupByOperator { constructor(keySelector, elementSelector, durationSelector, subjectSelector) { this.keySelector = keySelector; this.elementSelector = elementSelector; this.durationSelector = durationSelector; this.subjectSelector = subjectSelector; } call(subscriber, source) { return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector)); } } class GroupBySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, keySelector, elementSelector, durationSelector, subjectSelector) { super(destination); this.keySelector = keySelector; this.elementSelector = elementSelector; this.durationSelector = durationSelector; this.subjectSelector = subjectSelector; this.groups = null; this.attemptedToUnsubscribe = false; this.count = 0; } _next(value) { let key; try { key = this.keySelector(value); } catch (err) { this.error(err); return; } this._group(value, key); } _group(value, key) { let groups = this.groups; if (!groups) { groups = this.groups = new Map(); } let group = groups.get(key); let element; if (this.elementSelector) { try { element = this.elementSelector(value); } catch (err) { this.error(err); } } else { element = value; } if (!group) { group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_3__["Subject"]()); groups.set(key, group); const groupedObservable = new GroupedObservable(key, group, this); this.destination.next(groupedObservable); if (this.durationSelector) { let duration; try { duration = this.durationSelector(new GroupedObservable(key, group)); } catch (err) { this.error(err); return; } this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this))); } } if (!group.closed) { group.next(element); } } _error(err) { const groups = this.groups; if (groups) { groups.forEach((group, key) => { group.error(err); }); groups.clear(); } this.destination.error(err); } _complete() { const groups = this.groups; if (groups) { groups.forEach((group, key) => { group.complete(); }); groups.clear(); } this.destination.complete(); } removeGroup(key) { this.groups.delete(key); } unsubscribe() { if (!this.closed) { this.attemptedToUnsubscribe = true; if (this.count === 0) { super.unsubscribe(); } } } } class GroupDurationSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(key, group, parent) { super(group); this.key = key; this.group = group; this.parent = parent; } _next(value) { this.complete(); } _unsubscribe() { const { parent, key } = this; this.key = this.parent = null; if (parent) { parent.removeGroup(key); } } } class GroupedObservable extends _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"] { constructor(key, groupSubject, refCountSubscription) { super(); this.key = key; this.groupSubject = groupSubject; this.refCountSubscription = refCountSubscription; } _subscribe(subscriber) { const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); const { refCountSubscription, groupSubject } = this; if (refCountSubscription && !refCountSubscription.closed) { subscription.add(new InnerRefCountSubscription(refCountSubscription)); } subscription.add(groupSubject.subscribe(subscriber)); return subscription; } } class InnerRefCountSubscription extends _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"] { constructor(parent) { super(); this.parent = parent; parent.count++; } unsubscribe() { const parent = this.parent; if (!parent.closed && !this.closed) { super.unsubscribe(); parent.count -= 1; if (parent.count === 0 && parent.attemptedToUnsubscribe) { parent.unsubscribe(); } } } } //# sourceMappingURL=groupBy.js.map /***/ }), /***/ "OSsQ": /*!*********************************************!*\ !*** ./node_modules/d3-zoom/src/noevent.js ***! \*********************************************/ /*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); function nopropagation(event) { event.stopImmediatePropagation(); } /* harmony default export */ __webpack_exports__["default"] = (function(event) { event.preventDefault(); event.stopImmediatePropagation(); }); /***/ }), /***/ "OWWo": /*!******************************************!*\ !*** ./node_modules/d3-array/src/sum.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sum; }); function sum(values, valueof) { let sum = 0; if (valueof === undefined) { for (let value of values) { if (value = +value) { sum += value; } } } else { let index = -1; for (let value of values) { if (value = +valueof(value, ++index, values)) { sum += value; } } } return sum; } /***/ }), /***/ "Ok6N": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/scan.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return scan; }); /* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leastIndex.js */ "/CzE"); function scan(values, compare) { const index = Object(_leastIndex_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, compare); return index < 0 ? undefined : index; } /***/ }), /***/ "Oo5A": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/order/insideOut.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ "T17Z"); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "WuDp"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var n = series.length, i, j, sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__["sum"]), order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series), top = 0, bottom = 0, tops = [], bottoms = []; for (i = 0; i < n; ++i) { j = order[i]; if (top < bottom) { top += sums[j]; tops.push(j); } else { bottom += sums[j]; bottoms.push(j); } } return bottoms.reverse().concat(tops); }); /***/ }), /***/ "OqQA": /*!**********************************************!*\ !*** ./node_modules/d3-drag/src/constant.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "OrLo": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/radial.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return radial; }); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ "4m7i"); function square(x) { return Math.sign(x) * x * x; } function unsquare(x) { return Math.sign(x) * Math.sqrt(Math.abs(x)); } function radial() { var squared = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), range = [0, 1], round = false, unknown; function scale(x) { var y = unsquare(squared(x)); return isNaN(y) ? unknown : round ? Math.round(y) : y; } scale.invert = function(y) { return squared.invert(square(y)); }; scale.domain = function(_) { return arguments.length ? (squared.domain(_), scale) : squared.domain(); }; scale.range = function(_) { return arguments.length ? (squared.range((range = Array.from(_, _number_js__WEBPACK_IMPORTED_MODULE_3__["default"])).map(square)), scale) : range.slice(); }; scale.rangeRound = function(_) { return scale.range(_).round(true); }; scale.round = function(_) { return arguments.length ? (round = !!_, scale) : round; }; scale.clamp = function(_) { return arguments.length ? (squared.clamp(_), scale) : squared.clamp(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return radial(squared.domain(), range) .round(round) .clamp(squared.clamp()) .unknown(unknown); }; _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(scale, arguments); return Object(_linear_js__WEBPACK_IMPORTED_MODULE_2__["linearish"])(scale); } /***/ }), /***/ "OsX3": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferTime.js ***! \*********************************************************************/ /*! exports provided: bufferTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function bufferTime(bufferTimeSpan) { let length = arguments.length; let scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(arguments[arguments.length - 1])) { scheduler = arguments[arguments.length - 1]; length--; } let bufferCreationInterval = null; if (length >= 2) { bufferCreationInterval = arguments[1]; } let maxBufferSize = Number.POSITIVE_INFINITY; if (length >= 3) { maxBufferSize = arguments[2]; } return function bufferTimeOperatorFunction(source) { return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler)); }; } class BufferTimeOperator { constructor(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) { this.bufferTimeSpan = bufferTimeSpan; this.bufferCreationInterval = bufferCreationInterval; this.maxBufferSize = maxBufferSize; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler)); } } class Context { constructor() { this.buffer = []; } } class BufferTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { constructor(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) { super(destination); this.bufferTimeSpan = bufferTimeSpan; this.bufferCreationInterval = bufferCreationInterval; this.maxBufferSize = maxBufferSize; this.scheduler = scheduler; this.contexts = []; const context = this.openContext(); this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0; if (this.timespanOnly) { const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan }; this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState)); } else { const closeState = { subscriber: this, context }; const creationState = { bufferTimeSpan, bufferCreationInterval, subscriber: this, scheduler }; this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState)); this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState)); } } _next(value) { const contexts = this.contexts; const len = contexts.length; let filledBufferContext; for (let i = 0; i < len; i++) { const context = contexts[i]; const buffer = context.buffer; buffer.push(value); if (buffer.length == this.maxBufferSize) { filledBufferContext = context; } } if (filledBufferContext) { this.onBufferFull(filledBufferContext); } } _error(err) { this.contexts.length = 0; super._error(err); } _complete() { const { contexts, destination } = this; while (contexts.length > 0) { const context = contexts.shift(); destination.next(context.buffer); } super._complete(); } _unsubscribe() { this.contexts = null; } onBufferFull(context) { this.closeContext(context); const closeAction = context.closeAction; closeAction.unsubscribe(); this.remove(closeAction); if (!this.closed && this.timespanOnly) { context = this.openContext(); const bufferTimeSpan = this.bufferTimeSpan; const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan }; this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState)); } } openContext() { const context = new Context(); this.contexts.push(context); return context; } closeContext(context) { this.destination.next(context.buffer); const contexts = this.contexts; const spliceIndex = contexts ? contexts.indexOf(context) : -1; if (spliceIndex >= 0) { contexts.splice(contexts.indexOf(context), 1); } } } function dispatchBufferTimeSpanOnly(state) { const subscriber = state.subscriber; const prevContext = state.context; if (prevContext) { subscriber.closeContext(prevContext); } if (!subscriber.closed) { state.context = subscriber.openContext(); state.context.closeAction = this.schedule(state, state.bufferTimeSpan); } } function dispatchBufferCreation(state) { const { bufferCreationInterval, bufferTimeSpan, subscriber, scheduler } = state; const context = subscriber.openContext(); const action = this; if (!subscriber.closed) { subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber, context })); action.schedule(state, bufferCreationInterval); } } function dispatchBufferClose(arg) { const { subscriber, context } = arg; subscriber.closeContext(context); } //# sourceMappingURL=bufferTime.js.map /***/ }), /***/ "P3dq": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/join.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(onenter, onupdate, onexit) { var enter = this.enter(), update = this, exit = this.exit(); enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); if (onupdate != null) update = onupdate(update); if (onexit == null) exit.remove(); else onexit(exit); return enter && update ? enter.merge(update).order() : update; }); /***/ }), /***/ "P3jZ": /*!*****************************************************!*\ !*** ./node_modules/d3-format/src/formatRounded.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); /* harmony default export */ __webpack_exports__["default"] = (function(x, p) { var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(x, p); if (!d) return x + ""; var coefficient = d[0], exponent = d[1]; return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0"); }); /***/ }), /***/ "P6wR": /*!******************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***! \******************************************************************/ /*! exports provided: azimuthalEqualAreaRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEqualAreaRaw", function() { return azimuthalEqualAreaRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); var azimuthalEqualAreaRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(cxcy) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(2 / (1 + cxcy)); }); azimuthalEqualAreaRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / 2); }); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEqualAreaRaw) .scale(124.75) .clipAngle(180 - 1e-3); }); /***/ }), /***/ "PQSO": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/clip/circle.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "YzSS"); /* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle.js */ "vNJl"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual.js */ "fnXD"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.js */ "pb3N"); /* harmony default export */ __webpack_exports__["default"] = (function(radius) { var cr = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), delta = 6 * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], smallRadius = cr > 0, notHemisphere = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(cr) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; // TODO optimise for this common case function interpolate(from, to, direction, stream) { Object(_circle_js__WEBPACK_IMPORTED_MODULE_1__["circleStream"])(stream, radius, delta, direction, from, to); } function visible(lambda, phi) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi) > cr; } // Takes a line and cuts into visible segments. Return values used for polygon // clipping: 0 - there were intersections or the line was empty; 1 - no // intersections 2 - there were intersections, and the first and last segments // should be rejoined. function clipLine(stream) { var point0, // previous point c0, // code for previous point v0, // visibility of previous point v00, // visibility of first point clean; // no intersections return { lineStart: function() { v00 = v0 = false; clean = 1; }, point: function(lambda, phi) { var point1 = [lambda, phi], point2, v = visible(lambda, phi), c = smallRadius ? v ? 0 : code(lambda, phi) : v ? code(lambda + (lambda < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]), phi) : 0; if (!point0 && (v00 = v0 = v)) stream.lineStart(); if (v !== v0) { point2 = intersect(point0, point1); if (!point2 || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point2) || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point1, point2)) point1[2] = 1; } if (v !== v0) { clean = 0; if (v) { // outside going in stream.lineStart(); point2 = intersect(point1, point0); stream.point(point2[0], point2[1]); } else { // inside going out point2 = intersect(point0, point1); stream.point(point2[0], point2[1], 2); stream.lineEnd(); } point0 = point2; } else if (notHemisphere && point0 && smallRadius ^ v) { var t; // If the codes for two points are different, or are both zero, // and there this segment intersects with the small circle. if (!(c & c0) && (t = intersect(point1, point0, true))) { clean = 0; if (smallRadius) { stream.lineStart(); stream.point(t[0][0], t[0][1]); stream.point(t[1][0], t[1][1]); stream.lineEnd(); } else { stream.point(t[1][0], t[1][1]); stream.lineEnd(); stream.lineStart(); stream.point(t[0][0], t[0][1], 3); } } } if (v && (!point0 || !Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point1))) { stream.point(point1[0], point1[1]); } point0 = point1, v0 = v, c0 = c; }, lineEnd: function() { if (v0) stream.lineEnd(); point0 = null; }, // Rejoin first and last segments if there were intersections and the first // and last points were visible. clean: function() { return clean | ((v00 && v0) << 1); } }; } // Intersects the great circle between a and b with the clip circle. function intersect(a, b, two) { var pa = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(a), pb = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(b); // We have two planes, n1.p = d1 and n2.p = d2. // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). var n1 = [1, 0, 0], // normal n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(pa, pb), n2n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(n2, n2), n1n2 = n2[0], // cartesianDot(n1, n2), determinant = n2n2 - n1n2 * n1n2; // Two polar points. if (!determinant) return !two && a; var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(n1, n2), A = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n1, c1), B = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n2, c2); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(A, B); // Solve |p(t)|^2 = 1. var u = n1xn2, w = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, u), uu = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(u, u), t2 = w * w - uu * (Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, A) - 1); if (t2 < 0) return; var t = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(t2), q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w - t) / uu); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q, A); q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q); if (!two) return q; // Two intersection points. var lambda0 = a[0], lambda1 = b[0], phi0 = a[1], phi1 = b[1], z; if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; var delta = lambda1 - lambda0, polar = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"], meridian = polar || delta < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; // Check that the first point is between a and b. if (meridian ? polar ? phi0 + phi1 > 0 ^ q[1] < (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(q[0] - lambda0) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] ? phi0 : phi1) : phi0 <= q[1] && q[1] <= phi1 : delta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) { var q1 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w + t) / uu); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q1, A); return [q, Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q1)]; } } // Generates a 4-bit vector representing the location of a point relative to // the small circle's bounding box. function code(lambda, phi) { var r = smallRadius ? radius : _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] - radius, code = 0; if (lambda < -r) code |= 1; // left else if (lambda > r) code |= 2; // right if (phi < -r) code |= 4; // below else if (phi > r) code |= 8; // above return code; } return Object(_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], radius - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]]); }); /***/ }), /***/ "PSPu": /*!*****************************************!*\ !*** ./node_modules/d3-geo/src/area.js ***! \*****************************************/ /*! exports provided: areaRingSum, areaStream, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaRingSum", function() { return areaRingSum; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaStream", function() { return areaStream; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "mPOO"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "tepu"); var areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); // hello? var areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), lambda00, phi00, lambda0, cosPhi0, sinPhi0; var areaStream = { point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonStart: function() { areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); areaStream.lineStart = areaRingStart; areaStream.lineEnd = areaRingEnd; }, polygonEnd: function() { var areaRing = +areaRingSum; areaSum.add(areaRing < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] + areaRing : areaRing); this.lineStart = this.lineEnd = this.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }, sphere: function() { areaSum.add(_math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]); } }; function areaRingStart() { areaStream.point = areaPointFirst; } function areaRingEnd() { areaPoint(lambda00, phi00); } function areaPointFirst(lambda, phi) { areaStream.point = areaPoint; lambda00 = lambda, phi00 = phi; lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; lambda0 = lambda, cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]), sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); } function areaPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]; // half the angular distance from south pole // Spherical excess E for a spherical triangle with vertices: south pole, // previous point, current point. Uses a formula derived from Cagnoli’s // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2). var dLambda = lambda - lambda0, sdLambda = dLambda >= 0 ? 1 : -1, adLambda = sdLambda * dLambda, cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), k = sinPhi0 * sinPhi, u = cosPhi0 * cosPhi + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(adLambda), v = k * sdLambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(adLambda); areaRingSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(v, u)); // Advance the previous points. lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi; } /* harmony default export */ __webpack_exports__["default"] = (function(object) { areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, areaStream); return areaSum * 2; }); /***/ }), /***/ "PYcf": /*!***************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { var node = this, nodes = [node], children, i, index = -1; while (node = nodes.pop()) { callback.call(that, node, ++index, this); if (children = node.children) { for (i = children.length - 1; i >= 0; --i) { nodes.push(children[i]); } } } return this; }); /***/ }), /***/ "PZkE": /*!**********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/distinctUntilKeyChanged.js ***! \**********************************************************************************/ /*! exports provided: distinctUntilKeyChanged */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; }); /* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./distinctUntilChanged */ "/uUt"); function distinctUntilKeyChanged(key, compare) { return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])((x, y) => compare ? compare(x[key], y[key]) : x[key] === y[key]); } //# sourceMappingURL=distinctUntilKeyChanged.js.map /***/ }), /***/ "PfrF": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/bufferWhen.js ***! \*********************************************************************/ /*! exports provided: bufferWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function bufferWhen(closingSelector) { return function (source) { return source.lift(new BufferWhenOperator(closingSelector)); }; } class BufferWhenOperator { constructor(closingSelector) { this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector)); } } class BufferWhenSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination, closingSelector) { super(destination); this.closingSelector = closingSelector; this.subscribing = false; this.openBuffer(); } _next(value) { this.buffer.push(value); } _complete() { const buffer = this.buffer; if (buffer) { this.destination.next(buffer); } super._complete(); } _unsubscribe() { this.buffer = undefined; this.subscribing = false; } notifyNext() { this.openBuffer(); } notifyComplete() { if (this.subscribing) { this.complete(); } else { this.openBuffer(); } } openBuffer() { let { closingSubscription } = this; if (closingSubscription) { this.remove(closingSubscription); closingSubscription.unsubscribe(); } const buffer = this.buffer; if (this.buffer) { this.destination.next(buffer); } this.buffer = []; let closingNotifier; try { const { closingSelector } = this; closingNotifier = closingSelector(); } catch (err) { return this.error(err); } closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"](); this.closingSubscription = closingSubscription; this.add(closingSubscription); this.subscribing = true; closingSubscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(closingNotifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](this))); this.subscribing = false; } } //# sourceMappingURL=bufferWhen.js.map /***/ }), /***/ "Pgey": /*!**********************************************!*\ !*** ./node_modules/d3-timer/src/timeout.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "dPRQ"); /* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"]; delay = delay == null ? 0 : +delay; t.restart(elapsed => { t.stop(); callback(elapsed + delay); }, delay, time); return t; }); /***/ }), /***/ "PqYM": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/timer.js ***! \*****************************************************************/ /*! exports provided: timer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function timer(dueTime = 0, periodOrScheduler, scheduler) { let period = -1; if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) { period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler); } else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) { scheduler = periodOrScheduler; } if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime) ? dueTime : (+dueTime - scheduler.now()); return scheduler.schedule(dispatch, due, { index: 0, period, subscriber }); }); } function dispatch(state) { const { index, period, subscriber } = state; subscriber.next(index); if (subscriber.closed) { return; } else if (period === -1) { return subscriber.complete(); } state.index = index + 1; this.schedule(state, period); } //# sourceMappingURL=timer.js.map /***/ }), /***/ "PuQ0": /*!******************************************!*\ !*** ./node_modules/d3-array/src/bin.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "wMLG"); /* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect.js */ "h8nK"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "2bil"); /* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "wz8V"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity.js */ "i202"); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ "GWx9"); /* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks.js */ "7ssf"); /* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges.js */ "Nl5w"); /* harmony default export */ __webpack_exports__["default"] = (function() { var value = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], domain = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"], threshold = _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__["default"]; function histogram(data) { if (!Array.isArray(data)) data = Array.from(data); var i, n = data.length, x, values = new Array(n); for (i = 0; i < n; ++i) { values[i] = value(data[i], i, data); } var xz = domain(values), x0 = xz[0], x1 = xz[1], tz = threshold(values, x0, x1); // Convert number of thresholds into uniform thresholds, and nice the // default domain accordingly. if (!Array.isArray(tz)) { const max = x1, tn = +tz; if (domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]) [x0, x1] = Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__["default"])(x0, x1, tn); tz = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__["default"])(x0, x1, tn); // If the last threshold is coincident with the domain’s upper bound, the // last bin will be zero-width. If the default domain is used, and this // last threshold is coincident with the maximum input value, we can // extend the niced upper bound by one tick to ensure uniform bin widths; // otherwise, we simply remove the last threshold. Note that we don’t // coerce values or the domain to numbers, and thus must be careful to // compare order (>=) rather than strict equality (===)! if (tz[tz.length - 1] >= x1) { if (max >= x1 && domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]) { const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__["tickIncrement"])(x0, x1, tn); if (isFinite(step)) { if (step > 0) { x1 = (Math.floor(x1 / step) + 1) * step; } else if (step < 0) { x1 = (Math.ceil(x1 * -step) + 1) / -step; } } } else { tz.pop(); } } } // Remove any thresholds outside the domain. var m = tz.length; while (tz[0] <= x0) tz.shift(), --m; while (tz[m - 1] > x1) tz.pop(), --m; var bins = new Array(m + 1), bin; // Initialize bins. for (i = 0; i <= m; ++i) { bin = bins[i] = []; bin.x0 = i > 0 ? tz[i - 1] : x0; bin.x1 = i < m ? tz[i] : x1; } // Assign data to bins by value, ignoring any outside the domain. for (i = 0; i < n; ++i) { x = values[i]; if (x0 <= x && x <= x1) { bins[Object(_bisect_js__WEBPACK_IMPORTED_MODULE_1__["default"])(tz, x, 0, m)].push(data[i]); } } return bins; } histogram.value = function(_) { return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : value; }; histogram.domain = function(_) { return arguments.length ? (domain = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])([_[0], _[1]]), histogram) : domain; }; histogram.thresholds = function(_) { return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : threshold; }; return histogram; }); /***/ }), /***/ "Pz8W": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapAction.js ***! \*********************************************************************/ /*! exports provided: AsapAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; }); /* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/Immediate */ "c7jc"); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); class AsapAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } requestAsyncId(scheduler, id, delay = 0) { if (delay !== null && delay > 0) { return super.requestAsyncId(scheduler, id, delay); } scheduler.actions.push(this); return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null))); } recycleAsyncId(scheduler, id, delay = 0) { if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { return super.recycleAsyncId(scheduler, id, delay); } if (scheduler.actions.length === 0) { _util_Immediate__WEBPACK_IMPORTED_MODULE_0__["Immediate"].clearImmediate(id); scheduler.scheduled = undefined; } return undefined; } } //# sourceMappingURL=AsapAction.js.map /***/ }), /***/ "Q43v": /*!***********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/catmullRomOpen.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ "sK06"); /* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ "Kcim"); function CatmullRomOpen(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRomOpen.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; if (this._point) { var x23 = this._x2 - x, y23 = this._y2 - y; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; case 3: this._point = 4; // proceed default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a; this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { function catmullRom(context) { return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__["CardinalOpen"](context, 0); } catmullRom.alpha = function(alpha) { return custom(+alpha); }; return catmullRom; })(0.5)); /***/ }), /***/ "QIAL": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isInteropObservable.js ***! \*************************************************************************/ /*! exports provided: isInteropObservable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; }); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); function isInteropObservable(input) { return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function'; } //# sourceMappingURL=isInteropObservable.js.map /***/ }), /***/ "QK7T": /*!**********************************************!*\ !*** ./node_modules/d3-array/src/shuffle.js ***! \**********************************************/ /*! exports provided: default, shuffler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return shuffler; }); /* harmony default export */ __webpack_exports__["default"] = (shuffler(Math.random)); function shuffler(random) { return function shuffle(array, i0 = 0, i1 = array.length) { let m = i1 - (i0 = +i0); while (m) { const i = random() * m-- | 0, t = array[m + i0]; array[m + i0] = array[i + i0]; array[i + i0] = t; } return array; }; } /***/ }), /***/ "QjDJ": /*!******************************************************!*\ !*** ./node_modules/d3-selection/src/selectorAll.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function empty() { return []; } /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return selector == null ? empty : function() { return this.querySelectorAll(selector); }; }); /***/ }), /***/ "Qn8I": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/using.js ***! \*****************************************************************/ /*! exports provided: using */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ "Cfvw"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./empty */ "EY2u"); function using(resourceFactory, observableFactory) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { let resource; try { resource = resourceFactory(); } catch (err) { subscriber.error(err); return undefined; } let result; try { result = observableFactory(resource); } catch (err) { subscriber.error(err); return undefined; } const source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; const subscription = source.subscribe(subscriber); return () => { subscription.unsubscribe(); if (resource) { resource.unsubscribe(); } }; }); } //# sourceMappingURL=using.js.map /***/ }), /***/ "QqCr": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/bindCallback.js ***! \************************************************************************/ /*! exports provided: bindCallback */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); /* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/canReportError */ "8Qeq"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function bindCallback(callbackFunc, resultSelector, scheduler) { if (resultSelector) { if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) { scheduler = resultSelector; } else { return (...args) => bindCallback(callbackFunc, scheduler)(...args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])((args) => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } } return function (...args) { const context = this; let subject; const params = { context, subject, callbackFunc, scheduler, }; return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { if (!scheduler) { if (!subject) { subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs); subject.complete(); }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) { subject.error(err); } else { console.warn(err); } } } return subject.subscribe(subscriber); } else { const state = { args, subscriber, params, }; return scheduler.schedule(dispatch, 0, state); } }); }; } function dispatch(state) { const self = this; const { args, subscriber, params } = state; const { callbackFunc, context, scheduler } = params; let { subject } = params; if (!subject) { subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"](); const handler = (...innerArgs) => { const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs; this.add(scheduler.schedule(dispatchNext, 0, { value, subject })); }; try { callbackFunc.apply(context, [...args, handler]); } catch (err) { subject.error(err); } } this.add(subject.subscribe(subscriber)); } function dispatchNext(state) { const { value, subject } = state; subject.next(value); subject.complete(); } function dispatchError(state) { const { err, subject } = state; subject.error(err); } //# sourceMappingURL=bindCallback.js.map /***/ }), /***/ "QupR": /*!*********************************************!*\ !*** ./node_modules/d3-force/src/jiggle.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(random) { return (random() - 0.5) * 1e-6; }); /***/ }), /***/ "R0i0": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/time.js ***! \*******************************************/ /*! exports provided: calendar, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calendar", function() { return calendar; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return time; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time */ "tgfz"); /* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time-format */ "cOGN"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ "bcaG"); var durationSecond = 1000, durationMinute = durationSecond * 60, durationHour = durationMinute * 60, durationDay = durationHour * 24, durationWeek = durationDay * 7, durationMonth = durationDay * 30, durationYear = durationDay * 365; function date(t) { return new Date(t); } function number(t) { return t instanceof Date ? +t : +new Date(+t); } function calendar(year, month, week, day, hour, minute, second, millisecond, format) { var scale = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["default"])(), invert = scale.invert, domain = scale.domain; var formatMillisecond = format(".%L"), formatSecond = format(":%S"), formatMinute = format("%I:%M"), formatHour = format("%I %p"), formatDay = format("%a %d"), formatWeek = format("%b %d"), formatMonth = format("%B"), formatYear = format("%Y"); var tickIntervals = [ [second, 1, durationSecond], [second, 5, 5 * durationSecond], [second, 15, 15 * durationSecond], [second, 30, 30 * durationSecond], [minute, 1, durationMinute], [minute, 5, 5 * durationMinute], [minute, 15, 15 * durationMinute], [minute, 30, 30 * durationMinute], [ hour, 1, durationHour ], [ hour, 3, 3 * durationHour ], [ hour, 6, 6 * durationHour ], [ hour, 12, 12 * durationHour ], [ day, 1, durationDay ], [ day, 2, 2 * durationDay ], [ week, 1, durationWeek ], [ month, 1, durationMonth ], [ month, 3, 3 * durationMonth ], [ year, 1, durationYear ] ]; function tickFormat(date) { return (second(date) < date ? formatMillisecond : minute(date) < date ? formatSecond : hour(date) < date ? formatMinute : day(date) < date ? formatHour : month(date) < date ? (week(date) < date ? formatDay : formatWeek) : year(date) < date ? formatMonth : formatYear)(date); } function tickInterval(interval, start, stop) { if (interval == null) interval = 10; // If a desired tick count is specified, pick a reasonable tick interval // based on the extent of the domain and a rough estimate of tick size. // Otherwise, assume interval is already a time interval and use it. if (typeof interval === "number") { var target = Math.abs(stop - start) / interval, i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisector"])(function(i) { return i[2]; }).right(tickIntervals, target), step; if (i === tickIntervals.length) { step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start / durationYear, stop / durationYear, interval); interval = year; } else if (i) { i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; step = i[1]; interval = i[0]; } else { step = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, interval), 1); interval = millisecond; } return interval.every(step); } return interval; } scale.invert = function(y) { return new Date(invert(y)); }; scale.domain = function(_) { return arguments.length ? domain(Array.from(_, number)) : domain().map(date); }; scale.ticks = function(interval) { var d = domain(), t0 = d[0], t1 = d[d.length - 1], r = t1 < t0, t; if (r) t = t0, t0 = t1, t1 = t; t = tickInterval(interval, t0, t1); t = t ? t.range(t0, t1 + 1) : []; // inclusive stop return r ? t.reverse() : t; }; scale.tickFormat = function(count, specifier) { return specifier == null ? tickFormat : format(specifier); }; scale.nice = function(interval) { var d = domain(); return (interval = tickInterval(interval, d[0], d[d.length - 1])) ? domain(Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__["default"])(d, interval)) : scale; }; scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["copy"])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); }; return scale; } function time() { return _init_js__WEBPACK_IMPORTED_MODULE_4__["initRange"].apply(calendar(d3_time__WEBPACK_IMPORTED_MODULE_1__["timeYear"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMonth"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeWeek"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeDay"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeHour"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMinute"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeSecond"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_2__["timeFormat"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); } /***/ }), /***/ "R0y8": /*!*****************************************!*\ !*** ./node_modules/d3-geo/src/math.js ***! \*****************************************/ /*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, hypot, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quarterPi", function() { return quarterPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return degrees; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return radians; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan", function() { return atan; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ceil", function() { return ceil; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exp", function() { return exp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "floor", function() { return floor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hypot", function() { return hypot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pow", function() { return pow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sign", function() { return sign; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tan", function() { return tan; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "haversin", function() { return haversin; }); var epsilon = 1e-6; var epsilon2 = 1e-12; var pi = Math.PI; var halfPi = pi / 2; var quarterPi = pi / 4; var tau = pi * 2; var degrees = 180 / pi; var radians = pi / 180; var abs = Math.abs; var atan = Math.atan; var atan2 = Math.atan2; var cos = Math.cos; var ceil = Math.ceil; var exp = Math.exp; var floor = Math.floor; var hypot = Math.hypot; var log = Math.log; var pow = Math.pow; var sin = Math.sin; var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; var sqrt = Math.sqrt; var tan = Math.tan; function acos(x) { return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); } function asin(x) { return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x); } function haversin(x) { return (x = sin(x / 2)) * x; } /***/ }), /***/ "R9CD": /*!********************************************!*\ !*** ./node_modules/d3-array/src/pairs.js ***! \********************************************/ /*! exports provided: default, pair */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pairs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pair", function() { return pair; }); function pairs(values, pairof = pair) { const pairs = []; let previous; let first = false; for (const value of values) { if (first) pairs.push(pairof(previous, value)); previous = value; first = true; } return pairs; } function pair(a, b) { return [a, b]; } /***/ }), /***/ "RBWq": /*!**************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***! \**************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "efedf5bcbddc756bb1", "f2f0f7cbc9e29e9ac86a51a3", "f2f0f7cbc9e29e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8756bb154278f", "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "RQVR": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/root.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return this._root; }); /***/ }), /***/ "RUbi": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AsapScheduler.js ***! \************************************************************************/ /*! exports provided: AsapScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; }); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class AsapScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { flush(action) { this.active = true; this.scheduled = undefined; const { actions } = this; let error; let index = -1; let count = actions.length; action = action || actions.shift(); do { if (error = action.execute(action.state, action.delay)) { break; } } while (++index < count && (action = actions.shift())); this.active = false; if (error) { while (++index < count && (action = actions.shift())) { action.unsubscribe(); } throw error; } } } //# sourceMappingURL=AsapScheduler.js.map /***/ }), /***/ "RhHs": /*!*******************************************!*\ !*** ./node_modules/d3-axis/src/index.js ***! \*******************************************/ /*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _axis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis.js */ "iBRH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisTop"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisBottom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return _axis_js__WEBPACK_IMPORTED_MODULE_0__["axisLeft"]; }); /***/ }), /***/ "Ri0D": /*!******************************************!*\ !*** ./node_modules/d3-dsv/src/index.js ***! \******************************************/ /*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "NRL+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ "Vibt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatValue"]; }); /* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ "wWUp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatValue"]; }); /* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ "6hg5"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /***/ }), /***/ "S/r+": /*!**************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var node = this, nodes = [node]; while (node = node.parent) { nodes.push(node); } return nodes; }); /***/ }), /***/ "S2Xb": /*!*********************************************!*\ !*** ./node_modules/d3-contour/src/noop.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() {}); /***/ }), /***/ "S3lI": /*!************************************************************!*\ !*** ./node_modules/d3-interpolate/src/transform/index.js ***! \************************************************************/ /*! exports provided: interpolateTransformCss, interpolateTransformSvg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; }); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ "4xfg"); /* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ "2nV0"); function interpolateTransform(parse, pxComma, pxParen, degParen) { function pop(s) { return s.length ? s.pop() + " " : ""; } function translate(xa, ya, xb, yb, s, q) { if (xa !== xb || ya !== yb) { var i = s.push("translate(", null, pxComma, null, pxParen); q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); } else if (xb || yb) { s.push("translate(" + xb + pxComma + yb + pxParen); } } function rotate(a, b, s, q) { if (a !== b) { if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); } else if (b) { s.push(pop(s) + "rotate(" + b + degParen); } } function skewX(a, b, s, q) { if (a !== b) { q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); } else if (b) { s.push(pop(s) + "skewX(" + b + degParen); } } function scale(xa, ya, xb, yb, s, q) { if (xa !== xb || ya !== yb) { var i = s.push(pop(s) + "scale(", null, ",", null, ")"); q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); } else if (xb !== 1 || yb !== 1) { s.push(pop(s) + "scale(" + xb + "," + yb + ")"); } } return function(a, b) { var s = [], // string constants and placeholders q = []; // number interpolators a = parse(a), b = parse(b); translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); rotate(a.rotate, b.rotate, s, q); skewX(a.skewX, b.skewX, s, q); scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); a = b = null; // gc return function(t) { var i = -1, n = q.length, o; while (++i < n) s[(o = q[i]).i] = o.x(t); return s.join(""); }; }; } var interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseCss"], "px, ", "px)", "deg)"); var interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseSvg"], ", ", ")", ")"); /***/ }), /***/ "S83q": /*!********************************************************!*\ !*** ./node_modules/d3-interpolate/src/basisClosed.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "yEp2"); /* harmony default export */ __webpack_exports__["default"] = (function(values) { var n = values.length; return function(t) { var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), v0 = values[(i + n - 1) % n], v1 = values[i % n], v2 = values[(i + 1) % n], v3 = values[(i + 2) % n]; return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["basis"])((t - i / n) * n, v0, v1, v2, v3); }; }); /***/ }), /***/ "SC+/": /*!********************************************!*\ !*** ./node_modules/d3-color/src/index.js ***! \********************************************/ /*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "FmoU"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["rgb"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["hsl"]; }); /* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ "YvDT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["hcl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["lch"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["gray"]; }); /* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ "Faen"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /***/ }), /***/ "SDD1": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/curve/linear.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function Linear(context) { this._context = context; } Linear.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; // proceed default: this._context.lineTo(x, y); break; } } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Linear(context); }); /***/ }), /***/ "SGTC": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/clip/line.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b, x0, y0, x1, y1) { var ax = a[0], ay = a[1], bx = b[0], by = b[1], t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r; r = x0 - ax; if (!dx && r > 0) return; r /= dx; if (dx < 0) { if (r < t0) return; if (r < t1) t1 = r; } else if (dx > 0) { if (r > t1) return; if (r > t0) t0 = r; } r = x1 - ax; if (!dx && r < 0) return; r /= dx; if (dx < 0) { if (r > t1) return; if (r > t0) t0 = r; } else if (dx > 0) { if (r < t0) return; if (r < t1) t1 = r; } r = y0 - ay; if (!dy && r > 0) return; r /= dy; if (dy < 0) { if (r < t0) return; if (r < t1) t1 = r; } else if (dy > 0) { if (r > t1) return; if (r > t0) t0 = r; } r = y1 - ay; if (!dy && r < 0) return; r /= dy; if (dy < 0) { if (r > t1) return; if (r > t0) t0 = r; } else if (dy > 0) { if (r < t0) return; if (r < t1) t1 = r; } if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; return true; }); /***/ }), /***/ "SKGk": /*!*********************************************!*\ !*** ./node_modules/d3-chord/src/ribbon.js ***! \*********************************************/ /*! exports provided: default, ribbonArrow */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ribbonArrow", function() { return ribbonArrow; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "8efb"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "HpDs"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "mJZf"); function defaultSource(d) { return d.source; } function defaultTarget(d) { return d.target; } function defaultRadius(d) { return d.radius; } function defaultStartAngle(d) { return d.startAngle; } function defaultEndAngle(d) { return d.endAngle; } function defaultPadAngle() { return 0; } function defaultArrowheadRadius() { return 10; } function ribbon(headRadius) { var source = defaultSource, target = defaultTarget, sourceRadius = defaultRadius, targetRadius = defaultRadius, startAngle = defaultStartAngle, endAngle = defaultEndAngle, padAngle = defaultPadAngle, context = null; function ribbon() { var buffer, s = source.apply(this, arguments), t = target.apply(this, arguments), ap = padAngle.apply(this, arguments) / 2, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), sr = +sourceRadius.apply(this, (argv[0] = s, argv)), sa0 = startAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"], sa1 = endAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"], tr = +targetRadius.apply(this, (argv[0] = t, argv)), ta0 = startAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"], ta1 = endAngle.apply(this, argv) - _math_js__WEBPACK_IMPORTED_MODULE_3__["halfPi"]; if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); if (ap > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) { if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(sa1 - sa0) > ap * 2 + _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap); else sa0 = sa1 = (sa0 + sa1) / 2; if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(ta1 - ta0) > ap * 2 + _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap); else ta0 = ta1 = (ta0 + ta1) / 2; } context.moveTo(sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(sa0), sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(sa0)); context.arc(0, 0, sr, sa0, sa1); if (sa0 !== ta0 || sa1 !== ta1) { if (headRadius) { var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2; context.quadraticCurveTo(0, 0, tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta0), tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta0)); context.lineTo(tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta2), tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta2)); context.lineTo(tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta1), tr2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta1)); } else { context.quadraticCurveTo(0, 0, tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(ta0), tr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(ta0)); context.arc(0, 0, tr, ta0, ta1); } } context.quadraticCurveTo(0, 0, sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["cos"])(sa0), sr * Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["sin"])(sa0)); context.closePath(); if (buffer) return context = null, buffer + "" || null; } if (headRadius) ribbon.headRadius = function(_) { return arguments.length ? (headRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : headRadius; }; ribbon.radius = function(_) { return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : sourceRadius; }; ribbon.sourceRadius = function(_) { return arguments.length ? (sourceRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : sourceRadius; }; ribbon.targetRadius = function(_) { return arguments.length ? (targetRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : targetRadius; }; ribbon.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : startAngle; }; ribbon.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : endAngle; }; ribbon.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), ribbon) : padAngle; }; ribbon.source = function(_) { return arguments.length ? (source = _, ribbon) : source; }; ribbon.target = function(_) { return arguments.length ? (target = _, ribbon) : target; }; ribbon.context = function(_) { return arguments.length ? ((context = _ == null ? null : _), ribbon) : context; }; return ribbon; } /* harmony default export */ __webpack_exports__["default"] = (function() { return ribbon(); }); function ribbonArrow() { return ribbon(defaultArrowheadRadius); } /***/ }), /***/ "SMTj": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/path/bounds.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "mPOO"); var x0 = Infinity, y0 = x0, x1 = -x0, y1 = x1; var boundsStream = { point: boundsPoint, lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], result: function() { var bounds = [[x0, y0], [x1, y1]]; x1 = y1 = -(y0 = x0 = Infinity); return bounds; } }; function boundsPoint(x, y) { if (x < x0) x0 = x; if (x > x1) x1 = x; if (y < y0) y0 = y; if (y > y1) y1 = y; } /* harmony default export */ __webpack_exports__["default"] = (boundsStream); /***/ }), /***/ "SSHS": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/some.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return some; }); function some(values, test) { if (typeof test !== "function") throw new TypeError("test is not a function"); let index = -1; for (const value of values) { if (test(value, ++index, values)) { return true; } } return false; } /***/ }), /***/ "SeVD": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeTo.js ***! \*****************************************************************/ /*! exports provided: subscribeTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; }); /* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribeToArray */ "ngJS"); /* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeToPromise */ "a7t3"); /* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subscribeToIterable */ "pLzU"); /* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subscribeToObservable */ "CRDf"); /* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isArrayLike */ "I55L"); /* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isPromise */ "c2HN"); /* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isObject */ "XoHu"); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); /* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../symbol/observable */ "kJWO"); const subscribeTo = (result) => { if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') { return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result); } else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) { return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result); } else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) { return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result); } else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') { return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result); } else { const value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : `'${result}'`; const msg = `You provided ${value} where a stream was expected.` + ' You can provide an Observable, Promise, Array, or Iterable.'; throw new TypeError(msg); } }; //# sourceMappingURL=subscribeTo.js.map /***/ }), /***/ "Sf2A": /*!************************************************!*\ !*** ./node_modules/d3-contour/src/density.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "mcvr"); /* harmony import */ var _blur_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blur.js */ "VQEX"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant.js */ "DiG6"); /* harmony import */ var _contours_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contours.js */ "gy+j"); function defaultX(d) { return d[0]; } function defaultY(d) { return d[1]; } function defaultWeight() { return 1; } /* harmony default export */ __webpack_exports__["default"] = (function() { var x = defaultX, y = defaultY, weight = defaultWeight, dx = 960, dy = 500, r = 20, // blur radius k = 2, // log2(grid cell size) o = r * 3, // grid offset, to pad for blur n = (dx + o * 2) >> k, // grid width m = (dy + o * 2) >> k, // grid height threshold = Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(20); function density(data) { var values0 = new Float32Array(n * m), values1 = new Float32Array(n * m); data.forEach(function(d, i, data) { var xi = (+x(d, i, data) + o) >> k, yi = (+y(d, i, data) + o) >> k, wi = +weight(d, i, data); if (xi >= 0 && xi < n && yi >= 0 && yi < m) { values0[xi + yi * n] += wi; } }); // TODO Optimize. Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); Object(_blur_js__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); var tz = threshold(values0); // Convert number of thresholds into uniform thresholds. if (!Array.isArray(tz)) { var stop = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["max"])(values0); tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(0, stop, tz); tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(0, Math.floor(stop / tz) * tz, tz); tz.shift(); } return Object(_contours_js__WEBPACK_IMPORTED_MODULE_4__["default"])() .thresholds(tz) .size([n, m]) (values0) .map(transform); } function transform(geometry) { geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel. geometry.coordinates.forEach(transformPolygon); return geometry; } function transformPolygon(coordinates) { coordinates.forEach(transformRing); } function transformRing(coordinates) { coordinates.forEach(transformPoint); } // TODO Optimize. function transformPoint(coordinates) { coordinates[0] = coordinates[0] * Math.pow(2, k) - o; coordinates[1] = coordinates[1] * Math.pow(2, k) - o; } function resize() { o = r * 3; n = (dx + o * 2) >> k; m = (dy + o * 2) >> k; return density; } density.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : x; }; density.y = function(_) { return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : y; }; density.weight = function(_) { return arguments.length ? (weight = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : weight; }; density.size = function(_) { if (!arguments.length) return [dx, dy]; var _0 = +_[0], _1 = +_[1]; if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); return dx = _0, dy = _1, resize(); }; density.cellSize = function(_) { if (!arguments.length) return 1 << k; if (!((_ = +_) >= 1)) throw new Error("invalid cell size"); return k = Math.floor(Math.log(_) / Math.LN2), resize(); }; density.thresholds = function(_) { return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_), density) : threshold; }; density.bandwidth = function(_) { if (!arguments.length) return Math.sqrt(r * (r + 1)); if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth"); return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize(); }; return density; }); /***/ }), /***/ "SgsU": /*!**********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/links.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var root = this, links = []; root.each(function(node) { if (node !== root) { // Don’t include the root’s parent, if any. links.push({source: node.parent, target: node}); } }); return links; }); /***/ }), /***/ "SpAZ": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/identity.js ***! \**************************************************************/ /*! exports provided: identity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); function identity(x) { return x; } //# sourceMappingURL=identity.js.map /***/ }), /***/ "Spa3": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***! \*************************************************************************/ /*! exports provided: default, magma, inferno, plasma */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "magma", function() { return magma; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inferno", function() { return inferno; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plasma", function() { return plasma; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); function ramp(range) { var n = range.length; return function(t) { return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; }; } /* harmony default export */ __webpack_exports__["default"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"))); var magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); var inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); var plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); /***/ }), /***/ "SxV6": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/first.js ***! \****************************************************************/ /*! exports provided: first */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./filter */ "pLZG"); /* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ "IzEk"); /* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ "xbPD"); /* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ "XDbj"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function first(predicate, defaultValue) { const hasDefaultValue = arguments.length >= 2; return (source) => source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"]())); } //# sourceMappingURL=first.js.map /***/ }), /***/ "SxqP": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "d8b365f5f5f55ab4ac", "a6611adfc27d80cdc1018571", "a6611adfc27df5f5f580cdc1018571", "8c510ad8b365f6e8c3c7eae55ab4ac01665e", "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "T17Z": /*!*******************************************************!*\ !*** ./node_modules/d3-shape/src/order/appearance.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "qqpY"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var peaks = series.map(peak); return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); }); function peak(series) { var i = -1, j = 0, n = series.length, vi, vj = -Infinity; while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; return j; } /***/ }), /***/ "T9TN": /*!******************************************************!*\ !*** ./node_modules/d3-selection/src/sourceEvent.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(event) { let sourceEvent; while (sourceEvent = event.sourceEvent) event = sourceEvent; return event; }); /***/ }), /***/ "TCOF": /*!**********************************************************!*\ !*** ./node_modules/d3-time-format/src/defaultLocale.js ***! \**********************************************************/ /*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return timeFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return timeParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return utcFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return utcParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "pZEX"); var locale; var timeFormat; var timeParse; var utcFormat; var utcParse; defaultLocale({ dateTime: "%x, %X", date: "%-m/%-d/%Y", time: "%-I:%M:%S %p", periods: ["AM", "PM"], days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] }); function defaultLocale(definition) { locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition); timeFormat = locale.format; timeParse = locale.parse; utcFormat = locale.utcFormat; utcParse = locale.utcParse; return locale; } /***/ }), /***/ "TI0E": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/lineRadial.js ***! \*************************************************/ /*! exports provided: lineRadial, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return lineRadial; }); /* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "JnD7"); /* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ "+ugm"); function lineRadial(l) { var c = l.curve; l.angle = l.x, delete l.x; l.radius = l.y, delete l.y; l.curve = function(_) { return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; }; return l; } /* harmony default export */ __webpack_exports__["default"] = (function() { return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"])); }); /***/ }), /***/ "TKDR": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/resample.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "YzSS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "t9E6"); var maxDepth = 16, // maximum depth of subdivision cosMinDistance = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(30 * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); // cos(minimum angular distance) /* harmony default export */ __webpack_exports__["default"] = (function(project, delta2) { return +delta2 ? resample(project, delta2) : resampleNone(project); }); function resampleNone(project) { return Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ point: function(x, y) { x = project(x, y); this.stream.point(x[0], x[1]); } }); } function resample(project, delta2) { function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy; if (d2 > 4 * delta2 && depth--) { var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(a * a + b * b + c * c), phi2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(c /= m), lambda2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(c) - 1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - lambda1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? (lambda0 + lambda1) / 2 : Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(b, a), p = project(lambda2, phi2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2; if (dz * dz / d2 > delta2 // perpendicular projected distance || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); stream.point(x2, y2); resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); } } } return function(stream) { var lambda00, x00, y00, a00, b00, c00, // first point lambda0, x0, y0, a0, b0, c0; // previous point var resampleStream = { point: point, lineStart: lineStart, lineEnd: lineEnd, polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } }; function point(x, y) { x = project(x, y); stream.point(x[0], x[1]); } function lineStart() { x0 = NaN; resampleStream.point = linePoint; stream.lineStart(); } function linePoint(lambda, phi) { var c = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])([lambda, phi]), p = project(lambda, phi); resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); stream.point(x0, y0); } function lineEnd() { resampleStream.point = point; stream.lineEnd(); } function ringStart() { lineStart(); resampleStream.point = ringPoint; resampleStream.lineEnd = ringEnd; } function ringPoint(lambda, phi) { linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; resampleStream.point = linePoint; } function ringEnd() { resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); resampleStream.lineEnd = lineEnd; lineEnd(); } return resampleStream; }; } /***/ }), /***/ "TKo5": /*!*******************************************!*\ !*** ./node_modules/d3-drag/src/event.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DragEvent; }); function DragEvent(type, { sourceEvent, subject, target, identifier, active, x, y, dx, dy, dispatch }) { Object.defineProperties(this, { type: {value: type, enumerable: true, configurable: true}, sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, subject: {value: subject, enumerable: true, configurable: true}, target: {value: target, enumerable: true, configurable: true}, identifier: {value: identifier, enumerable: true, configurable: true}, active: {value: active, enumerable: true, configurable: true}, x: {value: x, enumerable: true, configurable: true}, y: {value: y, enumerable: true, configurable: true}, dx: {value: dx, enumerable: true, configurable: true}, dy: {value: dy, enumerable: true, configurable: true}, _: {value: dispatch} }); } DragEvent.prototype.on = function() { var value = this._.on.apply(this._, arguments); return value === this._ ? this : value; }; /***/ }), /***/ "TXIv": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/quad.js ***! \******************************************/ /*! exports provided: quadIn, quadOut, quadInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadIn", function() { return quadIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadOut", function() { return quadOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadInOut", function() { return quadInOut; }); function quadIn(t) { return t * t; } function quadOut(t) { return t * (2 - t); } function quadInOut(t) { return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; } /***/ }), /***/ "TfGn": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return constants; }); function constants(x) { return function() { return x; }; } /***/ }), /***/ "TisH": /*!*************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/dispatch.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _window_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window.js */ "oxeV"); function dispatchEvent(node, type, params) { var window = Object(_window_js__WEBPACK_IMPORTED_MODULE_0__["default"])(node), event = window.CustomEvent; if (typeof event === "function") { event = new event(type, params); } else { event = window.document.createEvent("Event"); if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; else event.initEvent(type, false, false); } node.dispatchEvent(event); } function dispatchConstant(type, params) { return function() { return dispatchEvent(this, type, params); }; } function dispatchFunction(type, params) { return function() { return dispatchEvent(this, type, params.apply(this, arguments)); }; } /* harmony default export */ __webpack_exports__["default"] = (function(type, params) { return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params)); }); /***/ }), /***/ "U6M7": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/hue.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "sFV2"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__["hue"])(+a, +b); return function(t) { var x = i(t); return x - 360 * Math.floor(x / 360); }; }); /***/ }), /***/ "UFbn": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/order/reverse.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "qqpY"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); }); /***/ }), /***/ "UGGt": /*!*****************************************************!*\ !*** ./node_modules/d3-interpolate/src/discrete.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(range) { var n = range.length; return function(t) { return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; }; }); /***/ }), /***/ "UGaM": /*!**************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publishBehavior.js ***! \**************************************************************************/ /*! exports provided: publishBehavior */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; }); /* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BehaviorSubject */ "2Vo4"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publishBehavior(value) { return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); } //# sourceMappingURL=publishBehavior.js.map /***/ }), /***/ "UHDu": /*!***********************************************!*\ !*** ./node_modules/d3-hierarchy/src/tree.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index.js */ "a8tM"); function defaultSeparation(a, b) { return a.parent === b.parent ? 1 : 2; } // function radialSeparation(a, b) { // return (a.parent === b.parent ? 1 : 2) / a.depth; // } // This function is used to traverse the left contour of a subtree (or // subforest). It returns the successor of v on this contour. This successor is // either given by the leftmost child of v or by the thread of v. The function // returns null if and only if v is on the highest level of its subtree. function nextLeft(v) { var children = v.children; return children ? children[0] : v.t; } // This function works analogously to nextLeft. function nextRight(v) { var children = v.children; return children ? children[children.length - 1] : v.t; } // Shifts the current subtree rooted at w+. This is done by increasing // prelim(w+) and mod(w+) by shift. function moveSubtree(wm, wp, shift) { var change = shift / (wp.i - wm.i); wp.c -= change; wp.s += shift; wm.c += change; wp.z += shift; wp.m += shift; } // All other shifts, applied to the smaller subtrees between w- and w+, are // performed by this function. To prepare the shifts, we have to adjust // change(w+), shift(w+), and change(w-). function executeShifts(v) { var shift = 0, change = 0, children = v.children, i = children.length, w; while (--i >= 0) { w = children[i]; w.z += shift; w.m += shift; shift += w.s + (change += w.c); } } // If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, // returns the specified (default) ancestor. function nextAncestor(vim, v, ancestor) { return vim.a.parent === v.parent ? vim.a : ancestor; } function TreeNode(node, i) { this._ = node; this.parent = null; this.children = null; this.A = null; // default ancestor this.a = this; // ancestor this.z = 0; // prelim this.m = 0; // mod this.c = 0; // change this.s = 0; // shift this.t = null; // thread this.i = i; // number } TreeNode.prototype = Object.create(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__["Node"].prototype); function treeRoot(root) { var tree = new TreeNode(root, 0), node, nodes = [tree], child, children, i, n; while (node = nodes.pop()) { if (children = node._.children) { node.children = new Array(n = children.length); for (i = n - 1; i >= 0; --i) { nodes.push(child = node.children[i] = new TreeNode(children[i], i)); child.parent = node; } } } (tree.parent = new TreeNode(null, 0)).children = [tree]; return tree; } // Node-link tree diagram using the Reingold-Tilford "tidy" algorithm /* harmony default export */ __webpack_exports__["default"] = (function() { var separation = defaultSeparation, dx = 1, dy = 1, nodeSize = null; function tree(root) { var t = treeRoot(root); // Compute the layout using Buchheim et al.’s algorithm. t.eachAfter(firstWalk), t.parent.m = -t.z; t.eachBefore(secondWalk); // If a fixed node size is specified, scale x and y. if (nodeSize) root.eachBefore(sizeNode); // If a fixed tree size is specified, scale x and y based on the extent. // Compute the left-most, right-most, and depth-most nodes for extents. else { var left = root, right = root, bottom = root; root.eachBefore(function(node) { if (node.x < left.x) left = node; if (node.x > right.x) right = node; if (node.depth > bottom.depth) bottom = node; }); var s = left === right ? 1 : separation(left, right) / 2, tx = s - left.x, kx = dx / (right.x + s + tx), ky = dy / (bottom.depth || 1); root.eachBefore(function(node) { node.x = (node.x + tx) * kx; node.y = node.depth * ky; }); } return root; } // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is // applied recursively to the children of v, as well as the function // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the // node v is placed to the midpoint of its outermost children. function firstWalk(v) { var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null; if (children) { executeShifts(v); var midpoint = (children[0].z + children[children.length - 1].z) / 2; if (w) { v.z = w.z + separation(v._, w._); v.m = v.z - midpoint; } else { v.z = midpoint; } } else if (w) { v.z = w.z + separation(v._, w._); } v.parent.A = apportion(v, w, v.parent.A || siblings[0]); } // Computes all real x-coordinates by summing up the modifiers recursively. function secondWalk(v) { v._.x = v.z + v.parent.m; v.m += v.parent.m; } // The core of the algorithm. Here, a new subtree is combined with the // previous subtrees. Threads are used to traverse the inside and outside // contours of the left and right subtree up to the highest common level. The // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the // superscript o means outside and i means inside, the subscript - means left // subtree and + means right subtree. For summing up the modifiers along the // contour, we use respective variables si+, si-, so-, and so+. Whenever two // nodes of the inside contours conflict, we compute the left one of the // greatest uncommon ancestors using the function ANCESTOR and call MOVE // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees. // Finally, we add a new thread (if necessary). function apportion(v, w, ancestor) { if (w) { var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift; while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) { vom = nextLeft(vom); vop = nextRight(vop); vop.a = v; shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); if (shift > 0) { moveSubtree(nextAncestor(vim, v, ancestor), v, shift); sip += shift; sop += shift; } sim += vim.m; sip += vip.m; som += vom.m; sop += vop.m; } if (vim && !nextRight(vop)) { vop.t = vim; vop.m += sim - sop; } if (vip && !nextLeft(vom)) { vom.t = vip; vom.m += sip - som; ancestor = v; } } return ancestor; } function sizeNode(node) { node.x *= dx; node.y = node.depth * dy; } tree.separation = function(x) { return arguments.length ? (separation = x, tree) : separation; }; tree.size = function(x) { return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]); }; tree.nodeSize = function(x) { return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null); }; return tree; }); /***/ }), /***/ "UHp3": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowTime.js ***! \*********************************************************************/ /*! exports provided: windowTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function windowTime(windowTimeSpan) { let scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; let windowCreationInterval = null; let maxWindowSize = Number.POSITIVE_INFINITY; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[3])) { scheduler = arguments[3]; } if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[2])) { scheduler = arguments[2]; } else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[2])) { maxWindowSize = Number(arguments[2]); } if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(arguments[1])) { scheduler = arguments[1]; } else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(arguments[1])) { windowCreationInterval = Number(arguments[1]); } return function windowTimeOperatorFunction(source) { return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler)); }; } class WindowTimeOperator { constructor(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) { this.windowTimeSpan = windowTimeSpan; this.windowCreationInterval = windowCreationInterval; this.maxWindowSize = maxWindowSize; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler)); } } class CountedSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor() { super(...arguments); this._numberOfNextedValues = 0; } next(value) { this._numberOfNextedValues++; super.next(value); } get numberOfNextedValues() { return this._numberOfNextedValues; } } class WindowTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"] { constructor(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) { super(destination); this.destination = destination; this.windowTimeSpan = windowTimeSpan; this.windowCreationInterval = windowCreationInterval; this.maxWindowSize = maxWindowSize; this.scheduler = scheduler; this.windows = []; const window = this.openWindow(); if (windowCreationInterval !== null && windowCreationInterval >= 0) { const closeState = { subscriber: this, window, context: null }; const creationState = { windowTimeSpan, windowCreationInterval, subscriber: this, scheduler }; this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState)); this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState)); } else { const timeSpanOnlyState = { subscriber: this, window, windowTimeSpan }; this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState)); } } _next(value) { const windows = this.windows; const len = windows.length; for (let i = 0; i < len; i++) { const window = windows[i]; if (!window.closed) { window.next(value); if (window.numberOfNextedValues >= this.maxWindowSize) { this.closeWindow(window); } } } } _error(err) { const windows = this.windows; while (windows.length > 0) { windows.shift().error(err); } this.destination.error(err); } _complete() { const windows = this.windows; while (windows.length > 0) { const window = windows.shift(); if (!window.closed) { window.complete(); } } this.destination.complete(); } openWindow() { const window = new CountedSubject(); this.windows.push(window); const destination = this.destination; destination.next(window); return window; } closeWindow(window) { window.complete(); const windows = this.windows; windows.splice(windows.indexOf(window), 1); } } function dispatchWindowTimeSpanOnly(state) { const { subscriber, windowTimeSpan, window } = state; if (window) { subscriber.closeWindow(window); } state.window = subscriber.openWindow(); this.schedule(state, windowTimeSpan); } function dispatchWindowCreation(state) { const { windowTimeSpan, subscriber, scheduler, windowCreationInterval } = state; const window = subscriber.openWindow(); const action = this; let context = { action, subscription: null }; const timeSpanState = { subscriber, window, context }; context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState); action.add(context.subscription); action.schedule(state, windowCreationInterval); } function dispatchWindowClose(state) { const { subscriber, window, context } = state; if (context && context.action && context.subscription) { context.action.remove(context.subscription); } subscriber.closeWindow(window); } //# sourceMappingURL=windowTime.js.map /***/ }), /***/ "ULlS": /*!************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/classed.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function classArray(string) { return string.trim().split(/^|\s+/); } function classList(node) { return node.classList || new ClassList(node); } function ClassList(node) { this._node = node; this._names = classArray(node.getAttribute("class") || ""); } ClassList.prototype = { add: function(name) { var i = this._names.indexOf(name); if (i < 0) { this._names.push(name); this._node.setAttribute("class", this._names.join(" ")); } }, remove: function(name) { var i = this._names.indexOf(name); if (i >= 0) { this._names.splice(i, 1); this._node.setAttribute("class", this._names.join(" ")); } }, contains: function(name) { return this._names.indexOf(name) >= 0; } }; function classedAdd(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.add(names[i]); } function classedRemove(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.remove(names[i]); } function classedTrue(names) { return function() { classedAdd(this, names); }; } function classedFalse(names) { return function() { classedRemove(this, names); }; } function classedFunction(names, value) { return function() { (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { var names = classArray(name + ""); if (arguments.length < 2) { var list = classList(this.node()), i = -1, n = names.length; while (++i < n) if (!list.contains(names[i])) return false; return true; } return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value)); }); /***/ }), /***/ "UPWK": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/cumsum.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cumsum; }); function cumsum(values, valueof) { var sum = 0, index = 0; return Float64Array.from(values, valueof === undefined ? v => (sum += +v || 0) : v => (sum += +valueof(v, index++, values) || 0)); } /***/ }), /***/ "UXbc": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeMapTo.js ***! \*********************************************************************/ /*! exports provided: mergeMapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; }); /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); function mergeMapTo(innerObservable, resultSelector, concurrent = Number.POSITIVE_INFINITY) { if (typeof resultSelector === 'function') { return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(() => innerObservable, resultSelector, concurrent); } if (typeof resultSelector === 'number') { concurrent = resultSelector; } return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(() => innerObservable, concurrent); } //# sourceMappingURL=mergeMapTo.js.map /***/ }), /***/ "UXun": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/shareReplay.js ***! \**********************************************************************/ /*! exports provided: shareReplay */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; }); /* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ReplaySubject */ "jtHE"); function shareReplay(configOrBufferSize, windowTime, scheduler) { let config; if (configOrBufferSize && typeof configOrBufferSize === 'object') { config = configOrBufferSize; } else { config = { bufferSize: configOrBufferSize, windowTime, refCount: false, scheduler, }; } return (source) => source.lift(shareReplayOperator(config)); } function shareReplayOperator({ bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, refCount: useRefCount, scheduler, }) { let subject; let refCount = 0; let subscription; let hasError = false; let isComplete = false; return function shareReplayOperation(source) { refCount++; let innerSub; if (!subject || hasError) { hasError = false; subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler); innerSub = subject.subscribe(this); subscription = source.subscribe({ next(value) { subject.next(value); }, error(err) { hasError = true; subject.error(err); }, complete() { isComplete = true; subscription = undefined; subject.complete(); }, }); if (isComplete) { subscription = undefined; } } else { innerSub = subject.subscribe(this); } this.add(() => { refCount--; innerSub.unsubscribe(); innerSub = undefined; if (subscription && !isComplete && useRefCount && refCount === 0) { subscription.unsubscribe(); subscription = undefined; subject = undefined; } }); }; } //# sourceMappingURL=shareReplay.js.map /***/ }), /***/ "Ud7J": /*!********************************************************!*\ !*** ./node_modules/d3-interpolate/src/numberArray.js ***! \********************************************************/ /*! exports provided: default, isNumberArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberArray", function() { return isNumberArray; }); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { if (!b) b = []; var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i; return function(t) { for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; return c; }; }); function isNumberArray(x) { return ArrayBuffer.isView(x) && !(x instanceof DataView); } /***/ }), /***/ "UnGF": /*!*************************************************!*\ !*** ./node_modules/d3-contour/src/contains.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(ring, hole) { var i = -1, n = hole.length, c; while (++i < n) if (c = ringContains(ring, hole[i])) return c; return 0; }); function ringContains(ring, point) { var x = point[0], y = point[1], contains = -1; for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) { var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1]; if (segmentContains(pi, pj, point)) return 0; if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains; } return contains; } function segmentContains(a, b, c) { var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]); } function collinear(a, b, c) { return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]); } function within(p, q, r) { return p <= q && q <= r || r <= q && q <= p; } /***/ }), /***/ "Uwo/": /*!*******************************************!*\ !*** ./node_modules/d3-color/src/math.js ***! \*******************************************/ /*! exports provided: radians, degrees */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return radians; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return degrees; }); const radians = Math.PI / 180; const degrees = 180 / Math.PI; /***/ }), /***/ "V/Wt": /*!**************************************************!*\ !*** ./node_modules/d3-selection/src/creator.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace.js */ "bNSl"); /* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces.js */ "4xGt"); function creatorInherit(name) { return function() { var document = this.ownerDocument, uri = this.namespaceURI; return uri === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__["xhtml"] && document.documentElement.namespaceURI === _namespaces_js__WEBPACK_IMPORTED_MODULE_1__["xhtml"] ? document.createElement(name) : document.createElementNS(uri, name); }; } function creatorFixed(fullname) { return function() { return this.ownerDocument.createElementNS(fullname.space, fullname.local); }; } /* harmony default export */ __webpack_exports__["default"] = (function(name) { var fullname = Object(_namespace_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name); return (fullname.local ? creatorFixed : creatorInherit)(fullname); }); /***/ }), /***/ "V183": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/mean.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mean; }); function mean(values, valueof) { let count = 0; let sum = 0; if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { ++count, sum += value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { ++count, sum += value; } } } if (count) return sum / count; } /***/ }), /***/ "VIHS": /*!*************************************************!*\ !*** ./node_modules/d3-force/src/simulation.js ***! \*************************************************/ /*! exports provided: x, y, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "ta7q"); /* harmony import */ var _lcg_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lcg.js */ "NgI0"); function x(d) { return d.x; } function y(d) { return d.y; } var initialRadius = 10, initialAngle = Math.PI * (3 - Math.sqrt(5)); /* harmony default export */ __webpack_exports__["default"] = (function(nodes) { var simulation, alpha = 1, alphaMin = 0.001, alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), alphaTarget = 0, velocityDecay = 0.6, forces = new Map(), stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(step), event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("tick", "end"), random = Object(_lcg_js__WEBPACK_IMPORTED_MODULE_2__["default"])(); if (nodes == null) nodes = []; function step() { tick(); event.call("tick", simulation); if (alpha < alphaMin) { stepper.stop(); event.call("end", simulation); } } function tick(iterations) { var i, n = nodes.length, node; if (iterations === undefined) iterations = 1; for (var k = 0; k < iterations; ++k) { alpha += (alphaTarget - alpha) * alphaDecay; forces.forEach(function(force) { force(alpha); }); for (i = 0; i < n; ++i) { node = nodes[i]; if (node.fx == null) node.x += node.vx *= velocityDecay; else node.x = node.fx, node.vx = 0; if (node.fy == null) node.y += node.vy *= velocityDecay; else node.y = node.fy, node.vy = 0; } } return simulation; } function initializeNodes() { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.index = i; if (node.fx != null) node.x = node.fx; if (node.fy != null) node.y = node.fy; if (isNaN(node.x) || isNaN(node.y)) { var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle; node.x = radius * Math.cos(angle); node.y = radius * Math.sin(angle); } if (isNaN(node.vx) || isNaN(node.vy)) { node.vx = node.vy = 0; } } } function initializeForce(force) { if (force.initialize) force.initialize(nodes, random); return force; } initializeNodes(); return simulation = { tick: tick, restart: function() { return stepper.restart(step), simulation; }, stop: function() { return stepper.stop(), simulation; }, nodes: function(_) { return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes; }, alpha: function(_) { return arguments.length ? (alpha = +_, simulation) : alpha; }, alphaMin: function(_) { return arguments.length ? (alphaMin = +_, simulation) : alphaMin; }, alphaDecay: function(_) { return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; }, alphaTarget: function(_) { return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; }, velocityDecay: function(_) { return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; }, randomSource: function(_) { return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random; }, force: function(name, _) { return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); }, find: function(x, y, radius) { var i = 0, n = nodes.length, dx, dy, d2, node, closest; if (radius == null) radius = Infinity; else radius *= radius; for (i = 0; i < n; ++i) { node = nodes[i]; dx = x - node.x; dy = y - node.y; d2 = dx * dx + dy * dy; if (d2 < radius) closest = node, radius = d2; } return closest; }, on: function(name, _) { return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); } }; }); /***/ }), /***/ "VIqg": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/linear.js ***! \*********************************************/ /*! exports provided: linearish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearish", function() { return linearish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return linear; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat.js */ "ssni"); function linearish(scale) { var domain = scale.domain; scale.ticks = function(count) { var d = domain(); return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(d[0], d[d.length - 1], count == null ? 10 : count); }; scale.tickFormat = function(count, specifier) { var d = domain(); return Object(_tickFormat_js__WEBPACK_IMPORTED_MODULE_3__["default"])(d[0], d[d.length - 1], count == null ? 10 : count, specifier); }; scale.nice = function(count) { if (count == null) count = 10; var d = domain(); var i0 = 0; var i1 = d.length - 1; var start = d[i0]; var stop = d[i1]; var prestep; var step; var maxIter = 10; if (stop < start) { step = start, start = stop, stop = step; step = i0, i0 = i1, i1 = step; } while (maxIter-- > 0) { step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); if (step === prestep) { d[i0] = start d[i1] = stop return domain(d); } else if (step > 0) { start = Math.floor(start / step) * step; stop = Math.ceil(stop / step) * step; } else if (step < 0) { start = Math.ceil(start * step) / step; stop = Math.floor(stop * step) / step; } else { break; } prestep = step; } return scale; }; return scale; } function linear() { var scale = Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["default"])(); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, linear()); }; _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); return linearish(scale); } /***/ }), /***/ "VMG8": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e9a3c9f7f7f7a1d76a", "d01c8bf1b6dab8e1864dac26", "d01c8bf1b6daf7f7f7b8e1864dac26", "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "VQEX": /*!*********************************************!*\ !*** ./node_modules/d3-contour/src/blur.js ***! \*********************************************/ /*! exports provided: blurX, blurY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurX", function() { return blurX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurY", function() { return blurY; }); // TODO Optimize edge cases. // TODO Optimize index calculation. // TODO Optimize arguments. function blurX(source, target, r) { var n = source.width, m = source.height, w = (r << 1) + 1; for (var j = 0; j < m; ++j) { for (var i = 0, sr = 0; i < n + r; ++i) { if (i < n) { sr += source.data[i + j * n]; } if (i >= r) { if (i >= w) { sr -= source.data[i - w + j * n]; } target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w); } } } } // TODO Optimize edge cases. // TODO Optimize index calculation. // TODO Optimize arguments. function blurY(source, target, r) { var n = source.width, m = source.height, w = (r << 1) + 1; for (var i = 0; i < n; ++i) { for (var j = 0, sr = 0; j < m + r; ++j) { if (j < m) { sr += source.data[i + j * n]; } if (j >= r) { if (j >= w) { sr -= source.data[i + (j - w) * n]; } target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w); } } } } /***/ }), /***/ "VRyK": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/merge.js ***! \*****************************************************************/ /*! exports provided: merge */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/mergeAll */ "bHdf"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fromArray */ "yCtX"); function merge(...observables) { let concurrent = Number.POSITIVE_INFINITY; let scheduler = null; let last = observables[observables.length - 1]; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) { scheduler = observables.pop(); if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') { concurrent = observables.pop(); } } else if (typeof last === 'number') { concurrent = observables.pop(); } if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) { return observables[0]; } return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler)); } //# sourceMappingURL=merge.js.map /***/ }), /***/ "VXJj": /*!***************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/equirectangular.js ***! \***************************************************************/ /*! exports provided: equirectangularRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equirectangularRaw", function() { return equirectangularRaw; }); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "1ibS"); function equirectangularRaw(lambda, phi) { return [lambda, phi]; } equirectangularRaw.invert = equirectangularRaw; /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equirectangularRaw) .scale(152.63); }); /***/ }), /***/ "Vfhj": /*!**********************************************!*\ !*** ./node_modules/d3-time/src/utcMonth.js ***! \**********************************************/ /*! exports provided: default, utcMonths */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return utcMonths; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCDate(1); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCMonth(date.getUTCMonth() + step); }, function(start, end) { return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; }, function(date) { return date.getUTCMonth(); }); /* harmony default export */ __webpack_exports__["default"] = (utcMonth); var utcMonths = utcMonth.range; /***/ }), /***/ "Vibt": /*!****************************************!*\ !*** ./node_modules/d3-dsv/src/csv.js ***! \****************************************/ /*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return csvParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return csvParseRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return csvFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return csvFormatBody; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return csvFormatRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return csvFormatRow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return csvFormatValue; }); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "NRL+"); var csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])(","); var csvParse = csv.parse; var csvParseRows = csv.parseRows; var csvFormat = csv.format; var csvFormatBody = csv.formatBody; var csvFormatRows = csv.formatRows; var csvFormatRow = csv.formatRow; var csvFormatValue = csv.formatValue; /***/ }), /***/ "VkQ2": /*!*************************************************************!*\ !*** ./node_modules/d3-shape/src/curve/catmullRomClosed.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ "O03L"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "0K5P"); /* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ "Kcim"); function CatmullRomClosed(context, alpha) { this._context = context; this._alpha = alpha; } CatmullRomClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x3, this._y3); this._context.closePath(); break; } case 2: { this._context.lineTo(this._x3, this._y3); this._context.closePath(); break; } case 3: { this.point(this._x3, this._y3); this.point(this._x4, this._y4); this.point(this._x5, this._y5); break; } } }, point: function(x, y) { x = +x, y = +y; if (this._point) { var x23 = this._x2 - x, y23 = this._y2 - y; this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); } switch (this._point) { case 0: this._point = 1; this._x3 = x, this._y3 = y; break; case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; case 2: this._point = 3; this._x5 = x, this._y5 = y; break; default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__["point"])(this, x, y); break; } this._l01_a = this._l12_a, this._l12_a = this._l23_a; this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { function catmullRom(context) { return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__["CardinalClosed"](context, 0); } catmullRom.alpha = function(alpha) { return custom(+alpha); }; return catmullRom; })(0.5)); /***/ }), /***/ "VphZ": /*!**********************************!*\ !*** ./node_modules/d3/index.js ***! \**********************************/ /*! exports provided: version, bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, chordTranspose, chordDirected, ribbon, ribbonArrow, color, rgb, hsl, lab, hcl, lch, gray, cubehelix, contours, contourDensity, Delaunay, Voronoi, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, randomUniform, randomInt, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, randomPareto, randomBernoulli, randomGeometric, randomBinomial, randomGamma, randomBeta, randomWeibull, randomCauchy, randomLogistic, randomPoisson, randomLcg, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleRadial, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, create, creator, local, matcher, namespace, namespaces, pointer, pointers, select, selectAll, selection, selector, selectorAll, style, window, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBumpX, curveBumpY, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, zoom, zoomTransform, zoomIdentity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _dist_package_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dist/package.js */ "L+rq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "version", function() { return _dist_package_js__WEBPACK_IMPORTED_MODULE_0__["version"]; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisect"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectLeft"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectCenter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ascending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisector"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["count"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["cross"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cumsum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["cumsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["descending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["deviation"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["extent"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["Adder"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fsum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["fsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fcumsum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["fcumsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "group", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["group"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["groups"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "index", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["index"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["indexes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["rollup"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["rollups"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupSort", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["groupSort"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bin", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bin"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["histogram"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdFreedmanDiaconis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdScott"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdSturges"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["max"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["maxIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["mean"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["median"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["merge"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["min"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["minIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nice", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["nice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["pairs"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["permute"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quantile"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quantileSorted"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quickselect", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quickselect"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["range"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "least", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["least"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "leastIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["leastIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatest", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["greatest"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatestIndex", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["greatestIndex"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["scan"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["shuffle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["shuffler"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["sum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ticks"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickIncrement"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickStep"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["transpose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["variance"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["zip"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["every"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "some", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["some"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["filter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["map"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["reduce"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reverse", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["reverse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["sort"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["difference"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "disjoint", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["disjoint"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["intersection"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subset", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["subset"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "superset", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["superset"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["union"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternMap", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["InternMap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternSet", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["InternSet"]; }); /* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-axis */ "RhHs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisTop"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisBottom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisLeft"]; }); /* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-brush */ "X486"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brush"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushSelection"]; }); /* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-chord */ "+u7/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chord"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordTranspose", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chordTranspose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chordDirected", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chordDirected"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["ribbon"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbonArrow", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["ribbonArrow"]; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["color"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["rgb"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["hsl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["lab"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["hcl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["lch"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["gray"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return d3_color__WEBPACK_IMPORTED_MODULE_5__["cubehelix"]; }); /* harmony import */ var d3_contour__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-contour */ "zMfI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_6__["contours"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_6__["contourDensity"]; }); /* harmony import */ var d3_delaunay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-delaunay */ "z8qe"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Delaunay", function() { return d3_delaunay__WEBPACK_IMPORTED_MODULE_7__["Delaunay"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Voronoi", function() { return d3_delaunay__WEBPACK_IMPORTED_MODULE_7__["Voronoi"]; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_8__["dispatch"]; }); /* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-drag */ "q+nN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["drag"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragDisable"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragEnable"]; }); /* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-dsv */ "Ri0D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["dsvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatValue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParseRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRows"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatValue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["autoType"]; }); /* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-ease */ "+3eq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeLinear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuad"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePoly"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSin"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExp"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounce"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBack"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackInOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElastic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticIn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticInOut"]; }); /* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-fetch */ "sukG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["blob"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["buffer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["dsv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["csv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["tsv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["image"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["json"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["text"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["xml"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["html"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["svg"]; }); /* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-force */ "Ckr6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCenter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCollide"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceLink"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceManyBody"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceSimulation"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceY"]; }); /* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-format */ "rWgG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatDefaultLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["format"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatPrefix"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatSpecifier"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["FormatSpecifier"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionFixed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionPrefix"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionRound"]; }); /* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-geo */ "n8A4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoBounds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCentroid"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipAntimeridian"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipExtent"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipRectangle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoContains"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoDistance"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule10"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoInterpolate"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoLength"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoPath"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbers"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbersUsa"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualAreaRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistant"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistantRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformalRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualAreaRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistant"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistantRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarth"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarthRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangular"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangularRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonicRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoIdentity"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjection"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjectionMutator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercatorRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1Raw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographicRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographicRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercatorRaw"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoRotation"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStream"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransform"]; }); /* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-hierarchy */ "yUfG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["cluster"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["hierarchy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["pack"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packSiblings"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packEnclose"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["partition"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["stratify"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["tree"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapBinary"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapDice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSlice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSliceDice"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSquarify"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapResquarify"]; }); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolate"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateArray"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasisClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDate"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDiscrete"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumber"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumberArray"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateObject"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRound"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateString"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformCss"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformSvg"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateZoom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgb"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasisClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHsl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHslLong"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateLab"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHcl"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHclLong"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelix"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelixLong"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["piecewise"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["quantize"]; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return d3_path__WEBPACK_IMPORTED_MODULE_18__["path"]; }); /* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-polygon */ "tUiF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonCentroid"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonHull"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonContains"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonLength"]; }); /* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-quadtree */ "gO8D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_20__["quadtree"]; }); /* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-random */ "7MRl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomUniform"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomInt", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomInt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomNormal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLogNormal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBates"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomIrwinHall"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomExponential"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPareto", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomPareto"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBernoulli", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBernoulli"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGeometric", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomGeometric"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBinomial", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBinomial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomGamma", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomGamma"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBeta", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBeta"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomWeibull", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomWeibull"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomCauchy", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomCauchy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogistic", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLogistic"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomPoisson", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomPoisson"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLcg", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLcg"]; }); /* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale */ "ziQ1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleBand"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePoint"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleIdentity"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLinear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSymlog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleOrdinal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleImplicit"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleRadial", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantile"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantize"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleThreshold"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleTime"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleUtc"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequential"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSymlog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialQuantile"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDiverging"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSymlog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["tickFormat"]; }); /* harmony import */ var d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-scale-chromatic */ "oetV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeCategory10"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeAccent"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeDark2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePaired"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel1"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet1"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet2"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet3"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeTableau10"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBrBG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBrBG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePRGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePRGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePiYG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePiYG"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuOr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuOr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdGy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdGy"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSpectral"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSpectral"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBuGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdPu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGnBu"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGn"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrBr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrBr"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrRd"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBlues"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBlues"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreens"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreens"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreys"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreys"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePurples"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePurples"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateReds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeReds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOranges"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOranges"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCividis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCubehelixDefault"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRainbow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateWarm"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCool"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSinebow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateTurbo"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateViridis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateMagma"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateInferno"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePlasma"]; }); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["create"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["creator"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["local"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["matcher"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespace"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespaces"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointer", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["pointer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointers", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["pointers"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["select"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectAll"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selection"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selector"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectorAll"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["style"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["window"]; }); /* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-shape */ "8d86"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["arc"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["area"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["line"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pie"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["areaRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialArea"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["lineRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialLine"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pointRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkHorizontal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkVertical"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkRadial"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbol"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbols"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCircle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCross"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolDiamond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolSquare"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolStar"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolTriangle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolWye"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisOpen"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpX", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBumpX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBumpY", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBumpY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBundle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalOpen"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinal"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomOpen"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinearClosed"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveNatural"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStep"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepAfter"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepBefore"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stack"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetExpand"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetDiverging"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetNone"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetSilhouette"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetWiggle"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAppearance"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAscending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderDescending"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderInsideOut"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderNone"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderReverse"]; }); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time */ "tgfz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeInterval"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMillisecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMilliseconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMillisecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMilliseconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSeconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSecond"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSeconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinute"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinutes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHour"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHours"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDay"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeek"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeeks"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFriday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonth"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonths"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYears"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinute"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinutes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHour"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHours"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDay"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeek"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeeks"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFriday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonth"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonths"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYear"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYears"]; }); /* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-time-format */ "cOGN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatDefaultLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatLocale"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoParse"]; }); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-timer */ "ta7q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["now"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timerFlush"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timeout"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["interval"]; }); /* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-transition */ "sQjb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["transition"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["active"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["interrupt"]; }); /* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! d3-zoom */ "2TRZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__["zoom"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__["zoomTransform"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_30__["zoomIdentity"]; }); /***/ }), /***/ "Vpsf": /*!*******************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameAction.js ***! \*******************************************************************************/ /*! exports provided: AnimationFrameAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); class AnimationFrameAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } requestAsyncId(scheduler, id, delay = 0) { if (delay !== null && delay > 0) { return super.requestAsyncId(scheduler, id, delay); } scheduler.actions.push(this); return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(() => scheduler.flush(null))); } recycleAsyncId(scheduler, id, delay = 0) { if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { return super.recycleAsyncId(scheduler, id, delay); } if (scheduler.actions.length === 0) { cancelAnimationFrame(id); scheduler.scheduled = undefined; } return undefined; } } //# sourceMappingURL=AnimationFrameAction.js.map /***/ }), /***/ "W+J7": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/pack/siblings.js ***! \********************************************************/ /*! exports provided: packEnclose, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return packEnclose; }); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ "j1BO"); /* harmony import */ var _enclose_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enclose.js */ "7Mu7"); function place(b, a, c) { var dx = b.x - a.x, x, a2, dy = b.y - a.y, y, b2, d2 = dx * dx + dy * dy; if (d2) { a2 = a.r + c.r, a2 *= a2; b2 = b.r + c.r, b2 *= b2; if (a2 > b2) { x = (d2 + b2 - a2) / (2 * d2); y = Math.sqrt(Math.max(0, b2 / d2 - x * x)); c.x = b.x - x * dx - y * dy; c.y = b.y - x * dy + y * dx; } else { x = (d2 + a2 - b2) / (2 * d2); y = Math.sqrt(Math.max(0, a2 / d2 - x * x)); c.x = a.x + x * dx - y * dy; c.y = a.y + x * dy + y * dx; } } else { c.x = a.x + c.r; c.y = a.y; } } function intersects(a, b) { var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y; return dr > 0 && dr * dr > dx * dx + dy * dy; } function score(node) { var a = node._, b = node.next._, ab = a.r + b.r, dx = (a.x * b.r + b.x * a.r) / ab, dy = (a.y * b.r + b.y * a.r) / ab; return dx * dx + dy * dy; } function Node(circle) { this._ = circle; this.next = null; this.previous = null; } function packEnclose(circles) { if (!(n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(circles)).length)) return 0; var a, b, c, n, aa, ca, i, j, k, sj, sk; // Place the first circle. a = circles[0], a.x = 0, a.y = 0; if (!(n > 1)) return a.r; // Place the second circle. b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0; if (!(n > 2)) return a.r + b.r; // Place the third circle. place(b, a, c = circles[2]); // Initialize the front-chain using the first three circles a, b and c. a = new Node(a), b = new Node(b), c = new Node(c); a.next = c.previous = b; b.next = a.previous = c; c.next = b.previous = a; // Attempt to place each remaining circle… pack: for (i = 3; i < n; ++i) { place(a._, b._, c = circles[i]), c = new Node(c); // Find the closest intersecting circle on the front-chain, if any. // “Closeness” is determined by linear distance along the front-chain. // “Ahead” or “behind” is likewise determined by linear distance. j = b.next, k = a.previous, sj = b._.r, sk = a._.r; do { if (sj <= sk) { if (intersects(j._, c._)) { b = j, a.next = b, b.previous = a, --i; continue pack; } sj += j._.r, j = j.next; } else { if (intersects(k._, c._)) { a = k, a.next = b, b.previous = a, --i; continue pack; } sk += k._.r, k = k.previous; } } while (j !== k.next); // Success! Insert the new circle c between a and b. c.previous = a, c.next = b, a.next = b.previous = b = c; // Compute the new closest circle pair to the centroid. aa = score(a); while ((c = c.next) !== b) { if ((ca = score(c)) < aa) { a = c, aa = ca; } } b = a.next; } // Compute the enclosing circle of the front chain. a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a); // Translate the circles to put the enclosing circle around the origin. for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y; return c.r; } /* harmony default export */ __webpack_exports__["default"] = (function(circles) { packEnclose(circles); return circles; }); /***/ }), /***/ "WDTS": /*!*************************************************!*\ !*** ./node_modules/d3-delaunay/src/polygon.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Polygon; }); class Polygon { constructor() { this._ = []; } moveTo(x, y) { this._.push([x, y]); } closePath() { this._.push(this._[0].slice()); } lineTo(x, y) { this._.push([x, y]); } value() { return this._.length ? this._ : null; } } /***/ }), /***/ "WFWS": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/ease.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function easeConstant(id, value) { if (typeof value !== "function") throw new Error; return function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = value; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var id = this._id; return arguments.length ? this.each(easeConstant(id, value)) : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).ease; }); /***/ }), /***/ "WFeF": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/round.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a = +a, b = +b, function(t) { return Math.round(a * (1 - t) + b * t); }; }); /***/ }), /***/ "WHjf": /*!**************************************************!*\ !*** ./node_modules/d3-array/src/quickselect.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quickselect; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); // Based on https://github.com/mourner/quickselect // ISC license, Copyright 2018 Vladimir Agafonkin. function quickselect(array, k, left = 0, right = array.length - 1, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { while (right > left) { if (right - left > 600) { const n = right - left + 1; const m = k - left + 1; const z = Math.log(n); const s = 0.5 * Math.exp(2 * z / 3); const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); quickselect(array, k, newLeft, newRight, compare); } const t = array[k]; let i = left; let j = right; swap(array, left, k); if (compare(array[right], t) > 0) swap(array, left, right); while (i < j) { swap(array, i, j), ++i, --j; while (compare(array[i], t) < 0) ++i; while (compare(array[j], t) > 0) --j; } if (compare(array[left], t) === 0) swap(array, left, j); else ++j, swap(array, j, right); if (j <= k) left = j + 1; if (k <= j) right = j - 1; } return array; } function swap(array, i, j) { const t = array[i]; array[i] = array[j]; array[j] = t; } /***/ }), /***/ "WMd4": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Notification.js ***! \*************************************************************/ /*! exports provided: NotificationKind, Notification */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; }); /* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./observable/empty */ "EY2u"); /* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./observable/of */ "LRne"); /* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./observable/throwError */ "z6cu"); var NotificationKind; (function (NotificationKind) { NotificationKind["NEXT"] = "N"; NotificationKind["ERROR"] = "E"; NotificationKind["COMPLETE"] = "C"; })(NotificationKind || (NotificationKind = {})); class Notification { constructor(kind, value, error) { this.kind = kind; this.value = value; this.error = error; this.hasValue = kind === 'N'; } observe(observer) { switch (this.kind) { case 'N': return observer.next && observer.next(this.value); case 'E': return observer.error && observer.error(this.error); case 'C': return observer.complete && observer.complete(); } } do(next, error, complete) { const kind = this.kind; switch (kind) { case 'N': return next && next(this.value); case 'E': return error && error(this.error); case 'C': return complete && complete(); } } accept(nextOrObserver, error, complete) { if (nextOrObserver && typeof nextOrObserver.next === 'function') { return this.observe(nextOrObserver); } else { return this.do(nextOrObserver, error, complete); } } toObservable() { const kind = this.kind; switch (kind) { case 'N': return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value); case 'E': return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error); case 'C': return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])(); } throw new Error('unexpected notification kind value'); } static createNext(value) { if (typeof value !== 'undefined') { return new Notification('N', value); } return Notification.undefinedValueNotification; } static createError(err) { return new Notification('E', undefined, err); } static createComplete() { return Notification.completeNotification; } } Notification.completeNotification = new Notification('C'); Notification.undefinedValueNotification = new Notification('N', undefined); //# sourceMappingURL=Notification.js.map /***/ }), /***/ "WPMC": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/generate.js ***! \********************************************************************/ /*! exports provided: generate */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) { let resultSelector; let initialState; if (arguments.length == 1) { const options = initialStateOrOptions; initialState = options.initialState; condition = options.condition; iterate = options.iterate; resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]; scheduler = options.scheduler; } else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) { initialState = initialStateOrOptions; resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]; scheduler = resultSelectorOrObservable; } else { initialState = initialStateOrOptions; resultSelector = resultSelectorOrObservable; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { let state = initialState; if (scheduler) { return scheduler.schedule(dispatch, 0, { subscriber, iterate, condition, resultSelector, state }); } do { if (condition) { let conditionResult; try { conditionResult = condition(state); } catch (err) { subscriber.error(err); return undefined; } if (!conditionResult) { subscriber.complete(); break; } } let value; try { value = resultSelector(state); } catch (err) { subscriber.error(err); return undefined; } subscriber.next(value); if (subscriber.closed) { break; } try { state = iterate(state); } catch (err) { subscriber.error(err); return undefined; } } while (true); return undefined; }); } function dispatch(state) { const { subscriber, condition } = state; if (subscriber.closed) { return undefined; } if (state.needIterate) { try { state.state = state.iterate(state.state); } catch (err) { subscriber.error(err); return undefined; } } else { state.needIterate = true; } if (condition) { let conditionResult; try { conditionResult = condition(state.state); } catch (err) { subscriber.error(err); return undefined; } if (!conditionResult) { subscriber.complete(); return undefined; } if (subscriber.closed) { return undefined; } } let value; try { value = state.resultSelector(state.state); } catch (err) { subscriber.error(err); return undefined; } if (subscriber.closed) { return undefined; } subscriber.next(value); if (subscriber.closed) { return undefined; } return this.schedule(state); } //# sourceMappingURL=generate.js.map /***/ }), /***/ "WmHh": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/insert.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator.js */ "V/Wt"); /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ "b9Oj"); function constantNull() { return null; } /* harmony default export */ __webpack_exports__["default"] = (function(name, before) { var create = typeof name === "function" ? name : Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name), select = before == null ? constantNull : typeof before === "function" ? before : Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(before); return this.select(function() { return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); }); }); /***/ }), /***/ "Ws9M": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/hcl.js ***! \************************************************/ /*! exports provided: default, hclLong */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hclLong", function() { return hclLong; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function hcl(hue) { return function(start, end) { var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(end)).h), c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.c, end.c), l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.h = h(t); start.c = c(t); start.l = l(t); start.opacity = opacity(t); return start + ""; }; } } /* harmony default export */ __webpack_exports__["default"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); var hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "Wtxg": /*!*********************************************!*\ !*** ./node_modules/d3-force/src/radial.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony default export */ __webpack_exports__["default"] = (function(radius, x, y) { var nodes, strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), strengths, radiuses; if (typeof radius !== "function") radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+radius); if (x == null) x = 0; if (y == null) y = 0; function force(alpha) { for (var i = 0, n = nodes.length; i < n; ++i) { var node = nodes[i], dx = node.x - x || 1e-6, dy = node.y - y || 1e-6, r = Math.sqrt(dx * dx + dy * dy), k = (radiuses[i] - r) * strengths[i] * alpha / r; node.vx += dx * k; node.vy += dy * k; } } function initialize() { if (!nodes) return; var i, n = nodes.length; strengths = new Array(n); radiuses = new Array(n); for (i = 0; i < n; ++i) { radiuses[i] = +radius(nodes[i], i, nodes); strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); } } force.initialize = function(_) { nodes = _, initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; }; force.radius = function(_) { return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius; }; force.x = function(_) { return arguments.length ? (x = +_, force) : x; }; force.y = function(_) { return arguments.length ? (y = +_, force) : y; }; return force; }); /***/ }), /***/ "WuDp": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/order/ascending.js ***! \******************************************************/ /*! exports provided: default, sum */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; }); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "qqpY"); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var sums = series.map(sum); return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return sums[a] - sums[b]; }); }); function sum(series) { var s = 0, i = -1, n = series.length, v; while (++i < n) if (v = +series[i][1]) s += v; return s; } /***/ }), /***/ "WyKG": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/toSubscriber.js ***! \******************************************************************/ /*! exports provided: toSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/rxSubscriber */ "2QA8"); /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observer */ "gRHU"); function toSubscriber(nextOrObserver, error, complete) { if (nextOrObserver) { if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) { return nextOrObserver; } if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) { return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]](); } } if (!nextOrObserver && !error && !complete) { return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]); } return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete); } //# sourceMappingURL=toSubscriber.js.map /***/ }), /***/ "X486": /*!********************************************!*\ !*** ./node_modules/d3-brush/src/index.js ***! \********************************************/ /*! exports provided: brush, brushX, brushY, brushSelection */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _brush_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush.js */ "hTZz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushX"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushSelection"]; }); /***/ }), /***/ "X7tT": /*!********************************************!*\ !*** ./node_modules/d3-brush/src/event.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return BrushEvent; }); function BrushEvent(type, { sourceEvent, target, selection, mode, dispatch }) { Object.defineProperties(this, { type: {value: type, enumerable: true, configurable: true}, sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, target: {value: target, enumerable: true, configurable: true}, selection: {value: selection, enumerable: true, configurable: true}, mode: {value: mode, enumerable: true, configurable: true}, _: {value: dispatch} }); } /***/ }), /***/ "X7xT": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***! \*************************************************************************/ /*! exports provided: warm, cool, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warm", function() { return warm; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cool", function() { return cool; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); var warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); var cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8)); var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(); /* harmony default export */ __webpack_exports__["default"] = (function(t) { if (t < 0 || t > 1) t -= Math.floor(t); var ts = Math.abs(t - 0.5); c.h = 360 * t - 100; c.s = 1.5 - 1.5 * ts; c.l = 0.8 - 0.9 * ts; return c + ""; }); /***/ }), /***/ "XAaG": /*!***************************************************!*\ !*** ./node_modules/d3-geo/src/projection/fit.js ***! \***************************************************/ /*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitExtent", function() { return fitExtent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitSize", function() { return fitSize; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitWidth", function() { return fitWidth; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitHeight", function() { return fitHeight; }); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream.js */ "tepu"); /* harmony import */ var _path_bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds.js */ "SMTj"); function fit(projection, fitBounds, object) { var clip = projection.clipExtent && projection.clipExtent(); projection.scale(150).translate([0, 0]); if (clip != null) projection.clipExtent(null); Object(_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object, projection.stream(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"])); fitBounds(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"].result()); if (clip != null) projection.clipExtent(clip); return projection; } function fitExtent(projection, extent, object) { return fit(projection, function(b) { var w = extent[1][0] - extent[0][0], h = extent[1][1] - extent[0][1], k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; projection.scale(150 * k).translate([x, y]); }, object); } function fitSize(projection, size, object) { return fitExtent(projection, [[0, 0], size], object); } function fitWidth(projection, width, object) { return fit(projection, function(b) { var w = +width, k = w / (b[1][0] - b[0][0]), x = (w - k * (b[1][0] + b[0][0])) / 2, y = -k * b[0][1]; projection.scale(150 * k).translate([x, y]); }, object); } function fitHeight(projection, height, object) { return fit(projection, function(b) { var h = +height, k = h / (b[1][1] - b[0][1]), x = -k * b[0][0], y = (h - k * (b[1][1] + b[0][1])) / 2; projection.scale(150 * k).translate([x, y]); }, object); } /***/ }), /***/ "XDbj": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/throwIfEmpty.js ***! \***********************************************************************/ /*! exports provided: throwIfEmpty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function throwIfEmpty(errorFactory = defaultErrorFactory) { return (source) => { return source.lift(new ThrowIfEmptyOperator(errorFactory)); }; } class ThrowIfEmptyOperator { constructor(errorFactory) { this.errorFactory = errorFactory; } call(subscriber, source) { return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory)); } } class ThrowIfEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { constructor(destination, errorFactory) { super(destination); this.errorFactory = errorFactory; this.hasValue = false; } _next(value) { this.hasValue = true; this.destination.next(value); } _complete() { if (!this.hasValue) { let err; try { err = this.errorFactory(); } catch (e) { err = e; } this.destination.error(err); } else { return this.destination.complete(); } } } function defaultErrorFactory() { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); } //# sourceMappingURL=throwIfEmpty.js.map /***/ }), /***/ "XJJ9": /*!*********************************************!*\ !*** ./node_modules/d3-random/src/bates.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _irwinHall_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall.js */ "hSnb"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBates(source) { var I = _irwinHall_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomBates(n) { // use limiting distribution at n === 0 if ((n = +n) === 0) return source; var randomIrwinHall = I(n); return function() { return randomIrwinHall() / n; }; } randomBates.source = sourceRandomBates; return randomBates; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "XNiG": /*!********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Subject.js ***! \********************************************************/ /*! exports provided: SubjectSubscriber, Subject, AnonymousSubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Observable */ "HDdC"); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); /* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); /* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SubjectSubscription */ "Ylt2"); /* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/symbol/rxSubscriber */ "2QA8"); class SubjectSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"] { constructor(destination) { super(destination); this.destination = destination; } } class Subject extends _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] { constructor() { super(); this.observers = []; this.closed = false; this.isStopped = false; this.hasError = false; this.thrownError = null; } [_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_5__["rxSubscriber"]]() { return new SubjectSubscriber(this); } lift(operator) { const subject = new AnonymousSubject(this, this); subject.operator = operator; return subject; } next(value) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } if (!this.isStopped) { const { observers } = this; const len = observers.length; const copy = observers.slice(); for (let i = 0; i < len; i++) { copy[i].next(value); } } } error(err) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } this.hasError = true; this.thrownError = err; this.isStopped = true; const { observers } = this; const len = observers.length; const copy = observers.slice(); for (let i = 0; i < len; i++) { copy[i].error(err); } this.observers.length = 0; } complete() { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } this.isStopped = true; const { observers } = this; const len = observers.length; const copy = observers.slice(); for (let i = 0; i < len; i++) { copy[i].complete(); } this.observers.length = 0; } unsubscribe() { this.isStopped = true; this.closed = true; this.observers = null; } _trySubscribe(subscriber) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } else { return super._trySubscribe(subscriber); } } _subscribe(subscriber) { if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_3__["ObjectUnsubscribedError"](); } else if (this.hasError) { subscriber.error(this.thrownError); return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } else if (this.isStopped) { subscriber.complete(); return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } else { this.observers.push(subscriber); return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_4__["SubjectSubscription"](this, subscriber); } } asObservable() { const observable = new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](); observable.source = this; return observable; } } Subject.create = (destination, source) => { return new AnonymousSubject(destination, source); }; class AnonymousSubject extends Subject { constructor(destination, source) { super(); this.destination = destination; this.source = source; } next(value) { const { destination } = this; if (destination && destination.next) { destination.next(value); } } error(err) { const { destination } = this; if (destination && destination.error) { this.destination.error(err); } } complete() { const { destination } = this; if (destination && destination.complete) { this.destination.complete(); } } _subscribe(subscriber) { const { source } = this; if (source) { return this.source.subscribe(subscriber); } else { return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } } } //# sourceMappingURL=Subject.js.map /***/ }), /***/ "XO33": /*!*********************************************!*\ !*** ./node_modules/d3-fetch/src/buffer.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseArrayBuffer(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); return response.arrayBuffer(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseArrayBuffer); }); /***/ }), /***/ "XTjh": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(t) { t = Math.max(0, Math.min(1, t)); return "rgb(" + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) + ")"; }); /***/ }), /***/ "XfOf": /*!***************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony default export */ __webpack_exports__["default"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-240, 0.5, 1.0))); /***/ }), /***/ "Xl5i": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/textTween.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function textInterpolate(i) { return function(t) { this.textContent = i.call(this, t); }; } function textTween(value) { var t0, i0; function tween() { var i = value.apply(this, arguments); if (i !== i0) t0 = (i0 = i) && textInterpolate(i); return t0; } tween._value = value; return tween; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var key = "text"; if (arguments.length < 1) return (key = this.tween(key)) && key._value; if (value == null) return this.tween(key, null); if (typeof value !== "function") throw new Error; return this.tween(key, textTween(value)); }); /***/ }), /***/ "XoFe": /*!**************************************************!*\ !*** ./node_modules/d3-selection/src/pointer.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent.js */ "T9TN"); /* harmony default export */ __webpack_exports__["default"] = (function(event, node) { event = Object(_sourceEvent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(event); if (node === undefined) node = event.currentTarget; if (node) { var svg = node.ownerSVGElement || node; if (svg.createSVGPoint) { var point = svg.createSVGPoint(); point.x = event.clientX, point.y = event.clientY; point = point.matrixTransform(node.getScreenCTM().inverse()); return [point.x, point.y]; } if (node.getBoundingClientRect) { var rect = node.getBoundingClientRect(); return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; } } return [event.pageX, event.pageY]; }); /***/ }), /***/ "XoHu": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isObject.js ***! \**************************************************************/ /*! exports provided: isObject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); function isObject(x) { return x !== null && typeof x === 'object'; } //# sourceMappingURL=isObject.js.map /***/ }), /***/ "XqQ8": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaustMap.js ***! \*********************************************************************/ /*! exports provided: exhaustMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function exhaustMap(project, resultSelector) { if (resultSelector) { return (source) => source.pipe(exhaustMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))))); } return (source) => source.lift(new ExhaustMapOperator(project)); } class ExhaustMapOperator { constructor(project) { this.project = project; } call(subscriber, source) { return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project)); } } class ExhaustMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, project) { super(destination); this.project = project; this.hasSubscription = false; this.hasCompleted = false; this.index = 0; } _next(value) { if (!this.hasSubscription) { this.tryNext(value); } } tryNext(value) { let result; const index = this.index++; try { result = this.project(value, index); } catch (err) { this.destination.error(err); return; } this.hasSubscription = true; this._innerSub(result); } _innerSub(result) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } _complete() { this.hasCompleted = true; if (!this.hasSubscription) { this.destination.complete(); } this.unsubscribe(); } notifyNext(innerValue) { this.destination.next(innerValue); } notifyError(err) { this.destination.error(err); } notifyComplete() { this.hasSubscription = false; if (this.hasCompleted) { this.destination.complete(); } } } //# sourceMappingURL=exhaustMap.js.map /***/ }), /***/ "Xt/6": /*!********************************************!*\ !*** ./node_modules/d3-time/src/second.js ***! \********************************************/ /*! exports provided: default, seconds */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "seconds", function() { return seconds; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(date - date.getMilliseconds()); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]; }, function(date) { return date.getUTCSeconds(); }); /* harmony default export */ __webpack_exports__["default"] = (second); var seconds = second.range; /***/ }), /***/ "Y/cZ": /*!**********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Scheduler.js ***! \**********************************************************/ /*! exports provided: Scheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; }); class Scheduler { constructor(SchedulerAction, now = Scheduler.now) { this.SchedulerAction = SchedulerAction; this.now = now; } schedule(work, delay = 0, state) { return new this.SchedulerAction(this, work).schedule(state, delay); } } Scheduler.now = () => Date.now(); //# sourceMappingURL=Scheduler.js.map /***/ }), /***/ "Y3EW": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e0ecf49ebcda8856a7", "edf8fbb3cde38c96c688419d", "edf8fbb3cde38c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68856a7810f7c", "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "Y4Tn": /*!******************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/transverseMercator.js ***! \******************************************************************/ /*! exports provided: transverseMercatorRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transverseMercatorRaw", function() { return transverseMercatorRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator.js */ "LZ5Q"); function transverseMercatorRaw(lambda, phi) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2)), -lambda]; } transverseMercatorRaw.invert = function(x, y) { return [-y, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(x)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]]; }; /* harmony default export */ __webpack_exports__["default"] = (function() { var m = Object(_mercator_js__WEBPACK_IMPORTED_MODULE_1__["mercatorProjection"])(transverseMercatorRaw), center = m.center, rotate = m.rotate; m.center = function(_) { return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]); }; m.rotate = function(_) { return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]); }; return rotate([0, 0, 90]) .scale(159.155); }); /***/ }), /***/ "Y62N": /*!*********************************************!*\ !*** ./node_modules/d3-color/src/define.js ***! \*********************************************/ /*! exports provided: default, extend */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; }); /* harmony default export */ __webpack_exports__["default"] = (function(constructor, factory, prototype) { constructor.prototype = factory.prototype = prototype; prototype.constructor = constructor; }); function extend(parent, definition) { var prototype = Object.create(parent.prototype); for (var key in definition) prototype[key] = definition[key]; return prototype; } /***/ }), /***/ "Y6u4": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/TimeoutError.js ***! \******************************************************************/ /*! exports provided: TimeoutError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; }); const TimeoutErrorImpl = (() => { function TimeoutErrorImpl() { Error.call(this); this.message = 'Timeout has occurred'; this.name = 'TimeoutError'; return this; } TimeoutErrorImpl.prototype = Object.create(Error.prototype); return TimeoutErrorImpl; })(); const TimeoutError = TimeoutErrorImpl; //# sourceMappingURL=TimeoutError.js.map /***/ }), /***/ "Y6wi": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/switchAll.js ***! \********************************************************************/ /*! exports provided: switchAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; }); /* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "eIep"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function switchAll() { return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]); } //# sourceMappingURL=switchAll.js.map /***/ }), /***/ "Y7HM": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isNumeric.js ***! \***************************************************************/ /*! exports provided: isNumeric */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; }); /* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isArray */ "DH7j"); function isNumeric(val) { return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0; } //# sourceMappingURL=isNumeric.js.map /***/ }), /***/ "Y7ZM": /*!******************************************************!*\ !*** ./node_modules/d3-array/src/threshold/scott.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "hiel"); /* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../deviation.js */ "CcBx"); /* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { return Math.ceil((max - min) / (3.5 * Object(_deviation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values), -1 / 3))); }); /***/ }), /***/ "YbCY": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/text.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function textRemove() { this.textContent = ""; } function textConstant(value) { return function() { this.textContent = value; }; } function textFunction(value) { return function() { var v = value.apply(this, arguments); this.textContent = v == null ? "" : v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent; }); /***/ }), /***/ "Yij6": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fde0ddfa9fb5c51b8a", "feebe2fbb4b9f768a1ae017e", "feebe2fbb4b9f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "Ylt2": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/SubjectSubscription.js ***! \********************************************************************/ /*! exports provided: SubjectSubscription */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; }); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscription */ "quSY"); class SubjectSubscription extends _Subscription__WEBPACK_IMPORTED_MODULE_0__["Subscription"] { constructor(subject, subscriber) { super(); this.subject = subject; this.subscriber = subscriber; this.closed = false; } unsubscribe() { if (this.closed) { return; } this.closed = true; const subject = this.subject; const observers = subject.observers; this.subject = null; if (!observers || observers.length === 0 || subject.isStopped || subject.closed) { return; } const subscriberIndex = observers.indexOf(this.subscriber); if (subscriberIndex !== -1) { observers.splice(subscriberIndex, 1); } } } //# sourceMappingURL=SubjectSubscription.js.map /***/ }), /***/ "Yn3m": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ef8a62f7f7f767a9cf", "ca0020f4a58292c5de0571b0", "ca0020f4a582f7f7f792c5de0571b0", "b2182bef8a62fddbc7d1e5f067a9cf2166ac", "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "YrTO": /*!***********************************************************!*\ !*** ./node_modules/d3-transition/src/selection/index.js ***! \***********************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ "0xxc"); /* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ "2/3s"); d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__["default"]; d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__["default"]; /***/ }), /***/ "YuR2": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/QueueAction.js ***! \**********************************************************************/ /*! exports provided: QueueAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); class QueueAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { constructor(scheduler, work) { super(scheduler, work); this.scheduler = scheduler; this.work = work; } schedule(state, delay = 0) { if (delay > 0) { return super.schedule(state, delay); } this.delay = delay; this.state = state; this.scheduler.flush(this); return this; } execute(state, delay) { return (delay > 0 || this.closed) ? super.execute(state, delay) : this._execute(state, delay); } requestAsyncId(scheduler, id, delay = 0) { if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) { return super.requestAsyncId(scheduler, id, delay); } return scheduler.flush(this); } } //# sourceMappingURL=QueueAction.js.map /***/ }), /***/ "YvDT": /*!******************************************!*\ !*** ./node_modules/d3-color/src/lab.js ***! \******************************************/ /*! exports provided: gray, default, Lab, lch, hcl, Hcl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return gray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lab", function() { return Lab; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return lch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hcl", function() { return Hcl; }); /* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "Y62N"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "FmoU"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "Uwo/"); // https://observablehq.com/@mbostock/lab-and-rgb const K = 18, Xn = 0.96422, Yn = 1, Zn = 0.82521, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1; function labConvert(o) { if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); if (o instanceof Hcl) return hcl2lab(o); if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); var r = rgb2lrgb(o.r), g = rgb2lrgb(o.g), b = rgb2lrgb(o.b), y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; if (r === g && g === b) x = z = y; else { x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); } return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); } function gray(l, opacity) { return new Lab(l, 0, 0, opacity == null ? 1 : opacity); } function lab(l, a, b, opacity) { return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); } function Lab(l, a, b, opacity) { this.l = +l; this.a = +a; this.b = +b; this.opacity = +opacity; } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { brighter: function(k) { return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); }, darker: function(k) { return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); }, rgb: function() { var y = (this.l + 16) / 116, x = isNaN(this.a) ? y : y + this.a / 500, z = isNaN(this.b) ? y : y - this.b / 200; x = Xn * lab2xyz(x); y = Yn * lab2xyz(y); z = Zn * lab2xyz(z); return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), this.opacity ); } })); function xyz2lab(t) { return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; } function lab2xyz(t) { return t > t1 ? t * t * t : t2 * (t - t0); } function lrgb2rgb(x) { return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); } function rgb2lrgb(x) { return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); } function hclConvert(o) { if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); if (!(o instanceof Lab)) o = labConvert(o); if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"]; return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); } function lch(l, c, h, opacity) { return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); } function hcl(h, c, l, opacity) { return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); } function Hcl(h, c, l, opacity) { this.h = +h; this.c = +c; this.l = +l; this.opacity = +opacity; } function hcl2lab(o) { if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]; return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); } Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], { brighter: function(k) { return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); }, darker: function(k) { return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); }, rgb: function() { return hcl2lab(this).rgb(); } })); /***/ }), /***/ "YzSS": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/cartesian.js ***! \**********************************************/ /*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spherical", function() { return spherical; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesian", function() { return cartesian; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianDot", function() { return cartesianDot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianCross", function() { return cartesianCross; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianAddInPlace", function() { return cartesianAddInPlace; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianScale", function() { return cartesianScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianNormalizeInPlace", function() { return cartesianNormalizeInPlace; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "R0y8"); function spherical(cartesian) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(cartesian[1], cartesian[0]), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(cartesian[2])]; } function cartesian(spherical) { var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi); return [cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi)]; } function cartesianDot(a, b) { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } function cartesianCross(a, b) { return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; } // TODO return a function cartesianAddInPlace(a, b) { a[0] += b[0], a[1] += b[1], a[2] += b[2]; } function cartesianScale(vector, k) { return [vector[0] * k, vector[1] * k, vector[2] * k]; } // TODO return d function cartesianNormalizeInPlace(d) { var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); d[0] /= l, d[1] /= l, d[2] /= l; } /***/ }), /***/ "Z5Ne": /*!***************************************************!*\ !*** ./node_modules/d3-array/src/intersection.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return intersection; }); /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.js */ "8XJe"); function intersection(values, ...others) { values = new Set(values); others = others.map(_set_js__WEBPACK_IMPORTED_MODULE_0__["default"]); out: for (const value of values) { for (const other of others) { if (!other.has(value)) { values.delete(value); continue out; } } } return values; } /***/ }), /***/ "Z9Ww": /*!***********************************************!*\ !*** ./node_modules/d3-force/src/manyBody.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-quadtree */ "gO8D"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jiggle.js */ "QupR"); /* harmony import */ var _simulation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation.js */ "VIHS"); /* harmony default export */ __webpack_exports__["default"] = (function() { var nodes, node, random, alpha, strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(-30), strengths, distanceMin2 = 1, distanceMax2 = Infinity, theta2 = 0.81; function force(_) { var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_0__["quadtree"])(nodes, _simulation_js__WEBPACK_IMPORTED_MODULE_3__["x"], _simulation_js__WEBPACK_IMPORTED_MODULE_3__["y"]).visitAfter(accumulate); for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); } function initialize() { if (!nodes) return; var i, n = nodes.length, node; strengths = new Array(n); for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); } function accumulate(quad) { var strength = 0, q, c, weight = 0, x, y, i; // For internal nodes, accumulate forces from child quadrants. if (quad.length) { for (x = y = i = 0; i < 4; ++i) { if ((q = quad[i]) && (c = Math.abs(q.value))) { strength += q.value, weight += c, x += c * q.x, y += c * q.y; } } quad.x = x / weight; quad.y = y / weight; } // For leaf nodes, accumulate forces from coincident quadrants. else { q = quad; q.x = q.data.x; q.y = q.data.y; do strength += strengths[q.data.index]; while (q = q.next); } quad.value = strength; } function apply(quad, x1, _, x2) { if (!quad.value) return true; var x = quad.x - node.x, y = quad.y - node.y, w = x2 - x1, l = x * x + y * y; // Apply the Barnes-Hut approximation if possible. // Limit forces for very close nodes; randomize direction if coincident. if (w * w / theta2 < l) { if (l < distanceMax2) { if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += x * x; if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += y * y; if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); node.vx += x * quad.value * alpha / l; node.vy += y * quad.value * alpha / l; } return true; } // Otherwise, process points directly. else if (quad.length || l >= distanceMax2) return; // Limit forces for very close nodes; randomize direction if coincident. if (quad.data !== node || quad.next) { if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += x * x; if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += y * y; if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); } do if (quad.data !== node) { w = strengths[quad.data.index] * alpha / l; node.vx += x * w; node.vy += y * w; } while (quad = quad.next); } force.initialize = function(_nodes, _random) { nodes = _nodes; random = _random; initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), initialize(), force) : strength; }; force.distanceMin = function(_) { return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); }; force.distanceMax = function(_) { return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); }; force.theta = function(_) { return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); }; return force; }); /***/ }), /***/ "ZQwz": /*!******************************************!*\ !*** ./node_modules/d3-shape/src/arc.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "CYYh"); function arcInnerRadius(d) { return d.innerRadius; } function arcOuterRadius(d) { return d.outerRadius; } function arcStartAngle(d) { return d.startAngle; } function arcEndAngle(d) { return d.endAngle; } function arcPadAngle(d) { return d && d.padAngle; // Note: optional! } function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10; if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return; t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; return [x0 + t * x10, y0 + t * y10]; } // Compute perpendicular offset line of length rc. // http://mathworld.wolfram.com/Circle-LineIntersection.html function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["max"])(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00; // Pick the closer of the two intersection points. // TODO Is there a faster way to determine which intersection to use? if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; return { cx: cx0, cy: cy0, x01: -ox, y01: -oy, x11: cx0 * (r1 / r - 1), y11: cy0 * (r1 / r - 1) }; } /* harmony default export */ __webpack_exports__["default"] = (function() { var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null; function arc() { var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(a1 - a0), cw = a1 > a0; if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); // Ensure that the outer radius is always larger than the inner radius. if (r1 < r0) r = r1, r1 = r0, r0 = r; // Is it a point? if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(0, 0); // Or is it a circle or annulus? else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a0)); context.arc(0, 0, r1, a0, a1, !cw); if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a1)); context.arc(0, 0, r0, a1, a0, cw); } } // Or is it a circular or annular sector? else { var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(r0 * r0 + r1 * r1)), rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1; // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)), p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)); if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; else da0 = 0, a00 = a10 = (a0 + a1) / 2; if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; else da1 = 0, a01 = a11 = (a0 + a1) / 2; } var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a01), y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a01), x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a10), y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a10); // Apply rounded corners? if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a11), y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a11), x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a00), y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a00), oc; // Restrict the corner radius according to the sector angle. if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(bx * bx + by * by))) / 2), lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(oc[0] * oc[0] + oc[1] * oc[1]); rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r0 - lc) / (kc - 1)); rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r1 - lc) / (kc + 1)); } } // Is the sector collapsed to a line? if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(x01, y01); // Does the sector’s outer ring have rounded corners? else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged? if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring. else { context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw); context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); } } // Or is the outer ring just a circular arc? else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); // Is there no inner ring, and it’s a circular sector? // Or perhaps it’s an annular sector collapsed due to padding? if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.lineTo(x10, y10); // Does the sector’s inner ring (or point) have rounded corners? else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged? if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring. else { context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), cw); context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); } } // Or is the inner ring just a circular arc? else context.arc(0, 0, r0, a10, a00, cw); } context.closePath(); if (buffer) return context = null, buffer + "" || null; } arc.centroid = function() { var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] / 2; return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a) * r]; }; arc.innerRadius = function(_) { return arguments.length ? (innerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : innerRadius; }; arc.outerRadius = function(_) { return arguments.length ? (outerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : outerRadius; }; arc.cornerRadius = function(_) { return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : cornerRadius; }; arc.padRadius = function(_) { return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padRadius; }; arc.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : startAngle; }; arc.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : endAngle; }; arc.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padAngle; }; arc.context = function(_) { return arguments.length ? ((context = _ == null ? null : _), arc) : context; }; return arc; }); /***/ }), /***/ "ZRP+": /*!********************************************!*\ !*** ./node_modules/d3-ease/src/linear.js ***! \********************************************/ /*! exports provided: linear */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; }); const linear = t => +t; /***/ }), /***/ "ZUHj": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToResult.js ***! \***********************************************************************/ /*! exports provided: subscribeToResult */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; }); /* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../InnerSubscriber */ "51Dv"); /* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./subscribeTo */ "SeVD"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ "HDdC"); function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex)) { if (innerSubscriber.closed) { return undefined; } if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) { return result.subscribe(innerSubscriber); } return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(innerSubscriber); } //# sourceMappingURL=subscribeToResult.js.map /***/ }), /***/ "ZtE7": /*!*******************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/colors.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(specifier) { var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); return colors; }); /***/ }), /***/ "Zy1z": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/pairwise.js ***! \*******************************************************************/ /*! exports provided: pairwise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function pairwise() { return (source) => source.lift(new PairwiseOperator()); } class PairwiseOperator { call(subscriber, source) { return source.subscribe(new PairwiseSubscriber(subscriber)); } } class PairwiseSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); this.hasPrev = false; } _next(value) { let pair; if (this.hasPrev) { pair = [this.prev, value]; } else { this.hasPrev = true; } this.prev = value; if (pair) { this.destination.next(pair); } } } //# sourceMappingURL=pairwise.js.map /***/ }), /***/ "Zyez": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/sequenceEqual.js ***! \************************************************************************/ /*! exports provided: sequenceEqual, SequenceEqualOperator, SequenceEqualSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function sequenceEqual(compareTo, comparator) { return (source) => source.lift(new SequenceEqualOperator(compareTo, comparator)); } class SequenceEqualOperator { constructor(compareTo, comparator) { this.compareTo = compareTo; this.comparator = comparator; } call(subscriber, source) { return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator)); } } class SequenceEqualSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, compareTo, comparator) { super(destination); this.compareTo = compareTo; this.comparator = comparator; this._a = []; this._b = []; this._oneComplete = false; this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, this))); } _next(value) { if (this._oneComplete && this._b.length === 0) { this.emit(false); } else { this._a.push(value); this.checkValues(); } } _complete() { if (this._oneComplete) { this.emit(this._a.length === 0 && this._b.length === 0); } else { this._oneComplete = true; } this.unsubscribe(); } checkValues() { const { _a, _b, comparator } = this; while (_a.length > 0 && _b.length > 0) { let a = _a.shift(); let b = _b.shift(); let areEqual = false; try { areEqual = comparator ? comparator(a, b) : a === b; } catch (e) { this.destination.error(e); } if (!areEqual) { this.emit(false); } } } emit(value) { const { destination } = this; destination.next(value); destination.complete(); } nextB(value) { if (this._oneComplete && this._a.length === 0) { this.emit(false); } else { this._b.push(value); this.checkValues(); } } completeB() { if (this._oneComplete) { this.emit(this._a.length === 0 && this._b.length === 0); } else { this._oneComplete = true; } } } class SequenceEqualCompareToSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, parent) { super(destination); this.parent = parent; } _next(value) { this.parent.nextB(value); } _error(err) { this.parent.error(err); this.unsubscribe(); } _complete() { this.parent.completeB(); this.unsubscribe(); } } //# sourceMappingURL=sequenceEqual.js.map /***/ }), /***/ "ZzDG": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/array.js ***! \**************************************************/ /*! exports provided: default, genericArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genericArray", function() { return genericArray; }); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ "Ud7J"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__["default"] : genericArray)(a, b); }); function genericArray(a, b) { var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i; for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[i], b[i]); for (; i < nb; ++i) c[i] = b[i]; return function(t) { for (i = 0; i < na; ++i) c[i] = x[i](t); return c; }; } /***/ }), /***/ "a7t3": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js ***! \************************************************************************/ /*! exports provided: subscribeToPromise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; }); /* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hostReportError */ "NJ4a"); const subscribeToPromise = (promise) => (subscriber) => { promise.then((value) => { if (!subscriber.closed) { subscriber.next(value); subscriber.complete(); } }, (err) => subscriber.error(err)) .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]); return subscriber; }; //# sourceMappingURL=subscribeToPromise.js.map /***/ }), /***/ "a8tM": /*!**********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/index.js ***! \**********************************************************/ /*! exports provided: default, computeHeight, Node */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hierarchy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeHeight", function() { return computeHeight; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; }); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.js */ "3pBD"); /* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each.js */ "6x6I"); /* harmony import */ var _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore.js */ "PYcf"); /* harmony import */ var _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter.js */ "njJa"); /* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ "mfBI"); /* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sum.js */ "bJAQ"); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sort.js */ "umZI"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./path.js */ "J27/"); /* harmony import */ var _ancestors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ancestors.js */ "S/r+"); /* harmony import */ var _descendants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./descendants.js */ "+Tjx"); /* harmony import */ var _leaves_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./leaves.js */ "v/rI"); /* harmony import */ var _links_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./links.js */ "SgsU"); /* harmony import */ var _iterator_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./iterator.js */ "yE6J"); function hierarchy(data, children) { if (data instanceof Map) { data = [undefined, data]; if (children === undefined) children = mapChildren; } else if (children === undefined) { children = objectChildren; } var root = new Node(data), node, nodes = [root], child, childs, i, n; while (node = nodes.pop()) { if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) { node.children = childs; for (i = n - 1; i >= 0; --i) { nodes.push(child = childs[i] = new Node(childs[i])); child.parent = node; child.depth = node.depth + 1; } } } return root.eachBefore(computeHeight); } function node_copy() { return hierarchy(this).eachBefore(copyData); } function objectChildren(d) { return d.children; } function mapChildren(d) { return Array.isArray(d) ? d[1] : null; } function copyData(node) { if (node.data.value !== undefined) node.value = node.data.value; node.data = node.data.data; } function computeHeight(node) { var height = 0; do node.height = height; while ((node = node.parent) && (node.height < ++height)); } function Node(data) { this.data = data; this.depth = this.height = 0; this.parent = null; } Node.prototype = hierarchy.prototype = { constructor: Node, count: _count_js__WEBPACK_IMPORTED_MODULE_0__["default"], each: _each_js__WEBPACK_IMPORTED_MODULE_1__["default"], eachAfter: _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__["default"], eachBefore: _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__["default"], find: _find_js__WEBPACK_IMPORTED_MODULE_4__["default"], sum: _sum_js__WEBPACK_IMPORTED_MODULE_5__["default"], sort: _sort_js__WEBPACK_IMPORTED_MODULE_6__["default"], path: _path_js__WEBPACK_IMPORTED_MODULE_7__["default"], ancestors: _ancestors_js__WEBPACK_IMPORTED_MODULE_8__["default"], descendants: _descendants_js__WEBPACK_IMPORTED_MODULE_9__["default"], leaves: _leaves_js__WEBPACK_IMPORTED_MODULE_10__["default"], links: _links_js__WEBPACK_IMPORTED_MODULE_11__["default"], copy: node_copy, [Symbol.iterator]: _iterator_js__WEBPACK_IMPORTED_MODULE_12__["default"] }; /***/ }), /***/ "aGrj": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMapTo.js ***! \**********************************************************************/ /*! exports provided: switchMapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; }); /* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./switchMap */ "eIep"); function switchMapTo(innerObservable, resultSelector) { return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(() => innerObservable, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(() => innerObservable); } //# sourceMappingURL=switchMapTo.js.map /***/ }), /***/ "aNk7": /*!*********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/on.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function start(name) { return (name + "").trim().split(/^|\s+/).every(function(t) { var i = t.indexOf("."); if (i >= 0) t = t.slice(0, i); return !t || t === "start"; }); } function onFunction(id, name, listener) { var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"]; return function() { var schedule = sit(this, id), on = schedule.on; // If this node shared a dispatch with the previous node, // just assign the updated shared dispatch and we’re done! // Otherwise, copy-on-write. if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); schedule.on = on1; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, listener) { var id = this._id; return arguments.length < 2 ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener)); }); /***/ }), /***/ "aR9J": /*!*************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/stereographic.js ***! \*************************************************************/ /*! exports provided: stereographicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stereographicRaw", function() { return stereographicRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function stereographicRaw(x, y) { var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = 1 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; } stereographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) { return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(z); }); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(stereographicRaw) .scale(250) .clipAngle(142); }); /***/ }), /***/ "aY1w": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/sparse.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(update) { return new Array(update.length); }); /***/ }), /***/ "aj5g": /*!*********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/albersUsa.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _albers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers.js */ "iQWy"); /* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea.js */ "nVu6"); /* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "XAaG"); // The projections must have mutually exclusive clip regions on the sphere, // as this will avoid emitting interleaving lines and polygons. function multiplex(streams) { var n = streams.length; return { point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); }, sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); }, lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); }, lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); }, polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); }, polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); } }; } // A composite projection for the United States, configured by default for // 960×500. The projection also works quite well at 960×600 if you change the // scale to 1285 and adjust the translate accordingly. The set of standard // parallels for each region comes from USGS, which is published here: // http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers /* harmony default export */ __webpack_exports__["default"] = (function() { var cache, cacheStream, lower48 = Object(_albers_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), lower48Point, alaska = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338 hawaii = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007 point, pointStream = {point: function(x, y) { point = [x, y]; }}; function albersUsa(coordinates) { var x = coordinates[0], y = coordinates[1]; return point = null, (lower48Point.point(x, y), point) || (alaskaPoint.point(x, y), point) || (hawaiiPoint.point(x, y), point); } albersUsa.invert = function(coordinates) { var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k; return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii : lower48).invert(coordinates); }; albersUsa.stream = function(stream) { return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]); }; albersUsa.precision = function(_) { if (!arguments.length) return lower48.precision(); lower48.precision(_), alaska.precision(_), hawaii.precision(_); return reset(); }; albersUsa.scale = function(_) { if (!arguments.length) return lower48.scale(); lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_); return albersUsa.translate(lower48.translate()); }; albersUsa.translate = function(_) { if (!arguments.length) return lower48.translate(); var k = lower48.scale(), x = +_[0], y = +_[1]; lower48Point = lower48 .translate(_) .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]) .stream(pointStream); alaskaPoint = alaska .translate([x - 0.307 * k, y + 0.201 * k]) .clipExtent([[x - 0.425 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.120 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.214 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) .stream(pointStream); hawaiiPoint = hawaii .translate([x - 0.205 * k, y + 0.212 * k]) .clipExtent([[x - 0.214 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.166 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.115 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]]) .stream(pointStream); return reset(); }; albersUsa.fitExtent = function(extent, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(albersUsa, extent, object); }; albersUsa.fitSize = function(size, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(albersUsa, size, object); }; albersUsa.fitWidth = function(width, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(albersUsa, width, object); }; albersUsa.fitHeight = function(height, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(albersUsa, height, object); }; function reset() { cache = cacheStream = null; return albersUsa; } return albersUsa.scale(1070); }); /***/ }), /***/ "aw+z": /*!************************************************!*\ !*** ./node_modules/d3-scale/src/threshold.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return threshold; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function threshold() { var domain = [0.5], range = [0, 1], unknown, n = 1; function scale(x) { return x != null && x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; } scale.domain = function(_) { return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); }; scale.invertExtent = function(y) { var i = range.indexOf(y); return [domain[i - 1], domain[i]]; }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.copy = function() { return threshold() .domain(domain) .range(range) .unknown(unknown); }; return _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(scale, arguments); } /***/ }), /***/ "b54z": /*!*********************************************!*\ !*** ./node_modules/d3-random/src/gamma.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _normal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal.js */ "ptze"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomGamma(source) { var randomNormal = _normal_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source)(); function randomGamma(k, theta) { if ((k = +k) < 0) throw new RangeError("invalid k"); // degenerate distribution if k === 0 if (k === 0) return () => 0; theta = theta == null ? 1 : +theta; // exponential distribution if k === 1 if (k === 1) return () => -Math.log1p(-source()) * theta; var d = (k < 1 ? k + 1 : k) - 1 / 3, c = 1 / (3 * Math.sqrt(d)), multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1; return function() { do { do { var x = randomNormal(), v = 1 + c * x; } while (v <= 0); v *= v * v; var u = 1 - source(); } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v))); return d * v * multiplier() * theta; }; } randomGamma.source = sourceRandomGamma; return randomGamma; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "b9Oj": /*!***************************************************!*\ !*** ./node_modules/d3-selection/src/selector.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function none() {} /* harmony default export */ __webpack_exports__["default"] = (function(selector) { return selector == null ? none : function() { return this.querySelector(selector); }; }); /***/ }), /***/ "bBIG": /*!*******************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/selectChildren.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ "Cnj1"); var filter = Array.prototype.filter; function children() { return this.children; } function childrenFilter(match) { return function() { return filter.call(this.children, match); }; } /* harmony default export */ __webpack_exports__["default"] = (function(match) { return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__["childMatcher"])(match))); }); /***/ }), /***/ "bHdf": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/mergeAll.js ***! \*******************************************************************/ /*! exports provided: mergeAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; }); /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ "SpAZ"); function mergeAll(concurrent = Number.POSITIVE_INFINITY) { return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent); } //# sourceMappingURL=mergeAll.js.map /***/ }), /***/ "bJAQ": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/sum.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(value) { return this.eachAfter(function(node) { var sum = +value(node.data) || 0, children = node.children, i = children && children.length; while (--i >= 0) sum += children[i].value; node.value = sum; }); }); /***/ }), /***/ "bN2o": /*!*****************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conic.js ***! \*****************************************************/ /*! exports provided: conicProjection */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicProjection", function() { return conicProjection; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "1ibS"); function conicProjection(projectAt) { var phi0 = 0, phi1 = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 3, m = Object(_index_js__WEBPACK_IMPORTED_MODULE_1__["projectionMutator"])(projectAt), p = m(phi0, phi1); p.parallels = function(_) { return arguments.length ? m(phi0 = _[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi1 = _[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]) : [phi0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], phi1 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; }; return p; } /***/ }), /***/ "bNSl": /*!****************************************************!*\ !*** ./node_modules/d3-selection/src/namespace.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _namespaces_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces.js */ "4xGt"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { var prefix = name += "", i = prefix.indexOf(":"); if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); return _namespaces_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProperty(prefix) ? {space: _namespaces_js__WEBPACK_IMPORTED_MODULE_0__["default"][prefix], local: name} : name; // eslint-disable-line no-prototype-builtins }); /***/ }), /***/ "bOdf": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMap.js ***! \********************************************************************/ /*! exports provided: concatMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; }); /* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ "5+tZ"); function concatMap(project, resultSelector) { return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1); } //# sourceMappingURL=concatMap.js.map /***/ }), /***/ "bUA0": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/identity.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle.js */ "F2eR"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity.js */ "IYKK"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "t9E6"); /* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "XAaG"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (function() { var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect alpha = 0, ca, sa, // angle x0 = null, y0, x1, y1, // clip extent kx = 1, ky = 1, transform = Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({ point: function(x, y) { var p = projection([x, y]) this.stream.point(p[0], p[1]); } }), postclip = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], cache, cacheStream; function reset() { kx = k * sx; ky = k * sy; cache = cacheStream = null; return projection; } function projection (p) { var x = p[0] * kx, y = p[1] * ky; if (alpha) { var t = y * ca - x * sa; x = x * ca + y * sa; y = t; } return [x + tx, y + ty]; } projection.invert = function(p) { var x = p[0] - tx, y = p[1] - ty; if (alpha) { var t = y * ca + x * sa; x = x * ca - y * sa; y = t; } return [x / kx, y / ky]; }; projection.stream = function(stream) { return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream)); }; projection.postclip = function(_) { return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; }; projection.clipExtent = function(_) { return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; }; projection.scale = function(_) { return arguments.length ? (k = +_, reset()) : k; }; projection.translate = function(_) { return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty]; } projection.angle = function(_) { return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_4__["radians"], sa = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__["sin"])(alpha), ca = Object(_math_js__WEBPACK_IMPORTED_MODULE_4__["cos"])(alpha), reset()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_4__["degrees"]; }; projection.reflectX = function(_) { return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0; }; projection.reflectY = function(_) { return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0; }; projection.fitExtent = function(extent, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(projection, extent, object); }; projection.fitSize = function(size, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(projection, size, object); }; projection.fitWidth = function(width, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(projection, width, object); }; projection.fitHeight = function(height, object) { return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(projection, height, object); }; return projection; }); /***/ }), /***/ "bcaG": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/nice.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nice; }); function nice(domain, interval) { domain = domain.slice(); var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], t; if (x1 < x0) { t = i0, i0 = i1, i1 = t; t = x0, x0 = x1, x1 = t; } domain[i0] = interval.floor(x0); domain[i1] = interval.ceil(x1); return domain; } /***/ }), /***/ "brLB": /*!********************************************!*\ !*** ./node_modules/d3-time/src/utcDay.js ***! \********************************************/ /*! exports provided: default, utcDays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return utcDays; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCDate(date.getUTCDate() + step); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"]; }, function(date) { return date.getUTCDate() - 1; }); /* harmony default export */ __webpack_exports__["default"] = (utcDay); var utcDays = utcDay.range; /***/ }), /***/ "c2HN": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isPromise.js ***! \***************************************************************/ /*! exports provided: isPromise */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; }); function isPromise(value) { return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; } //# sourceMappingURL=isPromise.js.map /***/ }), /***/ "c6ID": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/sample.js ***! \*****************************************************************/ /*! exports provided: sample */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function sample(notifier) { return (source) => source.lift(new SampleOperator(notifier)); } class SampleOperator { constructor(notifier) { this.notifier = notifier; } call(subscriber, source) { const sampleSubscriber = new SampleSubscriber(subscriber); const subscription = source.subscribe(sampleSubscriber); subscription.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(this.notifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](sampleSubscriber))); return subscription; } } class SampleSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor() { super(...arguments); this.hasValue = false; } _next(value) { this.value = value; this.hasValue = true; } notifyNext() { this.emitValue(); } notifyComplete() { this.emitValue(); } emitValue() { if (this.hasValue) { this.hasValue = false; this.destination.next(this.value); } } } //# sourceMappingURL=sample.js.map /***/ }), /***/ "c7jc": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/Immediate.js ***! \***************************************************************/ /*! exports provided: Immediate, TestTools */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestTools", function() { return TestTools; }); let nextHandle = 1; const RESOLVED = (() => Promise.resolve())(); const activeHandles = {}; function findAndClearHandle(handle) { if (handle in activeHandles) { delete activeHandles[handle]; return true; } return false; } const Immediate = { setImmediate(cb) { const handle = nextHandle++; activeHandles[handle] = true; RESOLVED.then(() => findAndClearHandle(handle) && cb()); return handle; }, clearImmediate(handle) { findAndClearHandle(handle); }, }; const TestTools = { pending() { return Object.keys(activeHandles).length; } }; //# sourceMappingURL=Immediate.js.map /***/ }), /***/ "cBqT": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/find.js ***! \***************************************************************/ /*! exports provided: find, FindValueOperator, FindValueSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function find(predicate, thisArg) { if (typeof predicate !== 'function') { throw new TypeError('predicate is not a function'); } return (source) => source.lift(new FindValueOperator(predicate, source, false, thisArg)); } class FindValueOperator { constructor(predicate, source, yieldIndex, thisArg) { this.predicate = predicate; this.source = source; this.yieldIndex = yieldIndex; this.thisArg = thisArg; } call(observer, source) { return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg)); } } class FindValueSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, source, yieldIndex, thisArg) { super(destination); this.predicate = predicate; this.source = source; this.yieldIndex = yieldIndex; this.thisArg = thisArg; this.index = 0; } notifyComplete(value) { const destination = this.destination; destination.next(value); destination.complete(); this.unsubscribe(); } _next(value) { const { predicate, thisArg } = this; const index = this.index++; try { const result = predicate.call(thisArg || this, value, index, this.source); if (result) { this.notifyComplete(this.yieldIndex ? index : value); } } catch (err) { this.destination.error(err); } } _complete() { this.notifyComplete(this.yieldIndex ? -1 : undefined); } } //# sourceMappingURL=find.js.map /***/ }), /***/ "cKk/": /*!****************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/selection.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); var Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.constructor; /* harmony default export */ __webpack_exports__["default"] = (function() { return new Selection(this._groups, this._parents); }); /***/ }), /***/ "cNgm": /*!************************************************!*\ !*** ./node_modules/d3-interpolate/src/hsl.js ***! \************************************************/ /*! exports provided: default, hslLong */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslLong", function() { return hslLong; }); /* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "SC+/"); /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "sFV2"); function hsl(hue) { return function(start, end) { var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(end)).h), s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); return function(t) { start.h = h(t); start.s = s(t); start.l = l(t); start.opacity = opacity(t); return start + ""; }; } } /* harmony default export */ __webpack_exports__["default"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"])); var hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /***/ }), /***/ "cOGN": /*!**************************************************!*\ !*** ./node_modules/d3-time-format/src/index.js ***! \**************************************************/ /*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "TCOF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeParse"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcParse"]; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "pZEX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ "v7Le"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ "oMw+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /***/ }), /***/ "cb2h": /*!***************************************************!*\ !*** ./node_modules/d3-interpolate/src/object.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var i = {}, c = {}, k; if (a === null || typeof a !== "object") a = {}; if (b === null || typeof b !== "object") b = {}; for (k in b) { if (k in a) { i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[k], b[k]); } else { c[k] = b[k]; } } return function(t) { for (k in i) c[k] = i[k](t); return c; }; }); /***/ }), /***/ "cdIC": /*!*********************************************!*\ !*** ./node_modules/d3-drag/src/noevent.js ***! \*********************************************/ /*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); function nopropagation(event) { event.stopImmediatePropagation(); } /* harmony default export */ __webpack_exports__["default"] = (function(event) { event.preventDefault(); event.stopImmediatePropagation(); }); /***/ }), /***/ "cmp4": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/quantile.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function quantile() { var domain = [], range = [], thresholds = [], unknown; function rescale() { var i = 0, n = Math.max(1, range.length); thresholds = new Array(n - 1); while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["quantileSorted"])(domain, i / n); return scale; } function scale(x) { return x == null || isNaN(x = +x) ? unknown : range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(thresholds, x)]; } scale.invertExtent = function(y) { var i = range.indexOf(y); return i < 0 ? [NaN, NaN] : [ i > 0 ? thresholds[i - 1] : domain[0], i < thresholds.length ? thresholds[i] : domain[domain.length - 1] ]; }; scale.domain = function(_) { if (!arguments.length) return domain.slice(); domain = []; for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]); return rescale(); }; scale.range = function(_) { return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; scale.quantiles = function() { return thresholds.slice(); }; scale.copy = function() { return quantile() .domain(domain) .range(range) .unknown(unknown); }; return _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(scale, arguments); } /***/ }), /***/ "cnUW": /*!****************************************!*\ !*** ./node_modules/d3-force/src/x.js ***! \****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony default export */ __webpack_exports__["default"] = (function(x) { var strength = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1), nodes, strengths, xz; if (typeof x !== "function") x = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x == null ? 0 : +x); function force(alpha) { for (var i = 0, n = nodes.length, node; i < n; ++i) { node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; } } function initialize() { if (!nodes) return; var i, n = nodes.length; strengths = new Array(n); xz = new Array(n); for (i = 0; i < n; ++i) { strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); } } force.initialize = function(_) { nodes = _; initialize(); }; force.strength = function(_) { return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength; }; force.x = function(_) { return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : x; }; return force; }); /***/ }), /***/ "coGc": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/delayWhen.js ***! \********************************************************************/ /*! exports provided: delayWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function delayWhen(delayDurationSelector, subscriptionDelay) { if (subscriptionDelay) { return (source) => new SubscriptionDelayObservable(source, subscriptionDelay) .lift(new DelayWhenOperator(delayDurationSelector)); } return (source) => source.lift(new DelayWhenOperator(delayDurationSelector)); } class DelayWhenOperator { constructor(delayDurationSelector) { this.delayDurationSelector = delayDurationSelector; } call(subscriber, source) { return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector)); } } class DelayWhenSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, delayDurationSelector) { super(destination); this.delayDurationSelector = delayDurationSelector; this.completed = false; this.delayNotifierSubscriptions = []; this.index = 0; } notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) { this.destination.next(outerValue); this.removeSubscription(innerSub); this.tryComplete(); } notifyError(error, innerSub) { this._error(error); } notifyComplete(innerSub) { const value = this.removeSubscription(innerSub); if (value) { this.destination.next(value); } this.tryComplete(); } _next(value) { const index = this.index++; try { const delayNotifier = this.delayDurationSelector(value, index); if (delayNotifier) { this.tryDelay(delayNotifier, value); } } catch (err) { this.destination.error(err); } } _complete() { this.completed = true; this.tryComplete(); this.unsubscribe(); } removeSubscription(subscription) { subscription.unsubscribe(); const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription); if (subscriptionIdx !== -1) { this.delayNotifierSubscriptions.splice(subscriptionIdx, 1); } return subscription.outerValue; } tryDelay(delayNotifier, value) { const notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, delayNotifier, value); if (notifierSubscription && !notifierSubscription.closed) { const destination = this.destination; destination.add(notifierSubscription); this.delayNotifierSubscriptions.push(notifierSubscription); } } tryComplete() { if (this.completed && this.delayNotifierSubscriptions.length === 0) { this.destination.complete(); } } } class SubscriptionDelayObservable extends _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"] { constructor(source, subscriptionDelay) { super(); this.source = source; this.subscriptionDelay = subscriptionDelay; } _subscribe(subscriber) { this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source)); } } class SubscriptionDelaySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent, source) { super(); this.parent = parent; this.source = source; this.sourceSubscribed = false; } _next(unused) { this.subscribeToSource(); } _error(err) { this.unsubscribe(); this.parent.error(err); } _complete() { this.unsubscribe(); this.subscribeToSource(); } subscribeToSource() { if (!this.sourceSubscribed) { this.sourceSubscribed = true; this.unsubscribe(); this.source.subscribe(this.parent); } } } //# sourceMappingURL=delayWhen.js.map /***/ }), /***/ "cp0P": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/forkJoin.js ***! \********************************************************************/ /*! exports provided: forkJoin */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/map */ "lJxs"); /* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isObject */ "XoHu"); /* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./from */ "Cfvw"); function forkJoin(...sources) { if (sources.length === 1) { const first = sources[0]; if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first)) { return forkJoinInternal(first, null); } if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first) && Object.getPrototypeOf(first) === Object.prototype) { const keys = Object.keys(first); return forkJoinInternal(keys.map(key => first[key]), keys); } } if (typeof sources[sources.length - 1] === 'function') { const resultSelector = sources.pop(); sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources; return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])((args) => resultSelector(...args))); } return forkJoinInternal(sources, null); } function forkJoinInternal(sources, keys) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const len = sources.length; if (len === 0) { subscriber.complete(); return; } const values = new Array(len); let completed = 0; let emitted = 0; for (let i = 0; i < len; i++) { const source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]); let hasValue = false; subscriber.add(source.subscribe({ next: value => { if (!hasValue) { hasValue = true; emitted++; } values[i] = value; }, error: err => subscriber.error(err), complete: () => { completed++; if (completed === len || !hasValue) { if (emitted === len) { subscriber.next(keys ? keys.reduce((result, key, i) => (result[key] = values[i], result), {}) : values); } subscriber.complete(); } } })); } }); } //# sourceMappingURL=forkJoin.js.map /***/ }), /***/ "cvkC": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/maxIndex.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return maxIndex; }); function maxIndex(values, valueof) { let max; let maxIndex = -1; let index = -1; if (valueof === undefined) { for (const value of values) { ++index; if (value != null && (max < value || (max === undefined && value >= value))) { max = value, maxIndex = index; } } } else { for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (max < value || (max === undefined && value >= value))) { max = value, maxIndex = index; } } } return maxIndex; } /***/ }), /***/ "cwsO": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/rotation.js ***! \*********************************************/ /*! exports provided: rotateRadians, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateRadians", function() { return rotateRadians; }); /* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ "pbho"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); function rotationIdentity(lambda, phi) { return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda) > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + Math.round(-lambda / _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) * _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; } rotationIdentity.invert = rotationIdentity; function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { return (deltaLambda %= _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) ? (deltaPhi || deltaGamma ? Object(_compose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) : rotationLambda(deltaLambda)) : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) : rotationIdentity); } function forwardRotationLambda(deltaLambda) { return function(lambda, phi) { return lambda += deltaLambda, [lambda > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda - _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda < -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi]; }; } function rotationLambda(deltaLambda) { var rotation = forwardRotationLambda(deltaLambda); rotation.invert = forwardRotationLambda(-deltaLambda); return rotation; } function rotationPhiGamma(deltaPhi, deltaGamma) { var cosDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaPhi), sinDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaPhi), cosDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaGamma), sinDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaGamma); function rotation(lambda, phi) { var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), k = z * cosDeltaPhi + x * sinDeltaPhi; return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaGamma + y * sinDeltaGamma) ]; } rotation.invert = function(lambda, phi) { var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi, y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), k = z * cosDeltaGamma - y * sinDeltaGamma; return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaPhi - x * sinDeltaPhi) ]; }; return rotation; } /* harmony default export */ __webpack_exports__["default"] = (function(rotate) { rotate = rotateRadians(rotate[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate.length > 2 ? rotate[2] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"] : 0); function forward(coordinates) { coordinates = rotate(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; } forward.invert = function(coordinates) { coordinates = rotate.invert(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates; }; return forward; }); /***/ }), /***/ "cx9U": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/single.js ***! \*****************************************************************/ /*! exports provided: single */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/EmptyError */ "sVev"); function single(predicate) { return (source) => source.lift(new SingleOperator(predicate, source)); } class SingleOperator { constructor(predicate, source) { this.predicate = predicate; this.source = source; } call(subscriber, source) { return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source)); } } class SingleSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, source) { super(destination); this.predicate = predicate; this.source = source; this.seenValue = false; this.index = 0; } applySingleValue(value) { if (this.seenValue) { this.destination.error('Sequence contains more than one element'); } else { this.seenValue = true; this.singleValue = value; } } _next(value) { const index = this.index++; if (this.predicate) { this.tryNext(value, index); } else { this.applySingleValue(value); } } tryNext(value, index) { try { if (this.predicate(value, index, this.source)) { this.applySingleValue(value); } } catch (err) { this.destination.error(err); } } _complete() { const destination = this.destination; if (this.index > 0) { destination.next(this.seenValue ? this.singleValue : undefined); destination.complete(); } else { destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]); } } } //# sourceMappingURL=single.js.map /***/ }), /***/ "cyYV": /*!************************************************!*\ !*** ./node_modules/d3-array/src/transpose.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min.js */ "mrVq"); /* harmony default export */ __webpack_exports__["default"] = (function(matrix) { if (!(n = matrix.length)) return []; for (var i = -1, m = Object(_min_js__WEBPACK_IMPORTED_MODULE_0__["default"])(matrix, length), transpose = new Array(m); ++i < m;) { for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { row[j] = matrix[j][i]; } } return transpose; }); function length(d) { return d.length; } /***/ }), /***/ "d4SJ": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/curve/bundle.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "jICm"); function Bundle(context, beta) { this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context); this._beta = beta; } Bundle.prototype = { lineStart: function() { this._x = []; this._y = []; this._basis.lineStart(); }, lineEnd: function() { var x = this._x, y = this._y, j = x.length - 1; if (j > 0) { var x0 = x[0], y0 = y[0], dx = x[j] - x0, dy = y[j] - y0, i = -1, t; while (++i <= j) { t = i / j; this._basis.point( this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) ); } } this._x = this._y = null; this._basis.lineEnd(); }, point: function(x, y) { this._x.push(+x); this._y.push(+y); } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(beta) { function bundle(context) { return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context) : new Bundle(context, beta); } bundle.beta = function(beta) { return custom(+beta); }; return bundle; })(0.85)); /***/ }), /***/ "d5JU": /*!*****************************************************!*\ !*** ./node_modules/d3-shape/src/curve/cardinal.js ***! \*****************************************************/ /*! exports provided: point, Cardinal, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cardinal", function() { return Cardinal; }); function point(that, x, y) { that._context.bezierCurveTo( that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2 ); } function Cardinal(context, tension) { this._context = context; this._k = (1 - tension) / 6; } Cardinal.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x2, this._y2); break; case 3: point(this, this._x1, this._y1); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; this._x1 = x, this._y1 = y; break; case 2: this._point = 3; // proceed default: point(this, x, y); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { function cardinal(context) { return new Cardinal(context, tension); } cardinal.tension = function(tension) { return custom(+tension); }; return cardinal; })(0)); /***/ }), /***/ "d65L": /*!*********************************************!*\ !*** ./node_modules/d3-time/src/utcYear.js ***! \*********************************************/ /*! exports provided: default, utcYears */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return utcYears; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCMonth(0, 1); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCFullYear(date.getUTCFullYear() + step); }, function(start, end) { return end.getUTCFullYear() - start.getUTCFullYear(); }, function(date) { return date.getUTCFullYear(); }); // An optimized implementation for this simple case. utcYear.every = function(k) { return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); date.setUTCMonth(0, 1); date.setUTCHours(0, 0, 0, 0); }, function(date, step) { date.setUTCFullYear(date.getUTCFullYear() + step * k); }); }; /* harmony default export */ __webpack_exports__["default"] = (utcYear); var utcYears = utcYear.range; /***/ }), /***/ "dCyY": /*!*****************************************!*\ !*** ./node_modules/d3-time/src/day.js ***! \*****************************************/ /*! exports provided: default, days */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "days", function() { return days; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])( date => date.setHours(0, 0, 0, 0), (date, step) => date.setDate(date.getDate() + step), (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"], date => date.getDate() - 1 ); /* harmony default export */ __webpack_exports__["default"] = (day); var days = day.range; /***/ }), /***/ "dPRQ": /*!********************************************!*\ !*** ./node_modules/d3-timer/src/timer.js ***! \********************************************/ /*! exports provided: now, Timer, timer, timerFlush */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return now; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return timerFlush; }); var frame = 0, // is an animation frame pending? timeout = 0, // is a timeout pending? interval = 0, // are any timers active? pokeDelay = 1000, // how frequently we check for clock skew taskHead, taskTail, clockLast = 0, clockNow = 0, clockSkew = 0, clock = typeof performance === "object" && performance.now ? performance : Date, setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; function now() { return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); } function clearNow() { clockNow = 0; } function Timer() { this._call = this._time = this._next = null; } Timer.prototype = timer.prototype = { constructor: Timer, restart: function(callback, delay, time) { if (typeof callback !== "function") throw new TypeError("callback is not a function"); time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); if (!this._next && taskTail !== this) { if (taskTail) taskTail._next = this; else taskHead = this; taskTail = this; } this._call = callback; this._time = time; sleep(); }, stop: function() { if (this._call) { this._call = null; this._time = Infinity; sleep(); } } }; function timer(callback, delay, time) { var t = new Timer; t.restart(callback, delay, time); return t; } function timerFlush() { now(); // Get the current time, if not already set. ++frame; // Pretend we’ve set an alarm, if we haven’t already. var t = taskHead, e; while (t) { if ((e = clockNow - t._time) >= 0) t._call.call(null, e); t = t._next; } --frame; } function wake() { clockNow = (clockLast = clock.now()) + clockSkew; frame = timeout = 0; try { timerFlush(); } finally { frame = 0; nap(); clockNow = 0; } } function poke() { var now = clock.now(), delay = now - clockLast; if (delay > pokeDelay) clockSkew -= delay, clockLast = now; } function nap() { var t0, t1 = taskHead, t2, time = Infinity; while (t1) { if (t1._call) { if (time > t1._time) time = t1._time; t0 = t1, t1 = t1._next; } else { t2 = t1._next, t1._next = null; t1 = t0 ? t0._next = t2 : taskHead = t2; } } taskTail = t0; sleep(time); } function sleep(time) { if (frame) return; // Soonest alarm already set, or will be. if (timeout) timeout = clearTimeout(timeout); var delay = time - clockNow; // Strictly less than if we recomputed clockNow. if (delay > 24) { if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); if (interval) interval = clearInterval(interval); } else { if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); frame = 1, setFrame(wake); } } /***/ }), /***/ "dW/k": /*!*****************************************************!*\ !*** ./node_modules/d3-transition/src/interrupt.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function(node, name) { var schedules = node.__transition, schedule, active, empty = true, i; if (!schedules) return; name = name == null ? null : name + ""; for (i in schedules) { if ((schedule = schedules[i]).name !== name) { empty = false; continue; } active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["STARTING"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDING"]; schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDED"]; schedule.timer.stop(); schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group); delete schedules[i]; } if (empty) delete node.__transition; }); /***/ }), /***/ "dg0l": /*!*********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/azimuthal.js ***! \*********************************************************/ /*! exports provided: azimuthalRaw, azimuthalInvert */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalRaw", function() { return azimuthalRaw; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalInvert", function() { return azimuthalInvert; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); function azimuthalRaw(scale) { return function(x, y) { var cx = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x), cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = scale(cx * cy); if (k === Infinity) return [2, 0]; return [ k * cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), k * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) ]; } } function azimuthalInvert(angle) { return function(x, y) { var z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y), c = angle(z), sc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c), cc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(c); return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x * sc, z * cc), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z && y * sc / z) ]; } } /***/ }), /***/ "dkDA": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/materialize.js ***! \**********************************************************************/ /*! exports provided: materialize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Notification */ "WMd4"); function materialize() { return function materializeOperatorFunction(source) { return source.lift(new MaterializeOperator()); }; } class MaterializeOperator { call(subscriber, source) { return source.subscribe(new MaterializeSubscriber(subscriber)); } } class MaterializeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); } _next(value) { this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createNext(value)); } _error(err) { const destination = this.destination; destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createError(err)); destination.complete(); } _complete() { const destination = this.destination; destination.next(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createComplete()); destination.complete(); } } //# sourceMappingURL=materialize.js.map /***/ }), /***/ "e94d": /*!***********************************************!*\ !*** ./node_modules/d3-random/src/weibull.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomWeibull(source) { function randomWeibull(k, a, b) { var outerFunc; if ((k = +k) === 0) { outerFunc = x => -Math.log(x); } else { k = 1 / k; outerFunc = x => Math.pow(x, k); } a = a == null ? 0 : +a; b = b == null ? 1 : +b; return function() { return a + b * outerFunc(-Math.log1p(-source())); }; } randomWeibull.source = sourceRandomWeibull; return randomWeibull; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "e9ab": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/curve/step.js ***! \*************************************************/ /*! exports provided: default, stepBefore, stepAfter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepBefore", function() { return stepBefore; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepAfter", function() { return stepAfter; }); function Step(context, t) { this._context = context; this._t = t; } Step.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = this._y = NaN; this._point = 0; }, lineEnd: function() { if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; // proceed default: { if (this._t <= 0) { this._context.lineTo(this._x, y); this._context.lineTo(x, y); } else { var x1 = this._x * (1 - this._t) + x * this._t; this._context.lineTo(x1, this._y); this._context.lineTo(x1, y); } break; } } this._x = x, this._y = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Step(context, 0.5); }); function stepBefore(context) { return new Step(context, 0); } function stepAfter(context) { return new Step(context, 1); } /***/ }), /***/ "eIep": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/switchMap.js ***! \********************************************************************/ /*! exports provided: switchMap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function switchMap(project, resultSelector) { if (typeof resultSelector === 'function') { return (source) => source.pipe(switchMap((a, i) => Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])((b, ii) => resultSelector(a, b, i, ii))))); } return (source) => source.lift(new SwitchMapOperator(project)); } class SwitchMapOperator { constructor(project) { this.project = project; } call(subscriber, source) { return source.subscribe(new SwitchMapSubscriber(subscriber, this.project)); } } class SwitchMapSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, project) { super(destination); this.project = project; this.index = 0; } _next(value) { let result; const index = this.index++; try { result = this.project(value, index); } catch (error) { this.destination.error(error); return; } this._innerSub(result); } _innerSub(result) { const innerSubscription = this.innerSubscription; if (innerSubscription) { innerSubscription.unsubscribe(); } const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); this.innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(result, innerSubscriber); if (this.innerSubscription !== innerSubscriber) { destination.add(this.innerSubscription); } } _complete() { const { innerSubscription } = this; if (!innerSubscription || innerSubscription.closed) { super._complete(); } this.unsubscribe(); } _unsubscribe() { this.innerSubscription = undefined; } notifyComplete() { this.innerSubscription = undefined; if (this.isStopped) { super._complete(); } } notifyNext(innerValue) { this.destination.next(innerValue); } } //# sourceMappingURL=switchMap.js.map /***/ }), /***/ "eJvb": /*!******************************************!*\ !*** ./node_modules/d3-scale/src/pow.js ***! \******************************************/ /*! exports provided: powish, default, sqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "powish", function() { return powish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function transformPow(exponent) { return function(x) { return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); }; } function transformSqrt(x) { return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); } function transformSquare(x) { return x < 0 ? -x * x : x * x; } function powish(transform) { var scale = transform(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"]), exponent = 1; function rescale() { return exponent === 1 ? transform(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"]) : exponent === 0.5 ? transform(transformSqrt, transformSquare) : transform(transformPow(exponent), transformPow(1 / exponent)); } scale.exponent = function(_) { return arguments.length ? (exponent = +_, rescale()) : exponent; }; return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); } function pow() { var scale = powish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, pow()).exponent(scale.exponent()); }; _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); return scale; } function sqrt() { return pow.apply(null, arguments).exponent(0.5); } /***/ }), /***/ "eNwd": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/animationFrame.js ***! \*************************************************************************/ /*! exports provided: animationFrameScheduler, animationFrame */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return animationFrameScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; }); /* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AnimationFrameAction */ "Vpsf"); /* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnimationFrameScheduler */ "znLP"); const animationFrameScheduler = new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]); const animationFrame = animationFrameScheduler; //# sourceMappingURL=animationFrame.js.map /***/ }), /***/ "eTLM": /*!***************************************************!*\ !*** ./node_modules/d3-random/src/exponential.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomExponential(source) { function randomExponential(lambda) { return function() { return -Math.log1p(-source()) / lambda; }; } randomExponential.source = sourceRandomExponential; return randomExponential; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "eW2m": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e7e1efc994c7dd1c77", "f1eef6d7b5d8df65b0ce1256", "f1eef6d7b5d8df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0dd1c77980043", "f1eef6d4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "ezys": /*!*********************************************!*\ !*** ./node_modules/d3-polygon/src/hull.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross.js */ "MLOY"); function lexicographicOrder(a, b) { return a[0] - b[0] || a[1] - b[1]; } // Computes the upper convex hull per the monotone chain algorithm. // Assumes points.length >= 3, is sorted by x, unique in y. // Returns an array of indices into points in left-to-right order. function computeUpperHullIndexes(points) { const n = points.length, indexes = [0, 1]; let size = 2, i; for (i = 2; i < n; ++i) { while (size > 1 && Object(_cross_js__WEBPACK_IMPORTED_MODULE_0__["default"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size; indexes[size++] = i; } return indexes.slice(0, size); // remove popped points } /* harmony default export */ __webpack_exports__["default"] = (function(points) { if ((n = points.length) < 3) return null; var i, n, sortedPoints = new Array(n), flippedPoints = new Array(n); for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i]; sortedPoints.sort(lexicographicOrder); for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]]; var upperIndexes = computeUpperHullIndexes(sortedPoints), lowerIndexes = computeUpperHullIndexes(flippedPoints); // Construct the hull polygon, removing possible duplicate endpoints. var skipLeft = lowerIndexes[0] === upperIndexes[0], skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1], hull = []; // Add upper hull in right-to-l order. // Then add lower hull in left-to-right order. for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]); for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]); return hull; }); /***/ }), /***/ "f29J": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concat.js ***! \*****************************************************************/ /*! exports provided: concat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; }); /* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/concat */ "GyhO"); function concat(...observables) { return (source) => source.lift.call(Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, ...observables)); } //# sourceMappingURL=concat.js.map /***/ }), /***/ "f4CH": /*!***********************************************!*\ !*** ./node_modules/d3-scale/src/quantize.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantize; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function quantize() { var x0 = 0, x1 = 1, n = 1, domain = [0.5], range = [0, 1], unknown; function scale(x) { return x != null && x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown; } function rescale() { var i = -1; domain = new Array(n); while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); return scale; } scale.domain = function(_) { return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1]; }; scale.range = function(_) { return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice(); }; scale.invertExtent = function(y) { var i = range.indexOf(y); return i < 0 ? [NaN, NaN] : i < 1 ? [x0, domain[0]] : i >= n ? [domain[n - 1], x1] : [domain[i - 1], domain[i]]; }; scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : scale; }; scale.thresholds = function() { return domain.slice(); }; scale.copy = function() { return quantize() .domain([x0, x1]) .range(range) .unknown(unknown); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(Object(_linear_js__WEBPACK_IMPORTED_MODULE_1__["linearish"])(scale), arguments); } /***/ }), /***/ "fAVw": /*!********************************************!*\ !*** ./node_modules/d3-array/src/union.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return union; }); function union(...others) { const set = new Set(); for (const other of others) { for (const o of other) { set.add(o); } } return set; } /***/ }), /***/ "fFD9": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/combineLatest.js ***! \************************************************************************/ /*! exports provided: combineLatest */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/combineLatest */ "itXk"); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); const none = {}; function combineLatest(...observables) { let project = null; if (typeof observables[observables.length - 1] === 'function') { project = observables.pop(); } if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) { observables = observables[0].slice(); } return (source) => source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source, ...observables]), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); } //# sourceMappingURL=combineLatest.js.map /***/ }), /***/ "fXoL": /*!******************************************************************!*\ !*** ./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js ***! \******************************************************************/ /*! exports provided: ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0, ɵALLOW_MULTIPLE_PLATFORMS, ɵAPP_ID_RANDOM_PROVIDER, ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__, ɵChangeDetectorStatus, ɵCodegenComponentFactoryResolver, ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, ɵCompiler_compileModuleAsync__POST_R3__, ɵCompiler_compileModuleSync__POST_R3__, ɵComponentFactory, ɵConsole, ɵDEFAULT_LOCALE_ID, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵINJECTOR_IMPL__POST_R3__, ɵINJECTOR_SCOPE, ɵLifecycleHooksFeature, ɵLocaleDataIndex, ɵNG_COMP_DEF, ɵNG_DIR_DEF, ɵNG_ELEMENT_ID, ɵNG_INJ_DEF, ɵNG_MOD_DEF, ɵNG_PIPE_DEF, ɵNG_PROV_DEF, ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, ɵNO_CHANGE, ɵNgModuleFactory, ɵNoopNgZone, ɵReflectionCapabilities, ɵRender3ComponentFactory, ɵRender3ComponentRef, ɵRender3NgModuleRef, ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, ɵSWITCH_COMPILE_COMPONENT__POST_R3__, ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, ɵSWITCH_COMPILE_NGMODULE__POST_R3__, ɵSWITCH_COMPILE_PIPE__POST_R3__, ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, ɵSWITCH_IVY_ENABLED__POST_R3__, ɵSWITCH_RENDERER2_FACTORY__POST_R3__, ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, ɵ_sanitizeHtml, ɵ_sanitizeUrl, ɵallowSanitizationBypassAndThrow, ɵand, ɵangular_packages_core_core_a, ɵangular_packages_core_core_b, ɵangular_packages_core_core_ba, ɵangular_packages_core_core_bb, ɵangular_packages_core_core_bc, ɵangular_packages_core_core_bd, ɵangular_packages_core_core_be, ɵangular_packages_core_core_bf, ɵangular_packages_core_core_bg, ɵangular_packages_core_core_bh, ɵangular_packages_core_core_bi, ɵangular_packages_core_core_bj, ɵangular_packages_core_core_bl, ɵangular_packages_core_core_bm, ɵangular_packages_core_core_bn, ɵangular_packages_core_core_bo, ɵangular_packages_core_core_bp, ɵangular_packages_core_core_bq, ɵangular_packages_core_core_br, ɵangular_packages_core_core_bs, ɵangular_packages_core_core_bv, ɵangular_packages_core_core_bw, ɵangular_packages_core_core_bx, ɵangular_packages_core_core_bz, ɵangular_packages_core_core_c, ɵangular_packages_core_core_cb, ɵangular_packages_core_core_cc, ɵangular_packages_core_core_d, ɵangular_packages_core_core_e, ɵangular_packages_core_core_f, ɵangular_packages_core_core_g, ɵangular_packages_core_core_h, ɵangular_packages_core_core_i, ɵangular_packages_core_core_j, ɵangular_packages_core_core_k, ɵangular_packages_core_core_l, ɵangular_packages_core_core_m, ɵangular_packages_core_core_n, ɵangular_packages_core_core_o, ɵangular_packages_core_core_p, ɵangular_packages_core_core_q, ɵangular_packages_core_core_r, ɵangular_packages_core_core_s, ɵangular_packages_core_core_t, ɵangular_packages_core_core_u, ɵangular_packages_core_core_v, ɵangular_packages_core_core_w, ɵangular_packages_core_core_x, ɵangular_packages_core_core_y, ɵangular_packages_core_core_z, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustResourceUrl, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustUrl, ɵccf, ɵclearOverrides, ɵclearResolutionOfComponentResourcesQueue, ɵcmf, ɵcompileComponent, ɵcompileDirective, ɵcompileNgModule, ɵcompileNgModuleDefs, ɵcompileNgModuleFactory__POST_R3__, ɵcompilePipe, ɵcreateInjector, ɵcrt, ɵdefaultIterableDiffers, ɵdefaultKeyValueDiffers, ɵdetectChanges, ɵdevModeEqual, ɵdid, ɵeld, ɵfindLocaleData, ɵflushModuleScopingQueueAsMuchAsPossible, ɵgetComponentViewDefinitionFactory, ɵgetDebugNodeR2, ɵgetDebugNode__POST_R3__, ɵgetDirectives, ɵgetHostElement, ɵgetInjectableDef, ɵgetLContext, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, ɵgetModuleFactory__POST_R3__, ɵgetSanitizationBypassType, ɵglobal, ɵinitServicesIfNeeded, ɵinlineInterpolate, ɵinterpolate, ɵisBoundToModule__POST_R3__, ɵisDefaultChangeDetectionStrategy, ɵisListLikeIterable, ɵisObservable, ɵisPromise, ɵisSubscribable, ɵivyEnabled, ɵmakeDecorator, ɵmarkDirty, ɵmod, ɵmpd, ɵncd, ɵnoSideEffects, ɵnov, ɵoverrideComponentView, ɵoverrideProvider, ɵpad, ɵpatchComponentDefWithScope, ɵpid, ɵpod, ɵppd, ɵprd, ɵpublishDefaultGlobalUtils, ɵpublishGlobalUtil, ɵqud, ɵregisterLocaleData, ɵregisterModuleFactory, ɵregisterNgModuleType, ɵrenderComponent, ɵresetCompiledComponents, ɵresetJitOptions, ɵresolveComponentResources, ɵsetClassMetadata, ɵsetCurrentInjector, ɵsetDocument, ɵsetLocaleId, ɵstore, ɵstringify, ɵted, ɵtransitiveScopesFor, ɵunregisterLocaleData, ɵunv, ɵunwrapSafeValue, ɵvid, ɵwhenRendered, ɵɵCopyDefinitionFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinjectPipeChangeDetectorRef, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ANALYZE_FOR_ENTRY_COMPONENTS", function() { return ANALYZE_FOR_ENTRY_COMPONENTS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_BOOTSTRAP_LISTENER", function() { return APP_BOOTSTRAP_LISTENER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_ID", function() { return APP_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_INITIALIZER", function() { return APP_INITIALIZER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationInitStatus", function() { return ApplicationInitStatus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationModule", function() { return ApplicationModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicationRef", function() { return ApplicationRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Attribute", function() { return Attribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COMPILER_OPTIONS", function() { return COMPILER_OPTIONS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CUSTOM_ELEMENTS_SCHEMA", function() { return CUSTOM_ELEMENTS_SCHEMA; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectionStrategy", function() { return ChangeDetectionStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangeDetectorRef", function() { return ChangeDetectorRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Compiler", function() { return Compiler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompilerFactory", function() { return CompilerFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactory", function() { return ComponentFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentFactoryResolver", function() { return ComponentFactoryResolver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComponentRef", function() { return ComponentRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChild", function() { return ContentChild; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContentChildren", function() { return ContentChildren; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_CURRENCY_CODE", function() { return DEFAULT_CURRENCY_CODE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugElement", function() { return DebugElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugEventListener", function() { return DebugEventListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DebugNode", function() { return DebugNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultIterableDiffer", function() { return DefaultIterableDiffer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Directive", function() { return Directive; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementRef", function() { return ElementRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmbeddedViewRef", function() { return EmbeddedViewRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorHandler", function() { return ErrorHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventEmitter", function() { return EventEmitter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Host", function() { return Host; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostBinding", function() { return HostBinding; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HostListener", function() { return HostListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INJECTOR", function() { return INJECTOR$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Inject", function() { return Inject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectFlags", function() { return InjectFlags; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injectable", function() { return Injectable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InjectionToken", function() { return InjectionToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Injector", function() { return Injector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Input", function() { return Input; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IterableDiffers", function() { return IterableDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyValueDiffers", function() { return KeyValueDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOCALE_ID", function() { return LOCALE_ID$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MissingTranslationStrategy", function() { return MissingTranslationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModuleWithComponentFactories", function() { return ModuleWithComponentFactories; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_ERRORS_SCHEMA", function() { return NO_ERRORS_SCHEMA; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModule", function() { return NgModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactory", function() { return NgModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleFactoryLoader", function() { return NgModuleFactoryLoader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgModuleRef", function() { return NgModuleRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgProbeToken", function() { return NgProbeToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgZone", function() { return NgZone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Optional", function() { return Optional; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Output", function() { return Output; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PACKAGE_ROOT_URL", function() { return PACKAGE_ROOT_URL; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_ID", function() { return PLATFORM_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_INITIALIZER", function() { return PLATFORM_INITIALIZER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Pipe", function() { return Pipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformRef", function() { return PlatformRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Query", function() { return Query; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryList", function() { return QueryList; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveInjector", function() { return ReflectiveInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReflectiveKey", function() { return ReflectiveKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Renderer2", function() { return Renderer2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererFactory2", function() { return RendererFactory2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RendererStyleFlags2", function() { return RendererStyleFlags2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedReflectiveFactory", function() { return ResolvedReflectiveFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sanitizer", function() { return Sanitizer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SecurityContext", function() { return SecurityContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Self", function() { return Self; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleChange", function() { return SimpleChange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkipSelf", function() { return SkipSelf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoader", function() { return SystemJsNgModuleLoader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemJsNgModuleLoaderConfig", function() { return SystemJsNgModuleLoaderConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS", function() { return TRANSLATIONS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TRANSLATIONS_FORMAT", function() { return TRANSLATIONS_FORMAT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TemplateRef", function() { return TemplateRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Testability", function() { return Testability; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestabilityRegistry", function() { return TestabilityRegistry; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Type", function() { return Type; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Version", function() { return Version; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChild", function() { return ViewChild; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewChildren", function() { return ViewChildren; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewContainerRef", function() { return ViewContainerRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewEncapsulation", function() { return ViewEncapsulation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewRef", function() { return ViewRef$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WrappedValue", function() { return WrappedValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asNativeElements", function() { return asNativeElements; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assertPlatform", function() { return assertPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatform", function() { return createPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPlatformFactory", function() { return createPlatformFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defineInjectable", function() { return defineInjectable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroyPlatform", function() { return destroyPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableProdMode", function() { return enableProdMode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forwardRef", function() { return forwardRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDebugNode", function() { return getDebugNode$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleFactory", function() { return getModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPlatform", function() { return getPlatform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return inject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDevMode", function() { return isDevMode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformCore", function() { return platformCore; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveForwardRef", function() { return resolveForwardRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTestabilityGetter", function() { return setTestabilityGetter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ0", function() { return ɵ0$3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵALLOW_MULTIPLE_PLATFORMS", function() { return ALLOW_MULTIPLE_PLATFORMS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵAPP_ID_RANDOM_PROVIDER", function() { return APP_ID_RANDOM_PROVIDER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__", function() { return CREATE_ATTRIBUTE_DECORATOR__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵChangeDetectorStatus", function() { return ChangeDetectorStatus; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCodegenComponentFactoryResolver", function() { return CodegenComponentFactoryResolver; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__", function() { return Compiler_compileModuleAndAllComponentsAsync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__", function() { return Compiler_compileModuleAndAllComponentsSync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleAsync__POST_R3__", function() { return Compiler_compileModuleAsync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵCompiler_compileModuleSync__POST_R3__", function() { return Compiler_compileModuleSync__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵComponentFactory", function() { return ComponentFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵConsole", function() { return Console; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDEFAULT_LOCALE_ID", function() { return DEFAULT_LOCALE_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_ARRAY", function() { return EMPTY_ARRAY$4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEMPTY_MAP", function() { return EMPTY_MAP; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_IMPL__POST_R3__", function() { return INJECTOR_IMPL__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINJECTOR_SCOPE", function() { return INJECTOR_SCOPE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵLifecycleHooksFeature", function() { return LifecycleHooksFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵLocaleDataIndex", function() { return LocaleDataIndex; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_COMP_DEF", function() { return NG_COMP_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_DIR_DEF", function() { return NG_DIR_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_ELEMENT_ID", function() { return NG_ELEMENT_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_INJ_DEF", function() { return NG_INJ_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_MOD_DEF", function() { return NG_MOD_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_PIPE_DEF", function() { return NG_PIPE_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNG_PROV_DEF", function() { return NG_PROV_DEF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR", function() { return NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNO_CHANGE", function() { return NO_CHANGE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNgModuleFactory", function() { return NgModuleFactory$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNoopNgZone", function() { return NoopNgZone; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵReflectionCapabilities", function() { return ReflectionCapabilities; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentFactory", function() { return ComponentFactory$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3ComponentRef", function() { return ComponentRef$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵRender3NgModuleRef", function() { return NgModuleRef$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__", function() { return SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_COMPONENT__POST_R3__", function() { return SWITCH_COMPILE_COMPONENT__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__", function() { return SWITCH_COMPILE_DIRECTIVE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_INJECTABLE__POST_R3__", function() { return SWITCH_COMPILE_INJECTABLE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_NGMODULE__POST_R3__", function() { return SWITCH_COMPILE_NGMODULE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_COMPILE_PIPE__POST_R3__", function() { return SWITCH_COMPILE_PIPE__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__", function() { return SWITCH_ELEMENT_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_IVY_ENABLED__POST_R3__", function() { return SWITCH_IVY_ENABLED__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_RENDERER2_FACTORY__POST_R3__", function() { return SWITCH_RENDERER2_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__", function() { return SWITCH_TEMPLATE_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__", function() { return SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeHtml", function() { return _sanitizeHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵ_sanitizeUrl", function() { return _sanitizeUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵallowSanitizationBypassAndThrow", function() { return allowSanitizationBypassAndThrow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵand", function() { return anchorDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_a", function() { return isForwardRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_b", function() { return injectInjectorOnly; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_ba", function() { return zoneSchedulerFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bb", function() { return USD_CURRENCY_CODE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bc", function() { return _def; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bd", function() { return DebugContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_be", function() { return NgOnChangesFeatureImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bf", function() { return SCHEDULER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bg", function() { return injectAttributeImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bh", function() { return getLView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bi", function() { return getBindingRoot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bj", function() { return nextContextImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bl", function() { return pureFunction1Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bm", function() { return pureFunction2Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bn", function() { return pureFunction3Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bo", function() { return pureFunction4Internal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bp", function() { return pureFunctionVInternal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bq", function() { return getUrlSanitizer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_br", function() { return makePropDecorator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bs", function() { return makeParamDecorator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bv", function() { return getClosureSafeProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bw", function() { return NullInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bx", function() { return getInjectImplementation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_bz", function() { return getNativeByTNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_c", function() { return attachInjectFlag; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_cb", function() { return getRootContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_cc", function() { return i18nPostprocess; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_d", function() { return ReflectiveInjector_; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_e", function() { return ReflectiveDependency; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_f", function() { return resolveReflectiveProviders; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_g", function() { return _appIdRandomProviderFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_h", function() { return injectRenderer2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_i", function() { return injectElementRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_j", function() { return createElementRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_k", function() { return getModuleFactory__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_l", function() { return injectTemplateRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_m", function() { return createTemplateRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_n", function() { return injectViewContainerRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_o", function() { return DebugNode__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_p", function() { return DebugElement__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_q", function() { return getDebugNodeR2__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_r", function() { return injectChangeDetectorRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_s", function() { return DefaultIterableDifferFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_t", function() { return DefaultKeyValueDifferFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_u", function() { return defaultIterableDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_v", function() { return defaultKeyValueDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_w", function() { return _iterableDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_x", function() { return _keyValueDiffersFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_y", function() { return _localeFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_core_core_z", function() { return APPLICATION_MODULE_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustHtml", function() { return bypassSanitizationTrustHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustResourceUrl", function() { return bypassSanitizationTrustResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustScript", function() { return bypassSanitizationTrustScript; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustStyle", function() { return bypassSanitizationTrustStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵbypassSanitizationTrustUrl", function() { return bypassSanitizationTrustUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵccf", function() { return createComponentFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵclearOverrides", function() { return clearOverrides; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵclearResolutionOfComponentResourcesQueue", function() { return clearResolutionOfComponentResourcesQueue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcmf", function() { return createNgModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileComponent", function() { return compileComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileDirective", function() { return compileDirective; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModule", function() { return compileNgModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleDefs", function() { return compileNgModuleDefs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompileNgModuleFactory__POST_R3__", function() { return compileNgModuleFactory__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcompilePipe", function() { return compilePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcreateInjector", function() { return createInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵcrt", function() { return createRendererType2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefaultIterableDiffers", function() { return defaultIterableDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdefaultKeyValueDiffers", function() { return defaultKeyValueDiffers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdetectChanges", function() { return detectChanges; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdevModeEqual", function() { return devModeEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵdid", function() { return directiveDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵeld", function() { return elementDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵfindLocaleData", function() { return findLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflushModuleScopingQueueAsMuchAsPossible", function() { return flushModuleScopingQueueAsMuchAsPossible; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetComponentViewDefinitionFactory", function() { return getComponentViewDefinitionFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDebugNodeR2", function() { return getDebugNodeR2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDebugNode__POST_R3__", function() { return getDebugNode__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDirectives", function() { return getDirectives; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetHostElement", function() { return getHostElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetInjectableDef", function() { return getInjectableDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLContext", function() { return getLContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLocaleCurrencyCode", function() { return getLocaleCurrencyCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetLocalePluralCase", function() { return getLocalePluralCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetModuleFactory__POST_R3__", function() { return getModuleFactory__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetSanitizationBypassType", function() { return getSanitizationBypassType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵglobal", function() { return _global; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinitServicesIfNeeded", function() { return initServicesIfNeeded; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinlineInterpolate", function() { return inlineInterpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinterpolate", function() { return interpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisBoundToModule__POST_R3__", function() { return isBoundToModule__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisDefaultChangeDetectionStrategy", function() { return isDefaultChangeDetectionStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisListLikeIterable", function() { return isListLikeIterable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisObservable", function() { return isObservable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisPromise", function() { return isPromise; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵisSubscribable", function() { return isSubscribable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵivyEnabled", function() { return ivyEnabled; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmakeDecorator", function() { return makeDecorator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmarkDirty", function() { return markDirty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmod", function() { return moduleDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵmpd", function() { return moduleProvideDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵncd", function() { return ngContentDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵnoSideEffects", function() { return noSideEffects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵnov", function() { return nodeValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideComponentView", function() { return overrideComponentView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵoverrideProvider", function() { return overrideProvider; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpad", function() { return pureArrayDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpatchComponentDefWithScope", function() { return patchComponentDefWithScope; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpid", function() { return pipeDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpod", function() { return pureObjectDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵppd", function() { return purePipeDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵprd", function() { return providerDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpublishDefaultGlobalUtils", function() { return publishDefaultGlobalUtils; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵpublishGlobalUtil", function() { return publishGlobalUtil; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵqud", function() { return queryDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterLocaleData", function() { return registerLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterModuleFactory", function() { return registerModuleFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵregisterNgModuleType", function() { return registerNgModuleType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵrenderComponent", function() { return renderComponent$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresetCompiledComponents", function() { return resetCompiledComponents; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresetJitOptions", function() { return resetJitOptions; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵresolveComponentResources", function() { return resolveComponentResources; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetClassMetadata", function() { return setClassMetadata; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetCurrentInjector", function() { return setCurrentInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetDocument", function() { return setDocument; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetLocaleId", function() { return setLocaleId; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵstore", function() { return store; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵstringify", function() { return stringify; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵted", function() { return textDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵtransitiveScopesFor", function() { return transitiveScopesFor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunregisterLocaleData", function() { return unregisterAllLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunv", function() { return unwrapValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵunwrapSafeValue", function() { return unwrapSafeValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵvid", function() { return viewDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵwhenRendered", function() { return whenRendered; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵCopyDefinitionFeature", function() { return ɵɵCopyDefinitionFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵInheritDefinitionFeature", function() { return ɵɵInheritDefinitionFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵNgOnChangesFeature", function() { return ɵɵNgOnChangesFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵProvidersFeature", function() { return ɵɵProvidersFeature; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵadvance", function() { return ɵɵadvance; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattribute", function() { return ɵɵattribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate1", function() { return ɵɵattributeInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate2", function() { return ɵɵattributeInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate3", function() { return ɵɵattributeInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate4", function() { return ɵɵattributeInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate5", function() { return ɵɵattributeInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate6", function() { return ɵɵattributeInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate7", function() { return ɵɵattributeInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolate8", function() { return ɵɵattributeInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵattributeInterpolateV", function() { return ɵɵattributeInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMap", function() { return ɵɵclassMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate1", function() { return ɵɵclassMapInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate2", function() { return ɵɵclassMapInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate3", function() { return ɵɵclassMapInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate4", function() { return ɵɵclassMapInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate5", function() { return ɵɵclassMapInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate6", function() { return ɵɵclassMapInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate7", function() { return ɵɵclassMapInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolate8", function() { return ɵɵclassMapInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassMapInterpolateV", function() { return ɵɵclassMapInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵclassProp", function() { return ɵɵclassProp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵcontentQuery", function() { return ɵɵcontentQuery; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineComponent", function() { return ɵɵdefineComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineDirective", function() { return ɵɵdefineDirective; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjectable", function() { return ɵɵdefineInjectable; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineInjector", function() { return ɵɵdefineInjector; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefineNgModule", function() { return ɵɵdefineNgModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdefinePipe", function() { return ɵɵdefinePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdirectiveInject", function() { return ɵɵdirectiveInject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵdisableBindings", function() { return ɵɵdisableBindings; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelement", function() { return ɵɵelement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainer", function() { return ɵɵelementContainer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerEnd", function() { return ɵɵelementContainerEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementContainerStart", function() { return ɵɵelementContainerStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementEnd", function() { return ɵɵelementEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵelementStart", function() { return ɵɵelementStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵenableBindings", function() { return ɵɵenableBindings; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵgetCurrentView", function() { return ɵɵgetCurrentView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵgetInheritedFactory", function() { return ɵɵgetInheritedFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵhostProperty", function() { return ɵɵhostProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18n", function() { return ɵɵi18n; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nApply", function() { return ɵɵi18nApply; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nAttributes", function() { return ɵɵi18nAttributes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nEnd", function() { return ɵɵi18nEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nExp", function() { return ɵɵi18nExp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nPostprocess", function() { return ɵɵi18nPostprocess; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵi18nStart", function() { return ɵɵi18nStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinject", function() { return ɵɵinject; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinjectAttribute", function() { return ɵɵinjectAttribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinjectPipeChangeDetectorRef", function() { return ɵɵinjectPipeChangeDetectorRef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactory", function() { return ɵɵinvalidFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵinvalidFactoryDep", function() { return ɵɵinvalidFactoryDep; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵlistener", function() { return ɵɵlistener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵloadQuery", function() { return ɵɵloadQuery; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceHTML", function() { return ɵɵnamespaceHTML; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceMathML", function() { return ɵɵnamespaceMathML; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnamespaceSVG", function() { return ɵɵnamespaceSVG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵnextContext", function() { return ɵɵnextContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclareComponent", function() { return ɵɵngDeclareComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclareDirective", function() { return ɵɵngDeclareDirective; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵngDeclarePipe", function() { return ɵɵngDeclarePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipe", function() { return ɵɵpipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind1", function() { return ɵɵpipeBind1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind2", function() { return ɵɵpipeBind2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind3", function() { return ɵɵpipeBind3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBind4", function() { return ɵɵpipeBind4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpipeBindV", function() { return ɵɵpipeBindV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵprojection", function() { return ɵɵprojection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵprojectionDef", function() { return ɵɵprojectionDef; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵproperty", function() { return ɵɵproperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate", function() { return ɵɵpropertyInterpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate1", function() { return ɵɵpropertyInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate2", function() { return ɵɵpropertyInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate3", function() { return ɵɵpropertyInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate4", function() { return ɵɵpropertyInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate5", function() { return ɵɵpropertyInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate6", function() { return ɵɵpropertyInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate7", function() { return ɵɵpropertyInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolate8", function() { return ɵɵpropertyInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpropertyInterpolateV", function() { return ɵɵpropertyInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction0", function() { return ɵɵpureFunction0; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction1", function() { return ɵɵpureFunction1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction2", function() { return ɵɵpureFunction2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction3", function() { return ɵɵpureFunction3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction4", function() { return ɵɵpureFunction4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction5", function() { return ɵɵpureFunction5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction6", function() { return ɵɵpureFunction6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction7", function() { return ɵɵpureFunction7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunction8", function() { return ɵɵpureFunction8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵpureFunctionV", function() { return ɵɵpureFunctionV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵqueryRefresh", function() { return ɵɵqueryRefresh; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵreference", function() { return ɵɵreference; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveBody", function() { return ɵɵresolveBody; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveDocument", function() { return ɵɵresolveDocument; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵresolveWindow", function() { return ɵɵresolveWindow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵrestoreView", function() { return ɵɵrestoreView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeHtml", function() { return ɵɵsanitizeHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeResourceUrl", function() { return ɵɵsanitizeResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeScript", function() { return ɵɵsanitizeScript; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeStyle", function() { return ɵɵsanitizeStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrl", function() { return ɵɵsanitizeUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsanitizeUrlOrResourceUrl", function() { return ɵɵsanitizeUrlOrResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsetComponentScope", function() { return ɵɵsetComponentScope; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsetNgModuleScope", function() { return ɵɵsetNgModuleScope; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMap", function() { return ɵɵstyleMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate1", function() { return ɵɵstyleMapInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate2", function() { return ɵɵstyleMapInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate3", function() { return ɵɵstyleMapInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate4", function() { return ɵɵstyleMapInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate5", function() { return ɵɵstyleMapInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate6", function() { return ɵɵstyleMapInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate7", function() { return ɵɵstyleMapInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolate8", function() { return ɵɵstyleMapInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleMapInterpolateV", function() { return ɵɵstyleMapInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstyleProp", function() { return ɵɵstyleProp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate1", function() { return ɵɵstylePropInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate2", function() { return ɵɵstylePropInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate3", function() { return ɵɵstylePropInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate4", function() { return ɵɵstylePropInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate5", function() { return ɵɵstylePropInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate6", function() { return ɵɵstylePropInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate7", function() { return ɵɵstylePropInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolate8", function() { return ɵɵstylePropInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵstylePropInterpolateV", function() { return ɵɵstylePropInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostListener", function() { return ɵɵsyntheticHostListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵsyntheticHostProperty", function() { return ɵɵsyntheticHostProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtemplate", function() { return ɵɵtemplate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtemplateRefExtractor", function() { return ɵɵtemplateRefExtractor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtext", function() { return ɵɵtext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate", function() { return ɵɵtextInterpolate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate1", function() { return ɵɵtextInterpolate1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate2", function() { return ɵɵtextInterpolate2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate3", function() { return ɵɵtextInterpolate3; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate4", function() { return ɵɵtextInterpolate4; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate5", function() { return ɵɵtextInterpolate5; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate6", function() { return ɵɵtextInterpolate6; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate7", function() { return ɵɵtextInterpolate7; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolate8", function() { return ɵɵtextInterpolate8; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtextInterpolateV", function() { return ɵɵtextInterpolateV; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantHtml", function() { return ɵɵtrustConstantHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵtrustConstantResourceUrl", function() { return ɵɵtrustConstantResourceUrl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵɵviewQuery", function() { return ɵɵviewQuery; }); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/operators */ "kU1M"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getClosureSafeProperty(objWithPropertyToExtract) { for (let key in objWithPropertyToExtract) { if (objWithPropertyToExtract[key] === getClosureSafeProperty) { return key; } } throw Error('Could not find renamed property on target object.'); } /** * Sets properties on a target object from a source object, but only if * the property doesn't already exist on the target object. * @param target The target to set properties on * @param source The source of the property keys and values to set */ function fillProperties(target, source) { for (const key in source) { if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) { target[key] = source[key]; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function stringify(token) { if (typeof token === 'string') { return token; } if (Array.isArray(token)) { return '[' + token.map(stringify).join(', ') + ']'; } if (token == null) { return '' + token; } if (token.overriddenName) { return `${token.overriddenName}`; } if (token.name) { return `${token.name}`; } const res = token.toString(); if (res == null) { return '' + res; } const newLineIndex = res.indexOf('\n'); return newLineIndex === -1 ? res : res.substring(0, newLineIndex); } /** * Concatenates two strings with separator, allocating new strings only when necessary. * * @param before before string. * @param separator separator string. * @param after after string. * @returns concatenated string. */ function concatStringsWithSpace(before, after) { return (before == null || before === '') ? (after === null ? '' : after) : ((after == null || after === '') ? before : before + ' ' + after); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty }); /** * Allows to refer to references which are not yet defined. * * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of * DI is declared, but not yet defined. It is also used when the `token` which we use when creating * a query is not yet defined. * * @usageNotes * ### Example * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'} * @publicApi */ function forwardRef(forwardRefFn) { forwardRefFn.__forward_ref__ = forwardRef; forwardRefFn.toString = function () { return stringify(this()); }; return forwardRefFn; } /** * Lazily retrieves the reference value from a forwardRef. * * Acts as the identity function when given a non-forward-ref value. * * @usageNotes * ### Example * * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'} * * @see `forwardRef` * @publicApi */ function resolveForwardRef(type) { return isForwardRef(type) ? type() : type; } /** Checks whether a function is wrapped by a `forwardRef`. */ function isForwardRef(fn) { return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Base URL for the error details page. // Keep this value in sync with a similar const in // `packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts`. const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors'; class RuntimeError extends Error { constructor(code, message) { super(formatRuntimeError(code, message)); this.code = code; } } // Contains a set of error messages that have details guides at angular.io. // Full list of available error guides can be found at https://angular.io/errors /* tslint:disable:no-toplevel-property-access */ const RUNTIME_ERRORS_WITH_GUIDES = new Set([ "100" /* EXPRESSION_CHANGED_AFTER_CHECKED */, "200" /* CYCLIC_DI_DEPENDENCY */, "201" /* PROVIDER_NOT_FOUND */, "300" /* MULTIPLE_COMPONENTS_MATCH */, "301" /* EXPORT_NOT_FOUND */, "302" /* PIPE_NOT_FOUND */, ]); /* tslint:enable:no-toplevel-property-access */ /** Called to format a runtime error */ function formatRuntimeError(code, message) { const fullCode = code ? `NG0${code}: ` : ''; let errorMessage = `${fullCode}${message}`; // Some runtime errors are still thrown without `ngDevMode` (for example // `throwProviderNotFoundError`), so we add `ngDevMode` check here to avoid pulling // `RUNTIME_ERRORS_WITH_GUIDES` symbol into prod bundles. // TODO: revisit all instances where `RuntimeError` is thrown and see if `ngDevMode` can be added // there instead to tree-shake more devmode-only code (and eventually remove `ngDevMode` check // from this code). if (ngDevMode && RUNTIME_ERRORS_WITH_GUIDES.has(code)) { errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG0${code}`; } return errorMessage; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Used for stringify render output in Ivy. * Important! This function is very performance-sensitive and we should * be extra careful not to introduce megamorphic reads in it. * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations. */ function renderStringify(value) { if (typeof value === 'string') return value; if (value == null) return ''; // Use `String` so that it invokes the `toString` method of the value. Note that this // appears to be faster than calling `value.toString` (see `render_stringify` benchmark). return String(value); } /** * Used to stringify a value so that it can be displayed in an error message. * Important! This function contains a megamorphic read and should only be * used for error messages. */ function stringifyForError(value) { if (typeof value === 'function') return value.name || value.toString(); if (typeof value === 'object' && value != null && typeof value.type === 'function') { return value.type.name || value.type.toString(); } return renderStringify(value); } /** Called when directives inject each other (creating a circular dependency) */ function throwCyclicDependencyError(token, path) { const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : ''; throw new RuntimeError("200" /* CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`); } function throwMixedMultiProviderError() { throw new Error(`Cannot mix multi providers and regular providers`); } function throwInvalidProviderError(ngModuleType, providers, provider) { let ngModuleDetail = ''; if (ngModuleType && providers) { const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...'); ngModuleDetail = ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`; } throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail); } /** Throws an error when a token is not found in DI. */ function throwProviderNotFoundError(token, injectorName) { const injectorDetails = injectorName ? ` in ${injectorName}` : ''; throw new RuntimeError("201" /* PROVIDER_NOT_FOUND */, `No provider for ${stringifyForError(token)} found${injectorDetails}`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function assertNumber(actual, msg) { if (!(typeof actual === 'number')) { throwError(msg, typeof actual, 'number', '==='); } } function assertNumberInRange(actual, minInclusive, maxInclusive) { assertNumber(actual, 'Expected a number'); assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to'); assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to'); } function assertString(actual, msg) { if (!(typeof actual === 'string')) { throwError(msg, actual === null ? 'null' : typeof actual, 'string', '==='); } } function assertFunction(actual, msg) { if (!(typeof actual === 'function')) { throwError(msg, actual === null ? 'null' : typeof actual, 'function', '==='); } } function assertEqual(actual, expected, msg) { if (!(actual == expected)) { throwError(msg, actual, expected, '=='); } } function assertNotEqual(actual, expected, msg) { if (!(actual != expected)) { throwError(msg, actual, expected, '!='); } } function assertSame(actual, expected, msg) { if (!(actual === expected)) { throwError(msg, actual, expected, '==='); } } function assertNotSame(actual, expected, msg) { if (!(actual !== expected)) { throwError(msg, actual, expected, '!=='); } } function assertLessThan(actual, expected, msg) { if (!(actual < expected)) { throwError(msg, actual, expected, '<'); } } function assertLessThanOrEqual(actual, expected, msg) { if (!(actual <= expected)) { throwError(msg, actual, expected, '<='); } } function assertGreaterThan(actual, expected, msg) { if (!(actual > expected)) { throwError(msg, actual, expected, '>'); } } function assertGreaterThanOrEqual(actual, expected, msg) { if (!(actual >= expected)) { throwError(msg, actual, expected, '>='); } } function assertNotDefined(actual, msg) { if (actual != null) { throwError(msg, actual, null, '=='); } } function assertDefined(actual, msg) { if (actual == null) { throwError(msg, actual, null, '!='); } } function throwError(msg, actual, expected, comparison) { throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`)); } function assertDomNode(node) { // If we're in a worker, `Node` will not be defined. if (!(typeof Node !== 'undefined' && node instanceof Node) && !(typeof node === 'object' && node != null && node.constructor.name === 'WebWorkerRenderNode')) { throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`); } } function assertIndexInRange(arr, index) { assertDefined(arr, 'Array must be defined.'); const maxLen = arr.length; if (index < 0 || index >= maxLen) { throwError(`Index expected to be less than ${maxLen} but got ${index}`); } } function assertOneOf(value, ...validValues) { if (validValues.indexOf(value) !== -1) return true; throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and * in which injectors (if any) it will be available. * * This should be assigned to a static `ɵprov` field on a type, which will then be an * `InjectableType`. * * Options: * * `providedIn` determines which injectors will include the injectable, by either associating it * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be * provided in the `'root'` injector, which will be the application-level injector in most apps. * * `factory` gives the zero argument function which will create an instance of the injectable. * The factory can call `inject` to access the `Injector` and request injection of dependencies. * * @codeGenApi * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm. */ function ɵɵdefineInjectable(opts) { return { token: opts.token, providedIn: opts.providedIn || null, factory: opts.factory, value: undefined, }; } /** * @deprecated in v8, delete after v10. This API should be used only by generated code, and that * code should now use ɵɵdefineInjectable instead. * @publicApi */ const defineInjectable = ɵɵdefineInjectable; /** * Construct an `InjectorDef` which configures an injector. * * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an * `InjectorType`. * * Options: * * * `providers`: an optional array of providers to add to the injector. Each provider must * either have a factory or point to a type which has a `ɵprov` static property (the * type must be an `InjectableType`). * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s * whose providers will also be added to the injector. Locally provided types will override * providers from imports. * * @codeGenApi */ function ɵɵdefineInjector(options) { return { providers: options.providers || [], imports: options.imports || [] }; } /** * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading * inherited value. * * @param type A type which may have its own (non-inherited) `ɵprov`. */ function getInjectableDef(type) { return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF); } /** * Return definition only if it is defined directly on `type` and is not inherited from a base * class of `type`. */ function getOwnDefinition(type, field) { return type.hasOwnProperty(field) ? type[field] : null; } /** * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors. * * @param type A type which may have `ɵprov`, via inheritance. * * @deprecated Will be removed in a future version of Angular, where an error will occur in the * scenario if we find the `ɵprov` on an ancestor only. */ function getInheritedInjectableDef(type) { const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]); if (def) { const typeName = getTypeName(type); // TODO(FW-1307): Re-add ngDevMode when closure can handle it // ngDevMode && console.warn(`DEPRECATED: DI is instantiating a token "${typeName}" that inherits its @Injectable decorator but does not provide one itself.\n` + `This will become an error in a future version of Angular. Please add @Injectable() to the "${typeName}" class.`); return def; } else { return null; } } /** Gets the name of a type, accounting for some cross-browser differences. */ function getTypeName(type) { // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers // it'll always return the name of the function itself, no matter how many other functions it // inherits from. On IE the function doesn't have its own `name` property, but it takes it from // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around // the issue by converting the function to a string and parsing its name out that way via a regex. if (type.hasOwnProperty('name')) { return type.name; } const match = ('' + type).match(/^function\s*([^\s(]+)/); return match === null ? '' : match[1]; } /** * Read the injector def type in a way which is immune to accidentally reading inherited value. * * @param type type which may have an injector def (`ɵinj`) */ function getInjectorDef(type) { return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null; } const NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty }); const NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty }); // We need to keep these around so we can read off old defs if new defs are unavailable const NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty }); const NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Injection flags for DI. * * @publicApi */ var InjectFlags; (function (InjectFlags) { // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer // writes exports of it into ngfactory files. /** Check self and check parent injector if needed */ InjectFlags[InjectFlags["Default"] = 0] = "Default"; /** * Specifies that an injector should retrieve a dependency from any injector until reaching the * host element of the current component. (Only used with Element Injector) */ InjectFlags[InjectFlags["Host"] = 1] = "Host"; /** Don't ascend to ancestors of the node requesting injection. */ InjectFlags[InjectFlags["Self"] = 2] = "Self"; /** Skip the node that is requesting injection. */ InjectFlags[InjectFlags["SkipSelf"] = 4] = "SkipSelf"; /** Inject `defaultValue` instead if token not found. */ InjectFlags[InjectFlags["Optional"] = 8] = "Optional"; })(InjectFlags || (InjectFlags = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Current implementation of inject. * * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this * way for two reasons: * 1. `Injector` should not depend on ivy logic. * 2. To maintain tree shake-ability we don't want to bring in unnecessary code. */ let _injectImplementation; function getInjectImplementation() { return _injectImplementation; } /** * Sets the current inject implementation. */ function setInjectImplementation(impl) { const previous = _injectImplementation; _injectImplementation = impl; return previous; } /** * Injects `root` tokens in limp mode. * * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to * `"root"`. This is known as the limp mode injection. In such case the value is stored in the * `InjectableDef`. */ function injectRootLimpMode(token, notFoundValue, flags) { const injectableDef = getInjectableDef(token); if (injectableDef && injectableDef.providedIn == 'root') { return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value; } if (flags & InjectFlags.Optional) return null; if (notFoundValue !== undefined) return notFoundValue; throwProviderNotFoundError(stringify(token), 'Injector'); } /** * Assert that `_injectImplementation` is not `fn`. * * This is useful, to prevent infinite recursion. * * @param fn Function which it should not equal to */ function assertInjectImplementationNotEqual(fn) { ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Convince closure compiler that the wrapped function has no side-effects. * * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to * allow us to execute a function but have closure compiler mark the call as no-side-effects. * It is important that the return value for the `noSideEffects` function be assigned * to something which is retained otherwise the call to `noSideEffects` will be removed by closure * compiler. */ function noSideEffects(fn) { return { toString: fn }.toString(); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The strategy that the default change detector uses to detect changes. * When set, takes effect the next time change detection is triggered. * * @see {@link ChangeDetectorRef#usage-notes Change detection usage} * * @publicApi */ var ChangeDetectionStrategy; (function (ChangeDetectionStrategy) { /** * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated * until reactivated by setting the strategy to `Default` (`CheckAlways`). * Change detection can still be explicitly invoked. * This strategy applies to all child directives and cannot be overridden. */ ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; /** * Use the default `CheckAlways` strategy, in which change detection is automatic until * explicitly deactivated. */ ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); /** * Defines the possible states of the default change detector. * @see `ChangeDetectorRef` */ var ChangeDetectorStatus; (function (ChangeDetectorStatus) { /** * A state in which, after calling `detectChanges()`, the change detector * state becomes `Checked`, and must be explicitly invoked or reactivated. */ ChangeDetectorStatus[ChangeDetectorStatus["CheckOnce"] = 0] = "CheckOnce"; /** * A state in which change detection is skipped until the change detector mode * becomes `CheckOnce`. */ ChangeDetectorStatus[ChangeDetectorStatus["Checked"] = 1] = "Checked"; /** * A state in which change detection continues automatically until explicitly * deactivated. */ ChangeDetectorStatus[ChangeDetectorStatus["CheckAlways"] = 2] = "CheckAlways"; /** * A state in which a change detector sub tree is not a part of the main tree and * should be skipped. */ ChangeDetectorStatus[ChangeDetectorStatus["Detached"] = 3] = "Detached"; /** * Indicates that the change detector encountered an error checking a binding * or calling a directive lifecycle method and is now in an inconsistent state. Change * detectors in this state do not detect changes. */ ChangeDetectorStatus[ChangeDetectorStatus["Errored"] = 4] = "Errored"; /** * Indicates that the change detector has been destroyed. */ ChangeDetectorStatus[ChangeDetectorStatus["Destroyed"] = 5] = "Destroyed"; })(ChangeDetectorStatus || (ChangeDetectorStatus = {})); /** * Reports whether a given strategy is currently the default for change detection. * @param changeDetectionStrategy The strategy to check. * @returns True if the given strategy is the current default, false otherwise. * @see `ChangeDetectorStatus` * @see `ChangeDetectorRef` */ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) { return changeDetectionStrategy == null || changeDetectionStrategy === ChangeDetectionStrategy.Default; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines template and style encapsulation options available for Component's {@link Component}. * * See {@link Component#encapsulation encapsulation}. * * @usageNotes * ### Example * * {@example core/ts/metadata/encapsulation.ts region='longform'} * * @publicApi */ var ViewEncapsulation; (function (ViewEncapsulation) { /** * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host * Element and pre-processing the style rules provided via {@link Component#styles styles} or * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all * selectors. * * This is the default option. */ ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11. /** * Don't provide any template or style encapsulation. */ ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; /** * Use Shadow DOM to encapsulate styles. * * For the DOM this means using modern [Shadow * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and * creating a ShadowRoot for Component's Host Element. */ ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; })(ViewEncapsulation || (ViewEncapsulation = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const __globalThis = typeof globalThis !== 'undefined' && globalThis; const __window = typeof window !== 'undefined' && window; const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && self; const __global = typeof global !== 'undefined' && global; // Always use __globalThis if available, which is the spec-defined global variable across all // environments, then fallback to __global first, because in Node tests both __global and // __window may be defined and _global should be __global in that case. const _global = __globalThis || __global || __window || __self; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function ngDevModeResetPerfCounters() { const locationString = typeof location !== 'undefined' ? location.toString() : ''; const newCounters = { namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1, firstCreatePass: 0, tNode: 0, tView: 0, rendererCreateTextNode: 0, rendererSetText: 0, rendererCreateElement: 0, rendererAddEventListener: 0, rendererSetAttribute: 0, rendererRemoveAttribute: 0, rendererSetProperty: 0, rendererSetClassName: 0, rendererAddClass: 0, rendererRemoveClass: 0, rendererSetStyle: 0, rendererRemoveStyle: 0, rendererDestroy: 0, rendererDestroyNode: 0, rendererMoveNode: 0, rendererRemoveNode: 0, rendererAppendChild: 0, rendererInsertBefore: 0, rendererCreateComment: 0, }; // Make sure to refer to ngDevMode as ['ngDevMode'] for closure. const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1; _global['ngDevMode'] = allowNgDevModeTrue && newCounters; return newCounters; } /** * This function checks to see if the `ngDevMode` has been set. If yes, * then we honor it, otherwise we default to dev mode with additional checks. * * The idea is that unless we are doing production build where we explicitly * set `ngDevMode == false` we should be helping the developer by providing * as much early warning and errors as possible. * * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode * is defined for the entire instruction set. * * When checking `ngDevMode` on toplevel, always init it before referencing it * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595. * * Details on possible values for `ngDevMode` can be found on its docstring. * * NOTE: * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`. */ function initNgDevMode() { // The below checks are to ensure that calling `initNgDevMode` multiple times does not // reset the counters. // If the `ngDevMode` is not an object, then it means we have not created the perf counters // yet. if (typeof ngDevMode === 'undefined' || ngDevMode) { if (typeof ngDevMode !== 'object') { ngDevModeResetPerfCounters(); } return typeof ngDevMode !== 'undefined' && !!ngDevMode; } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file contains reuseable "empty" symbols that can be used as default return values * in different parts of the rendering code. Because the same symbols are returned, this * allows for identity checks against these values to be consistently used by the framework * code. */ const EMPTY_OBJ = {}; const EMPTY_ARRAY = []; // freezing the values prevents any code from accidentally inserting new values in if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) { // These property accesses can be ignored because ngDevMode will be set to false // when optimizing code and the whole if statement will be dropped. // tslint:disable-next-line:no-toplevel-property-access Object.freeze(EMPTY_OBJ); // tslint:disable-next-line:no-toplevel-property-access Object.freeze(EMPTY_ARRAY); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file contains reuseable "empty" symbols that can be used as default return values * in different parts of the rendering code. Because the same symbols are returned, this * allows for identity checks against these values to be consistently used by the framework * code. */ const EMPTY_ARRAY$1 = []; // freezing the values prevents any code from accidentally inserting new values in if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) { // These property accesses can be ignored because ngDevMode will be set to false // when optimizing code and the whole if statement will be dropped. // tslint:disable-next-line:no-toplevel-property-access Object.freeze(EMPTY_ARRAY$1); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty }); const NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty }); const NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty }); const NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty }); const NG_LOC_ID_DEF = getClosureSafeProperty({ ɵloc: getClosureSafeProperty }); const NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: getClosureSafeProperty }); /** * If a directive is diPublic, bloomAdd sets a property on the type with this constant as * the key and the directive's unique ID as the value. This allows us to map directives to their * bloom filter bit for DI. */ // TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified. const NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _renderCompCount = 0; /** * Create a component definition object. * * * # Example * ``` * class MyDirective { * // Generated by Angular Template Compiler * // [Symbol] syntax will not be supported by TypeScript until v2.7 * static ɵcmp = defineComponent({ * ... * }); * } * ``` * @codeGenApi */ function ɵɵdefineComponent(componentDefinition) { return noSideEffects(() => { // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent. // See the `initNgDevMode` docstring for more information. (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode(); const type = componentDefinition.type; const declaredInputs = {}; const def = { type: type, providersResolver: null, decls: componentDefinition.decls, vars: componentDefinition.vars, factory: null, template: componentDefinition.template || null, consts: componentDefinition.consts || null, ngContentSelectors: componentDefinition.ngContentSelectors, hostBindings: componentDefinition.hostBindings || null, hostVars: componentDefinition.hostVars || 0, hostAttrs: componentDefinition.hostAttrs || null, contentQueries: componentDefinition.contentQueries || null, declaredInputs: declaredInputs, inputs: null, outputs: null, exportAs: componentDefinition.exportAs || null, onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush, directiveDefs: null, pipeDefs: null, selectors: componentDefinition.selectors || EMPTY_ARRAY$1, viewQuery: componentDefinition.viewQuery || null, features: componentDefinition.features || null, data: componentDefinition.data || {}, // TODO(misko): convert ViewEncapsulation into const enum so that it can be used // directly in the next line. Also `None` should be 0 not 2. encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated, id: 'c', styles: componentDefinition.styles || EMPTY_ARRAY$1, _: null, setInput: null, schemas: componentDefinition.schemas || null, tView: null, }; const directiveTypes = componentDefinition.directives; const feature = componentDefinition.features; const pipeTypes = componentDefinition.pipes; def.id += _renderCompCount++; def.inputs = invertObject(componentDefinition.inputs, declaredInputs), def.outputs = invertObject(componentDefinition.outputs), feature && feature.forEach((fn) => fn(def)); def.directiveDefs = directiveTypes ? () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes) .map(extractDirectiveDef) : null; def.pipeDefs = pipeTypes ? () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) : null; return def; }); } /** * Generated next to NgModules to monkey-patch directive and pipe references onto a component's * definition, when generating a direct reference in the component file would otherwise create an * import cycle. * * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details. * * @codeGenApi */ function ɵɵsetComponentScope(type, directives, pipes) { const def = type.ɵcmp; def.directiveDefs = () => directives.map(extractDirectiveDef); def.pipeDefs = () => pipes.map(extractPipeDef); } function extractDirectiveDef(type) { const def = getComponentDef(type) || getDirectiveDef(type); if (ngDevMode && !def) { throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`); } return def; } function extractPipeDef(type) { const def = getPipeDef(type); if (ngDevMode && !def) { throw new Error(`'${type.name}' is not a 'PipeType'.`); } return def; } const autoRegisterModuleById = {}; /** * @codeGenApi */ function ɵɵdefineNgModule(def) { const res = { type: def.type, bootstrap: def.bootstrap || EMPTY_ARRAY$1, declarations: def.declarations || EMPTY_ARRAY$1, imports: def.imports || EMPTY_ARRAY$1, exports: def.exports || EMPTY_ARRAY$1, transitiveCompileScopes: null, schemas: def.schemas || null, id: def.id || null, }; if (def.id != null) { noSideEffects(() => { autoRegisterModuleById[def.id] = def.type; }); } return res; } /** * Adds the module metadata that is necessary to compute the module's transitive scope to an * existing module definition. * * Scope metadata of modules is not used in production builds, so calls to this function can be * marked pure to tree-shake it from the bundle, allowing for all referenced declarations * to become eligible for tree-shaking as well. * * @codeGenApi */ function ɵɵsetNgModuleScope(type, scope) { return noSideEffects(() => { const ngModuleDef = getNgModuleDef(type, true); ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY$1; ngModuleDef.imports = scope.imports || EMPTY_ARRAY$1; ngModuleDef.exports = scope.exports || EMPTY_ARRAY$1; }); } /** * Inverts an inputs or outputs lookup such that the keys, which were the * minified keys, are part of the values, and the values are parsed so that * the publicName of the property is the new key * * e.g. for * * ``` * class Comp { * @Input() * propName1: string; * * @Input('publicName2') * declaredPropName2: number; * } * ``` * * will be serialized as * * ``` * { * propName1: 'propName1', * declaredPropName2: ['publicName2', 'declaredPropName2'], * } * ``` * * which is than translated by the minifier as: * * ``` * { * minifiedPropName1: 'propName1', * minifiedPropName2: ['publicName2', 'declaredPropName2'], * } * ``` * * becomes: (public name => minifiedName) * * ``` * { * 'propName1': 'minifiedPropName1', * 'publicName2': 'minifiedPropName2', * } * ``` * * Optionally the function can take `secondary` which will result in: (public name => declared name) * * ``` * { * 'propName1': 'propName1', * 'publicName2': 'declaredPropName2', * } * ``` * */ function invertObject(obj, secondary) { if (obj == null) return EMPTY_OBJ; const newLookup = {}; for (const minifiedKey in obj) { if (obj.hasOwnProperty(minifiedKey)) { let publicName = obj[minifiedKey]; let declaredName = publicName; if (Array.isArray(publicName)) { declaredName = publicName[1]; publicName = publicName[0]; } newLookup[publicName] = minifiedKey; if (secondary) { (secondary[publicName] = declaredName); } } } return newLookup; } /** * Create a directive definition object. * * # Example * ```ts * class MyDirective { * // Generated by Angular Template Compiler * // [Symbol] syntax will not be supported by TypeScript until v2.7 * static ɵdir = ɵɵdefineDirective({ * ... * }); * } * ``` * * @codeGenApi */ const ɵɵdefineDirective = ɵɵdefineComponent; /** * Create a pipe definition object. * * # Example * ``` * class MyPipe implements PipeTransform { * // Generated by Angular Template Compiler * static ɵpipe = definePipe({ * ... * }); * } * ``` * @param pipeDef Pipe definition generated by the compiler * * @codeGenApi */ function ɵɵdefinePipe(pipeDef) { return { type: pipeDef.type, name: pipeDef.name, factory: null, pure: pipeDef.pure !== false, onDestroy: pipeDef.type.prototype.ngOnDestroy || null }; } /** * The following getter methods retrieve the definition from the type. Currently the retrieval * honors inheritance, but in the future we may change the rule to require that definitions are * explicit. This would require some sort of migration strategy. */ function getComponentDef(type) { return type[NG_COMP_DEF] || null; } function getDirectiveDef(type) { return type[NG_DIR_DEF] || null; } function getPipeDef(type) { return type[NG_PIPE_DEF] || null; } function getNgModuleDef(type, throwNotFound) { const ngModuleDef = type[NG_MOD_DEF] || null; if (!ngModuleDef && throwNotFound === true) { throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`); } return ngModuleDef; } function getNgLocaleIdDef(type) { return type[NG_LOC_ID_DEF] || null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Below are constants for LView indices to help us look up LView members // without having to remember the specific indices. // Uglify will inline these when minifying so there shouldn't be a cost. const HOST = 0; const TVIEW = 1; const FLAGS = 2; const PARENT = 3; const NEXT = 4; const TRANSPLANTED_VIEWS_TO_REFRESH = 5; const T_HOST = 6; const CLEANUP = 7; const CONTEXT = 8; const INJECTOR = 9; const RENDERER_FACTORY = 10; const RENDERER = 11; const SANITIZER = 12; const CHILD_HEAD = 13; const CHILD_TAIL = 14; // FIXME(misko): Investigate if the three declarations aren't all same thing. const DECLARATION_VIEW = 15; const DECLARATION_COMPONENT_VIEW = 16; const DECLARATION_LCONTAINER = 17; const PREORDER_HOOK_FLAGS = 18; const QUERIES = 19; /** * Size of LView's header. Necessary to adjust for it when setting slots. * * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate * instruction index into `LView` index. All other indexes should be in the `LView` index space and * there should be no need to refer to `HEADER_OFFSET` anywhere else. */ const HEADER_OFFSET = 20; /** * Converts `TViewType` into human readable text. * Make sure this matches with `TViewType` */ const TViewTypeAsString = [ 'Root', 'Component', 'Embedded', ]; // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Special location which allows easy identification of type. If we have an array which was * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is * `LContainer`. */ const TYPE = 1; /** * Below are constants for LContainer indices to help us look up LContainer members * without having to remember the specific indices. * Uglify will inline these when minifying so there shouldn't be a cost. */ /** * Flag to signify that this `LContainer` may have transplanted views which need to be change * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`. * * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify * that the `MOVED_VIEWS` are transplanted and on-push. */ const HAS_TRANSPLANTED_VIEWS = 2; // PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5 // As we already have these constants in LView, we don't need to re-create them. // T_HOST is index 6 // We already have this constants in LView, we don't need to re-create it. const NATIVE = 7; const VIEW_REFS = 8; const MOVED_VIEWS = 9; /** * Size of LContainer's header. Represents the index after which all views in the * container will be inserted. We need to keep a record of current views so we know * which views are already in the DOM (and don't need to be re-added) and so we can * remove views from the DOM when they are no longer required. */ const CONTAINER_HEADER_OFFSET = 10; // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$1 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * True if `value` is `LView`. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function isLView(value) { return Array.isArray(value) && typeof value[TYPE] === 'object'; } /** * True if `value` is `LContainer`. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function isLContainer(value) { return Array.isArray(value) && value[TYPE] === true; } function isContentQueryHost(tNode) { return (tNode.flags & 8 /* hasContentQuery */) !== 0; } function isComponentHost(tNode) { return (tNode.flags & 2 /* isComponentHost */) === 2 /* isComponentHost */; } function isDirectiveHost(tNode) { return (tNode.flags & 1 /* isDirectiveHost */) === 1 /* isDirectiveHost */; } function isComponentDef(def) { return def.template !== null; } function isRootView(target) { return (target[FLAGS] & 512 /* IsRoot */) !== 0; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // [Assert functions do not constraint type when they are guarded by a truthy // expression.](https://github.com/microsoft/TypeScript/issues/37295) function assertTNodeForLView(tNode, lView) { assertTNodeForTView(tNode, lView[TVIEW]); } function assertTNodeForTView(tNode, tView) { assertTNode(tNode); tNode.hasOwnProperty('tView_') && assertEqual(tNode.tView_, tView, 'This TNode does not belong to this TView.'); } function assertTNode(tNode) { assertDefined(tNode, 'TNode must be defined'); if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) { throwError('Not of type TNode, got: ' + tNode); } } function assertTIcu(tIcu) { assertDefined(tIcu, 'Expected TIcu to be defined'); if (!(typeof tIcu.currentCaseLViewIndex === 'number')) { throwError('Object is not of TIcu type.'); } } function assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \'ɵcmp\' property.') { if (!getComponentDef(actual)) { throwError(msg); } } function assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \'ɵmod\' property.') { if (!getNgModuleDef(actual)) { throwError(msg); } } function assertCurrentTNodeIsParent(isParent) { assertEqual(isParent, true, 'currentTNode should be a parent'); } function assertHasParent(tNode) { assertDefined(tNode, 'currentTNode should exist!'); assertDefined(tNode.parent, 'currentTNode should have a parent'); } function assertDataNext(lView, index, arr) { if (arr == null) arr = lView; assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`); } function assertLContainer(value) { assertDefined(value, 'LContainer must be defined'); assertEqual(isLContainer(value), true, 'Expecting LContainer'); } function assertLViewOrUndefined(value) { value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null'); } function assertLView(value) { assertDefined(value, 'LView must be defined'); assertEqual(isLView(value), true, 'Expecting LView'); } function assertFirstCreatePass(tView, errMessage) { assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.'); } function assertFirstUpdatePass(tView, errMessage) { assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.'); } /** * This is a basic sanity check that an object is probably a directive def. DirectiveDef is * an interface, so we can't do a direct instanceof check. */ function assertDirectiveDef(obj) { if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) { throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`); } } function assertIndexInDeclRange(lView, index) { const tView = lView[1]; assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index); } function assertIndexInVarsRange(lView, index) { const tView = lView[1]; assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index); } function assertIndexInExpandoRange(lView, index) { const tView = lView[1]; assertBetween(tView.expandoStartIndex, lView.length, index); } function assertBetween(lower, upper, index) { if (!(lower <= index && index < upper)) { throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`); } } function assertProjectionSlots(lView, errMessage) { assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.'); assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage || 'Components with projection nodes (<ng-content>) must have projection slots defined.'); } function assertParentView(lView, errMessage) { assertDefined(lView, errMessage || 'Component views should always have a parent view (component\'s host view)'); } /** * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a * NodeInjector data structure. * * @param lView `LView` which should be checked. * @param injectorIndex index into the `LView` where the `NodeInjector` is expected. */ function assertNodeInjector(lView, injectorIndex) { assertIndexInExpandoRange(lView, injectorIndex); assertIndexInExpandoRange(lView, injectorIndex + 8 /* PARENT */); assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter'); assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getFactoryDef(type, throwNotFound) { const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF); if (!hasFactoryDef && throwNotFound === true && ngDevMode) { throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`); } return hasFactoryDef ? type[NG_FACTORY_DEF] : null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents a basic change from a previous to a new value for a single * property on a directive instance. Passed as a value in a * {@link SimpleChanges} object to the `ngOnChanges` hook. * * @see `OnChanges` * * @publicApi */ class SimpleChange { constructor(previousValue, currentValue, firstChange) { this.previousValue = previousValue; this.currentValue = currentValue; this.firstChange = firstChange; } /** * Check whether the new value is the first value assigned. */ isFirstChange() { return this.firstChange; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The NgOnChangesFeature decorates a component with support for the ngOnChanges * lifecycle hook, so it should be included in any component that implements * that hook. * * If the component or directive uses inheritance, the NgOnChangesFeature MUST * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise * inherited properties will not be propagated to the ngOnChanges lifecycle * hook. * * Example usage: * * ``` * static ɵcmp = defineComponent({ * ... * inputs: {name: 'publicName'}, * features: [NgOnChangesFeature] * }); * ``` * * @codeGenApi */ function ɵɵNgOnChangesFeature() { return NgOnChangesFeatureImpl; } function NgOnChangesFeatureImpl(definition) { if (definition.type.prototype.ngOnChanges) { definition.setInput = ngOnChangesSetInput; } return rememberChangeHistoryAndInvokeOnChangesHook; } // This option ensures that the ngOnChanges lifecycle hook will be inherited // from superclasses (in InheritDefinitionFeature). /** @nocollapse */ // tslint:disable-next-line:no-toplevel-property-access ɵɵNgOnChangesFeature.ngInherit = true; /** * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate * `ngOnChanges`. * * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are * found it invokes `ngOnChanges` on the component instance. * * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`, * it is guaranteed to be called with component instance. */ function rememberChangeHistoryAndInvokeOnChangesHook() { const simpleChangesStore = getSimpleChangesStore(this); const current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current; if (current) { const previous = simpleChangesStore.previous; if (previous === EMPTY_OBJ) { simpleChangesStore.previous = current; } else { // New changes are copied to the previous store, so that we don't lose history for inputs // which were not changed this time for (let key in current) { previous[key] = current[key]; } } simpleChangesStore.current = null; this.ngOnChanges(current); } } function ngOnChangesSetInput(instance, value, publicName, privateName) { const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null }); const current = simpleChangesStore.current || (simpleChangesStore.current = {}); const previous = simpleChangesStore.previous; const declaredName = this.declaredInputs[publicName]; const previousChange = previous[declaredName]; current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ); instance[privateName] = value; } const SIMPLE_CHANGES_STORE = '__ngSimpleChanges__'; function getSimpleChangesStore(instance) { return instance[SIMPLE_CHANGES_STORE] || null; } function setSimpleChangesStore(instance, store) { return instance[SIMPLE_CHANGES_STORE] = store; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let profilerCallback = null; /** * Sets the callback function which will be invoked before and after performing certain actions at * runtime (for example, before and after running change detection). * * Warning: this function is *INTERNAL* and should not be relied upon in application's code. * The contract of the function might be changed in any release and/or the function can be removed * completely. * * @param profiler function provided by the caller or null value to disable profiling. */ const setProfiler = (profiler) => { profilerCallback = profiler; }; /** * Profiler function which wraps user code executed by the runtime. * * @param event ProfilerEvent corresponding to the execution context * @param instance component instance * @param hookOrListener lifecycle hook function or output listener. The value depends on the * execution context * @returns */ const profiler = function (event, instance, hookOrListener) { if (profilerCallback != null /* both `null` and `undefined` */) { profilerCallback(event, instance, hookOrListener); } }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; const MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/'; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This property will be monkey-patched on elements, components and directives */ const MONKEY_PATCH_KEY_NAME = '__ngContext__'; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Most of the use of `document` in Angular is from within the DI system so it is possible to simply * inject the `DOCUMENT` token and are done. * * Ivy is special because it does not rely upon the DI and must get hold of the document some other * way. * * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy. * Wherever ivy needs the global document, it calls `getDocument()` instead. * * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to * tell ivy what the global `document` is. * * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`) * by calling `setDocument()` when providing the `DOCUMENT` token. */ let DOCUMENT = undefined; /** * Tell ivy what the `document` is for this platform. * * It is only necessary to call this if the current platform is not a browser. * * @param document The object representing the global `document` in this environment. */ function setDocument(document) { DOCUMENT = document; } /** * Access the object that represents the `document` for this platform. * * Ivy calls this whenever it needs to access the `document` object. * For example to create the renderer or to do sanitization. */ function getDocument() { if (DOCUMENT !== undefined) { return DOCUMENT; } else if (typeof document !== 'undefined') { return document; } // No "document" can be found. This should only happen if we are running ivy outside Angular and // the current platform is not a browser. Since this is not a supported scenario at the moment // this should not happen in Angular apps. // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a // public API. Meanwhile we just return `undefined` and let the application fail. return undefined; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // TODO: cleanup once the code is merged in angular/angular var RendererStyleFlags3; (function (RendererStyleFlags3) { RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important"; RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase"; })(RendererStyleFlags3 || (RendererStyleFlags3 = {})); /** Returns whether the `renderer` is a `ProceduralRenderer3` */ function isProceduralRenderer(renderer) { return !!(renderer.listen); } const ɵ0 = (hostElement, rendererType) => { return getDocument(); }; const domRendererFactory3 = { createRenderer: ɵ0 }; // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$2 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`) * in same location in `LView`. This is because we don't want to pre-allocate space for it * because the storage is sparse. This file contains utilities for dealing with such data types. * * How do we know what is stored at a given location in `LView`. * - `Array.isArray(value) === false` => `RNode` (The normal storage value) * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value. * - `typeof value[TYPE] === 'object'` => `LView` * - This happens when we have a component at a given location * - `typeof value[TYPE] === true` => `LContainer` * - This happens when we have `LContainer` binding at a given location. * * * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient. */ /** * Returns `RNode`. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function unwrapRNode(value) { while (Array.isArray(value)) { value = value[HOST]; } return value; } /** * Returns `LView` or `null` if not found. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function unwrapLView(value) { while (Array.isArray(value)) { // This check is same as `isLView()` but we don't call at as we don't want to call // `Array.isArray()` twice and give JITer more work for inlining. if (typeof value[TYPE] === 'object') return value; value = value[HOST]; } return null; } /** * Returns `LContainer` or `null` if not found. * @param value wrapped value of `RNode`, `LView`, `LContainer` */ function unwrapLContainer(value) { while (Array.isArray(value)) { // This check is same as `isLContainer()` but we don't call at as we don't want to call // `Array.isArray()` twice and give JITer more work for inlining. if (value[TYPE] === true) return value; value = value[HOST]; } return null; } /** * Retrieves an element value from the provided `viewData`, by unwrapping * from any containers, component views, or style contexts. */ function getNativeByIndex(index, lView) { ngDevMode && assertIndexInRange(lView, index); ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET'); return unwrapRNode(lView[index]); } /** * Retrieve an `RNode` for a given `TNode` and `LView`. * * This function guarantees in dev mode to retrieve a non-null `RNode`. * * @param tNode * @param lView */ function getNativeByTNode(tNode, lView) { ngDevMode && assertTNodeForLView(tNode, lView); ngDevMode && assertIndexInRange(lView, tNode.index); const node = unwrapRNode(lView[tNode.index]); ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node); return node; } /** * Retrieve an `RNode` or `null` for a given `TNode` and `LView`. * * Some `TNode`s don't have associated `RNode`s. For example `Projection` * * @param tNode * @param lView */ function getNativeByTNodeOrNull(tNode, lView) { const index = tNode === null ? -1 : tNode.index; if (index !== -1) { ngDevMode && assertTNodeForLView(tNode, lView); const node = unwrapRNode(lView[index]); ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node); return node; } return null; } // fixme(misko): The return Type should be `TNode|null` function getTNode(tView, index) { ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode'); ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode'); const tNode = tView.data[index]; ngDevMode && tNode !== null && assertTNode(tNode); return tNode; } /** Retrieves a value from any `LView` or `TData`. */ function load(view, index) { ngDevMode && assertIndexInRange(view, index); return view[index]; } function getComponentLViewByIndex(nodeIndex, hostView) { // Could be an LView or an LContainer. If LContainer, unwrap to find LView. ngDevMode && assertIndexInRange(hostView, nodeIndex); const slotValue = hostView[nodeIndex]; const lView = isLView(slotValue) ? slotValue : slotValue[HOST]; return lView; } /** * Returns the monkey-patch value data present on the target (which could be * a component, directive or a DOM node). */ function readPatchedData(target) { ngDevMode && assertDefined(target, 'Target expected'); return target[MONKEY_PATCH_KEY_NAME] || null; } function readPatchedLView(target) { const value = readPatchedData(target); if (value) { return Array.isArray(value) ? value : value.lView; } return null; } /** Checks whether a given view is in creation mode */ function isCreationMode(view) { return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */; } /** * Returns a boolean for whether the view is attached to the change detection tree. * * Note: This determines whether a view should be checked, not whether it's inserted * into a container. For that, you'll want `viewAttachedToContainer` below. */ function viewAttachedToChangeDetector(view) { return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */; } /** Returns a boolean for whether the view is attached to a container. */ function viewAttachedToContainer(view) { return isLContainer(view[PARENT]); } function getConstant(consts, index) { if (index === null || index === undefined) return null; ngDevMode && assertIndexInRange(consts, index); return consts[index]; } /** * Resets the pre-order hook flags of the view. * @param lView the LView on which the flags are reset */ function resetPreOrderHookFlags(lView) { lView[PREORDER_HOOK_FLAGS] = 0; } /** * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents * whose * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh * or * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh */ function updateTransplantedViewCount(lContainer, amount) { lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount; let viewOrContainer = lContainer; let parent = lContainer[PARENT]; while (parent !== null && ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) || (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) { parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount; viewOrContainer = parent; parent = parent[PARENT]; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const instructionState = { lFrame: createLFrame(null), bindingsEnabled: true, isInCheckNoChangesMode: false, }; /** * Returns true if the instruction state stack is empty. * * Intended to be called from tests only (tree shaken otherwise). */ function specOnlyIsInstructionStateEmpty() { return instructionState.lFrame.parent === null; } function getElementDepthCount() { return instructionState.lFrame.elementDepthCount; } function increaseElementDepthCount() { instructionState.lFrame.elementDepthCount++; } function decreaseElementDepthCount() { instructionState.lFrame.elementDepthCount--; } function getBindingsEnabled() { return instructionState.bindingsEnabled; } /** * Enables directive matching on elements. * * * Example: * ``` * <my-comp my-directive> * Should match component / directive. * </my-comp> * <div ngNonBindable> * <!-- ɵɵdisableBindings() --> * <my-comp my-directive> * Should not match component / directive because we are in ngNonBindable. * </my-comp> * <!-- ɵɵenableBindings() --> * </div> * ``` * * @codeGenApi */ function ɵɵenableBindings() { instructionState.bindingsEnabled = true; } /** * Disables directive matching on element. * * * Example: * ``` * <my-comp my-directive> * Should match component / directive. * </my-comp> * <div ngNonBindable> * <!-- ɵɵdisableBindings() --> * <my-comp my-directive> * Should not match component / directive because we are in ngNonBindable. * </my-comp> * <!-- ɵɵenableBindings() --> * </div> * ``` * * @codeGenApi */ function ɵɵdisableBindings() { instructionState.bindingsEnabled = false; } /** * Return the current `LView`. */ function getLView() { return instructionState.lFrame.lView; } /** * Return the current `TView`. */ function getTView() { return instructionState.lFrame.tView; } /** * Restores `contextViewData` to the given OpaqueViewState instance. * * Used in conjunction with the getCurrentView() instruction to save a snapshot * of the current view and restore it when listeners are invoked. This allows * walking the declaration view tree in listeners to get vars from parent views. * * @param viewToRestore The OpaqueViewState instance to restore. * * @codeGenApi */ function ɵɵrestoreView(viewToRestore) { instructionState.lFrame.contextLView = viewToRestore; } function getCurrentTNode() { let currentTNode = getCurrentTNodePlaceholderOk(); while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) { currentTNode = currentTNode.parent; } return currentTNode; } function getCurrentTNodePlaceholderOk() { return instructionState.lFrame.currentTNode; } function getCurrentParentTNode() { const lFrame = instructionState.lFrame; const currentTNode = lFrame.currentTNode; return lFrame.isParent ? currentTNode : currentTNode.parent; } function setCurrentTNode(tNode, isParent) { ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView); const lFrame = instructionState.lFrame; lFrame.currentTNode = tNode; lFrame.isParent = isParent; } function isCurrentTNodeParent() { return instructionState.lFrame.isParent; } function setCurrentTNodeAsNotParent() { instructionState.lFrame.isParent = false; } function setCurrentTNodeAsParent() { instructionState.lFrame.isParent = true; } function getContextLView() { return instructionState.lFrame.contextLView; } function isInCheckNoChangesMode() { // TODO(misko): remove this from the LView since it is ngDevMode=true mode only. return instructionState.isInCheckNoChangesMode; } function setIsInCheckNoChangesMode(mode) { instructionState.isInCheckNoChangesMode = mode; } // top level variables should not be exported for performance reasons (PERF_NOTES.md) function getBindingRoot() { const lFrame = instructionState.lFrame; let index = lFrame.bindingRootIndex; if (index === -1) { index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex; } return index; } function getBindingIndex() { return instructionState.lFrame.bindingIndex; } function setBindingIndex(value) { return instructionState.lFrame.bindingIndex = value; } function nextBindingIndex() { return instructionState.lFrame.bindingIndex++; } function incrementBindingIndex(count) { const lFrame = instructionState.lFrame; const index = lFrame.bindingIndex; lFrame.bindingIndex = lFrame.bindingIndex + count; return index; } function isInI18nBlock() { return instructionState.lFrame.inI18n; } function setInI18nBlock(isInI18nBlock) { instructionState.lFrame.inI18n = isInI18nBlock; } /** * Set a new binding root index so that host template functions can execute. * * Bindings inside the host template are 0 index. But because we don't know ahead of time * how many host bindings we have we can't pre-compute them. For this reason they are all * 0 index and we just shift the root so that they match next available location in the LView. * * @param bindingRootIndex Root index for `hostBindings` * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive * whose `hostBindings` are being processed. */ function setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) { const lFrame = instructionState.lFrame; lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex; setCurrentDirectiveIndex(currentDirectiveIndex); } /** * When host binding is executing this points to the directive index. * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef` * `LView[getCurrentDirectiveIndex()]` is directive instance. */ function getCurrentDirectiveIndex() { return instructionState.lFrame.currentDirectiveIndex; } /** * Sets an index of a directive whose `hostBindings` are being processed. * * @param currentDirectiveIndex `TData` index where current directive instance can be found. */ function setCurrentDirectiveIndex(currentDirectiveIndex) { instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex; } /** * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being * executed. * * @param tData Current `TData` where the `DirectiveDef` will be looked up at. */ function getCurrentDirectiveDef(tData) { const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex; return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex]; } function getCurrentQueryIndex() { return instructionState.lFrame.currentQueryIndex; } function setCurrentQueryIndex(value) { instructionState.lFrame.currentQueryIndex = value; } /** * Returns a `TNode` of the location where the current `LView` is declared at. * * @param lView an `LView` that we want to find parent `TNode` for. */ function getDeclarationTNode(lView) { const tView = lView[TVIEW]; // Return the declaration parent for embedded views if (tView.type === 2 /* Embedded */) { ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.'); return tView.declTNode; } // Components don't have `TView.declTNode` because each instance of component could be // inserted in different location, hence `TView.declTNode` is meaningless. // Falling back to `T_HOST` in case we cross component boundary. if (tView.type === 1 /* Component */) { return lView[T_HOST]; } // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode. return null; } /** * This is a light weight version of the `enterView` which is needed by the DI system. * * @param lView `LView` location of the DI context. * @param tNode `TNode` for DI context * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration * tree from `tNode` until we find parent declared `TElementNode`. * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated * `NodeInjector` can be found and we should instead use `ModuleInjector`. * - If `true` than this call must be fallowed by `leaveDI` * - If `false` than this call failed and we should NOT call `leaveDI` */ function enterDI(lView, tNode, flags) { ngDevMode && assertLViewOrUndefined(lView); if (flags & InjectFlags.SkipSelf) { ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]); let parentTNode = tNode; let parentLView = lView; while (true) { ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined'); parentTNode = parentTNode.parent; if (parentTNode === null && !(flags & InjectFlags.Host)) { parentTNode = getDeclarationTNode(parentLView); if (parentTNode === null) break; // In this case, a parent exists and is definitely an element. So it will definitely // have an existing lView as the declaration view, which is why we can assume it's defined. ngDevMode && assertDefined(parentLView, 'Parent LView should be defined'); parentLView = parentLView[DECLARATION_VIEW]; // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives // We want to skip those and look only at Elements and ElementContainers to ensure // we're looking at true parent nodes, and not content or other types. if (parentTNode.type & (2 /* Element */ | 8 /* ElementContainer */)) { break; } } else { break; } } if (parentTNode === null) { // If we failed to find a parent TNode this means that we should use module injector. return false; } else { tNode = parentTNode; lView = parentLView; } } ngDevMode && assertTNodeForLView(tNode, lView); const lFrame = instructionState.lFrame = allocLFrame(); lFrame.currentTNode = tNode; lFrame.lView = lView; return true; } /** * Swap the current lView with a new lView. * * For performance reasons we store the lView in the top level of the module. * This way we minimize the number of properties to read. Whenever a new view * is entered we have to store the lView for later, and when the view is * exited the state has to be restored * * @param newView New lView to become active * @returns the previously active lView; */ function enterView(newView) { ngDevMode && assertNotEqual(newView[0], newView[1], '????'); ngDevMode && assertLViewOrUndefined(newView); const newLFrame = allocLFrame(); if (ngDevMode) { assertEqual(newLFrame.isParent, true, 'Expected clean LFrame'); assertEqual(newLFrame.lView, null, 'Expected clean LFrame'); assertEqual(newLFrame.tView, null, 'Expected clean LFrame'); assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame'); assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame'); assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame'); assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame'); assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame'); assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame'); } const tView = newView[TVIEW]; instructionState.lFrame = newLFrame; ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView); newLFrame.currentTNode = tView.firstChild; newLFrame.lView = newView; newLFrame.tView = tView; newLFrame.contextLView = newView; newLFrame.bindingIndex = tView.bindingStartIndex; newLFrame.inI18n = false; } /** * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure. */ function allocLFrame() { const currentLFrame = instructionState.lFrame; const childLFrame = currentLFrame === null ? null : currentLFrame.child; const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame; return newLFrame; } function createLFrame(parent) { const lFrame = { currentTNode: null, isParent: true, lView: null, tView: null, selectedIndex: -1, contextLView: null, elementDepthCount: 0, currentNamespace: null, currentDirectiveIndex: -1, bindingRootIndex: -1, bindingIndex: -1, currentQueryIndex: 0, parent: parent, child: null, inI18n: false, }; parent !== null && (parent.child = lFrame); // link the new LFrame for reuse. return lFrame; } /** * A lightweight version of leave which is used with DI. * * This function only resets `currentTNode` and `LView` as those are the only properties * used with DI (`enterDI()`). * * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`. */ function leaveViewLight() { const oldLFrame = instructionState.lFrame; instructionState.lFrame = oldLFrame.parent; oldLFrame.currentTNode = null; oldLFrame.lView = null; return oldLFrame; } /** * This is a lightweight version of the `leaveView` which is needed by the DI system. * * NOTE: this function is an alias so that we can change the type of the function to have `void` * return type. */ const leaveDI = leaveViewLight; /** * Leave the current `LView` * * This pops the `LFrame` with the associated `LView` from the stack. * * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is * because for performance reasons we don't release `LFrame` but rather keep it for next use. */ function leaveView() { const oldLFrame = leaveViewLight(); oldLFrame.isParent = true; oldLFrame.tView = null; oldLFrame.selectedIndex = -1; oldLFrame.contextLView = null; oldLFrame.elementDepthCount = 0; oldLFrame.currentDirectiveIndex = -1; oldLFrame.currentNamespace = null; oldLFrame.bindingRootIndex = -1; oldLFrame.bindingIndex = -1; oldLFrame.currentQueryIndex = 0; } function nextContextImpl(level) { const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView); return contextLView[CONTEXT]; } function walkUpViews(nestingLevel, currentView) { while (nestingLevel > 0) { ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.'); currentView = currentView[DECLARATION_VIEW]; nestingLevel--; } return currentView; } /** * Gets the currently selected element index. * * Used with {@link property} instruction (and more in the future) to identify the index in the * current `LView` to act on. */ function getSelectedIndex() { return instructionState.lFrame.selectedIndex; } /** * Sets the most recent index passed to {@link select} * * Used with {@link property} instruction (and more in the future) to identify the index in the * current `LView` to act on. * * (Note that if an "exit function" was set earlier (via `setElementExitFn()`) then that will be * run if and when the provided `index` value is different from the current selected index value.) */ function setSelectedIndex(index) { ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).'); ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, 'Can\'t set index passed end of LView'); instructionState.lFrame.selectedIndex = index; } /** * Gets the `tNode` that represents currently selected element. */ function getSelectedTNode() { const lFrame = instructionState.lFrame; return getTNode(lFrame.tView, lFrame.selectedIndex); } /** * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state. * * @codeGenApi */ function ɵɵnamespaceSVG() { instructionState.lFrame.currentNamespace = SVG_NAMESPACE; } /** * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state. * * @codeGenApi */ function ɵɵnamespaceMathML() { instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE; } /** * Sets the namespace used to create elements to `null`, which forces element creation to use * `createElement` rather than `createElementNS`. * * @codeGenApi */ function ɵɵnamespaceHTML() { namespaceHTMLInternal(); } /** * Sets the namespace used to create elements to `null`, which forces element creation to use * `createElement` rather than `createElementNS`. */ function namespaceHTMLInternal() { instructionState.lFrame.currentNamespace = null; } function getNamespace() { return instructionState.lFrame.currentNamespace; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`. * * Must be run *only* on the first template pass. * * Sets up the pre-order hooks on the provided `tView`, * see {@link HookData} for details about the data structure. * * @param directiveIndex The index of the directive in LView * @param directiveDef The definition containing the hooks to setup in tView * @param tView The current TView */ function registerPreOrderHooks(directiveIndex, directiveDef, tView) { ngDevMode && assertFirstCreatePass(tView); const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype; if (ngOnChanges) { const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef); (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges); (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])) .push(directiveIndex, wrappedOnChanges); } if (ngOnInit) { (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit); } if (ngDoCheck) { (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck); (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck); } } /** * * Loops through the directives on the provided `tNode` and queues hooks to be * run that are not initialization hooks. * * Should be executed during `elementEnd()` and similar to * preserve hook execution order. Content, view, and destroy hooks for projected * components and directives must be called *before* their hosts. * * Sets up the content, view, and destroy hooks on the provided `tView`, * see {@link HookData} for details about the data structure. * * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up * separately at `elementStart`. * * @param tView The current TView * @param tNode The TNode whose directives are to be searched for hooks to queue */ function registerPostOrderHooks(tView, tNode) { ngDevMode && assertFirstCreatePass(tView); // It's necessary to loop through the directives at elementEnd() (rather than processing in // directiveCreate) so we can preserve the current hook order. Content, view, and destroy // hooks for projected components and directives must be called *before* their hosts. for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) { const directiveDef = tView.data[i]; ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef'); const lifecycleHooks = directiveDef.type.prototype; const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks; if (ngAfterContentInit) { (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit); } if (ngAfterContentChecked) { (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked); (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked); } if (ngAfterViewInit) { (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit); } if (ngAfterViewChecked) { (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked); (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked); } if (ngOnDestroy != null) { (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy); } } } /** * Executing hooks requires complex logic as we need to deal with 2 constraints. * * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only * once, across many change detection cycles. This must be true even if some hooks throw, or if * some recursively trigger a change detection cycle. * To solve that, it is required to track the state of the execution of these init hooks. * This is done by storing and maintaining flags in the view: the {@link InitPhaseState}, * and the index within that phase. They can be seen as a cursor in the following structure: * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]] * They are are stored as flags in LView[FLAGS]. * * 2. Pre-order hooks can be executed in batches, because of the select instruction. * To be able to pause and resume their execution, we also need some state about the hook's array * that is being processed: * - the index of the next hook to be executed * - the number of init hooks already found in the processed part of the array * They are are stored as flags in LView[PREORDER_HOOK_FLAGS]. */ /** * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read * / write of the init-hooks related flags. * @param lView The LView where hooks are defined * @param hooks Hooks to be run * @param nodeIndex 3 cases depending on the value: * - undefined: all hooks from the array should be executed (post-order case) * - null: execute hooks only from the saved index until the end of the array (pre-order case, when * flushing the remaining hooks) * - number: execute hooks only from the saved index until that node index exclusive (pre-order * case, when executing select(number)) */ function executeCheckHooks(lView, hooks, nodeIndex) { callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex); } /** * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked, * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed. * @param lView The LView where hooks are defined * @param hooks Hooks to be run * @param initPhase A phase for which hooks should be run * @param nodeIndex 3 cases depending on the value: * - undefined: all hooks from the array should be executed (post-order case) * - null: execute hooks only from the saved index until the end of the array (pre-order case, when * flushing the remaining hooks) * - number: execute hooks only from the saved index until that node index exclusive (pre-order * case, when executing select(number)) */ function executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) { ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once'); if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { callHooks(lView, hooks, initPhase, nodeIndex); } } function incrementInitPhaseFlags(lView, initPhase) { ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.'); let flags = lView[FLAGS]; if ((flags & 3 /* InitPhaseStateMask */) === initPhase) { flags &= 2047 /* IndexWithinInitPhaseReset */; flags += 1 /* InitPhaseStateIncrementer */; lView[FLAGS] = flags; } } /** * Calls lifecycle hooks with their contexts, skipping init hooks if it's not * the first LView pass * * @param currentView The current view * @param arr The array in which the hooks are found * @param initPhaseState the current state of the init phase * @param currentNodeIndex 3 cases depending on the value: * - undefined: all hooks from the array should be executed (post-order case) * - null: execute hooks only from the saved index until the end of the array (pre-order case, when * flushing the remaining hooks) * - number: execute hooks only from the saved index until that node index exclusive (pre-order * case, when executing select(number)) */ function callHooks(currentView, arr, initPhase, currentNodeIndex) { ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.'); const startIndex = currentNodeIndex !== undefined ? (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) : 0; const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1; const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1 let lastNodeIndexFound = 0; for (let i = startIndex; i < max; i++) { const hook = arr[i + 1]; if (typeof hook === 'number') { lastNodeIndexFound = arr[i]; if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) { break; } } else { const isInitHook = arr[i] < 0; if (isInitHook) currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */; if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) { callHook(currentView, initPhase, arr, i); currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i + 2; } i++; } } } /** * Execute one hook against the current `LView`. * * @param currentView The current view * @param initPhaseState the current state of the init phase * @param arr The array in which the hooks are found * @param i The current index within the hook data array */ function callHook(currentView, initPhase, arr, i) { const isInitHook = arr[i] < 0; const hook = arr[i + 1]; const directiveIndex = isInitHook ? -arr[i] : arr[i]; const directive = currentView[directiveIndex]; if (isInitHook) { const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */; // The init phase state must be always checked here as it may have been recursively updated. if (indexWithintInitPhase < (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) && (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) { currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */; profiler(4 /* LifecycleHookStart */, directive, hook); try { hook.call(directive); } finally { profiler(5 /* LifecycleHookEnd */, directive, hook); } } } else { profiler(4 /* LifecycleHookStart */, directive, hook); try { hook.call(directive); } finally { profiler(5 /* LifecycleHookEnd */, directive, hook); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NO_PARENT_INJECTOR = -1; /** * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in * `TView.data`. This allows us to store information about the current node's tokens (which * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be * shared, so they live in `LView`). * * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter * determines whether a directive is available on the associated node or not. This prevents us * from searching the directives array at this level unless it's probable the directive is in it. * * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters. * * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed * using interfaces as they were previously. The start index of each `LInjector` and `TInjector` * will differ based on where it is flattened into the main array, so it's not possible to know * the indices ahead of time and save their types here. The interfaces are still included here * for documentation purposes. * * export interface LInjector extends Array<any> { * * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) * [0]: number; * * // Cumulative bloom for directive IDs 32-63 * [1]: number; * * // Cumulative bloom for directive IDs 64-95 * [2]: number; * * // Cumulative bloom for directive IDs 96-127 * [3]: number; * * // Cumulative bloom for directive IDs 128-159 * [4]: number; * * // Cumulative bloom for directive IDs 160 - 191 * [5]: number; * * // Cumulative bloom for directive IDs 192 - 223 * [6]: number; * * // Cumulative bloom for directive IDs 224 - 255 * [7]: number; * * // We need to store a reference to the injector's parent so DI can keep looking up * // the injector tree until it finds the dependency it's looking for. * [PARENT_INJECTOR]: number; * } * * export interface TInjector extends Array<any> { * * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE) * [0]: number; * * // Shared node bloom for directive IDs 32-63 * [1]: number; * * // Shared node bloom for directive IDs 64-95 * [2]: number; * * // Shared node bloom for directive IDs 96-127 * [3]: number; * * // Shared node bloom for directive IDs 128-159 * [4]: number; * * // Shared node bloom for directive IDs 160 - 191 * [5]: number; * * // Shared node bloom for directive IDs 192 - 223 * [6]: number; * * // Shared node bloom for directive IDs 224 - 255 * [7]: number; * * // Necessary to find directive indices for a particular node. * [TNODE]: TElementNode|TElementContainerNode|TContainerNode; * } */ /** * Factory for creating instances of injectors in the NodeInjector. * * This factory is complicated by the fact that it can resolve `multi` factories as well. * * NOTE: Some of the fields are optional which means that this class has two hidden classes. * - One without `multi` support (most common) * - One with `multi` values, (rare). * * Since VMs can cache up to 4 inline hidden classes this is OK. * * - Single factory: Only `resolving` and `factory` is defined. * - `providers` factory: `componentProviders` is a number and `index = -1`. * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`. */ class NodeInjectorFactory { constructor( /** * Factory to invoke in order to create a new instance. */ factory, /** * Set to `true` if the token is declared in `viewProviders` (or if it is component). */ isViewProvider, injectImplementation) { this.factory = factory; /** * Marker set to true during factory invocation to see if we get into recursive loop. * Recursive loop causes an error to be displayed. */ this.resolving = false; ngDevMode && assertDefined(factory, 'Factory not specified'); ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.'); this.canSeeViewProviders = isViewProvider; this.injectImpl = injectImplementation; } } function isFactory(obj) { return obj instanceof NodeInjectorFactory; } // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$3 = 1; /** * Converts `TNodeType` into human readable text. * Make sure this matches with `TNodeType` */ function toTNodeTypeAsString(tNodeType) { let text = ''; (tNodeType & 1 /* Text */) && (text += '|Text'); (tNodeType & 2 /* Element */) && (text += '|Element'); (tNodeType & 4 /* Container */) && (text += '|Container'); (tNodeType & 8 /* ElementContainer */) && (text += '|ElementContainer'); (tNodeType & 16 /* Projection */) && (text += '|Projection'); (tNodeType & 32 /* Icu */) && (text += '|IcuContainer'); (tNodeType & 64 /* Placeholder */) && (text += '|Placeholder'); return text.length > 0 ? text.substring(1) : text; } // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$4 = 1; /** * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding. * * ``` * <div my-dir [class]="exp"></div> * ``` * and * ``` * @Directive({ * }) * class MyDirective { * @Input() * class: string; * } * ``` * * In the above case it is necessary to write the reconciled styling information into the * directive's input. * * @param tNode */ function hasClassInput(tNode) { return (tNode.flags & 16 /* hasClassInput */) !== 0; } /** * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding. * * ``` * <div my-dir [style]="exp"></div> * ``` * and * ``` * @Directive({ * }) * class MyDirective { * @Input() * class: string; * } * ``` * * In the above case it is necessary to write the reconciled styling information into the * directive's input. * * @param tNode */ function hasStyleInput(tNode) { return (tNode.flags & 32 /* hasStyleInput */) !== 0; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function assertTNodeType(tNode, expectedTypes, message) { assertDefined(tNode, 'should be called with a TNode'); if ((tNode.type & expectedTypes) === 0) { throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`); } } function assertPureTNodeType(type) { if (!(type === 2 /* Element */ || // type === 1 /* Text */ || // type === 4 /* Container */ || // type === 8 /* ElementContainer */ || // type === 32 /* Icu */ || // type === 16 /* Projection */ || // type === 64 /* Placeholder */)) { throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`); } } /** * Assigns all attribute values to the provided element via the inferred renderer. * * This function accepts two forms of attribute entries: * * default: (key, value): * attrs = [key1, value1, key2, value2] * * namespaced: (NAMESPACE_MARKER, uri, name, value) * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value] * * The `attrs` array can contain a mix of both the default and namespaced entries. * The "default" values are set without a marker, but if the function comes across * a marker value then it will attempt to set a namespaced value. If the marker is * not of a namespaced value then the function will quit and return the index value * where it stopped during the iteration of the attrs array. * * See [AttributeMarker] to understand what the namespace marker value is. * * Note that this instruction does not support assigning style and class values to * an element. See `elementStart` and `elementHostAttrs` to learn how styling values * are applied to an element. * @param renderer The renderer to be used * @param native The element that the attributes will be assigned to * @param attrs The attribute array of values that will be assigned to the element * @returns the index value that was last accessed in the attributes array */ function setUpAttributes(renderer, native, attrs) { const isProc = isProceduralRenderer(renderer); let i = 0; while (i < attrs.length) { const value = attrs[i]; if (typeof value === 'number') { // only namespaces are supported. Other value types (such as style/class // entries) are not supported in this function. if (value !== 0 /* NamespaceURI */) { break; } // we just landed on the marker value ... therefore // we should skip to the next entry i++; const namespaceURI = attrs[i++]; const attrName = attrs[i++]; const attrVal = attrs[i++]; ngDevMode && ngDevMode.rendererSetAttribute++; isProc ? renderer.setAttribute(native, attrName, attrVal, namespaceURI) : native.setAttributeNS(namespaceURI, attrName, attrVal); } else { // attrName is string; const attrName = value; const attrVal = attrs[++i]; // Standard attributes ngDevMode && ngDevMode.rendererSetAttribute++; if (isAnimationProp(attrName)) { if (isProc) { renderer.setProperty(native, attrName, attrVal); } } else { isProc ? renderer.setAttribute(native, attrName, attrVal) : native.setAttribute(attrName, attrVal); } i++; } } // another piece of code may iterate over the same attributes array. Therefore // it may be helpful to return the exact spot where the attributes array exited // whether by running into an unsupported marker or if all the static values were // iterated over. return i; } /** * Test whether the given value is a marker that indicates that the following * attribute values in a `TAttributes` array are only the names of attributes, * and not name-value pairs. * @param marker The attribute marker to test. * @returns true if the marker is a "name-only" marker (e.g. `Bindings`, `Template` or `I18n`). */ function isNameOnlyAttributeMarker(marker) { return marker === 3 /* Bindings */ || marker === 4 /* Template */ || marker === 6 /* I18n */; } function isAnimationProp(name) { // Perf note: accessing charCodeAt to check for the first character of a string is faster as // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that // charCodeAt doesn't allocate memory to return a substring. return name.charCodeAt(0) === 64 /* AT_SIGN */; } /** * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process. * * This merge function keeps the order of attrs same. * * @param dst Location of where the merged `TAttributes` should end up. * @param src `TAttributes` which should be appended to `dst` */ function mergeHostAttrs(dst, src) { if (src === null || src.length === 0) { // do nothing } else if (dst === null || dst.length === 0) { // We have source, but dst is empty, just make a copy. dst = src.slice(); } else { let srcMarker = -1 /* ImplicitAttributes */; for (let i = 0; i < src.length; i++) { const item = src[i]; if (typeof item === 'number') { srcMarker = item; } else { if (srcMarker === 0 /* NamespaceURI */) { // Case where we need to consume `key1`, `key2`, `value` items. } else if (srcMarker === -1 /* ImplicitAttributes */ || srcMarker === 2 /* Styles */) { // Case where we have to consume `key1` and `value` only. mergeHostAttribute(dst, srcMarker, item, null, src[++i]); } else { // Case where we have to consume `key1` only. mergeHostAttribute(dst, srcMarker, item, null, null); } } } } return dst; } /** * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account. * * @param dst `TAttributes` to append to. * @param marker Region where the `key`/`value` should be added. * @param key1 Key to add to `TAttributes` * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`) * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class. */ function mergeHostAttribute(dst, marker, key1, key2, value) { let i = 0; // Assume that new markers will be inserted at the end. let markerInsertPosition = dst.length; // scan until correct type. if (marker === -1 /* ImplicitAttributes */) { markerInsertPosition = -1; } else { while (i < dst.length) { const dstValue = dst[i++]; if (typeof dstValue === 'number') { if (dstValue === marker) { markerInsertPosition = -1; break; } else if (dstValue > marker) { // We need to save this as we want the markers to be inserted in specific order. markerInsertPosition = i - 1; break; } } } } // search until you find place of insertion while (i < dst.length) { const item = dst[i]; if (typeof item === 'number') { // since `i` started as the index after the marker, we did not find it if we are at the next // marker break; } else if (item === key1) { // We already have same token if (key2 === null) { if (value !== null) { dst[i + 1] = value; } return; } else if (key2 === dst[i + 1]) { dst[i + 2] = value; return; } } // Increment counter. i++; if (key2 !== null) i++; if (value !== null) i++; } // insert at location. if (markerInsertPosition !== -1) { dst.splice(markerInsertPosition, 0, marker); i = markerInsertPosition + 1; } dst.splice(i++, 0, key1); if (key2 !== null) { dst.splice(i++, 0, key2); } if (value !== null) { dst.splice(i++, 0, value); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /// Parent Injector Utils /////////////////////////////////////////////////////////////// function hasParentInjector(parentLocation) { return parentLocation !== NO_PARENT_INJECTOR; } function getParentInjectorIndex(parentLocation) { ngDevMode && assertNumber(parentLocation, 'Number expected'); ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.'); const parentInjectorIndex = parentLocation & 32767 /* InjectorIndexMask */; ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.'); return parentLocation & 32767 /* InjectorIndexMask */; } function getParentInjectorViewOffset(parentLocation) { return parentLocation >> 16 /* ViewOffsetShift */; } /** * Unwraps a parent injector location number to find the view offset from the current injector, * then walks up the declaration view tree until the view is found that contains the parent * injector. * * @param location The location of the parent injector, which contains the view offset * @param startView The LView instance from which to start walking up the view tree * @returns The LView instance that contains the parent injector */ function getParentInjectorView(location, startView) { let viewOffset = getParentInjectorViewOffset(location); let parentView = startView; // For most cases, the parent injector can be found on the host node (e.g. for component // or container), but we must keep the loop here to support the rarer case of deeply nested // <ng-template> tags or inline views, where the parent injector might live many views // above the child injector. while (viewOffset > 0) { parentView = parentView[DECLARATION_VIEW]; viewOffset--; } return parentView; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines if the call to `inject` should include `viewProviders` in its resolution. * * This is set to true when we try to instantiate a component. This value is reset in * `getNodeInjectable` to a value which matches the declaration location of the token about to be * instantiated. This is done so that if we are injecting a token which was declared outside of * `viewProviders` we don't accidentally pull `viewProviders` in. * * Example: * * ``` * @Injectable() * class MyService { * constructor(public value: String) {} * } * * @Component({ * providers: [ * MyService, * {provide: String, value: 'providers' } * ] * viewProviders: [ * {provide: String, value: 'viewProviders'} * ] * }) * class MyComponent { * constructor(myService: MyService, value: String) { * // We expect that Component can see into `viewProviders`. * expect(value).toEqual('viewProviders'); * // `MyService` was not declared in `viewProviders` hence it can't see it. * expect(myService.value).toEqual('providers'); * } * } * * ``` */ let includeViewProviders = true; function setIncludeViewProviders(v) { const oldValue = includeViewProviders; includeViewProviders = v; return oldValue; } /** * The number of slots in each bloom filter (used by DI). The larger this number, the fewer * directives that will share slots, and thus, the fewer false positives when checking for * the existence of a directive. */ const BLOOM_SIZE = 256; const BLOOM_MASK = BLOOM_SIZE - 1; /** * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits, * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash * number. */ const BLOOM_BUCKET_BITS = 5; /** Counter used to generate unique IDs for directives. */ let nextNgElementId = 0; /** * Registers this directive as present in its node's injector by flipping the directive's * corresponding bit in the injector's bloom filter. * * @param injectorIndex The index of the node injector where this token should be registered * @param tView The TView for the injector's bloom filters * @param type The directive token to register */ function bloomAdd(injectorIndex, tView, type) { ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true'); let id; if (typeof type === 'string') { id = type.charCodeAt(0) || 0; } else if (type.hasOwnProperty(NG_ELEMENT_ID)) { id = type[NG_ELEMENT_ID]; } // Set a unique ID on the directive type, so if something tries to inject the directive, // we can easily retrieve the ID and hash it into the bloom bit that should be checked. if (id == null) { id = type[NG_ELEMENT_ID] = nextNgElementId++; } // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each), // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter. const bloomHash = id & BLOOM_MASK; // Create a mask that targets the specific bit associated with the directive. // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding // to bit positions 0 - 31 in a 32 bit integer. const mask = 1 << bloomHash; // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`. // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask // should be written to. tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask; } /** * Creates (or gets an existing) injector for a given element or container. * * @param tNode for which an injector should be retrieved / created. * @param lView View where the node is stored * @returns Node injector */ function getOrCreateNodeInjectorForNode(tNode, lView) { const existingInjectorIndex = getInjectorIndex(tNode, lView); if (existingInjectorIndex !== -1) { return existingInjectorIndex; } const tView = lView[TVIEW]; if (tView.firstCreatePass) { tNode.injectorIndex = lView.length; insertBloom(tView.data, tNode); // foundation for node bloom insertBloom(lView, null); // foundation for cumulative bloom insertBloom(tView.blueprint, null); } const parentLoc = getParentInjectorLocation(tNode, lView); const injectorIndex = tNode.injectorIndex; // If a parent injector can't be found, its location is set to -1. // In that case, we don't need to set up a cumulative bloom if (hasParentInjector(parentLoc)) { const parentIndex = getParentInjectorIndex(parentLoc); const parentLView = getParentInjectorView(parentLoc, lView); const parentData = parentLView[TVIEW].data; // Creates a cumulative bloom filter that merges the parent's bloom filter // and its own cumulative bloom (which contains tokens for all ancestors) for (let i = 0; i < 8 /* BLOOM_SIZE */; i++) { lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i]; } } lView[injectorIndex + 8 /* PARENT */] = parentLoc; return injectorIndex; } function insertBloom(arr, footer) { arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer); } function getInjectorIndex(tNode, lView) { if (tNode.injectorIndex === -1 || // If the injector index is the same as its parent's injector index, then the index has been // copied down from the parent node. No injector has been created yet on this node. (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) || // After the first template pass, the injector index might exist but the parent values // might not have been calculated yet for this instance lView[tNode.injectorIndex + 8 /* PARENT */] === null) { return -1; } else { ngDevMode && assertIndexInRange(lView, tNode.injectorIndex); return tNode.injectorIndex; } } /** * Finds the index of the parent injector, with a view offset if applicable. Used to set the * parent injector initially. * * @returns Returns a number that is the combination of the number of LViews that we have to go up * to find the LView containing the parent inject AND the index of the injector within that LView. */ function getParentInjectorLocation(tNode, lView) { if (tNode.parent && tNode.parent.injectorIndex !== -1) { // If we have a parent `TNode` and there is an injector associated with it we are done, because // the parent injector is within the current `LView`. return tNode.parent.injectorIndex; // ViewOffset is 0 } // When parent injector location is computed it may be outside of the current view. (ie it could // be pointing to a declared parent location). This variable stores number of declaration parents // we need to walk up in order to find the parent injector location. let declarationViewOffset = 0; let parentTNode = null; let lViewCursor = lView; // The parent injector is not in the current `LView`. We will have to walk the declared parent // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent // `NodeInjector`. while (lViewCursor !== null) { // First determine the `parentTNode` location. The parent pointer differs based on `TView.type`. const tView = lViewCursor[TVIEW]; const tViewType = tView.type; if (tViewType === 2 /* Embedded */) { ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.'); parentTNode = tView.declTNode; } else if (tViewType === 1 /* Component */) { // Components don't have `TView.declTNode` because each instance of component could be // inserted in different location, hence `TView.declTNode` is meaningless. parentTNode = lViewCursor[T_HOST]; } else { ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected'); parentTNode = null; } if (parentTNode === null) { // If we have no parent, than we are done. return NO_PARENT_INJECTOR; } ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]); // Every iteration of the loop requires that we go to the declared parent. declarationViewOffset++; lViewCursor = lViewCursor[DECLARATION_VIEW]; if (parentTNode.injectorIndex !== -1) { // We found a NodeInjector which points to something. return (parentTNode.injectorIndex | (declarationViewOffset << 16 /* ViewOffsetShift */)); } } return NO_PARENT_INJECTOR; } /** * Makes a type or an injection token public to the DI system by adding it to an * injector's bloom filter. * * @param di The node injector in which a directive will be added * @param token The type or the injection token to be made public */ function diPublicInInjector(injectorIndex, tView, token) { bloomAdd(injectorIndex, tView, token); } /** * Inject static attribute value into directive constructor. * * This method is used with `factory` functions which are generated as part of * `defineDirective` or `defineComponent`. The method retrieves the static value * of an attribute. (Dynamic attributes are not supported since they are not resolved * at the time of injection and can change over time.) * * # Example * Given: * ``` * @Component(...) * class MyComponent { * constructor(@Attribute('title') title: string) { ... } * } * ``` * When instantiated with * ``` * <my-component title="Hello"></my-component> * ``` * * Then factory method generated is: * ``` * MyComponent.ɵcmp = defineComponent({ * factory: () => new MyComponent(injectAttribute('title')) * ... * }) * ``` * * @publicApi */ function injectAttributeImpl(tNode, attrNameToInject) { ngDevMode && assertTNodeType(tNode, 12 /* AnyContainer */ | 3 /* AnyRNode */); ngDevMode && assertDefined(tNode, 'expecting tNode'); if (attrNameToInject === 'class') { return tNode.classes; } if (attrNameToInject === 'style') { return tNode.styles; } const attrs = tNode.attrs; if (attrs) { const attrsLength = attrs.length; let i = 0; while (i < attrsLength) { const value = attrs[i]; // If we hit a `Bindings` or `Template` marker then we are done. if (isNameOnlyAttributeMarker(value)) break; // Skip namespaced attributes if (value === 0 /* NamespaceURI */) { // we skip the next two values // as namespaced attributes looks like // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist', // 'existValue', ...] i = i + 2; } else if (typeof value === 'number') { // Skip to the first value of the marked attribute. i++; while (i < attrsLength && typeof attrs[i] === 'string') { i++; } } else if (value === attrNameToInject) { return attrs[i + 1]; } else { i = i + 2; } } } return null; } function notFoundValueOrThrow(notFoundValue, token, flags) { if (flags & InjectFlags.Optional) { return notFoundValue; } else { throwProviderNotFoundError(token, 'NodeInjector'); } } /** * Returns the value associated to the given token from the ModuleInjector or throws exception * * @param lView The `LView` that contains the `tNode` * @param token The token to look for * @param flags Injection flags * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional` * @returns the value from the injector or throws an exception */ function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) { if (flags & InjectFlags.Optional && notFoundValue === undefined) { // This must be set or the NullInjector will throw for optional deps notFoundValue = null; } if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) { const moduleInjector = lView[INJECTOR]; // switch to `injectInjectorOnly` implementation for module injector, since module injector // should not have access to Component/Directive DI scope (that may happen through // `directiveInject` implementation) const previousInjectImplementation = setInjectImplementation(undefined); try { if (moduleInjector) { return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional); } else { return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional); } } finally { setInjectImplementation(previousInjectImplementation); } } return notFoundValueOrThrow(notFoundValue, token, flags); } /** * Returns the value associated to the given token from the NodeInjectors => ModuleInjector. * * Look for the injector providing the token by walking up the node injector tree and then * the module injector tree. * * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`) * * @param tNode The Node where the search for the injector should start * @param lView The `LView` that contains the `tNode` * @param token The token to look for * @param flags Injection flags * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional` * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided */ function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) { if (tNode !== null) { const bloomHash = bloomHashBitOrFactory(token); // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef // so just call the factory function to create it. if (typeof bloomHash === 'function') { if (!enterDI(lView, tNode, flags)) { // Failed to enter DI, try module injector instead. If a token is injected with the @Host // flag, the module injector is not searched for that token in Ivy. return (flags & InjectFlags.Host) ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); } try { const value = bloomHash(); if (value == null && !(flags & InjectFlags.Optional)) { throwProviderNotFoundError(token); } else { return value; } } finally { leaveDI(); } } else if (typeof bloomHash === 'number') { // A reference to the previous injector TView that was found while climbing the element // injector tree. This is used to know if viewProviders can be accessed on the current // injector. let previousTView = null; let injectorIndex = getInjectorIndex(tNode, lView); let parentLocation = NO_PARENT_INJECTOR; let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null; // If we should skip this injector, or if there is no injector on this node, start by // searching the parent injector. if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) { parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8 /* PARENT */]; if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) { injectorIndex = -1; } else { previousTView = lView[TVIEW]; injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } } // Traverse up the injector tree until we find a potential match or until we know there // *isn't* a match. while (injectorIndex !== -1) { ngDevMode && assertNodeInjector(lView, injectorIndex); // Check the current injector. If it matches, see if it contains token. const tView = lView[TVIEW]; ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView); if (bloomHasToken(bloomHash, injectorIndex, tView.data)) { // At this point, we have an injector which *may* contain the token, so we step through // the providers and directives associated with the injector's corresponding node to get // the instance. const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode); if (instance !== NOT_FOUND) { return instance; } } parentLocation = lView[injectorIndex + 8 /* PARENT */]; if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) { // The def wasn't found anywhere on this node, so it was a false positive. // Traverse up the tree and continue searching. previousTView = tView; injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } else { // If we should not search parent OR If the ancestor bloom filter value does not have the // bit corresponding to the directive we can give up on traversing up to find the specific // injector. injectorIndex = -1; } } } } return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue); } const NOT_FOUND = {}; function createNodeInjector() { return new NodeInjector(getCurrentTNode(), getLView()); } function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) { const currentTView = lView[TVIEW]; const tNode = currentTView.data[injectorIndex + 8 /* TNODE */]; // First, we need to determine if view providers can be accessed by the starting element. // There are two possibilities const canAccessViewProviders = previousTView == null ? // 1) This is the first invocation `previousTView == null` which means that we are at the // `TNode` of where injector is starting to look. In such a case the only time we are allowed // to look into the ViewProviders is if: // - we are on a component // - AND the injector set `includeViewProviders` to true (implying that the token can see // ViewProviders because it is the Component or a Service which itself was declared in // ViewProviders) (isComponentHost(tNode) && includeViewProviders) : // 2) `previousTView != null` which means that we are now walking across the parent nodes. // In such a case we are only allowed to look into the ViewProviders if: // - We just crossed from child View to Parent View `previousTView != currentTView` // - AND the parent TNode is an Element. // This means that we just came from the Component's View and therefore are allowed to see // into the ViewProviders. (previousTView != currentTView && ((tNode.type & 3 /* AnyRNode */) !== 0)); // This special case happens when there is a @host on the inject and when we are searching // on the host element node. const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode; const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase); if (injectableIdx !== null) { return getNodeInjectable(lView, currentTView, injectableIdx, tNode); } else { return NOT_FOUND; } } /** * Searches for the given token among the node's directives and providers. * * @param tNode TNode on which directives are present. * @param tView The tView we are currently processing * @param token Provider token or type of a directive to look for. * @param canAccessViewProviders Whether view providers should be considered. * @param isHostSpecialCase Whether the host special case applies. * @returns Index of a found directive or provider, or null when none found. */ function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) { const nodeProviderIndexes = tNode.providerIndexes; const tInjectables = tView.data; const injectablesStart = nodeProviderIndexes & 1048575 /* ProvidersStartIndexMask */; const directivesStart = tNode.directiveStart; const directiveEnd = tNode.directiveEnd; const cptViewProvidersCount = nodeProviderIndexes >> 20 /* CptViewProvidersCountShift */; const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount; // When the host special case applies, only the viewProviders and the component are visible const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd; for (let i = startingIndex; i < endIndex; i++) { const providerTokenOrDef = tInjectables[i]; if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) { return i; } } if (isHostSpecialCase) { const dirDef = tInjectables[directivesStart]; if (dirDef && isComponentDef(dirDef) && dirDef.type === token) { return directivesStart; } } return null; } /** * Retrieve or instantiate the injectable from the `LView` at particular `index`. * * This function checks to see if the value has already been instantiated and if so returns the * cached `injectable`. Otherwise if it detects that the value is still a factory it * instantiates the `injectable` and caches the value. */ function getNodeInjectable(lView, tView, index, tNode) { let value = lView[index]; const tData = tView.data; if (isFactory(value)) { const factory = value; if (factory.resolving) { throwCyclicDependencyError(stringifyForError(tData[index])); } const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders); factory.resolving = true; const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null; const success = enterDI(lView, tNode, InjectFlags.Default); ngDevMode && assertEqual(success, true, 'Because flags do not contain \`SkipSelf\' we expect this to always succeed.'); try { value = lView[index] = factory.factory(undefined, tData, lView, tNode); // This code path is hit for both directives and providers. // For perf reasons, we want to avoid searching for hooks on providers. // It does no harm to try (the hooks just won't exist), but the extra // checks are unnecessary and this is a hot path. So we check to see // if the index of the dependency is in the directive range for this // tNode. If it's not, we know it's a provider and skip hook registration. if (tView.firstCreatePass && index >= tNode.directiveStart) { ngDevMode && assertDirectiveDef(tData[index]); registerPreOrderHooks(index, tData[index], tView); } } finally { previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation); setIncludeViewProviders(previousIncludeViewProviders); factory.resolving = false; leaveDI(); } } return value; } /** * Returns the bit in an injector's bloom filter that should be used to determine whether or not * the directive might be provided by the injector. * * When a directive is public, it is added to the bloom filter and given a unique ID that can be * retrieved on the Type. When the directive isn't public or the token is not a directive `null` * is returned as the node injector can not possibly provide that token. * * @param token the injection token * @returns the matching bit to check in the bloom filter or `null` if the token is not known. * When the returned value is negative then it represents special values such as `Injector`. */ function bloomHashBitOrFactory(token) { ngDevMode && assertDefined(token, 'token must be defined'); if (typeof token === 'string') { return token.charCodeAt(0) || 0; } const tokenId = // First check with `hasOwnProperty` so we don't get an inherited ID. token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined; // Negative token IDs are used for special objects such as `Injector` if (typeof tokenId === 'number') { if (tokenId >= 0) { return tokenId & BLOOM_MASK; } else { ngDevMode && assertEqual(tokenId, -1 /* Injector */, 'Expecting to get Special Injector Id'); return createNodeInjector; } } else { return tokenId; } } function bloomHasToken(bloomHash, injectorIndex, injectorView) { // Create a mask that targets the specific bit associated with the directive we're looking for. // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding // to bit positions 0 - 31 in a 32 bit integer. const mask = 1 << bloomHash; // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset // that should be used. const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)]; // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on, // this injector is a potential match. return !!(value & mask); } /** Returns true if flags prevent parent injector from being searched for tokens */ function shouldSearchParent(flags, isFirstHostTNode) { return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode); } class NodeInjector { constructor(_tNode, _lView) { this._tNode = _tNode; this._lView = _lView; } get(token, notFoundValue) { return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue); } } /** * @codeGenApi */ function ɵɵgetInheritedFactory(type) { return noSideEffects(() => { const ownConstructor = type.prototype.constructor; const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor); const objectPrototype = Object.prototype; let parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`. while (parent && parent !== objectPrototype) { const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent); // If we hit something that has a factory and the factory isn't the same as the type, // we've found the inherited factory. Note the check that the factory isn't the type's // own factory is redundant in most cases, but if the user has custom decorators on the // class, this lookup will start one level down in the prototype chain, causing us to // find the own factory first and potentially triggering an infinite loop downstream. if (factory && factory !== ownFactory) { return factory; } parent = Object.getPrototypeOf(parent); } // There is no factory defined. Either this was improper usage of inheritance // (no Angular decorator on the superclass) or there is no constructor at all // in the inheritance chain. Since the two cases cannot be distinguished, the // latter has to be assumed. return t => new t(); }); } function getFactoryOf(type) { if (isForwardRef(type)) { return () => { const factory = getFactoryOf(resolveForwardRef(type)); return factory && factory(); }; } return getFactoryDef(type); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Facade for the attribute injection from DI. * * @codeGenApi */ function ɵɵinjectAttribute(attrNameToInject) { return injectAttributeImpl(getCurrentTNode(), attrNameToInject); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ANNOTATIONS = '__annotations__'; const PARAMETERS = '__parameters__'; const PROP_METADATA = '__prop__metadata__'; /** * @suppress {globalThis} */ function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function DecoratorFactory(...args) { if (this instanceof DecoratorFactory) { metaCtor.call(this, ...args); return this; } const annotationInstance = new DecoratorFactory(...args); return function TypeDecorator(cls) { if (typeFn) typeFn(cls, ...args); // Use of Object.defineProperty is important since it creates non-enumerable property which // prevents the property is copied during subclassing. const annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS]; annotations.push(annotationInstance); if (additionalProcessing) additionalProcessing(cls); return cls; }; } if (parentClass) { DecoratorFactory.prototype = Object.create(parentClass.prototype); } DecoratorFactory.prototype.ngMetadataName = name; DecoratorFactory.annotationCls = DecoratorFactory; return DecoratorFactory; }); } function makeMetadataCtor(props) { return function ctor(...args) { if (props) { const values = props(...args); for (const propName in values) { this[propName] = values[propName]; } } }; } function makeParamDecorator(name, props, parentClass) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function ParamDecoratorFactory(...args) { if (this instanceof ParamDecoratorFactory) { metaCtor.apply(this, args); return this; } const annotationInstance = new ParamDecoratorFactory(...args); ParamDecorator.annotation = annotationInstance; return ParamDecorator; function ParamDecorator(cls, unusedKey, index) { // Use of Object.defineProperty is important since it creates non-enumerable property which // prevents the property is copied during subclassing. const parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS]; // there might be gaps if some in between parameters do not have annotations. // we pad with nulls. while (parameters.length <= index) { parameters.push(null); } (parameters[index] = parameters[index] || []).push(annotationInstance); return cls; } } if (parentClass) { ParamDecoratorFactory.prototype = Object.create(parentClass.prototype); } ParamDecoratorFactory.prototype.ngMetadataName = name; ParamDecoratorFactory.annotationCls = ParamDecoratorFactory; return ParamDecoratorFactory; }); } function makePropDecorator(name, props, parentClass, additionalProcessing) { return noSideEffects(() => { const metaCtor = makeMetadataCtor(props); function PropDecoratorFactory(...args) { if (this instanceof PropDecoratorFactory) { metaCtor.apply(this, args); return this; } const decoratorInstance = new PropDecoratorFactory(...args); function PropDecorator(target, name) { const constructor = target.constructor; // Use of Object.defineProperty is important because it creates a non-enumerable property // which prevents the property from being copied during subclassing. const meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA]; meta[name] = meta.hasOwnProperty(name) && meta[name] || []; meta[name].unshift(decoratorInstance); if (additionalProcessing) additionalProcessing(target, name, ...args); } return PropDecorator; } if (parentClass) { PropDecoratorFactory.prototype = Object.create(parentClass.prototype); } PropDecoratorFactory.prototype.ngMetadataName = name; PropDecoratorFactory.annotationCls = PropDecoratorFactory; return PropDecoratorFactory; }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function CREATE_ATTRIBUTE_DECORATOR__PRE_R3__() { return makeParamDecorator('Attribute', (attributeName) => ({ attributeName })); } function CREATE_ATTRIBUTE_DECORATOR__POST_R3__() { return makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) })); } const CREATE_ATTRIBUTE_DECORATOR_IMPL = CREATE_ATTRIBUTE_DECORATOR__POST_R3__; /** * Attribute decorator and metadata. * * @Annotation * @publicApi */ const Attribute = CREATE_ATTRIBUTE_DECORATOR_IMPL(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Creates a token that can be used in a DI Provider. * * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a * runtime representation) such as when injecting an interface, callable type, array or * parameterized type. * * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by * the `Injector`. This provides additional level of type safety. * * ``` * interface MyInterface {...} * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken')); * // myInterface is inferred to be MyInterface. * ``` * * When creating an `InjectionToken`, you can optionally specify a factory function which returns * (possibly by creating) a default value of the parameterized type `T`. This sets up the * `InjectionToken` using this factory as a provider as if it was defined explicitly in the * application's root injector. If the factory function, which takes zero arguments, needs to inject * dependencies, it can do so using the `inject` function. See below for an example. * * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As * mentioned above, `'root'` is the default value for `providedIn`. * * @usageNotes * ### Basic Example * * ### Plain InjectionToken * * {@example core/di/ts/injector_spec.ts region='InjectionToken'} * * ### Tree-shakable InjectionToken * * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'} * * * @publicApi */ class InjectionToken { constructor(_desc, options) { this._desc = _desc; /** @internal */ this.ngMetadataName = 'InjectionToken'; this.ɵprov = undefined; if (typeof options == 'number') { (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here'); // This is a special hack to assign __NG_ELEMENT_ID__ to this instance. // See `InjectorMarkers` this.__NG_ELEMENT_ID__ = options; } else if (options !== undefined) { this.ɵprov = ɵɵdefineInjectable({ token: this, providedIn: options.providedIn || 'root', factory: options.factory, }); } } toString() { return `InjectionToken ${this._desc}`; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A DI token that you can use to create a virtual [provider](guide/glossary#provider) * that will populate the `entryComponents` field of components and NgModules * based on its `useValue` property value. * All components that are referenced in the `useValue` value (either directly * or in a nested array or map) are added to the `entryComponents` property. * * @usageNotes * * The following example shows how the router can populate the `entryComponents` * field of an NgModule based on a router configuration that refers * to components. * * ```typescript * // helper function inside the router * function provideRoutes(routes) { * return [ * {provide: ROUTES, useValue: routes}, * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true} * ]; * } * * // user code * let routes = [ * {path: '/root', component: RootComp}, * {path: '/teams', component: TeamsComp} * ]; * * @NgModule({ * providers: [provideRoutes(routes)] * }) * class ModuleWithRoutes {} * ``` * * @publicApi * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary. */ const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents'); // Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not // explicitly set. This value will be changed to `true` in v12. // TODO(misko): switch the default in v12 to `true`. See: packages/compiler/src/core.ts const emitDistinctChangesOnlyDefaultValue = false; /** * Base class for query metadata. * * @see `ContentChildren`. * @see `ContentChild`. * @see `ViewChildren`. * @see `ViewChild`. * * @publicApi */ class Query { } const ɵ0$1 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: false, descendants: false, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data)); /** * ContentChildren decorator and metadata. * * * @Annotation * @publicApi */ const ContentChildren = makePropDecorator('ContentChildren', ɵ0$1, Query); const ɵ1 = (selector, data = {}) => (Object.assign({ selector, first: true, isViewQuery: false, descendants: true }, data)); /** * ContentChild decorator and metadata. * * * @Annotation * * @publicApi */ const ContentChild = makePropDecorator('ContentChild', ɵ1, Query); const ɵ2 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: true, descendants: true, emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue }, data)); /** * ViewChildren decorator and metadata. * * @Annotation * @publicApi */ const ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query); const ɵ3 = (selector, data) => (Object.assign({ selector, first: true, isViewQuery: true, descendants: true }, data)); /** * ViewChild decorator and metadata. * * @Annotation * @publicApi */ const ViewChild = makePropDecorator('ViewChild', ɵ3, Query); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var R3ResolvedDependencyType; (function (R3ResolvedDependencyType) { R3ResolvedDependencyType[R3ResolvedDependencyType["Token"] = 0] = "Token"; R3ResolvedDependencyType[R3ResolvedDependencyType["Attribute"] = 1] = "Attribute"; R3ResolvedDependencyType[R3ResolvedDependencyType["ChangeDetectorRef"] = 2] = "ChangeDetectorRef"; R3ResolvedDependencyType[R3ResolvedDependencyType["Invalid"] = 3] = "Invalid"; })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {})); var R3FactoryTarget; (function (R3FactoryTarget) { R3FactoryTarget[R3FactoryTarget["Directive"] = 0] = "Directive"; R3FactoryTarget[R3FactoryTarget["Component"] = 1] = "Component"; R3FactoryTarget[R3FactoryTarget["Injectable"] = 2] = "Injectable"; R3FactoryTarget[R3FactoryTarget["Pipe"] = 3] = "Pipe"; R3FactoryTarget[R3FactoryTarget["NgModule"] = 4] = "NgModule"; })(R3FactoryTarget || (R3FactoryTarget = {})); var ViewEncapsulation$1; (function (ViewEncapsulation) { ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; // Historically the 1 value was for `Native` encapsulation which has been removed as of v11. ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; })(ViewEncapsulation$1 || (ViewEncapsulation$1 = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getCompilerFacade() { const globalNg = _global['ng']; if (!globalNg || !globalNg.ɵcompilerFacade) { throw new Error(`Angular JIT compilation failed: '@angular/compiler' not loaded!\n` + ` - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n` + ` - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n` + ` - Alternatively provide the compiler with 'import "@angular/compiler";' before bootstrapping.`); } return globalNg.ɵcompilerFacade; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Represents a type that a Component or other object is instances of. * * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by * the `MyCustomComponent` constructor function. * * @publicApi */ const Type = Function; function isType(v) { return typeof v === 'function'; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Equivalent to ES6 spread, add each item to an array. * * @param items The items to add * @param arr The array to which you want to add the items */ function addAllToArray(items, arr) { for (let i = 0; i < items.length; i++) { arr.push(items[i]); } } /** * Determines if the contents of two arrays is identical * * @param a first array * @param b second array * @param identityAccessor Optional function for extracting stable object identity from a value in * the array. */ function arrayEquals(a, b, identityAccessor) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; i++) { let valueA = a[i]; let valueB = b[i]; if (identityAccessor) { valueA = identityAccessor(valueA); valueB = identityAccessor(valueB); } if (valueB !== valueA) { return false; } } return true; } /** * Flattens an array. */ function flatten(list, dst) { if (dst === undefined) dst = list; for (let i = 0; i < list.length; i++) { let item = list[i]; if (Array.isArray(item)) { // we need to inline it. if (dst === list) { // Our assumption that the list was already flat was wrong and // we need to clone flat since we need to write to it. dst = list.slice(0, i); } flatten(item, dst); } else if (dst !== list) { dst.push(item); } } return dst; } function deepForEach(input, fn) { input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value)); } function addToArray(arr, index, value) { // perf: array.push is faster than array.splice! if (index >= arr.length) { arr.push(value); } else { arr.splice(index, 0, value); } } function removeFromArray(arr, index) { // perf: array.pop is faster than array.splice! if (index >= arr.length - 1) { return arr.pop(); } else { return arr.splice(index, 1)[0]; } } function newArray(size, value) { const list = []; for (let i = 0; i < size; i++) { list.push(value); } return list; } /** * Remove item from array (Same as `Array.splice()` but faster.) * * `Array.splice()` is not as fast because it has to allocate an array for the elements which were * removed. This causes memory pressure and slows down code when most of the time we don't * care about the deleted items array. * * https://jsperf.com/fast-array-splice (About 20x faster) * * @param array Array to splice * @param index Index of element in array to remove. * @param count Number of items to remove. */ function arraySplice(array, index, count) { const length = array.length - count; while (index < length) { array[index] = array[index + count]; index++; } while (count--) { array.pop(); // shrink the array } } /** * Same as `Array.splice(index, 0, value)` but faster. * * `Array.splice()` is not fast because it has to allocate an array for the elements which were * removed. This causes memory pressure and slows down code when most of the time we don't * care about the deleted items array. * * @param array Array to splice. * @param index Index in array where the `value` should be added. * @param value Value to add to array. */ function arrayInsert(array, index, value) { ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.'); let end = array.length; while (end > index) { const previousEnd = end - 1; array[end] = array[previousEnd]; end = previousEnd; } array[index] = value; } /** * Same as `Array.splice2(index, 0, value1, value2)` but faster. * * `Array.splice()` is not fast because it has to allocate an array for the elements which were * removed. This causes memory pressure and slows down code when most of the time we don't * care about the deleted items array. * * @param array Array to splice. * @param index Index in array where the `value` should be added. * @param value1 Value to add to array. * @param value2 Value to add to array. */ function arrayInsert2(array, index, value1, value2) { ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\'t insert past array end.'); let end = array.length; if (end == index) { // inserting at the end. array.push(value1, value2); } else if (end === 1) { // corner case when we have less items in array than we have items to insert. array.push(value2, array[0]); array[0] = value1; } else { end--; array.push(array[end - 1], array[end]); while (end > index) { const previousEnd = end - 2; array[end] = array[previousEnd]; end--; } array[index] = value1; array[index + 1] = value2; } } /** * Insert a `value` into an `array` so that the array remains sorted. * * NOTE: * - Duplicates are not allowed, and are ignored. * - This uses binary search algorithm for fast inserts. * * @param array A sorted array to insert into. * @param value The value to insert. * @returns index of the inserted value. */ function arrayInsertSorted(array, value) { let index = arrayIndexOfSorted(array, value); if (index < 0) { // if we did not find it insert it. index = ~index; arrayInsert(array, index, value); } return index; } /** * Remove `value` from a sorted `array`. * * NOTE: * - This uses binary search algorithm for fast removals. * * @param array A sorted array to remove from. * @param value The value to remove. * @returns index of the removed value. * - positive index if value found and removed. * - negative index if value not found. (`~index` to get the value where it should have been * inserted) */ function arrayRemoveSorted(array, value) { const index = arrayIndexOfSorted(array, value); if (index >= 0) { arraySplice(array, index, 1); } return index; } /** * Get an index of an `value` in a sorted `array`. * * NOTE: * - This uses binary search algorithm for fast removals. * * @param array A sorted array to binary search. * @param value The value to look for. * @returns index of the value. * - positive index if value found. * - negative index if value not found. (`~index` to get the value where it should have been * located) */ function arrayIndexOfSorted(array, value) { return _arrayIndexOfSorted(array, value, 0); } /** * Set a `value` for a `key`. * * @param keyValueArray to modify. * @param key The key to locate or create. * @param value The value to set for a `key`. * @returns index (always even) of where the value vas set. */ function keyValueArraySet(keyValueArray, key, value) { let index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { // if we found it set it. keyValueArray[index | 1] = value; } else { index = ~index; arrayInsert2(keyValueArray, index, key, value); } return index; } /** * Retrieve a `value` for a `key` (on `undefined` if not found.) * * @param keyValueArray to search. * @param key The key to locate. * @return The `value` stored at the `key` location or `undefined if not found. */ function keyValueArrayGet(keyValueArray, key) { const index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { // if we found it retrieve it. return keyValueArray[index | 1]; } return undefined; } /** * Retrieve a `key` index value in the array or `-1` if not found. * * @param keyValueArray to search. * @param key The key to locate. * @returns index of where the key is (or should have been.) * - positive (even) index if key found. * - negative index if key not found. (`~index` (even) to get the index where it should have * been inserted.) */ function keyValueArrayIndexOf(keyValueArray, key) { return _arrayIndexOfSorted(keyValueArray, key, 1); } /** * Delete a `key` (and `value`) from the `KeyValueArray`. * * @param keyValueArray to modify. * @param key The key to locate or delete (if exist). * @returns index of where the key was (or should have been.) * - positive (even) index if key found and deleted. * - negative index if key not found. (`~index` (even) to get the index where it should have * been.) */ function keyValueArrayDelete(keyValueArray, key) { const index = keyValueArrayIndexOf(keyValueArray, key); if (index >= 0) { // if we found it remove it. arraySplice(keyValueArray, index, 2); } return index; } /** * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`. * * NOTE: * - This uses binary search algorithm for fast removals. * * @param array A sorted array to binary search. * @param value The value to look for. * @param shift grouping shift. * - `0` means look at every location * - `1` means only look at every other (even) location (the odd locations are to be ignored as * they are values.) * @returns index of the value. * - positive index if value found. * - negative index if value not found. (`~index` to get the value where it should have been * inserted) */ function _arrayIndexOfSorted(array, value, shift) { ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array'); let start = 0; let end = array.length >> shift; while (end !== start) { const middle = start + ((end - start) >> 1); // find the middle. const current = array[middle << shift]; if (value === current) { return (middle << shift); } else if (current > value) { end = middle; } else { start = middle + 1; // We already searched middle so make it non-inclusive by adding 1 } } return ~(end << shift); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /* * ######################### * Attention: These Regular expressions have to hold even if the code is minified! * ########################## */ /** * Regular expression that detects pass-through constructors for ES5 output. This Regex * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also * it intends to capture the pattern where existing constructors have been downleveled from * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g. * * ``` * function MyClass() { * var _this = _super.apply(this, arguments) || this; * ``` * * ``` * function MyClass() { * var _this = _super.apply(this, __spread(arguments)) || this; * ``` * * More details can be found in: https://github.com/angular/angular/issues/38453. */ const ES5_DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|[^()]+\(arguments\))\)/; /** Regular expression that detects ES2015 classes which extend from other classes. */ const ES2015_INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/; /** * Regular expression that detects ES2015 classes which extend from other classes and * have an explicit constructor defined. */ const ES2015_INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/; /** * Regular expression that detects ES2015 classes which extend from other classes * and inherit a constructor. */ const ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/; /** * Determine whether a stringified type is a class which delegates its constructor * to its parent. * * This is not trivial since compiled code can actually contain a constructor function * even if the original source code did not. For instance, when the child class contains * an initialized instance property. */ function isDelegateCtor(typeStr) { return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr)); } class ReflectionCapabilities { constructor(reflect) { this._reflect = reflect || _global['Reflect']; } isReflectionEnabled() { return true; } factory(t) { return (...args) => new t(...args); } /** @internal */ _zipTypesAndAnnotations(paramTypes, paramAnnotations) { let result; if (typeof paramTypes === 'undefined') { result = newArray(paramAnnotations.length); } else { result = newArray(paramTypes.length); } for (let i = 0; i < result.length; i++) { // TS outputs Object for parameters without types, while Traceur omits // the annotations. For now we preserve the Traceur behavior to aid // migration, but this can be revisited. if (typeof paramTypes === 'undefined') { result[i] = []; } else if (paramTypes[i] && paramTypes[i] != Object) { result[i] = [paramTypes[i]]; } else { result[i] = []; } if (paramAnnotations && paramAnnotations[i] != null) { result[i] = result[i].concat(paramAnnotations[i]); } } return result; } _ownParameters(type, parentCtor) { const typeStr = type.toString(); // If we have no decorators, we only have function.length as metadata. // In that case, to detect whether a child class declared an own constructor or not, // we need to look inside of that constructor to check whether it is // just calling the parent. // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439 // that sets 'design:paramtypes' to [] // if a class inherits from another class but has no ctor declared itself. if (isDelegateCtor(typeStr)) { return null; } // Prefer the direct API. if (type.parameters && type.parameters !== parentCtor.parameters) { return type.parameters; } // API of tsickle for lowering decorators to properties on the class. const tsickleCtorParams = type.ctorParameters; if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) { // Newer tsickle uses a function closure // Retain the non-function case for compatibility with older tsickle const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams; const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type); const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators)); return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); } // API for metadata created by invoking the decorators. const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS]; const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type); if (paramTypes || paramAnnotations) { return this._zipTypesAndAnnotations(paramTypes, paramAnnotations); } // If a class has no decorators, at least create metadata // based on function.length. // Note: We know that this is a real constructor as we checked // the content of the constructor above. return newArray(type.length); } parameters(type) { // Note: only report metadata if we have at least one class decorator // to stay in sync with the static reflector. if (!isType(type)) { return []; } const parentCtor = getParentCtor(type); let parameters = this._ownParameters(type, parentCtor); if (!parameters && parentCtor !== Object) { parameters = this.parameters(parentCtor); } return parameters || []; } _ownAnnotations(typeOrFunc, parentCtor) { // Prefer the direct API. if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) { let annotations = typeOrFunc.annotations; if (typeof annotations === 'function' && annotations.annotations) { annotations = annotations.annotations; } return annotations; } // API of tsickle for lowering decorators to properties on the class. if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) { return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators); } // API for metadata created by invoking the decorators. if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) { return typeOrFunc[ANNOTATIONS]; } return null; } annotations(typeOrFunc) { if (!isType(typeOrFunc)) { return []; } const parentCtor = getParentCtor(typeOrFunc); const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || []; const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : []; return parentAnnotations.concat(ownAnnotations); } _ownPropMetadata(typeOrFunc, parentCtor) { // Prefer the direct API. if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) { let propMetadata = typeOrFunc.propMetadata; if (typeof propMetadata === 'function' && propMetadata.propMetadata) { propMetadata = propMetadata.propMetadata; } return propMetadata; } // API of tsickle for lowering decorators to properties on the class. if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) { const propDecorators = typeOrFunc.propDecorators; const propMetadata = {}; Object.keys(propDecorators).forEach(prop => { propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]); }); return propMetadata; } // API for metadata created by invoking the decorators. if (typeOrFunc.hasOwnProperty(PROP_METADATA)) { return typeOrFunc[PROP_METADATA]; } return null; } propMetadata(typeOrFunc) { if (!isType(typeOrFunc)) { return {}; } const parentCtor = getParentCtor(typeOrFunc); const propMetadata = {}; if (parentCtor !== Object) { const parentPropMetadata = this.propMetadata(parentCtor); Object.keys(parentPropMetadata).forEach((propName) => { propMetadata[propName] = parentPropMetadata[propName]; }); } const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor); if (ownPropMetadata) { Object.keys(ownPropMetadata).forEach((propName) => { const decorators = []; if (propMetadata.hasOwnProperty(propName)) { decorators.push(...propMetadata[propName]); } decorators.push(...ownPropMetadata[propName]); propMetadata[propName] = decorators; }); } return propMetadata; } ownPropMetadata(typeOrFunc) { if (!isType(typeOrFunc)) { return {}; } return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {}; } hasLifecycleHook(type, lcProperty) { return type instanceof Type && lcProperty in type.prototype; } guards(type) { return {}; } getter(name) { return new Function('o', 'return o.' + name + ';'); } setter(name) { return new Function('o', 'v', 'return o.' + name + ' = v;'); } method(name) { const functionBody = `if (!o.${name}) throw new Error('"${name}" is undefined'); return o.${name}.apply(o, args);`; return new Function('o', 'args', functionBody); } // There is not a concept of import uri in Js, but this is useful in developing Dart applications. importUri(type) { // StaticSymbol if (typeof type === 'object' && type['filePath']) { return type['filePath']; } // Runtime type return `./${stringify(type)}`; } resourceUri(type) { return `./${stringify(type)}`; } resolveIdentifier(name, moduleUrl, members, runtime) { return runtime; } resolveEnum(enumIdentifier, name) { return enumIdentifier[name]; } } function convertTsickleDecoratorIntoMetadata(decoratorInvocations) { if (!decoratorInvocations) { return []; } return decoratorInvocations.map(decoratorInvocation => { const decoratorType = decoratorInvocation.type; const annotationCls = decoratorType.annotationCls; const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : []; return new annotationCls(...annotationArgs); }); } function getParentCtor(ctor) { const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null; const parentCtor = parentProto ? parentProto.constructor : null; // Note: We always use `Object` as the null value // to simplify checking later on. return parentCtor || Object; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _THROW_IF_NOT_FOUND = {}; const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; /* * Name of a property (that we patch onto DI decorator), which is used as an annotation of which * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators * in the code, thus making them tree-shakable. */ const DI_DECORATOR_FLAG = '__NG_DI_FLAG__'; const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath'; const NG_TOKEN_PATH = 'ngTokenPath'; const NEW_LINE = /\n/gm; const NO_NEW_LINE = 'ɵ'; const SOURCE = '__source'; const ɵ0$2 = getClosureSafeProperty; const USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0$2 }); /** * Current injector value used by `inject`. * - `undefined`: it is an error to call `inject` * - `null`: `inject` can be called but there is no injector (limp-mode). * - Injector instance: Use the injector for resolution. */ let _currentInjector = undefined; function setCurrentInjector(injector) { const former = _currentInjector; _currentInjector = injector; return former; } function injectInjectorOnly(token, flags = InjectFlags.Default) { if (_currentInjector === undefined) { throw new Error(`inject() must be called from an injection context`); } else if (_currentInjector === null) { return injectRootLimpMode(token, undefined, flags); } else { return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags); } } function ɵɵinject(token, flags = InjectFlags.Default) { return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags); } /** * Throws an error indicating that a factory function could not be generated by the compiler for a * particular class. * * This instruction allows the actual error message to be optimized away when ngDevMode is turned * off, saving bytes of generated code while still providing a good experience in dev mode. * * The name of the class is not mentioned here, but will be in the generated factory function name * and thus in the stack trace. * * @codeGenApi */ function ɵɵinvalidFactoryDep(index) { const msg = ngDevMode ? `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid. This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator. Please check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.` : 'invalid'; throw new Error(msg); } /** * Injects a token from the currently active injector. * * Must be used in the context of a factory function such as one defined for an * `InjectionToken`. Throws an error if not called from such a context. * * Within such a factory function, using this function to request injection of a dependency * is faster and more type-safe than providing an additional array of dependencies * (as has been common with `useFactory` providers). * * @param token The injection token for the dependency to be injected. * @param flags Optional flags that control how injection is executed. * The flags correspond to injection strategies that can be specified with * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`. * @returns the injected value if injection is successful, `null` otherwise. * * @usageNotes * * ### Example * * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'} * * @publicApi */ const inject = ɵɵinject; function injectArgs(types) { const args = []; for (let i = 0; i < types.length; i++) { const arg = resolveForwardRef(types[i]); if (Array.isArray(arg)) { if (arg.length === 0) { throw new Error('Arguments array must have arguments.'); } let type = undefined; let flags = InjectFlags.Default; for (let j = 0; j < arg.length; j++) { const meta = arg[j]; const flag = getInjectFlag(meta); if (typeof flag === 'number') { // Special case when we handle @Inject decorator. if (flag === -1 /* Inject */) { type = meta.token; } else { flags |= flag; } } else { type = meta; } } args.push(ɵɵinject(type, flags)); } else { args.push(ɵɵinject(arg)); } } return args; } /** * Attaches a given InjectFlag to a given decorator using monkey-patching. * Since DI decorators can be used in providers `deps` array (when provider is configured using * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we * attach the flag to make it available both as a static property and as a field on decorator * instance. * * @param decorator Provided DI decorator. * @param flag InjectFlag that should be applied. */ function attachInjectFlag(decorator, flag) { decorator[DI_DECORATOR_FLAG] = flag; decorator.prototype[DI_DECORATOR_FLAG] = flag; return decorator; } /** * Reads monkey-patched property that contains InjectFlag attached to a decorator. * * @param token Token that may contain monkey-patched DI flags property. */ function getInjectFlag(token) { return token[DI_DECORATOR_FLAG]; } function catchInjectorError(e, token, injectorErrorName, source) { const tokenPath = e[NG_TEMP_TOKEN_PATH]; if (token[SOURCE]) { tokenPath.unshift(token[SOURCE]); } e.message = formatError('\n' + e.message, tokenPath, injectorErrorName, source); e[NG_TOKEN_PATH] = tokenPath; e[NG_TEMP_TOKEN_PATH] = null; throw e; } function formatError(text, obj, injectorErrorName, source = null) { text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text; let context = stringify(obj); if (Array.isArray(obj)) { context = obj.map(stringify).join(' -> '); } else if (typeof obj === 'object') { let parts = []; for (let key in obj) { if (obj.hasOwnProperty(key)) { let value = obj[key]; parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value))); } } context = `{${parts.join(', ')}}`; } return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\n ')}`; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$3 = (token) => ({ token }); /** * Inject decorator and metadata. * * @Annotation * @publicApi */ const Inject = attachInjectFlag( // Disable tslint because `DecoratorFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access makeParamDecorator('Inject', ɵ0$3), -1 /* Inject */); /** * Optional decorator and metadata. * * @Annotation * @publicApi */ const Optional = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('Optional'), 8 /* Optional */); /** * Self decorator and metadata. * * @Annotation * @publicApi */ const Self = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('Self'), 2 /* Self */); /** * `SkipSelf` decorator and metadata. * * @Annotation * @publicApi */ const SkipSelf = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* SkipSelf */); /** * Host decorator and metadata. * * @Annotation * @publicApi */ const Host = // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined. // tslint:disable-next-line: no-toplevel-property-access attachInjectFlag(makeParamDecorator('Host'), 1 /* Host */); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _reflect = null; function getReflect() { return (_reflect = _reflect || new ReflectionCapabilities()); } function reflectDependencies(type) { return convertDependencies(getReflect().parameters(type)); } function convertDependencies(deps) { const compiler = getCompilerFacade(); return deps.map(dep => reflectDependency(compiler, dep)); } function reflectDependency(compiler, dep) { const meta = { token: null, host: false, optional: false, resolved: compiler.R3ResolvedDependencyType.Token, self: false, skipSelf: false, }; function setTokenAndResolvedType(token) { meta.resolved = compiler.R3ResolvedDependencyType.Token; meta.token = token; } if (Array.isArray(dep) && dep.length > 0) { for (let j = 0; j < dep.length; j++) { const param = dep[j]; if (param === undefined) { // param may be undefined if type of dep is not set by ngtsc continue; } const proto = Object.getPrototypeOf(param); if (param instanceof Optional || proto.ngMetadataName === 'Optional') { meta.optional = true; } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') { meta.skipSelf = true; } else if (param instanceof Self || proto.ngMetadataName === 'Self') { meta.self = true; } else if (param instanceof Host || proto.ngMetadataName === 'Host') { meta.host = true; } else if (param instanceof Inject) { meta.token = param.token; } else if (param instanceof Attribute) { if (param.attributeName === undefined) { throw new Error(`Attribute name must be defined.`); } meta.token = param.attributeName; meta.resolved = compiler.R3ResolvedDependencyType.Attribute; } else if (param.__ChangeDetectorRef__ === true) { meta.token = param; meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef; } else { setTokenAndResolvedType(param); } } } else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) { meta.token = undefined; meta.resolved = R3ResolvedDependencyType.Invalid; } else { setTokenAndResolvedType(dep); } return meta; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Used to resolve resource URLs on `@Component` when used with JIT compilation. * * Example: * ``` * @Component({ * selector: 'my-comp', * templateUrl: 'my-comp.html', // This requires asynchronous resolution * }) * class MyComponent{ * } * * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously. * * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner. * * // Use browser's `fetch()` function as the default resource resolution strategy. * resolveComponentResources(fetch).then(() => { * // After resolution all URLs have been converted into `template` strings. * renderComponent(MyComponent); * }); * * ``` * * NOTE: In AOT the resolution happens during compilation, and so there should be no need * to call this method outside JIT mode. * * @param resourceResolver a function which is responsible for returning a `Promise` to the * contents of the resolved URL. Browser's `fetch()` method is a good default implementation. */ function resolveComponentResources(resourceResolver) { // Store all promises which are fetching the resources. const componentResolved = []; // Cache so that we don't fetch the same resource more than once. const urlMap = new Map(); function cachedResourceResolve(url) { let promise = urlMap.get(url); if (!promise) { const resp = resourceResolver(url); urlMap.set(url, promise = resp.then(unwrapResponse)); } return promise; } componentResourceResolutionQueue.forEach((component, type) => { const promises = []; if (component.templateUrl) { promises.push(cachedResourceResolve(component.templateUrl).then((template) => { component.template = template; })); } const styleUrls = component.styleUrls; const styles = component.styles || (component.styles = []); const styleOffset = component.styles.length; styleUrls && styleUrls.forEach((styleUrl, index) => { styles.push(''); // pre-allocate array. promises.push(cachedResourceResolve(styleUrl).then((style) => { styles[styleOffset + index] = style; styleUrls.splice(styleUrls.indexOf(styleUrl), 1); if (styleUrls.length == 0) { component.styleUrls = undefined; } })); }); const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type)); componentResolved.push(fullyResolved); }); clearResolutionOfComponentResourcesQueue(); return Promise.all(componentResolved).then(() => undefined); } let componentResourceResolutionQueue = new Map(); // Track when existing ɵcmp for a Type is waiting on resources. const componentDefPendingResolution = new Set(); function maybeQueueResolutionOfComponentResources(type, metadata) { if (componentNeedsResolution(metadata)) { componentResourceResolutionQueue.set(type, metadata); componentDefPendingResolution.add(type); } } function isComponentDefPendingResolution(type) { return componentDefPendingResolution.has(type); } function componentNeedsResolution(component) { return !!((component.templateUrl && !component.hasOwnProperty('template')) || component.styleUrls && component.styleUrls.length); } function clearResolutionOfComponentResourcesQueue() { const old = componentResourceResolutionQueue; componentResourceResolutionQueue = new Map(); return old; } function restoreComponentResolutionQueue(queue) { componentDefPendingResolution.clear(); queue.forEach((_, type) => componentDefPendingResolution.add(type)); componentResourceResolutionQueue = queue; } function isComponentResourceResolutionQueueEmpty() { return componentResourceResolutionQueue.size === 0; } function unwrapResponse(response) { return typeof response == 'string' ? response : response.text(); } function componentDefResolved(type) { componentDefPendingResolution.delete(type); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The Trusted Types policy, or null if Trusted Types are not * enabled/supported, or undefined if the policy has not been created yet. */ let policy; /** * Returns the Trusted Types policy, or null if Trusted Types are not * enabled/supported. The first call to this function will create the policy. */ function getPolicy() { if (policy === undefined) { policy = null; if (_global.trustedTypes) { try { policy = _global.trustedTypes.createPolicy('angular', { createHTML: (s) => s, createScript: (s) => s, createScriptURL: (s) => s, }); } catch (_a) { // trustedTypes.createPolicy throws if called with a name that is // already registered, even in report-only mode. Until the API changes, // catch the error not to break the applications functionally. In such // cases, the code will fall back to using strings. } } } return policy; } /** * Unsafely promote a string to a TrustedHTML, falling back to strings when * Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that the * provided string will never cause an XSS vulnerability if used in a context * that will be interpreted as HTML by a browser, e.g. when assigning to * element.innerHTML. */ function trustedHTMLFromString(html) { var _a; return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html; } /** * Unsafely promote a string to a TrustedScript, falling back to strings when * Trusted Types are not available. * @security In particular, it must be assured that the provided string will * never cause an XSS vulnerability if used in a context that will be * interpreted and executed as a script by a browser, e.g. when calling eval. */ function trustedScriptFromString(script) { var _a; return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script; } /** * Unsafely promote a string to a TrustedScriptURL, falling back to strings * when Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that the * provided string will never cause an XSS vulnerability if used in a context * that will cause a browser to load and execute a resource, e.g. when * assigning to script.src. */ function trustedScriptURLFromString(url) { var _a; return ((_a = getPolicy()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url; } /** * Unsafely call the Function constructor with the given string arguments. It * is only available in development mode, and should be stripped out of * production code. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only called from development code, as use in production code can lead to * XSS vulnerabilities. */ function newTrustedFunctionForDev(...args) { if (typeof ngDevMode === 'undefined') { throw new Error('newTrustedFunctionForDev should never be called in production'); } if (!_global.trustedTypes) { // In environments that don't support Trusted Types, fall back to the most // straightforward implementation: return new Function(...args); } // Chrome currently does not support passing TrustedScript to the Function // constructor. The following implements the workaround proposed on the page // below, where the Chromium bug is also referenced: // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor const fnArgs = args.slice(0, -1).join(','); const fnBody = args[args.length - 1]; const body = `(function anonymous(${fnArgs} ) { ${fnBody} })`; // Using eval directly confuses the compiler and prevents this module from // being stripped out of JS binaries even if not used. The global['eval'] // indirection fixes that. const fn = _global['eval'](trustedScriptFromString(body)); if (fn.bind === undefined) { // Workaround for a browser bug that only exists in Chrome 83, where passing // a TrustedScript to eval just returns the TrustedScript back without // evaluating it. In that case, fall back to the most straightforward // implementation: return new Function(...args); } // To completely mimic the behavior of calling "new Function", two more // things need to happen: // 1. Stringifying the resulting function should return its source code fn.toString = () => body; // 2. When calling the resulting function, `this` should refer to `global` return fn.bind(_global); // When Trusted Types support in Function constructors is widely available, // the implementation of this function can be simplified to: // return new Function(...args.map(a => trustedScriptFromString(a))); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The Trusted Types policy, or null if Trusted Types are not * enabled/supported, or undefined if the policy has not been created yet. */ let policy$1; /** * Returns the Trusted Types policy, or null if Trusted Types are not * enabled/supported. The first call to this function will create the policy. */ function getPolicy$1() { if (policy$1 === undefined) { policy$1 = null; if (_global.trustedTypes) { try { policy$1 = _global.trustedTypes .createPolicy('angular#unsafe-bypass', { createHTML: (s) => s, createScript: (s) => s, createScriptURL: (s) => s, }); } catch (_a) { // trustedTypes.createPolicy throws if called with a name that is // already registered, even in report-only mode. Until the API changes, // catch the error not to break the applications functionally. In such // cases, the code will fall back to using strings. } } } return policy$1; } /** * Unsafely promote a string to a TrustedHTML, falling back to strings when * Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only passed strings that come directly from custom sanitizers or the * bypassSecurityTrust* functions. */ function trustedHTMLFromStringBypass(html) { var _a; return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createHTML(html)) || html; } /** * Unsafely promote a string to a TrustedScript, falling back to strings when * Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only passed strings that come directly from custom sanitizers or the * bypassSecurityTrust* functions. */ function trustedScriptFromStringBypass(script) { var _a; return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScript(script)) || script; } /** * Unsafely promote a string to a TrustedScriptURL, falling back to strings * when Trusted Types are not available. * @security This is a security-sensitive function; any use of this function * must go through security review. In particular, it must be assured that it * is only passed strings that come directly from custom sanitizers or the * bypassSecurityTrust* functions. */ function trustedScriptURLFromStringBypass(url) { var _a; return ((_a = getPolicy$1()) === null || _a === void 0 ? void 0 : _a.createScriptURL(url)) || url; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SafeValueImpl { constructor(changingThisBreaksApplicationSecurity) { this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity; } toString() { return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` + ` (see https://g.co/ng/security#xss)`; } } class SafeHtmlImpl extends SafeValueImpl { getTypeName() { return "HTML" /* Html */; } } class SafeStyleImpl extends SafeValueImpl { getTypeName() { return "Style" /* Style */; } } class SafeScriptImpl extends SafeValueImpl { getTypeName() { return "Script" /* Script */; } } class SafeUrlImpl extends SafeValueImpl { getTypeName() { return "URL" /* Url */; } } class SafeResourceUrlImpl extends SafeValueImpl { getTypeName() { return "ResourceURL" /* ResourceUrl */; } } function unwrapSafeValue(value) { return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity : value; } function allowSanitizationBypassAndThrow(value, type) { const actualType = getSanitizationBypassType(value); if (actualType != null && actualType !== type) { // Allow ResourceURLs in URL contexts, they are strictly more trusted. if (actualType === "ResourceURL" /* ResourceUrl */ && type === "URL" /* Url */) return true; throw new Error(`Required a safe ${type}, got a ${actualType} (see https://g.co/ng/security#xss)`); } return actualType === type; } function getSanitizationBypassType(value) { return value instanceof SafeValueImpl && value.getTypeName() || null; } /** * Mark `html` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link htmlSanitizer} to be trusted implicitly. * * @param trustedHtml `html` string which needs to be implicitly trusted. * @returns a `html` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustHtml(trustedHtml) { return new SafeHtmlImpl(trustedHtml); } /** * Mark `style` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link styleSanitizer} to be trusted implicitly. * * @param trustedStyle `style` string which needs to be implicitly trusted. * @returns a `style` hich has been branded to be implicitly trusted. */ function bypassSanitizationTrustStyle(trustedStyle) { return new SafeStyleImpl(trustedStyle); } /** * Mark `script` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link scriptSanitizer} to be trusted implicitly. * * @param trustedScript `script` string which needs to be implicitly trusted. * @returns a `script` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustScript(trustedScript) { return new SafeScriptImpl(trustedScript); } /** * Mark `url` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link urlSanitizer} to be trusted implicitly. * * @param trustedUrl `url` string which needs to be implicitly trusted. * @returns a `url` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustUrl(trustedUrl) { return new SafeUrlImpl(trustedUrl); } /** * Mark `url` string as trusted. * * This function wraps the trusted string in `String` and brands it in a way which makes it * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly. * * @param trustedResourceUrl `url` string which needs to be implicitly trusted. * @returns a `url` which has been branded to be implicitly trusted. */ function bypassSanitizationTrustResourceUrl(trustedResourceUrl) { return new SafeResourceUrlImpl(trustedResourceUrl); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML * that needs sanitizing. * Depending upon browser support we use one of two strategies for doing this. * Default: DOMParser strategy * Fallback: InertDocument strategy */ function getInertBodyHelper(defaultDoc) { const inertDocumentHelper = new InertDocumentHelper(defaultDoc); return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper; } /** * Uses DOMParser to create and fill an inert body element. * This is the default strategy used in browsers that support it. */ class DOMParserHelper { constructor(inertDocumentHelper) { this.inertDocumentHelper = inertDocumentHelper; } getInertBodyElement(html) { // We add these extra elements to ensure that the rest of the content is parsed as expected // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags // in `html` from consuming the otherwise explicit `</body>` tag. html = '<body><remove></remove>' + html; try { const body = new window.DOMParser() .parseFromString(trustedHTMLFromString(html), 'text/html') .body; if (body === null) { // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only // becomes available in the following tick of the JS engine. In that case we fall back to // the `inertDocumentHelper` instead. return this.inertDocumentHelper.getInertBodyElement(html); } body.removeChild(body.firstChild); return body; } catch (_a) { return null; } } } /** * Use an HTML5 `template` element, if supported, or an inert body element created via * `createHtmlDocument` to create and fill an inert DOM element. * This is the fallback strategy if the browser does not support DOMParser. */ class InertDocumentHelper { constructor(defaultDoc) { this.defaultDoc = defaultDoc; this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert'); if (this.inertDocument.body == null) { // usually there should be only one body element in the document, but IE doesn't have any, so // we need to create one. const inertHtml = this.inertDocument.createElement('html'); this.inertDocument.appendChild(inertHtml); const inertBodyElement = this.inertDocument.createElement('body'); inertHtml.appendChild(inertBodyElement); } } getInertBodyElement(html) { // Prefer using <template> element if supported. const templateEl = this.inertDocument.createElement('template'); if ('content' in templateEl) { templateEl.innerHTML = trustedHTMLFromString(html); return templateEl; } // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html` // and we returned the inert `body` node. This was changed, because IE seems to treat setting // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted // yet. In particular, IE appears to split some of the text into multiple text nodes rather // than keeping them in a single one which ends up messing with Ivy's i18n parsing further // down the line. This has been worked around by creating a new inert `body` and using it as // the root node in which we insert the HTML. const inertBody = this.inertDocument.createElement('body'); inertBody.innerHTML = trustedHTMLFromString(html); // Support: IE 11 only // strip custom-namespaced attributes on IE<=11 if (this.defaultDoc.documentMode) { this.stripCustomNsAttrs(inertBody); } return inertBody; } /** * When IE11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1' * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g. * 'ns1:xlink:foo'). * * This is undesirable since we don't want to allow any of these custom attributes. This method * strips them all. */ stripCustomNsAttrs(el) { const elAttrs = el.attributes; // loop backwards so that we can support removals. for (let i = elAttrs.length - 1; 0 < i; i--) { const attrib = elAttrs.item(i); const attrName = attrib.name; if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) { el.removeAttribute(attrName); } } let childNode = el.firstChild; while (childNode) { if (childNode.nodeType === Node.ELEMENT_NODE) this.stripCustomNsAttrs(childNode); childNode = childNode.nextSibling; } } } /** * We need to determine whether the DOMParser exists in the global context and * supports parsing HTML; HTML parsing support is not as wide as other formats, see * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility. * * @suppress {uselessCode} */ function isDOMParserAvailable() { try { return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html'); } catch (_a) { return false; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A pattern that recognizes a commonly useful subset of URLs that are safe. * * This regular expression matches a subset of URLs that will not cause script * execution if used in URL context within a HTML document. Specifically, this * regular expression matches if (comment from here on and regex copied from * Soy's EscapingConventions): * (1) Either an allowed protocol (http, https, mailto or ftp). * (2) or no protocol. A protocol must be followed by a colon. The below * allows that by allowing colons only after one of the characters [/?#]. * A colon after a hash (#) must be in the fragment. * Otherwise, a colon after a (?) must be in a query. * Otherwise, a colon after a single solidus (/) must be in a path. * Otherwise, a colon after a double solidus (//) must be in the authority * (before port). * * The pattern disallows &, used in HTML entity declarations before * one of the characters in [/?#]. This disallows HTML entities used in the * protocol name, which should never happen, e.g. "http" for "http". * It also disallows HTML entities in the first path part of a relative path, * e.g. "foo<bar/baz". Our existing escaping functions should not produce * that. More importantly, it disallows masking of a colon, * e.g. "javascript:...". * * This regular expression was taken from the Closure sanitization library. */ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi; /* A pattern that matches safe srcset values */ const SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi; /** A pattern that matches safe data URLs. Only matches image, video and audio types. */ const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i; function _sanitizeUrl(url) { url = String(url); if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url; if (typeof ngDevMode === 'undefined' || ngDevMode) { console.warn(`WARNING: sanitizing unsafe URL value ${url} (see https://g.co/ng/security#xss)`); } return 'unsafe:' + url; } function sanitizeSrcset(srcset) { srcset = String(srcset); return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', '); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function tagSet(tags) { const res = {}; for (const t of tags.split(',')) res[t] = true; return res; } function merge(...sets) { const res = {}; for (const s of sets) { for (const v in s) { if (s.hasOwnProperty(v)) res[v] = true; } } return res; } // Good source of info about elements and attributes // https://html.spec.whatwg.org/#semantics // https://simon.html5.org/html-elements // Safe Void Elements - HTML5 // https://html.spec.whatwg.org/#void-elements const VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr'); // Elements that you can, intentionally, leave open (and which close themselves) // https://html.spec.whatwg.org/#optional-tags const OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr'); const OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt'); const OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS); // Safe Block Elements - HTML5 const BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' + 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' + 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul')); // Inline Elements - HTML5 const INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' + 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' + 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video')); const VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS); // Attributes that have href and hence need to be sanitized const URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href'); // Attributes that have special href set hence need to be sanitized const SRCSET_ATTRS = tagSet('srcset'); const HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' + 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' + 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' + 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' + 'valign,value,vspace,width'); // Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018) const ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' + 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' + 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' + 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' + 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' + 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' + 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext'); // NB: This currently consciously doesn't support SVG. SVG sanitization has had several security // issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via // innerHTML is required, SVG attributes should be added here. // NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those // can be sanitized, but they increase security surface area without a legitimate use case, so they // are left out here. const VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS); // Elements whose content should not be traversed/preserved, if the elements themselves are invalid. // // Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve) // `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we // don't want to preserve the content, if the elements themselves are going to be removed. const SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template'); /** * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe * attributes. */ class SanitizingHtmlSerializer { constructor() { // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just // because characters were re-encoded. this.sanitizedSomething = false; this.buf = []; } sanitizeChildren(el) { // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters. // However this code never accesses properties off of `document` before deleting its contents // again, so it shouldn't be vulnerable to DOM clobbering. let current = el.firstChild; let traverseContent = true; while (current) { if (current.nodeType === Node.ELEMENT_NODE) { traverseContent = this.startElement(current); } else if (current.nodeType === Node.TEXT_NODE) { this.chars(current.nodeValue); } else { // Strip non-element, non-text nodes. this.sanitizedSomething = true; } if (traverseContent && current.firstChild) { current = current.firstChild; continue; } while (current) { // Leaving the element. Walk up and to the right, closing tags as we go. if (current.nodeType === Node.ELEMENT_NODE) { this.endElement(current); } let next = this.checkClobberedElement(current, current.nextSibling); if (next) { current = next; break; } current = this.checkClobberedElement(current, current.parentNode); } } return this.buf.join(''); } /** * Sanitizes an opening element tag (if valid) and returns whether the element's contents should * be traversed. Element content must always be traversed (even if the element itself is not * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`. * * @param element The element to sanitize. * @return True if the element's contents should be traversed. */ startElement(element) { const tagName = element.nodeName.toLowerCase(); if (!VALID_ELEMENTS.hasOwnProperty(tagName)) { this.sanitizedSomething = true; return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName); } this.buf.push('<'); this.buf.push(tagName); const elAttrs = element.attributes; for (let i = 0; i < elAttrs.length; i++) { const elAttr = elAttrs.item(i); const attrName = elAttr.name; const lower = attrName.toLowerCase(); if (!VALID_ATTRS.hasOwnProperty(lower)) { this.sanitizedSomething = true; continue; } let value = elAttr.value; // TODO(martinprobst): Special case image URIs for data:image/... if (URI_ATTRS[lower]) value = _sanitizeUrl(value); if (SRCSET_ATTRS[lower]) value = sanitizeSrcset(value); this.buf.push(' ', attrName, '="', encodeEntities(value), '"'); } this.buf.push('>'); return true; } endElement(current) { const tagName = current.nodeName.toLowerCase(); if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) { this.buf.push('</'); this.buf.push(tagName); this.buf.push('>'); } } chars(chars) { this.buf.push(encodeEntities(chars)); } checkClobberedElement(node, nextNode) { if (nextNode && (node.compareDocumentPosition(nextNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) { throw new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`); } return nextNode; } } // Regular Expressions for parsing tags and attributes const SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; // ! to ~ is the ASCII range. const NON_ALPHANUMERIC_REGEXP = /([^\#-~ |!])/g; /** * Escapes all potentially dangerous characters, so that the * resulting string can be safely inserted into attribute or * element text. * @param value */ function encodeEntities(value) { return value.replace(/&/g, '&') .replace(SURROGATE_PAIR_REGEXP, function (match) { const hi = match.charCodeAt(0); const low = match.charCodeAt(1); return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; }) .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; }) .replace(/</g, '<') .replace(/>/g, '>'); } let inertBodyHelper; /** * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to * the DOM in a browser environment. */ function _sanitizeHtml(defaultDoc, unsafeHtmlInput) { let inertBodyElement = null; try { inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc); // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime). let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : ''; inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous. let mXSSAttempts = 5; let parsedHtml = unsafeHtml; do { if (mXSSAttempts === 0) { throw new Error('Failed to sanitize html because the input is unstable'); } mXSSAttempts--; unsafeHtml = parsedHtml; parsedHtml = inertBodyElement.innerHTML; inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml); } while (unsafeHtml !== parsedHtml); const sanitizer = new SanitizingHtmlSerializer(); const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement); if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) { console.warn('WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss'); } return trustedHTMLFromString(safeHtml); } finally { // In case anything goes wrong, clear out inertElement to reset the entire DOM structure. if (inertBodyElement) { const parent = getTemplateContent(inertBodyElement) || inertBodyElement; while (parent.firstChild) { parent.removeChild(parent.firstChild); } } } } function getTemplateContent(el) { return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ? el.content : null; } function isTemplateElement(el) { return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE'; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly * handled. * * See DomSanitizer for more details on security in Angular applications. * * @publicApi */ var SecurityContext; (function (SecurityContext) { SecurityContext[SecurityContext["NONE"] = 0] = "NONE"; SecurityContext[SecurityContext["HTML"] = 1] = "HTML"; SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE"; SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT"; SecurityContext[SecurityContext["URL"] = 4] = "URL"; SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL"; })(SecurityContext || (SecurityContext = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing * dangerous content. * * This method parses the `html` and locates potentially dangerous content (such as urls and * javascript) and removes it. * * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}. * * @param unsafeHtml untrusted `html`, typically from the user. * @returns `html` string which is safe to display to user, because all of the dangerous javascript * and urls have been removed. * * @codeGenApi */ function ɵɵsanitizeHtml(unsafeHtml) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || ''); } if (allowSanitizationBypassAndThrow(unsafeHtml, "HTML" /* Html */)) { return trustedHTMLFromStringBypass(unwrapSafeValue(unsafeHtml)); } return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml)); } /** * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing * dangerous content. * * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}. * * @param unsafeStyle untrusted `style`, typically from the user. * @returns `style` string which is safe to bind to the `style` properties. * * @codeGenApi */ function ɵɵsanitizeStyle(unsafeStyle) { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || ''; } if (allowSanitizationBypassAndThrow(unsafeStyle, "Style" /* Style */)) { return unwrapSafeValue(unsafeStyle); } return renderStringify(unsafeStyle); } /** * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing * dangerous * content. * * This method parses the `url` and locates potentially dangerous content (such as javascript) and * removes it. * * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}. * * @param unsafeUrl untrusted `url`, typically from the user. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because * all of the dangerous javascript has been removed. * * @codeGenApi */ function ɵɵsanitizeUrl(unsafeUrl) { const sanitizer = getSanitizer(); if (sanitizer) { return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || ''; } if (allowSanitizationBypassAndThrow(unsafeUrl, "URL" /* Url */)) { return unwrapSafeValue(unsafeUrl); } return _sanitizeUrl(renderStringify(unsafeUrl)); } /** * A `url` sanitizer which only lets trusted `url`s through. * * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}. * * @param unsafeResourceUrl untrusted `url`, typically from the user. * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because * only trusted `url`s have been allowed to pass. * * @codeGenApi */ function ɵɵsanitizeResourceUrl(unsafeResourceUrl) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || ''); } if (allowSanitizationBypassAndThrow(unsafeResourceUrl, "ResourceURL" /* ResourceUrl */)) { return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl)); } throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)'); } /** * A `script` sanitizer which only lets trusted javascript through. * * This passes only `script`s marked trusted by calling {@link * bypassSanitizationTrustScript}. * * @param unsafeScript untrusted `script`, typically from the user. * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`, * because only trusted `scripts` have been allowed to pass. * * @codeGenApi */ function ɵɵsanitizeScript(unsafeScript) { const sanitizer = getSanitizer(); if (sanitizer) { return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || ''); } if (allowSanitizationBypassAndThrow(unsafeScript, "Script" /* Script */)) { return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript)); } throw new Error('unsafe value used in a script context'); } /** * A template tag function for promoting the associated constant literal to a * TrustedHTML. Interpolation is explicitly not allowed. * * @param html constant template literal containing trusted HTML. * @returns TrustedHTML wrapping `html`. * * @security This is a security-sensitive function and should only be used to * convert constant values of attributes and properties found in * application-provided Angular templates to TrustedHTML. * * @codeGenApi */ function ɵɵtrustConstantHtml(html) { // The following runtime check ensures that the function was called as a // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray // is an array with a `raw` property that is also an array. The associated // template literal has no interpolation if and only if the length of the // TemplateStringsArray is 1. if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) { throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`); } return trustedHTMLFromString(html[0]); } /** * A template tag function for promoting the associated constant literal to a * TrustedScriptURL. Interpolation is explicitly not allowed. * * @param url constant template literal containing a trusted script URL. * @returns TrustedScriptURL wrapping `url`. * * @security This is a security-sensitive function and should only be used to * convert constant values of attributes and properties found in * application-provided Angular templates to TrustedScriptURL. * * @codeGenApi */ function ɵɵtrustConstantResourceUrl(url) { // The following runtime check ensures that the function was called as a // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A // TemplateStringsArray is an array with a `raw` property that is also an // array. The associated template literal has no interpolation if and only if // the length of the TemplateStringsArray is 1. if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) { throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`); } return trustedScriptURLFromString(url[0]); } /** * Detects which sanitizer to use for URL property, based on tag name and prop name. * * The rules are based on the RESOURCE_URL context config from * `packages/compiler/src/schema/dom_security_schema.ts`. * If tag and prop names don't match Resource URL schema, use URL sanitizer. */ function getUrlSanitizer(tag, prop) { if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' || tag === 'script')) || (prop === 'href' && (tag === 'base' || tag === 'link'))) { return ɵɵsanitizeResourceUrl; } return ɵɵsanitizeUrl; } /** * Sanitizes URL, selecting sanitizer function based on tag and property names. * * This function is used in case we can't define security context at compile time, when only prop * name is available. This happens when we generate host bindings for Directives/Components. The * host element is unknown at compile time, so we defer calculation of specific sanitizer to * runtime. * * @param unsafeUrl untrusted `url`, typically from the user. * @param tag target element tag name. * @param prop name of the property that contains the value. * @returns `url` string which is safe to bind. * * @codeGenApi */ function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) { return getUrlSanitizer(tag, prop)(unsafeUrl); } function validateAgainstEventProperties(name) { if (name.toLowerCase().startsWith('on')) { const msg = `Binding to event property '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...` + `\nIf '${name}' is a directive input, make sure the directive is imported by the` + ` current module.`; throw new Error(msg); } } function validateAgainstEventAttributes(name) { if (name.toLowerCase().startsWith('on')) { const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` + `please use (${name.slice(2)})=...`; throw new Error(msg); } } function getSanitizer() { const lView = getLView(); return lView && lView[SANITIZER]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ERROR_TYPE = 'ngType'; const ERROR_DEBUG_CONTEXT = 'ngDebugContext'; const ERROR_ORIGINAL_ERROR = 'ngOriginalError'; const ERROR_LOGGER = 'ngErrorLogger'; function wrappedError(message, originalError) { const msg = `${message} caused by: ${originalError instanceof Error ? originalError.message : originalError}`; const error = Error(msg); error[ERROR_ORIGINAL_ERROR] = originalError; return error; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getType(error) { return error[ERROR_TYPE]; } function getDebugContext(error) { return error[ERROR_DEBUG_CONTEXT]; } function getOriginalError(error) { return error[ERROR_ORIGINAL_ERROR]; } function getErrorLogger(error) { return error[ERROR_LOGGER] || defaultErrorLogger; } function defaultErrorLogger(console, ...values) { console.error(...values); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides a hook for centralized exception handling. * * The default implementation of `ErrorHandler` prints error messages to the `console`. To * intercept error handling, write a custom exception handler that replaces this default as * appropriate for your app. * * @usageNotes * ### Example * * ``` * class MyErrorHandler implements ErrorHandler { * handleError(error) { * // do something with the exception * } * } * * @NgModule({ * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}] * }) * class MyModule {} * ``` * * @publicApi */ class ErrorHandler { constructor() { /** * @internal */ this._console = console; } handleError(error) { const originalError = this._findOriginalError(error); const context = this._findContext(error); // Note: Browser consoles show the place from where console.error was called. // We can use this to give users additional information about the error. const errorLogger = getErrorLogger(error); errorLogger(this._console, `ERROR`, error); if (originalError) { errorLogger(this._console, `ORIGINAL ERROR`, originalError); } if (context) { errorLogger(this._console, 'ERROR CONTEXT', context); } } /** @internal */ _findContext(error) { if (error) { return getDebugContext(error) ? getDebugContext(error) : this._findContext(getOriginalError(error)); } return null; } /** @internal */ _findOriginalError(error) { let e = getOriginalError(error); while (e && getOriginalError(e)) { e = getOriginalError(e); } return e; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines a schema that allows an NgModule to contain the following: * - Non-Angular elements named with dash case (`-`). * - Element properties named with dash case (`-`). * Dash case is the naming convention for custom elements. * * @publicApi */ const CUSTOM_ELEMENTS_SCHEMA = { name: 'custom-elements' }; /** * Defines a schema that allows any property on any element. * * @publicApi */ const NO_ERRORS_SCHEMA = { name: 'no-errors-schema' }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Disallowed strings in the comment. * * see: https://html.spec.whatwg.org/multipage/syntax.html#comments */ const COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g; /** * Delimiter in the disallowed strings which needs to be wrapped with zero with character. */ const COMMENT_DELIMITER = /(<|>)/; const COMMENT_DELIMITER_ESCAPED = '\u200B$1\u200B'; /** * Escape the content of comment strings so that it can be safely inserted into a comment node. * * The issue is that HTML does not specify any way to escape comment end text inside the comment. * Consider: `<!-- The way you close a comment is with ">", and "->" at the beginning or by "-->" or * "--!>" at the end. -->`. Above the `"-->"` is meant to be text not an end to the comment. This * can be created programmatically through DOM APIs. (`<!--` are also disallowed.) * * see: https://html.spec.whatwg.org/multipage/syntax.html#comments * * ``` * div.innerHTML = div.innerHTML * ``` * * One would expect that the above code would be safe to do, but it turns out that because comment * text is not escaped, the comment may contain text which will prematurely close the comment * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which * may contain such text and expect them to be safe.) * * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and * surrounding them with `_>_` where the `_` is a zero width space `\u200B`. The result is that if a * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the * text it will render normally but it will not cause the HTML parser to close/open the comment. * * @param value text to make safe for comment node by escaping the comment open/close character * sequence. */ function escapeCommentText(value) { return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!! */ /** * Creates an `Array` construction with a given name. This is useful when * looking for memory consumption to see what time of array it is. * * * @param name Name to give to the constructor * @returns A subclass of `Array` if possible. This can only be done in * environments which support `class` construct. */ function createNamedArrayType(name) { // This should never be called in prod mode, so let's verify that is the case. if (ngDevMode) { try { // If this function were compromised the following could lead to arbitrary // script execution. We bless it with Trusted Types anyway since this // function is stripped out of production binaries. return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array); } catch (e) { // If it does not work just give up and fall back to regular Array. return Array; } } else { throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code'); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function normalizeDebugBindingName(name) { // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers name = camelCaseToDashCase(name.replace(/[$@]/g, '_')); return `ng-reflect-${name}`; } const CAMEL_CASE_REGEXP = /([A-Z])/g; function camelCaseToDashCase(input) { return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase()); } function normalizeDebugBindingValue(value) { try { // Limit the size of the value as otherwise the DOM just gets polluted. return value != null ? value.toString().slice(0, 30) : value; } catch (e) { return '[ERROR] Exception while trying to serialize the value'; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Returns the matching `LContext` data for a given DOM node, directive or component instance. * * This function will examine the provided DOM element, component, or directive instance\'s * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched * value will be that of the newly created `LContext`. * * If the monkey-patched value is the `LView` instance then the context value for that * target will be created and the monkey-patch reference will be updated. Therefore when this * function is called it may mutate the provided element\'s, component\'s or any of the associated * directive\'s monkey-patch values. * * If the monkey-patch value is not detected then the code will walk up the DOM until an element * is found which contains a monkey-patch reference. When that occurs then the provided element * will be updated with a new context (which is then returned). If the monkey-patch value is not * detected for a component/directive instance then it will throw an error (all components and * directives should be automatically monkey-patched by ivy). * * @param target Component, Directive or DOM Node. */ function getLContext(target) { let mpValue = readPatchedData(target); if (mpValue) { // only when it's an array is it considered an LView instance // ... otherwise it's an already constructed LContext instance if (Array.isArray(mpValue)) { const lView = mpValue; let nodeIndex; let component = undefined; let directives = undefined; if (isComponentInstance(target)) { nodeIndex = findViaComponent(lView, target); if (nodeIndex == -1) { throw new Error('The provided component was not found in the application'); } component = target; } else if (isDirectiveInstance(target)) { nodeIndex = findViaDirective(lView, target); if (nodeIndex == -1) { throw new Error('The provided directive was not found in the application'); } directives = getDirectivesAtNodeIndex(nodeIndex, lView, false); } else { nodeIndex = findViaNativeElement(lView, target); if (nodeIndex == -1) { return null; } } // the goal is not to fill the entire context full of data because the lookups // are expensive. Instead, only the target data (the element, component, container, ICU // expression or directive details) are filled into the context. If called multiple times // with different target values then the missing target data will be filled in. const native = unwrapRNode(lView[nodeIndex]); const existingCtx = readPatchedData(native); const context = (existingCtx && !Array.isArray(existingCtx)) ? existingCtx : createLContext(lView, nodeIndex, native); // only when the component has been discovered then update the monkey-patch if (component && context.component === undefined) { context.component = component; attachPatchData(context.component, context); } // only when the directives have been discovered then update the monkey-patch if (directives && context.directives === undefined) { context.directives = directives; for (let i = 0; i < directives.length; i++) { attachPatchData(directives[i], context); } } attachPatchData(context.native, context); mpValue = context; } } else { const rElement = target; ngDevMode && assertDomNode(rElement); // if the context is not found then we need to traverse upwards up the DOM // to find the nearest element that has already been monkey patched with data let parent = rElement; while (parent = parent.parentNode) { const parentContext = readPatchedData(parent); if (parentContext) { let lView; if (Array.isArray(parentContext)) { lView = parentContext; } else { lView = parentContext.lView; } // the edge of the app was also reached here through another means // (maybe because the DOM was changed manually). if (!lView) { return null; } const index = findViaNativeElement(lView, rElement); if (index >= 0) { const native = unwrapRNode(lView[index]); const context = createLContext(lView, index, native); attachPatchData(native, context); mpValue = context; break; } } } } return mpValue || null; } /** * Creates an empty instance of a `LContext` context */ function createLContext(lView, nodeIndex, native) { return { lView, nodeIndex, native, component: undefined, directives: undefined, localRefs: undefined, }; } /** * Takes a component instance and returns the view for that component. * * @param componentInstance * @returns The component's view */ function getComponentViewByInstance(componentInstance) { let lView = readPatchedData(componentInstance); let view; if (Array.isArray(lView)) { const nodeIndex = findViaComponent(lView, componentInstance); view = getComponentLViewByIndex(nodeIndex, lView); const context = createLContext(lView, nodeIndex, view[HOST]); context.component = componentInstance; attachPatchData(componentInstance, context); attachPatchData(context.native, context); } else { const context = lView; view = getComponentLViewByIndex(context.nodeIndex, context.lView); } return view; } /** * Assigns the given data to the given target (which could be a component, * directive or DOM node instance) using monkey-patching. */ function attachPatchData(target, data) { target[MONKEY_PATCH_KEY_NAME] = data; } function isComponentInstance(instance) { return instance && instance.constructor && instance.constructor.ɵcmp; } function isDirectiveInstance(instance) { return instance && instance.constructor && instance.constructor.ɵdir; } /** * Locates the element within the given LView and returns the matching index */ function findViaNativeElement(lView, target) { const tView = lView[TVIEW]; for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) { if (unwrapRNode(lView[i]) === target) { return i; } } return -1; } /** * Locates the next tNode (child, sibling or parent). */ function traverseNextElement(tNode) { if (tNode.child) { return tNode.child; } else if (tNode.next) { return tNode.next; } else { // Let's take the following template: <div><span>text</span></div><component/> // After checking the text node, we need to find the next parent that has a "next" TNode, // in this case the parent `div`, so that we can find the component. while (tNode.parent && !tNode.parent.next) { tNode = tNode.parent; } return tNode.parent && tNode.parent.next; } } /** * Locates the component within the given LView and returns the matching index */ function findViaComponent(lView, componentInstance) { const componentIndices = lView[TVIEW].components; if (componentIndices) { for (let i = 0; i < componentIndices.length; i++) { const elementComponentIndex = componentIndices[i]; const componentView = getComponentLViewByIndex(elementComponentIndex, lView); if (componentView[CONTEXT] === componentInstance) { return elementComponentIndex; } } } else { const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView); const rootComponent = rootComponentView[CONTEXT]; if (rootComponent === componentInstance) { // we are dealing with the root element here therefore we know that the // element is the very first element after the HEADER data in the lView return HEADER_OFFSET; } } return -1; } /** * Locates the directive within the given LView and returns the matching index */ function findViaDirective(lView, directiveInstance) { // if a directive is monkey patched then it will (by default) // have a reference to the LView of the current view. The // element bound to the directive being search lives somewhere // in the view data. We loop through the nodes and check their // list of directives for the instance. let tNode = lView[TVIEW].firstChild; while (tNode) { const directiveIndexStart = tNode.directiveStart; const directiveIndexEnd = tNode.directiveEnd; for (let i = directiveIndexStart; i < directiveIndexEnd; i++) { if (lView[i] === directiveInstance) { return tNode.index; } } tNode = traverseNextElement(tNode); } return -1; } /** * Returns a list of directives extracted from the given view based on the * provided list of directive index values. * * @param nodeIndex The node index * @param lView The target view data * @param includeComponents Whether or not to include components in returned directives */ function getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) { const tNode = lView[TVIEW].data[nodeIndex]; let directiveStartIndex = tNode.directiveStart; if (directiveStartIndex == 0) return EMPTY_ARRAY$1; const directiveEndIndex = tNode.directiveEnd; if (!includeComponents && tNode.flags & 2 /* isComponentHost */) directiveStartIndex++; return lView.slice(directiveStartIndex, directiveEndIndex); } function getComponentAtNodeIndex(nodeIndex, lView) { const tNode = lView[TVIEW].data[nodeIndex]; let directiveStartIndex = tNode.directiveStart; return tNode.flags & 2 /* isComponentHost */ ? lView[directiveStartIndex] : null; } /** * Returns a map of local references (local reference name => element or directive instance) that * exist on a given element. */ function discoverLocalRefs(lView, nodeIndex) { const tNode = lView[TVIEW].data[nodeIndex]; if (tNode && tNode.localNames) { const result = {}; let localIndex = tNode.index + 1; for (let i = 0; i < tNode.localNames.length; i += 2) { result[tNode.localNames[i]] = lView[localIndex]; localIndex++; } return result; } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$4 = () => (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only setTimeout // everything else ) .bind(_global); const defaultScheduler = (ɵ0$4)(); /** * * @codeGenApi */ function ɵɵresolveWindow(element) { return { name: 'window', target: element.ownerDocument.defaultView }; } /** * * @codeGenApi */ function ɵɵresolveDocument(element) { return { name: 'document', target: element.ownerDocument }; } /** * * @codeGenApi */ function ɵɵresolveBody(element) { return { name: 'body', target: element.ownerDocument.body }; } /** * The special delimiter we use to separate property names, prefixes, and suffixes * in property binding metadata. See storeBindingMetadata(). * * We intentionally use the Unicode "REPLACEMENT CHARACTER" (U+FFFD) as a delimiter * because it is a very uncommon character that is unlikely to be part of a user's * property names or interpolation strings. If it is in fact used in a property * binding, DebugElement.properties will not return the correct value for that * binding. However, there should be no runtime effect for real applications. * * This character is typically rendered as a question mark inside of a diamond. * See https://en.wikipedia.org/wiki/Specials_(Unicode_block) * */ const INTERPOLATION_DELIMITER = `�`; /** * Unwrap a value which might be behind a closure (for forward declaration reasons). */ function maybeUnwrapFn(value) { if (value instanceof Function) { return value(); } else { return value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** Called when there are multiple component selectors that match a given node */ function throwMultipleComponentError(tNode) { throw new RuntimeError("300" /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}`); } /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */ function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) { const field = propName ? ` for '${propName}'` : ''; let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`; if (creationMode) { msg += ` It seems like the view has been created after its parent and its children have been dirty checked.` + ` Has it been created in a change detection hook?`; } // TODO: include debug context, see `viewDebugError` function in // `packages/core/src/view/errors.ts` for reference. throw new RuntimeError("100" /* EXPRESSION_CHANGED_AFTER_CHECKED */, msg); } function constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) { const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER); let oldValue = prefix, newValue = prefix; for (let i = 0; i < chunks.length; i++) { const slotIdx = rootIndex + i; oldValue += `${lView[slotIdx]}${chunks[i]}`; newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`; } return { propName, oldValue, newValue }; } /** * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError: * - property name (for property bindings or interpolations) * - old and new values, enriched using information from metadata * * More information on the metadata storage format can be found in `storePropertyBindingMetadata` * function description. */ function getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) { const tData = lView[TVIEW].data; const metadata = tData[bindingIndex]; if (typeof metadata === 'string') { // metadata for property interpolation if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) { return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue); } // metadata for property binding return { propName: metadata, oldValue, newValue }; } // metadata is not available for this expression, check if this expression is a part of the // property interpolation by going from the current binding index left and look for a string that // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this: // [..., 'id�Prefix � and � suffix', null, null, null, ...] if (metadata === null) { let idx = bindingIndex - 1; while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) { idx--; } const meta = tData[idx]; if (typeof meta === 'string') { const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g')); // first interpolation delimiter separates property name from interpolation parts (in case of // property interpolations), so we subtract one from total number of found delimiters if (matches && (matches.length - 1) > bindingIndex - idx) { return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue); } } } return { propName: undefined, oldValue, newValue }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Flags for renderer-specific style modifiers. * @publicApi */ var RendererStyleFlags2; (function (RendererStyleFlags2) { // TODO(misko): This needs to be refactored into a separate file so that it can be imported from // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now. /** * Marks a style as important. */ RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important"; /** * Marks a style as using dash case naming (this-is-dash-case). */ RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase"; })(RendererStyleFlags2 || (RendererStyleFlags2 = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _icuContainerIterate; /** * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s. */ function icuContainerIterate(tIcuContainerNode, lView) { return _icuContainerIterate(tIcuContainerNode, lView); } /** * Ensures that `IcuContainerVisitor`'s implementation is present. * * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the * bundler to tree shake ICU logic and only load it if ICU instruction is executed. */ function ensureIcuContainerVisitorLoaded(loader) { if (_icuContainerIterate === undefined) { // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it // can be inlined into call-site. _icuContainerIterate = loader(); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$5 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of * that LContainer, which is an LView * @param lView the lView whose parent to get */ function getLViewParent(lView) { ngDevMode && assertLView(lView); const parent = lView[PARENT]; return isLContainer(parent) ? parent[PARENT] : parent; } /** * Retrieve the root view from any component or `LView` by walking the parent `LView` until * reaching the root `LView`. * * @param componentOrLView any component or `LView` */ function getRootView(componentOrLView) { ngDevMode && assertDefined(componentOrLView, 'component'); let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView); while (lView && !(lView[FLAGS] & 512 /* IsRoot */)) { lView = getLViewParent(lView); } ngDevMode && assertLView(lView); return lView; } /** * Returns the `RootContext` instance that is associated with * the application where the target is situated. It does this by walking the parent views until it * gets to the root view, then getting the context off of that. * * @param viewOrComponent the `LView` or component to get the root context for. */ function getRootContext(viewOrComponent) { const rootView = getRootView(viewOrComponent); ngDevMode && assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?'); return rootView[CONTEXT]; } /** * Gets the first `LContainer` in the LView or `null` if none exists. */ function getFirstLContainer(lView) { return getNearestLContainer(lView[CHILD_HEAD]); } /** * Gets the next `LContainer` that is a sibling of the given container. */ function getNextLContainer(container) { return getNearestLContainer(container[NEXT]); } function getNearestLContainer(viewOrContainer) { while (viewOrContainer !== null && !isLContainer(viewOrContainer)) { viewOrContainer = viewOrContainer[NEXT]; } return viewOrContainer; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd; /** * NOTE: for performance reasons, the possible actions are inlined within the function instead of * being passed as an argument. */ function applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) { // If this slot was allocated for a text node dynamically created by i18n, the text node itself // won't be created until i18nApply() in the update block, so this node should be skipped. // For more info, see "ICU expressions should work inside an ngTemplateOutlet inside an ngFor" // in `i18n_spec.ts`. if (lNodeToHandle != null) { let lContainer; let isComponent = false; // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if // it has LContainer so that we can process all of those cases appropriately. if (isLContainer(lNodeToHandle)) { lContainer = lNodeToHandle; } else if (isLView(lNodeToHandle)) { isComponent = true; ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView'); lNodeToHandle = lNodeToHandle[HOST]; } const rNode = unwrapRNode(lNodeToHandle); ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode); if (action === 0 /* Create */ && parent !== null) { if (beforeNode == null) { nativeAppendChild(renderer, parent, rNode); } else { nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true); } } else if (action === 1 /* Insert */ && parent !== null) { nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true); } else if (action === 2 /* Detach */) { nativeRemoveNode(renderer, rNode, isComponent); } else if (action === 3 /* Destroy */) { ngDevMode && ngDevMode.rendererDestroyNode++; renderer.destroyNode(rNode); } if (lContainer != null) { applyContainer(renderer, action, lContainer, parent, beforeNode); } } } function createTextNode(renderer, value) { ngDevMode && ngDevMode.rendererCreateTextNode++; ngDevMode && ngDevMode.rendererSetText++; return isProceduralRenderer(renderer) ? renderer.createText(value) : renderer.createTextNode(value); } function updateTextNode(renderer, rNode, value) { ngDevMode && ngDevMode.rendererSetText++; isProceduralRenderer(renderer) ? renderer.setValue(rNode, value) : rNode.textContent = value; } function createCommentNode(renderer, value) { ngDevMode && ngDevMode.rendererCreateComment++; // isProceduralRenderer check is not needed because both `Renderer2` and `Renderer3` have the same // method name. return renderer.createComment(escapeCommentText(value)); } /** * Creates a native element from a tag name, using a renderer. * @param renderer A renderer to use * @param name the tag name * @param namespace Optional namespace for element. * @returns the element created */ function createElementNode(renderer, name, namespace) { ngDevMode && ngDevMode.rendererCreateElement++; if (isProceduralRenderer(renderer)) { return renderer.createElement(name, namespace); } else { return namespace === null ? renderer.createElement(name) : renderer.createElementNS(namespace, name); } } /** * Removes all DOM elements associated with a view. * * Because some root nodes of the view may be containers, we sometimes need * to propagate deeply into the nested containers to remove all elements in the * views beneath it. * * @param tView The `TView' of the `LView` from which elements should be added or removed * @param lView The view from which elements should be added or removed */ function removeViewFromContainer(tView, lView) { const renderer = lView[RENDERER]; applyView(tView, lView, renderer, 2 /* Detach */, null, null); lView[HOST] = null; lView[T_HOST] = null; } /** * Adds all DOM elements associated with a view. * * Because some root nodes of the view may be containers, we sometimes need * to propagate deeply into the nested containers to add all elements in the * views beneath it. * * @param tView The `TView' of the `LView` from which elements should be added or removed * @param parentTNode The `TNode` where the `LView` should be attached to. * @param renderer Current renderer to use for DOM manipulations. * @param lView The view from which elements should be added or removed * @param parentNativeNode The parent `RElement` where it should be inserted into. * @param beforeNode The node before which elements should be added, if insert mode */ function addViewToContainer(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) { lView[HOST] = parentNativeNode; lView[T_HOST] = parentTNode; applyView(tView, lView, renderer, 1 /* Insert */, parentNativeNode, beforeNode); } /** * Detach a `LView` from the DOM by detaching its nodes. * * @param tView The `TView' of the `LView` to be detached * @param lView the `LView` to be detached. */ function renderDetachView(tView, lView) { applyView(tView, lView, lView[RENDERER], 2 /* Detach */, null, null); } /** * Traverses down and up the tree of views and containers to remove listeners and * call onDestroy callbacks. * * Notes: * - Because it's used for onDestroy calls, it needs to be bottom-up. * - Must process containers instead of their views to avoid splicing * when views are destroyed and re-added. * - Using a while loop because it's faster than recursion * - Destroy only called on movement to sibling or movement to parent (laterally or up) * * @param rootView The view to destroy */ function destroyViewTree(rootView) { // If the view has no children, we can clean it up and return early. let lViewOrLContainer = rootView[CHILD_HEAD]; if (!lViewOrLContainer) { return cleanUpView(rootView[TVIEW], rootView); } while (lViewOrLContainer) { let next = null; if (isLView(lViewOrLContainer)) { // If LView, traverse down to child. next = lViewOrLContainer[CHILD_HEAD]; } else { ngDevMode && assertLContainer(lViewOrLContainer); // If container, traverse down to its first LView. const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET]; if (firstView) next = firstView; } if (!next) { // Only clean up view when moving to the side or up, as destroy hooks // should be called in order from the bottom up. while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) { if (isLView(lViewOrLContainer)) { cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer); } lViewOrLContainer = lViewOrLContainer[PARENT]; } if (lViewOrLContainer === null) lViewOrLContainer = rootView; if (isLView(lViewOrLContainer)) { cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer); } next = lViewOrLContainer && lViewOrLContainer[NEXT]; } lViewOrLContainer = next; } } /** * Inserts a view into a container. * * This adds the view to the container's array of active views in the correct * position. It also adds the view's elements to the DOM if the container isn't a * root node of another view (in that case, the view's elements will be added when * the container's parent view is added later). * * @param tView The `TView' of the `LView` to insert * @param lView The view to insert * @param lContainer The container into which the view should be inserted * @param index Which index in the container to insert the child view into */ function insertView(tView, lView, lContainer, index) { ngDevMode && assertLView(lView); ngDevMode && assertLContainer(lContainer); const indexInContainer = CONTAINER_HEADER_OFFSET + index; const containerLength = lContainer.length; if (index > 0) { // This is a new view, we need to add it to the children. lContainer[indexInContainer - 1][NEXT] = lView; } if (index < containerLength - CONTAINER_HEADER_OFFSET) { lView[NEXT] = lContainer[indexInContainer]; addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView); } else { lContainer.push(lView); lView[NEXT] = null; } lView[PARENT] = lContainer; // track views where declaration and insertion points are different const declarationLContainer = lView[DECLARATION_LCONTAINER]; if (declarationLContainer !== null && lContainer !== declarationLContainer) { trackMovedView(declarationLContainer, lView); } // notify query that a new view has been added const lQueries = lView[QUERIES]; if (lQueries !== null) { lQueries.insertView(tView); } // Sets the attached flag lView[FLAGS] |= 128 /* Attached */; } /** * Track views created from the declaration container (TemplateRef) and inserted into a * different LContainer. */ function trackMovedView(declarationContainer, lView) { ngDevMode && assertDefined(lView, 'LView required'); ngDevMode && assertLContainer(declarationContainer); const movedViews = declarationContainer[MOVED_VIEWS]; const insertedLContainer = lView[PARENT]; ngDevMode && assertLContainer(insertedLContainer); const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW]; ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView'); const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW]; ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView'); if (declaredComponentLView !== insertedComponentLView) { // At this point the declaration-component is not same as insertion-component; this means that // this is a transplanted view. Mark the declared lView as having transplanted views so that // those views can participate in CD. declarationContainer[HAS_TRANSPLANTED_VIEWS] = true; } if (movedViews === null) { declarationContainer[MOVED_VIEWS] = [lView]; } else { movedViews.push(lView); } } function detachMovedView(declarationContainer, lView) { ngDevMode && assertLContainer(declarationContainer); ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection'); const movedViews = declarationContainer[MOVED_VIEWS]; const declarationViewIndex = movedViews.indexOf(lView); const insertionLContainer = lView[PARENT]; ngDevMode && assertLContainer(insertionLContainer); // If the view was marked for refresh but then detached before it was checked (where the flag // would be cleared and the counter decremented), we need to decrement the view counter here // instead. if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) { lView[FLAGS] &= ~1024 /* RefreshTransplantedView */; updateTransplantedViewCount(insertionLContainer, -1); } movedViews.splice(declarationViewIndex, 1); } /** * Detaches a view from a container. * * This method removes the view from the container's array of active views. It also * removes the view's elements from the DOM. * * @param lContainer The container from which to detach a view * @param removeIndex The index of the view to detach * @returns Detached LView instance. */ function detachView(lContainer, removeIndex) { if (lContainer.length <= CONTAINER_HEADER_OFFSET) return; const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex; const viewToDetach = lContainer[indexInContainer]; if (viewToDetach) { const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER]; if (declarationLContainer !== null && declarationLContainer !== lContainer) { detachMovedView(declarationLContainer, viewToDetach); } if (removeIndex > 0) { lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT]; } const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex); removeViewFromContainer(viewToDetach[TVIEW], viewToDetach); // notify query that a view has been removed const lQueries = removedLView[QUERIES]; if (lQueries !== null) { lQueries.detachView(removedLView[TVIEW]); } viewToDetach[PARENT] = null; viewToDetach[NEXT] = null; // Unsets the attached flag viewToDetach[FLAGS] &= ~128 /* Attached */; } return viewToDetach; } /** * A standalone function which destroys an LView, * conducting clean up (e.g. removing listeners, calling onDestroys). * * @param tView The `TView' of the `LView` to be destroyed * @param lView The view to be destroyed. */ function destroyLView(tView, lView) { if (!(lView[FLAGS] & 256 /* Destroyed */)) { const renderer = lView[RENDERER]; if (isProceduralRenderer(renderer) && renderer.destroyNode) { applyView(tView, lView, renderer, 3 /* Destroy */, null, null); } destroyViewTree(lView); } } /** * Calls onDestroys hooks for all directives and pipes in a given view and then removes all * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks * can be propagated to @Output listeners. * * @param tView `TView` for the `LView` to clean up. * @param lView The LView to clean up */ function cleanUpView(tView, lView) { if (!(lView[FLAGS] & 256 /* Destroyed */)) { // Usually the Attached flag is removed when the view is detached from its parent, however // if it's a root view, the flag won't be unset hence why we're also removing on destroy. lView[FLAGS] &= ~128 /* Attached */; // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop. // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is // really more of an "afterDestroy" hook if you think about it. lView[FLAGS] |= 256 /* Destroyed */; executeOnDestroys(tView, lView); processCleanups(tView, lView); // For component views only, the local renderer is destroyed at clean up time. if (lView[TVIEW].type === 1 /* Component */ && isProceduralRenderer(lView[RENDERER])) { ngDevMode && ngDevMode.rendererDestroy++; lView[RENDERER].destroy(); } const declarationContainer = lView[DECLARATION_LCONTAINER]; // we are dealing with an embedded view that is still inserted into a container if (declarationContainer !== null && isLContainer(lView[PARENT])) { // and this is a projected view if (declarationContainer !== lView[PARENT]) { detachMovedView(declarationContainer, lView); } // For embedded views still attached to a container: remove query result from this view. const lQueries = lView[QUERIES]; if (lQueries !== null) { lQueries.detachView(tView); } } } } /** Removes listeners and unsubscribes from output subscriptions */ function processCleanups(tView, lView) { const tCleanup = tView.cleanup; const lCleanup = lView[CLEANUP]; // `LCleanup` contains both share information with `TCleanup` as well as instance specific // information appended at the end. We need to know where the end of the `TCleanup` information // is, and we track this with `lastLCleanupIndex`. let lastLCleanupIndex = -1; if (tCleanup !== null) { for (let i = 0; i < tCleanup.length - 1; i += 2) { if (typeof tCleanup[i] === 'string') { // This is a native DOM listener const idxOrTargetGetter = tCleanup[i + 1]; const target = typeof idxOrTargetGetter === 'function' ? idxOrTargetGetter(lView) : unwrapRNode(lView[idxOrTargetGetter]); const listener = lCleanup[lastLCleanupIndex = tCleanup[i + 2]]; const useCaptureOrSubIdx = tCleanup[i + 3]; if (typeof useCaptureOrSubIdx === 'boolean') { // native DOM listener registered with Renderer3 target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx); } else { if (useCaptureOrSubIdx >= 0) { // unregister lCleanup[lastLCleanupIndex = useCaptureOrSubIdx](); } else { // Subscription lCleanup[lastLCleanupIndex = -useCaptureOrSubIdx].unsubscribe(); } } i += 2; } else { // This is a cleanup function that is grouped with the index of its context const context = lCleanup[lastLCleanupIndex = tCleanup[i + 1]]; tCleanup[i].call(context); } } } if (lCleanup !== null) { for (let i = lastLCleanupIndex + 1; i < lCleanup.length; i++) { const instanceCleanupFn = lCleanup[i]; ngDevMode && assertFunction(instanceCleanupFn, 'Expecting instance cleanup function.'); instanceCleanupFn(); } lView[CLEANUP] = null; } } /** Calls onDestroy hooks for this view */ function executeOnDestroys(tView, lView) { let destroyHooks; if (tView != null && (destroyHooks = tView.destroyHooks) != null) { for (let i = 0; i < destroyHooks.length; i += 2) { const context = lView[destroyHooks[i]]; // Only call the destroy hook if the context has been requested. if (!(context instanceof NodeInjectorFactory)) { const toCall = destroyHooks[i + 1]; if (Array.isArray(toCall)) { for (let j = 0; j < toCall.length; j += 2) { toCall[j + 1].call(context[toCall[j]]); } } else { toCall.call(context); } } } } } /** * Returns a native element if a node can be inserted into the given parent. * * There are two reasons why we may not be able to insert a element immediately. * - Projection: When creating a child content element of a component, we have to skip the * insertion because the content of a component will be projected. * `<component><content>delayed due to projection</content></component>` * - Parent container is disconnected: This can happen when we are inserting a view into * parent container, which itself is disconnected. For example the parent container is part * of a View which has not be inserted or is made for projection but has not been inserted * into destination. * * @param tView: Current `TView`. * @param tNode: `TNode` for which we wish to retrieve render parent. * @param lView: Current `LView`. */ function getParentRElement(tView, tNode, lView) { return getClosestRElement(tView, tNode.parent, lView); } /** * Get closest `RElement` or `null` if it can't be found. * * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location. * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively). * If `TNode` is `null` then return host `RElement`: * - return `null` if projection * - return `null` if parent container is disconnected (we have no parent.) * * @param tView: Current `TView`. * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is * needed). * @param lView: Current `LView`. * @returns `null` if the `RElement` can't be determined at this time (no parent / projection) */ function getClosestRElement(tView, tNode, lView) { let parentTNode = tNode; // Skip over element and ICU containers as those are represented by a comment node and // can't be used as a render parent. while (parentTNode !== null && (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */))) { tNode = parentTNode; parentTNode = tNode.parent; } // If the parent tNode is null, then we are inserting across views: either into an embedded view // or a component view. if (parentTNode === null) { // We are inserting a root element of the component view into the component host element and // it should always be eager. return lView[HOST]; } else { ngDevMode && assertTNodeType(parentTNode, 3 /* AnyRNode */ | 4 /* Container */); if (parentTNode.flags & 2 /* isComponentHost */) { ngDevMode && assertTNodeForLView(parentTNode, lView); const encapsulation = tView.data[parentTNode.directiveStart].encapsulation; // We've got a parent which is an element in the current view. We just need to verify if the // parent element is not a component. Component's content nodes are not inserted immediately // because they will be projected, and so doing insert at this point would be wasteful. // Since the projection would then move it to its final destination. Note that we can't // make this assumption when using the Shadow DOM, because the native projection placeholders // (<content> or <slot>) have to be in place as elements are being inserted. if (encapsulation === ViewEncapsulation.None || encapsulation === ViewEncapsulation.Emulated) { return null; } } return getNativeByTNode(parentTNode, lView); } } /** * Inserts a native node before another native node for a given parent using {@link Renderer3}. * This is a utility function that can be used when native nodes were determined - it abstracts an * actual renderer being used. */ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) { ngDevMode && ngDevMode.rendererInsertBefore++; if (isProceduralRenderer(renderer)) { renderer.insertBefore(parent, child, beforeNode, isMove); } else { parent.insertBefore(child, beforeNode, isMove); } } function nativeAppendChild(renderer, parent, child) { ngDevMode && ngDevMode.rendererAppendChild++; ngDevMode && assertDefined(parent, 'parent node must be defined'); if (isProceduralRenderer(renderer)) { renderer.appendChild(parent, child); } else { parent.appendChild(child); } } function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) { if (beforeNode !== null) { nativeInsertBefore(renderer, parent, child, beforeNode, isMove); } else { nativeAppendChild(renderer, parent, child); } } /** Removes a node from the DOM given its native parent. */ function nativeRemoveChild(renderer, parent, child, isHostElement) { if (isProceduralRenderer(renderer)) { renderer.removeChild(parent, child, isHostElement); } else { parent.removeChild(child); } } /** * Returns a native parent of a given native node. */ function nativeParentNode(renderer, node) { return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode); } /** * Returns a native sibling of a given native node. */ function nativeNextSibling(renderer, node) { return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling; } /** * Find a node in front of which `currentTNode` should be inserted. * * This method determines the `RNode` in front of which we should insert the `currentRNode`. This * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked. * * @param parentTNode parent `TNode` * @param currentTNode current `TNode` (The node which we would like to insert into the DOM) * @param lView current `LView` */ function getInsertInFrontOfRNode(parentTNode, currentTNode, lView) { return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView); } /** * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into * account) * * This method determines the `RNode` in front of which we should insert the `currentRNode`. This * does not take `TNode.insertBeforeIndex` into account. * * @param parentTNode parent `TNode` * @param currentTNode current `TNode` (The node which we would like to insert into the DOM) * @param lView current `LView` */ function getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) { if (parentTNode.type & (8 /* ElementContainer */ | 32 /* Icu */)) { return getNativeByTNode(parentTNode, lView); } return null; } /** * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function. * * This function will only be set if i18n code runs. */ let _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n; /** * Tree shakable boundary for `processI18nInsertBefore` function. * * This function will only be set if i18n code runs. */ let _processI18nInsertBefore; function setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) { _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n; _processI18nInsertBefore = processI18nInsertBefore; } /** * Appends the `child` native node (or a collection of nodes) to the `parent`. * * @param tView The `TView' to be appended * @param lView The current LView * @param childRNode The native child (or children) that should be appended * @param childTNode The TNode of the child element */ function appendChild(tView, lView, childRNode, childTNode) { const parentRNode = getParentRElement(tView, childTNode, lView); const renderer = lView[RENDERER]; const parentTNode = childTNode.parent || lView[T_HOST]; const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView); if (parentRNode != null) { if (Array.isArray(childRNode)) { for (let i = 0; i < childRNode.length; i++) { nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false); } } else { nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false); } } _processI18nInsertBefore !== undefined && _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode); } /** * Returns the first native node for a given LView, starting from the provided TNode. * * Native nodes are returned in the order in which those appear in the native tree (DOM). */ function getFirstNativeNode(lView, tNode) { if (tNode !== null) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */ | 16 /* Projection */); const tNodeType = tNode.type; if (tNodeType & 3 /* AnyRNode */) { return getNativeByTNode(tNode, lView); } else if (tNodeType & 4 /* Container */) { return getBeforeNodeForView(-1, lView[tNode.index]); } else if (tNodeType & 8 /* ElementContainer */) { const elIcuContainerChild = tNode.child; if (elIcuContainerChild !== null) { return getFirstNativeNode(lView, elIcuContainerChild); } else { const rNodeOrLContainer = lView[tNode.index]; if (isLContainer(rNodeOrLContainer)) { return getBeforeNodeForView(-1, rNodeOrLContainer); } else { return unwrapRNode(rNodeOrLContainer); } } } else if (tNodeType & 32 /* Icu */) { let nextRNode = icuContainerIterate(tNode, lView); let rNode = nextRNode(); // If the ICU container has no nodes, than we use the ICU anchor as the node. return rNode || unwrapRNode(lView[tNode.index]); } else { const projectionNodes = getProjectionNodes(lView, tNode); if (projectionNodes !== null) { if (Array.isArray(projectionNodes)) { return projectionNodes[0]; } const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]); ngDevMode && assertParentView(parentView); return getFirstNativeNode(parentView, projectionNodes); } else { return getFirstNativeNode(lView, tNode.next); } } } return null; } function getProjectionNodes(lView, tNode) { if (tNode !== null) { const componentView = lView[DECLARATION_COMPONENT_VIEW]; const componentHost = componentView[T_HOST]; const slotIdx = tNode.projection; ngDevMode && assertProjectionSlots(lView); return componentHost.projection[slotIdx]; } return null; } function getBeforeNodeForView(viewIndexInContainer, lContainer) { const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1; if (nextViewIndex < lContainer.length) { const lView = lContainer[nextViewIndex]; const firstTNodeOfView = lView[TVIEW].firstChild; if (firstTNodeOfView !== null) { return getFirstNativeNode(lView, firstTNodeOfView); } } return lContainer[NATIVE]; } /** * Removes a native node itself using a given renderer. To remove the node we are looking up its * parent from the native tree as not all platforms / browsers support the equivalent of * node.remove(). * * @param renderer A renderer to be used * @param rNode The native node that should be removed * @param isHostElement A flag indicating if a node to be removed is a host of a component. */ function nativeRemoveNode(renderer, rNode, isHostElement) { ngDevMode && ngDevMode.rendererRemoveNode++; const nativeParent = nativeParentNode(renderer, rNode); if (nativeParent) { nativeRemoveChild(renderer, nativeParent, rNode, isHostElement); } } /** * Performs the operation of `action` on the node. Typically this involves inserting or removing * nodes on the LView or projection boundary. */ function applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode, isProjection) { while (tNode != null) { ngDevMode && assertTNodeForLView(tNode, lView); ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */); const rawSlotValue = lView[tNode.index]; const tNodeType = tNode.type; if (isProjection) { if (action === 0 /* Create */) { rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView); tNode.flags |= 4 /* isProjected */; } } if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) { if (tNodeType & 8 /* ElementContainer */) { applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false); applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } else if (tNodeType & 32 /* Icu */) { const nextRNode = icuContainerIterate(tNode, lView); let rNode; while (rNode = nextRNode()) { applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode); } applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } else if (tNodeType & 16 /* Projection */) { applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode); } else { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 4 /* Container */); applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode); } } tNode = isProjection ? tNode.projectionNext : tNode.next; } } function applyView(tView, lView, renderer, action, parentRElement, beforeNode) { applyNodes(renderer, action, tView.firstChild, lView, parentRElement, beforeNode, false); } /** * `applyProjection` performs operation on the projection. * * Inserting a projection requires us to locate the projected nodes from the parent component. The * complication is that those nodes themselves could be re-projected from their parent component. * * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed * @param lView The `LView` which needs to be inserted, detached, destroyed. * @param tProjectionNode node to project */ function applyProjection(tView, lView, tProjectionNode) { const renderer = lView[RENDERER]; const parentRNode = getParentRElement(tView, tProjectionNode, lView); const parentTNode = tProjectionNode.parent || lView[T_HOST]; let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView); applyProjectionRecursive(renderer, 0 /* Create */, lView, tProjectionNode, parentRNode, beforeNode); } /** * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert, * detach, destroy) * * Inserting a projection requires us to locate the projected nodes from the parent component. The * complication is that those nodes themselves could be re-projected from their parent component. * * @param renderer Render to use * @param action action to perform (insert, detach, destroy) * @param lView The LView which needs to be inserted, detached, destroyed. * @param tProjectionNode node to project * @param parentRElement parent DOM element for insertion/removal. * @param beforeNode Before which node the insertions should happen. */ function applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) { const componentLView = lView[DECLARATION_COMPONENT_VIEW]; const componentNode = componentLView[T_HOST]; ngDevMode && assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index'); const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection]; if (Array.isArray(nodeToProjectOrRNodes)) { // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we // need to support passing projectable nodes, so we cheat and put them in the TNode // of the Host TView. (Yes we put instance info at the T Level). We can get away with it // because we know that that TView is not shared and therefore it will not be a problem. // This should be refactored and cleaned up. for (let i = 0; i < nodeToProjectOrRNodes.length; i++) { const rNode = nodeToProjectOrRNodes[i]; applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode); } } else { let nodeToProject = nodeToProjectOrRNodes; const projectedComponentLView = componentLView[PARENT]; applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, beforeNode, true); } } /** * `applyContainer` performs an operation on the container and its views as specified by * `action` (insert, detach, destroy) * * Inserting a Container is complicated by the fact that the container may have Views which * themselves have containers or projections. * * @param renderer Renderer to use * @param action action to perform (insert, detach, destroy) * @param lContainer The LContainer which needs to be inserted, detached, destroyed. * @param parentRElement parent DOM element for insertion/removal. * @param beforeNode Before which node the insertions should happen. */ function applyContainer(renderer, action, lContainer, parentRElement, beforeNode) { ngDevMode && assertLContainer(lContainer); const anchor = lContainer[NATIVE]; // LContainer has its own before node. const native = unwrapRNode(lContainer); // An LContainer can be created dynamically on any node by injecting ViewContainerRef. // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor // node (comment in the DOM) that will be different from the LContainer's host node. In this // particular case we need to execute action on 2 nodes: // - container's host node (this is done in the executeActionOnElementOrContainer) // - container's host node (this is done here) if (anchor !== native) { // This is very strange to me (Misko). I would expect that the native is same as anchor. I // don't see a reason why they should be different, but they are. // // If they are we need to process the second anchor as well. applyToElementOrContainer(action, renderer, parentRElement, anchor, beforeNode); } for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const lView = lContainer[i]; applyView(lView[TVIEW], lView, renderer, action, parentRElement, anchor); } } /** * Writes class/style to element. * * @param renderer Renderer to use. * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`) * @param rNode The Node to write to. * @param prop Property to write to. This would be the class/style name. * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add * otherwise). */ function applyStyling(renderer, isClassBased, rNode, prop, value) { const isProcedural = isProceduralRenderer(renderer); if (isClassBased) { // We actually want JS true/false here because any truthy value should add the class if (!value) { ngDevMode && ngDevMode.rendererRemoveClass++; if (isProcedural) { renderer.removeClass(rNode, prop); } else { rNode.classList.remove(prop); } } else { ngDevMode && ngDevMode.rendererAddClass++; if (isProcedural) { renderer.addClass(rNode, prop); } else { ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected'); rNode.classList.add(prop); } } } else { let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase; if (value == null /** || value === undefined */) { ngDevMode && ngDevMode.rendererRemoveStyle++; if (isProcedural) { renderer.removeStyle(rNode, prop, flags); } else { rNode.style.removeProperty(prop); } } else { // A value is important if it ends with `!important`. The style // parser strips any semicolons at the end of the value. const isImportant = typeof value === 'string' ? value.endsWith('!important') : false; if (isImportant) { // !important has to be stripped from the value for it to be valid. value = value.slice(0, -10); flags |= RendererStyleFlags2.Important; } ngDevMode && ngDevMode.rendererSetStyle++; if (isProcedural) { renderer.setStyle(rNode, prop, value, flags); } else { ngDevMode && assertDefined(rNode.style, 'HTMLElement expected'); rNode.style.setProperty(prop, value, isImportant ? 'important' : ''); } } } } /** * Write `cssText` to `RElement`. * * This function does direct write without any reconciliation. Used for writing initial values, so * that static styling values do not pull in the style parser. * * @param renderer Renderer to use * @param element The element which needs to be updated. * @param newValue The new class list to write. */ function writeDirectStyle(renderer, element, newValue) { ngDevMode && assertString(newValue, '\'newValue\' should be a string'); if (isProceduralRenderer(renderer)) { renderer.setAttribute(element, 'style', newValue); } else { element.style.cssText = newValue; } ngDevMode && ngDevMode.rendererSetStyle++; } /** * Write `className` to `RElement`. * * This function does direct write without any reconciliation. Used for writing initial values, so * that static styling values do not pull in the style parser. * * @param renderer Renderer to use * @param element The element which needs to be updated. * @param newValue The new class list to write. */ function writeDirectClass(renderer, element, newValue) { ngDevMode && assertString(newValue, '\'newValue\' should be a string'); if (isProceduralRenderer(renderer)) { if (newValue === '') { // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`. renderer.removeAttribute(element, 'class'); } else { renderer.setAttribute(element, 'class', newValue); } } else { element.className = newValue; } ngDevMode && ngDevMode.rendererSetClassName++; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Returns an index of `classToSearch` in `className` taking token boundaries into account. * * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`) * * @param className A string containing classes (whitespace separated) * @param classToSearch A class name to locate * @param startingIndex Starting location of search * @returns an index of the located class (or -1 if not found) */ function classIndexOf(className, classToSearch, startingIndex) { ngDevMode && assertNotEqual(classToSearch, '', 'can not look for "" string.'); let end = className.length; while (true) { const foundIndex = className.indexOf(classToSearch, startingIndex); if (foundIndex === -1) return foundIndex; if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* SPACE */) { // Ensure that it has leading whitespace const length = classToSearch.length; if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32 /* SPACE */) { // Ensure that it has trailing whitespace return foundIndex; } } // False positive, keep searching from where we left off. startingIndex = foundIndex + 1; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5; const NG_TEMPLATE_SELECTOR = 'ng-template'; /** * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive) * * @param attrs `TAttributes` to search through. * @param cssClassToMatch class to match (lowercase) * @param isProjectionMode Whether or not class matching should look into the attribute `class` in * addition to the `AttributeMarker.Classes`. */ function isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) { // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect. // It is strange to me that sometimes the class information comes in form of `class` attribute // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine // if that is the right behavior. ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.'); let i = 0; while (i < attrs.length) { let item = attrs[i++]; if (isProjectionMode && item === 'class') { item = attrs[i]; if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) { return true; } } else if (item === 1 /* Classes */) { // We found the classes section. Start searching for the class. while (i < attrs.length && typeof (item = attrs[i++]) == 'string') { // while we have strings if (item.toLowerCase() === cssClassToMatch) return true; } return false; } } return false; } /** * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`). * * @param tNode current TNode */ function isInlineTemplate(tNode) { return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR; } /** * Function that checks whether a given tNode matches tag-based selector and has a valid type. * * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular * directive matching mode: * - in the "directive matching" mode we do _not_ take TContainer's tagName into account if it is * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a * tag name was extracted from * syntax so we would match the same directive twice); * - in the "projection" mode, we use a tag name potentially extracted from the * syntax processing * (applicable to TNodeType.Container only). */ function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) { const tagNameToCompare = tNode.type === 4 /* Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value; return currentSelector === tagNameToCompare; } /** * A utility function to match an Ivy node static data against a simple CSS selector * * @param node static data of the node to match * @param selector The selector to try matching against the node. * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing * directive matching. * @returns true if node matches the selector. */ function isNodeMatchingSelector(tNode, selector, isProjectionMode) { ngDevMode && assertDefined(selector[0], 'Selector should have a tag name'); let mode = 4 /* ELEMENT */; const nodeAttrs = tNode.attrs || []; // Find the index of first attribute that has no value, only a name. const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs); // When processing ":not" selectors, we skip to the next ":not" if the // current one doesn't match let skipToNextSelector = false; for (let i = 0; i < selector.length; i++) { const current = selector[i]; if (typeof current === 'number') { // If we finish processing a :not selector and it hasn't failed, return false if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) { return false; } // If we are skipping to the next :not() and this mode flag is positive, // it's a part of the current :not() selector, and we should keep skipping if (skipToNextSelector && isPositive(current)) continue; skipToNextSelector = false; mode = current | (mode & 1 /* NOT */); continue; } if (skipToNextSelector) continue; if (mode & 4 /* ELEMENT */) { mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */; if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) { if (isPositive(mode)) return false; skipToNextSelector = true; } } else { const selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i]; // special case for matching against classes when a tNode has been instantiated with // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo']) if ((mode & 8 /* CLASS */) && tNode.attrs !== null) { if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) { if (isPositive(mode)) return false; skipToNextSelector = true; } continue; } const attrName = (mode & 8 /* CLASS */) ? 'class' : current; const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode); if (attrIndexInNode === -1) { if (isPositive(mode)) return false; skipToNextSelector = true; continue; } if (selectorAttrValue !== '') { let nodeAttrValue; if (attrIndexInNode > nameOnlyMarkerIdx) { nodeAttrValue = ''; } else { ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes'); // we lowercase the attribute value to be able to match // selectors without case-sensitivity // (selectors are already in lowercase when generated) nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase(); } const compareAgainstClassName = mode & 8 /* CLASS */ ? nodeAttrValue : null; if (compareAgainstClassName && classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 || mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) { if (isPositive(mode)) return false; skipToNextSelector = true; } } } } return isPositive(mode) || skipToNextSelector; } function isPositive(mode) { return (mode & 1 /* NOT */) === 0; } /** * Examines the attribute's definition array for a node to find the index of the * attribute that matches the given `name`. * * NOTE: This will not match namespaced attributes. * * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`. * The following table summarizes which types of attributes we attempt to match: * * =========================================================================================================== * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n * Attributes * =========================================================================================================== * Inline + Projection | YES | YES | NO | YES * ----------------------------------------------------------------------------------------------------------- * Inline + Directive | NO | NO | YES | NO * ----------------------------------------------------------------------------------------------------------- * Non-inline + Projection | YES | YES | NO | YES * ----------------------------------------------------------------------------------------------------------- * Non-inline + Directive | YES | YES | NO | YES * =========================================================================================================== * * @param name the name of the attribute to find * @param attrs the attribute array to examine * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`) * rather than a manually expanded template node (e.g `<ng-template>`). * @param isProjectionMode true if we are matching against content projection otherwise we are * matching against directives. */ function findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) { if (attrs === null) return -1; let i = 0; if (isProjectionMode || !isInlineTemplate) { let bindingsMode = false; while (i < attrs.length) { const maybeAttrName = attrs[i]; if (maybeAttrName === name) { return i; } else if (maybeAttrName === 3 /* Bindings */ || maybeAttrName === 6 /* I18n */) { bindingsMode = true; } else if (maybeAttrName === 1 /* Classes */ || maybeAttrName === 2 /* Styles */) { let value = attrs[++i]; // We should skip classes here because we have a separate mechanism for // matching classes in projection mode. while (typeof value === 'string') { value = attrs[++i]; } continue; } else if (maybeAttrName === 4 /* Template */) { // We do not care about Template attributes in this scenario. break; } else if (maybeAttrName === 0 /* NamespaceURI */) { // Skip the whole namespaced attribute and value. This is by design. i += 4; continue; } // In binding mode there are only names, rather than name-value pairs. i += bindingsMode ? 1 : 2; } // We did not match the attribute return -1; } else { return matchTemplateAttribute(attrs, name); } } function isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) { for (let i = 0; i < selector.length; i++) { if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) { return true; } } return false; } function getProjectAsAttrValue(tNode) { const nodeAttrs = tNode.attrs; if (nodeAttrs != null) { const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* ProjectAs */); // only check for ngProjectAs in attribute names, don't accidentally match attribute's value // (attribute names are stored at even indexes) if ((ngProjectAsAttrIdx & 1) === 0) { return nodeAttrs[ngProjectAsAttrIdx + 1]; } } return null; } function getNameOnlyMarkerIndex(nodeAttrs) { for (let i = 0; i < nodeAttrs.length; i++) { const nodeAttr = nodeAttrs[i]; if (isNameOnlyAttributeMarker(nodeAttr)) { return i; } } return nodeAttrs.length; } function matchTemplateAttribute(attrs, name) { let i = attrs.indexOf(4 /* Template */); if (i > -1) { i++; while (i < attrs.length) { const attr = attrs[i]; // Return in case we checked all template attrs and are switching to the next section in the // attrs array (that starts with a number that represents an attribute marker). if (typeof attr === 'number') return -1; if (attr === name) return i; i++; } } return -1; } /** * Checks whether a selector is inside a CssSelectorList * @param selector Selector to be checked. * @param list List in which to look for the selector. */ function isSelectorInSelectorList(selector, list) { selectorListLoop: for (let i = 0; i < list.length; i++) { const currentSelectorInList = list[i]; if (selector.length !== currentSelectorInList.length) { continue; } for (let j = 0; j < selector.length; j++) { if (selector[j] !== currentSelectorInList[j]) { continue selectorListLoop; } } return true; } return false; } function maybeWrapInNotSelector(isNegativeMode, chunk) { return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk; } function stringifyCSSSelector(selector) { let result = selector[0]; let i = 1; let mode = 2 /* ATTRIBUTE */; let currentChunk = ''; let isNegativeMode = false; while (i < selector.length) { let valueOrMarker = selector[i]; if (typeof valueOrMarker === 'string') { if (mode & 2 /* ATTRIBUTE */) { const attrValue = selector[++i]; currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '="' + attrValue + '"' : '') + ']'; } else if (mode & 8 /* CLASS */) { currentChunk += '.' + valueOrMarker; } else if (mode & 4 /* ELEMENT */) { currentChunk += ' ' + valueOrMarker; } } else { // // Append current chunk to the final result in case we come across SelectorFlag, which // indicates that the previous section of a selector is over. We need to accumulate content // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g. // ``` // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC'] // ``` // should be transformed to `.classA :not(.classB .classC)`. // // Note: for negative selector part, we accumulate content between flags until we find the // next negative flag. This is needed to support a case where `:not()` rule contains more than // one chunk, e.g. the following selector: // ``` // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar'] // ``` // should be stringified to `:not(p.foo) :not(.bar)` // if (currentChunk !== '' && !isPositive(valueOrMarker)) { result += maybeWrapInNotSelector(isNegativeMode, currentChunk); currentChunk = ''; } mode = valueOrMarker; // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative // mode is maintained for remaining chunks of a selector. isNegativeMode = isNegativeMode || !isPositive(mode); } i++; } if (currentChunk !== '') { result += maybeWrapInNotSelector(isNegativeMode, currentChunk); } return result; } /** * Generates string representation of CSS selector in parsed form. * * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing * additional parsing at runtime (for example, for directive matching). However in some cases (for * example, while bootstrapping a component), a string version of the selector is required to query * for the host element on the page. This function takes the parsed form of a selector and returns * its string representation. * * @param selectorList selector in parsed form * @returns string representation of a given selector */ function stringifyCSSSelectorList(selectorList) { return selectorList.map(stringifyCSSSelector).join(','); } /** * Extracts attributes and classes information from a given CSS selector. * * This function is used while creating a component dynamically. In this case, the host element * (that is created dynamically) should contain attributes and classes specified in component's CSS * selector. * * @param selector CSS selector in parsed form (in a form of array) * @returns object with `attrs` and `classes` fields that contain extracted information */ function extractAttrsAndClassesFromSelector(selector) { const attrs = []; const classes = []; let i = 1; let mode = 2 /* ATTRIBUTE */; while (i < selector.length) { let valueOrMarker = selector[i]; if (typeof valueOrMarker === 'string') { if (mode === 2 /* ATTRIBUTE */) { if (valueOrMarker !== '') { attrs.push(valueOrMarker, selector[++i]); } } else if (mode === 8 /* CLASS */) { classes.push(valueOrMarker); } } else { // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative // mode is maintained for remaining chunks of a selector. Since attributes and classes are // extracted only for "positive" part of the selector, we can stop here. if (!isPositive(mode)) break; mode = valueOrMarker; } i++; } return { attrs, classes }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** A special value which designates that a value has not changed. */ const NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Advances to an element for later binding instructions. * * Used in conjunction with instructions like {@link property} to act on elements with specified * indices, for example those created with {@link element} or {@link elementStart}. * * ```ts * (rf: RenderFlags, ctx: any) => { * if (rf & 1) { * text(0, 'Hello'); * text(1, 'Goodbye') * element(2, 'div'); * } * if (rf & 2) { * advance(2); // Advance twice to the <div>. * property('title', 'test'); * } * } * ``` * @param delta Number of elements to advance forwards by. * * @codeGenApi */ function ɵɵadvance(delta) { ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward'); selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, isInCheckNoChangesMode()); } function selectIndexInternal(tView, lView, index, checkNoChangesMode) { ngDevMode && assertIndexInDeclRange(lView, index); // Flush the initial hooks for elements in the view that have been added up to this point. // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!checkNoChangesMode) { const hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */; if (hooksInitPhaseCompleted) { const preOrderCheckHooks = tView.preOrderCheckHooks; if (preOrderCheckHooks !== null) { executeCheckHooks(lView, preOrderCheckHooks, index); } } else { const preOrderHooks = tView.preOrderHooks; if (preOrderHooks !== null) { executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, index); } } } // We must set the selected index *after* running the hooks, because hooks may have side-effects // that cause other template functions to run, thus updating the selected index, which is global // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index // will be altered by the time we leave the `ɵɵadvance` instruction. setSelectedIndex(index); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function toTStylingRange(prev, next) { ngDevMode && assertNumberInRange(prev, 0, 32767 /* UNSIGNED_MASK */); ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */); return (prev << 17 /* PREV_SHIFT */ | next << 2 /* NEXT_SHIFT */); } function getTStylingRangePrev(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange >> 17 /* PREV_SHIFT */) & 32767 /* UNSIGNED_MASK */; } function getTStylingRangePrevDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange & 2 /* PREV_DUPLICATE */) == 2 /* PREV_DUPLICATE */; } function setTStylingRangePrev(tStylingRange, previous) { ngDevMode && assertNumber(tStylingRange, 'expected number'); ngDevMode && assertNumberInRange(previous, 0, 32767 /* UNSIGNED_MASK */); return ((tStylingRange & ~4294836224 /* PREV_MASK */) | (previous << 17 /* PREV_SHIFT */)); } function setTStylingRangePrevDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange | 2 /* PREV_DUPLICATE */); } function getTStylingRangeNext(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange & 131068 /* NEXT_MASK */) >> 2 /* NEXT_SHIFT */; } function setTStylingRangeNext(tStylingRange, next) { ngDevMode && assertNumber(tStylingRange, 'expected number'); ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */); return ((tStylingRange & ~131068 /* NEXT_MASK */) | // next << 2 /* NEXT_SHIFT */); } function getTStylingRangeNextDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange & 1 /* NEXT_DUPLICATE */) === 1 /* NEXT_DUPLICATE */; } function setTStylingRangeNextDuplicate(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); return (tStylingRange | 1 /* NEXT_DUPLICATE */); } function getTStylingRangeTail(tStylingRange) { ngDevMode && assertNumber(tStylingRange, 'expected number'); const next = getTStylingRangeNext(tStylingRange); return next === 0 ? getTStylingRangePrev(tStylingRange) : next; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Patch a `debug` property on top of the existing object. * * NOTE: always call this method with `ngDevMode && attachDebugObject(...)` * * @param obj Object to patch * @param debug Value to patch */ function attachDebugObject(obj, debug) { if (ngDevMode) { Object.defineProperty(obj, 'debug', { value: debug, enumerable: false }); } else { throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!'); } } /** * Patch a `debug` property getter on top of the existing object. * * NOTE: always call this method with `ngDevMode && attachDebugObject(...)` * * @param obj Object to patch * @param debugGetter Getter returning a value to patch */ function attachDebugGetter(obj, debugGetter) { if (ngDevMode) { Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false }); } else { throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!'); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode()); /* * This file contains conditionally attached classes which provide human readable (debug) level * information for `LView`, `LContainer` and other internal data structures. These data structures * are stored internally as array which makes it very difficult during debugging to reason about the * current state of the system. * * Patching the array with extra property does change the array's hidden class' but it does not * change the cost of access, therefore this patching should not have significant if any impact in * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array) * * So instead of seeing: * ``` * Array(30) [Object, 659, null, …] * ``` * * You get to see: * ``` * LViewDebug { * views: [...], * flags: {attached: true, ...} * nodes: [ * {html: '<div id="123">', ..., nodes: [ * {html: '<span>', ..., nodes: null} * ]} * ] * } * ``` */ let LVIEW_COMPONENT_CACHE; let LVIEW_EMBEDDED_CACHE; let LVIEW_ROOT; /** * This function clones a blueprint and creates LView. * * Simple slice will keep the same type, and we need it to be LView */ function cloneToLViewFromTViewBlueprint(tView) { const debugTView = tView; const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name); return lView.concat(tView.blueprint); } function getLViewToClone(type, name) { switch (type) { case 0 /* Root */: if (LVIEW_ROOT === undefined) LVIEW_ROOT = new (createNamedArrayType('LRootView'))(); return LVIEW_ROOT; case 1 /* Component */: if (LVIEW_COMPONENT_CACHE === undefined) LVIEW_COMPONENT_CACHE = new Map(); let componentArray = LVIEW_COMPONENT_CACHE.get(name); if (componentArray === undefined) { componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))(); LVIEW_COMPONENT_CACHE.set(name, componentArray); } return componentArray; case 2 /* Embedded */: if (LVIEW_EMBEDDED_CACHE === undefined) LVIEW_EMBEDDED_CACHE = new Map(); let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name); if (embeddedArray === undefined) { embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))(); LVIEW_EMBEDDED_CACHE.set(name, embeddedArray); } return embeddedArray; } } function nameSuffix(text) { if (text == null) return ''; const index = text.lastIndexOf('_Template'); return '_' + (index === -1 ? text : text.substr(0, index)); } /** * This class is a debug version of Object literal so that we can have constructor name show up * in * debug tools in ngDevMode. */ const TViewConstructor = class TView { constructor(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) { this.type = type; this.blueprint = blueprint; this.template = template; this.queries = queries; this.viewQuery = viewQuery; this.declTNode = declTNode; this.data = data; this.bindingStartIndex = bindingStartIndex; this.expandoStartIndex = expandoStartIndex; this.hostBindingOpCodes = hostBindingOpCodes; this.firstCreatePass = firstCreatePass; this.firstUpdatePass = firstUpdatePass; this.staticViewQueries = staticViewQueries; this.staticContentQueries = staticContentQueries; this.preOrderHooks = preOrderHooks; this.preOrderCheckHooks = preOrderCheckHooks; this.contentHooks = contentHooks; this.contentCheckHooks = contentCheckHooks; this.viewHooks = viewHooks; this.viewCheckHooks = viewCheckHooks; this.destroyHooks = destroyHooks; this.cleanup = cleanup; this.contentQueries = contentQueries; this.components = components; this.directiveRegistry = directiveRegistry; this.pipeRegistry = pipeRegistry; this.firstChild = firstChild; this.schemas = schemas; this.consts = consts; this.incompleteFirstPass = incompleteFirstPass; this._decls = _decls; this._vars = _vars; } get template_() { const buf = []; processTNodeChildren(this.firstChild, buf); return buf.join(''); } get type_() { return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`; } }; class TNode { constructor(tView_, // type, // index, // insertBeforeIndex, // injectorIndex, // directiveStart, // directiveEnd, // directiveStylingLast, // propertyBindings, // flags, // providerIndexes, // value, // attrs, // mergedAttrs, // localNames, // initialInputs, // inputs, // outputs, // tViews, // next, // projectionNext, // child, // parent, // projection, // styles, // stylesWithoutHost, // residualStyles, // classes, // classesWithoutHost, // residualClasses, // classBindings, // styleBindings) { this.tView_ = tView_; this.type = type; this.index = index; this.insertBeforeIndex = insertBeforeIndex; this.injectorIndex = injectorIndex; this.directiveStart = directiveStart; this.directiveEnd = directiveEnd; this.directiveStylingLast = directiveStylingLast; this.propertyBindings = propertyBindings; this.flags = flags; this.providerIndexes = providerIndexes; this.value = value; this.attrs = attrs; this.mergedAttrs = mergedAttrs; this.localNames = localNames; this.initialInputs = initialInputs; this.inputs = inputs; this.outputs = outputs; this.tViews = tViews; this.next = next; this.projectionNext = projectionNext; this.child = child; this.parent = parent; this.projection = projection; this.styles = styles; this.stylesWithoutHost = stylesWithoutHost; this.residualStyles = residualStyles; this.classes = classes; this.classesWithoutHost = classesWithoutHost; this.residualClasses = residualClasses; this.classBindings = classBindings; this.styleBindings = styleBindings; } /** * Return a human debug version of the set of `NodeInjector`s which will be consulted when * resolving tokens from this `TNode`. * * When debugging applications, it is often difficult to determine which `NodeInjector`s will be * consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be * consulted in order when resolving a token starting at this `TNode`. * * The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is * difficult to reason about. * * @param lView The `LView` instance for this `TNode`. */ debugNodeInjectorPath(lView) { const path = []; let injectorIndex = getInjectorIndex(this, lView); if (injectorIndex === -1) { // Looks like the current `TNode` does not have `NodeInjector` associated with it => look for // parent NodeInjector. const parentLocation = getParentInjectorLocation(this, lView); if (parentLocation !== NO_PARENT_INJECTOR) { // We found a parent, so start searching from the parent location. injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } else { // No parents have been found, so there are no `NodeInjector`s to consult. } } while (injectorIndex !== -1) { ngDevMode && assertNodeInjector(lView, injectorIndex); const tNode = lView[TVIEW].data[injectorIndex + 8 /* TNODE */]; path.push(buildDebugNode(tNode, lView)); const parentLocation = lView[injectorIndex + 8 /* PARENT */]; if (parentLocation === NO_PARENT_INJECTOR) { injectorIndex = -1; } else { injectorIndex = getParentInjectorIndex(parentLocation); lView = getParentInjectorView(parentLocation, lView); } } return path; } get type_() { return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`; } get flags_() { const flags = []; if (this.flags & 16 /* hasClassInput */) flags.push('TNodeFlags.hasClassInput'); if (this.flags & 8 /* hasContentQuery */) flags.push('TNodeFlags.hasContentQuery'); if (this.flags & 32 /* hasStyleInput */) flags.push('TNodeFlags.hasStyleInput'); if (this.flags & 128 /* hasHostBindings */) flags.push('TNodeFlags.hasHostBindings'); if (this.flags & 2 /* isComponentHost */) flags.push('TNodeFlags.isComponentHost'); if (this.flags & 1 /* isDirectiveHost */) flags.push('TNodeFlags.isDirectiveHost'); if (this.flags & 64 /* isDetached */) flags.push('TNodeFlags.isDetached'); if (this.flags & 4 /* isProjected */) flags.push('TNodeFlags.isProjected'); return flags.join('|'); } get template_() { if (this.type & 1 /* Text */) return this.value; const buf = []; const tagName = typeof this.value === 'string' && this.value || this.type_; buf.push('<', tagName); if (this.flags) { buf.push(' ', this.flags_); } if (this.attrs) { for (let i = 0; i < this.attrs.length;) { const attrName = this.attrs[i++]; if (typeof attrName == 'number') { break; } const attrValue = this.attrs[i++]; buf.push(' ', attrName, '="', attrValue, '"'); } } buf.push('>'); processTNodeChildren(this.child, buf); buf.push('</', tagName, '>'); return buf.join(''); } get styleBindings_() { return toDebugStyleBinding(this, false); } get classBindings_() { return toDebugStyleBinding(this, true); } get providerIndexStart_() { return this.providerIndexes & 1048575 /* ProvidersStartIndexMask */; } get providerIndexEnd_() { return this.providerIndexStart_ + (this.providerIndexes >>> 20 /* CptViewProvidersCountShift */); } } const TNodeDebug = TNode; function toDebugStyleBinding(tNode, isClassBased) { const tData = tNode.tView_.data; const bindings = []; const range = isClassBased ? tNode.classBindings : tNode.styleBindings; const prev = getTStylingRangePrev(range); const next = getTStylingRangeNext(range); let isTemplate = next !== 0; let cursor = isTemplate ? next : prev; while (cursor !== 0) { const itemKey = tData[cursor]; const itemRange = tData[cursor + 1]; bindings.unshift({ key: itemKey, index: cursor, isTemplate: isTemplate, prevDuplicate: getTStylingRangePrevDuplicate(itemRange), nextDuplicate: getTStylingRangeNextDuplicate(itemRange), nextIndex: getTStylingRangeNext(itemRange), prevIndex: getTStylingRangePrev(itemRange), }); if (cursor === prev) isTemplate = false; cursor = getTStylingRangePrev(itemRange); } bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null); return bindings; } function processTNodeChildren(tNode, buf) { while (tNode) { buf.push(tNode.template_); tNode = tNode.next; } } const TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null; let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because // `LView` constructor could have side-effects. /** * This function clones a blueprint and creates TData. * * Simple slice will keep the same type, and we need it to be TData */ function cloneToTViewData(list) { if (TVIEWDATA_EMPTY === undefined) TVIEWDATA_EMPTY = new TViewData(); return TVIEWDATA_EMPTY.concat(list); } const LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null; const MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null; const TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null; const TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null; const TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null; const TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null; const LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null; const TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null; function attachLViewDebug(lView) { attachDebugObject(lView, new LViewDebug(lView)); } function attachLContainerDebug(lContainer) { attachDebugObject(lContainer, new LContainerDebug(lContainer)); } function toDebug(obj) { if (obj) { const debug = obj.debug; assertDefined(debug, 'Object does not have a debug representation.'); return debug; } else { return obj; } } /** * Use this method to unwrap a native element in `LView` and convert it into HTML for easier * reading. * * @param value possibly wrapped native DOM node. * @param includeChildren If `true` then the serialized HTML form will include child elements * (same * as `outerHTML`). If `false` then the serialized HTML form will only contain the element * itself * (will not serialize child elements). */ function toHtml(value, includeChildren = false) { const node = unwrapRNode(value); if (node) { switch (node.nodeType) { case Node.TEXT_NODE: return node.textContent; case Node.COMMENT_NODE: return `<!--${node.textContent}-->`; case Node.ELEMENT_NODE: const outerHTML = node.outerHTML; if (includeChildren) { return outerHTML; } else { const innerHTML = '>' + node.innerHTML + '<'; return (outerHTML.split(innerHTML)[0]) + '>'; } } } return null; } class LViewDebug { constructor(_raw_lView) { this._raw_lView = _raw_lView; } /** * Flags associated with the `LView` unpacked into a more readable state. */ get flags() { const flags = this._raw_lView[FLAGS]; return { __raw__flags__: flags, initPhaseState: flags & 3 /* InitPhaseStateMask */, creationMode: !!(flags & 4 /* CreationMode */), firstViewPass: !!(flags & 8 /* FirstLViewPass */), checkAlways: !!(flags & 16 /* CheckAlways */), dirty: !!(flags & 64 /* Dirty */), attached: !!(flags & 128 /* Attached */), destroyed: !!(flags & 256 /* Destroyed */), isRoot: !!(flags & 512 /* IsRoot */), indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */, }; } get parent() { return toDebug(this._raw_lView[PARENT]); } get hostHTML() { return toHtml(this._raw_lView[HOST], true); } get html() { return (this.nodes || []).map(mapToHTML).join(''); } get context() { return this._raw_lView[CONTEXT]; } /** * The tree of nodes associated with the current `LView`. The nodes have been normalized into * a tree structure with relevant details pulled out for readability. */ get nodes() { const lView = this._raw_lView; const tNode = lView[TVIEW].firstChild; return toDebugNodes(tNode, lView); } get template() { return this.tView.template_; } get tView() { return this._raw_lView[TVIEW]; } get cleanup() { return this._raw_lView[CLEANUP]; } get injector() { return this._raw_lView[INJECTOR]; } get rendererFactory() { return this._raw_lView[RENDERER_FACTORY]; } get renderer() { return this._raw_lView[RENDERER]; } get sanitizer() { return this._raw_lView[SANITIZER]; } get childHead() { return toDebug(this._raw_lView[CHILD_HEAD]); } get next() { return toDebug(this._raw_lView[NEXT]); } get childTail() { return toDebug(this._raw_lView[CHILD_TAIL]); } get declarationView() { return toDebug(this._raw_lView[DECLARATION_VIEW]); } get queries() { return this._raw_lView[QUERIES]; } get tHost() { return this._raw_lView[T_HOST]; } get decls() { return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex); } get vars() { return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex); } get expando() { return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length); } /** * Normalized view of child views (and containers) attached at this location. */ get childViews() { const childViews = []; let child = this.childHead; while (child) { childViews.push(child); child = child.next; } return childViews; } } function mapToHTML(node) { if (node.type === 'ElementContainer') { return (node.children || []).map(mapToHTML).join(''); } else if (node.type === 'IcuContainer') { throw new Error('Not implemented'); } else { return toHtml(node.native, true) || ''; } } function toLViewRange(tView, lView, start, end) { let content = []; for (let index = start; index < end; index++) { content.push({ index: index, t: tView.data[index], l: lView[index] }); } return { start: start, end: end, length: end - start, content: content }; } /** * Turns a flat list of nodes into a tree by walking the associated `TNode` tree. * * @param tNode * @param lView */ function toDebugNodes(tNode, lView) { if (tNode) { const debugNodes = []; let tNodeCursor = tNode; while (tNodeCursor) { debugNodes.push(buildDebugNode(tNodeCursor, lView)); tNodeCursor = tNodeCursor.next; } return debugNodes; } else { return []; } } function buildDebugNode(tNode, lView) { const rawValue = lView[tNode.index]; const native = unwrapRNode(rawValue); const factories = []; const instances = []; const tView = lView[TVIEW]; for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) { const def = tView.data[i]; factories.push(def.type); instances.push(lView[i]); } return { html: toHtml(native), type: toTNodeTypeAsString(tNode.type), tNode, native: native, children: toDebugNodes(tNode.child, lView), factories, instances, injector: buildNodeInjectorDebug(tNode, tView, lView), get injectorResolutionPath() { return tNode.debugNodeInjectorPath(lView); }, }; } function buildNodeInjectorDebug(tNode, tView, lView) { const viewProviders = []; for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) { viewProviders.push(tView.data[i]); } const providers = []; for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) { providers.push(tView.data[i]); } const nodeInjectorDebug = { bloom: toBloom(lView, tNode.injectorIndex), cumulativeBloom: toBloom(tView.data, tNode.injectorIndex), providers, viewProviders, parentInjectorIndex: lView[tNode.providerIndexStart_ - 1], }; return nodeInjectorDebug; } /** * Convert a number at `idx` location in `array` into binary representation. * * @param array * @param idx */ function binary(array, idx) { const value = array[idx]; // If not a number we print 8 `?` to retain alignment but let user know that it was called on // wrong type. if (typeof value !== 'number') return '????????'; // We prefix 0s so that we have constant length number const text = '00000000' + value.toString(2); return text.substring(text.length - 8); } /** * Convert a bloom filter at location `idx` in `array` into binary representation. * * @param array * @param idx */ function toBloom(array, idx) { if (idx < 0) { return 'NO_NODE_INJECTOR'; } return `${binary(array, idx + 7)}_${binary(array, idx + 6)}_${binary(array, idx + 5)}_${binary(array, idx + 4)}_${binary(array, idx + 3)}_${binary(array, idx + 2)}_${binary(array, idx + 1)}_${binary(array, idx + 0)}`; } class LContainerDebug { constructor(_raw_lContainer) { this._raw_lContainer = _raw_lContainer; } get hasTransplantedViews() { return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS]; } get views() { return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET) .map(toDebug); } get parent() { return toDebug(this._raw_lContainer[PARENT]); } get movedViews() { return this._raw_lContainer[MOVED_VIEWS]; } get host() { return this._raw_lContainer[HOST]; } get native() { return this._raw_lContainer[NATIVE]; } get next() { return toDebug(this._raw_lContainer[NEXT]); } } const ɵ0$5 = () => Promise.resolve(null); /** * A permanent marker promise which signifies that the current CD tree is * clean. */ const _CLEAN_PROMISE = (ɵ0$5)(); /** * Invoke `HostBindingsFunction`s for view. * * This methods executes `TView.hostBindingOpCodes`. It is used to execute the * `HostBindingsFunction`s associated with the current `LView`. * * @param tView Current `TView`. * @param lView Current `LView`. */ function processHostBindingOpCodes(tView, lView) { const hostBindingOpCodes = tView.hostBindingOpCodes; if (hostBindingOpCodes === null) return; try { for (let i = 0; i < hostBindingOpCodes.length; i++) { const opCode = hostBindingOpCodes[i]; if (opCode < 0) { // Negative numbers are element indexes. setSelectedIndex(~opCode); } else { // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex. const directiveIdx = opCode; const bindingRootIndx = hostBindingOpCodes[++i]; const hostBindingFn = hostBindingOpCodes[++i]; setBindingRootForHostBindings(bindingRootIndx, directiveIdx); const context = lView[directiveIdx]; hostBindingFn(2 /* Update */, context); } } } finally { setSelectedIndex(-1); } } /** Refreshes all content queries declared by directives in a given view */ function refreshContentQueries(tView, lView) { const contentQueries = tView.contentQueries; if (contentQueries !== null) { for (let i = 0; i < contentQueries.length; i += 2) { const queryStartIdx = contentQueries[i]; const directiveDefIdx = contentQueries[i + 1]; if (directiveDefIdx !== -1) { const directiveDef = tView.data[directiveDefIdx]; ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.'); ngDevMode && assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined'); setCurrentQueryIndex(queryStartIdx); directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx); } } } } /** Refreshes child components in the current view (update mode). */ function refreshChildComponents(hostLView, components) { for (let i = 0; i < components.length; i++) { refreshComponent(hostLView, components[i]); } } /** Renders child components in the current view (creation mode). */ function renderChildComponents(hostLView, components) { for (let i = 0; i < components.length; i++) { renderComponent(hostLView, components[i]); } } function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) { const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice(); lView[HOST] = host; lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */; resetPreOrderHookFlags(lView); ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView); lView[PARENT] = lView[DECLARATION_VIEW] = parentLView; lView[CONTEXT] = context; lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]); ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required'); lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]); ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required'); lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null; lView[INJECTOR] = injector || parentLView && parentLView[INJECTOR] || null; lView[T_HOST] = tHostNode; ngDevMode && assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView'); lView[DECLARATION_COMPONENT_VIEW] = tView.type == 2 /* Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView; ngDevMode && attachLViewDebug(lView); return lView; } function getOrCreateTNode(tView, index, type, name, attrs) { ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in // `view_engine_compatibility` for additional context. assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\'t be in the LView header.'); // Keep this function short, so that the VM will inline it. ngDevMode && assertPureTNodeType(type); let tNode = tView.data[index]; if (tNode === null) { tNode = createTNodeAtIndex(tView, index, type, name, attrs); if (isInI18nBlock()) { // If we are in i18n block then all elements should be pre declared through `Placeholder` // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context. // If the `TNode` was not pre-declared than it means it was not mentioned which means it was // removed, so we mark it as detached. tNode.flags |= 64 /* isDetached */; } } else if (tNode.type & 64 /* Placeholder */) { tNode.type = type; tNode.value = name; tNode.attrs = attrs; const parent = getCurrentParentTNode(); tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex; ngDevMode && assertTNodeForTView(tNode, tView); ngDevMode && assertEqual(index, tNode.index, 'Expecting same index'); } setCurrentTNode(tNode, true); return tNode; } function createTNodeAtIndex(tView, index, type, name, attrs) { const currentTNode = getCurrentTNodePlaceholderOk(); const isParent = isCurrentTNodeParent(); const parent = isParent ? currentTNode : currentTNode && currentTNode.parent; // Parents cannot cross component boundaries because components will be used in multiple places. const tNode = tView.data[index] = createTNode(tView, parent, type, index, name, attrs); // Assign a pointer to the first child node of a given view. The first node is not always the one // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has // the index 1 or more, so we can't just check node index. if (tView.firstChild === null) { tView.firstChild = tNode; } if (currentTNode !== null) { if (isParent) { // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify? if (currentTNode.child == null && tNode.parent !== null) { // We are in the same view, which means we are adding content node to the parent view. currentTNode.child = tNode; } } else { if (currentTNode.next === null) { // In the case of i18n the `currentTNode` may already be linked, in which case we don't want // to break the links which i18n created. currentTNode.next = tNode; } } } return tNode; } /** * When elements are created dynamically after a view blueprint is created (e.g. through * i18nApply()), we need to adjust the blueprint for future * template passes. * * @param tView `TView` associated with `LView` * @param lView The `LView` containing the blueprint to adjust * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0 * @param initialValue Initial value to store in blueprint */ function allocExpando(tView, lView, numSlotsToAlloc, initialValue) { if (numSlotsToAlloc === 0) return -1; if (ngDevMode) { assertFirstCreatePass(tView); assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!'); assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView'); assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView'); assertFirstUpdatePass(tView); } const allocIdx = lView.length; for (let i = 0; i < numSlotsToAlloc; i++) { lView.push(initialValue); tView.blueprint.push(initialValue); tView.data.push(null); } return allocIdx; } ////////////////////////// //// Render ////////////////////////// /** * Processes a view in the creation mode. This includes a number of steps in a specific order: * - creating view query functions (if any); * - executing a template function in the creation mode; * - updating static queries (if any); * - creating child components defined in a given view. */ function renderView(tView, lView, context) { ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode'); enterView(lView); try { const viewQuery = tView.viewQuery; if (viewQuery !== null) { executeViewQueryFn(1 /* Create */, viewQuery, context); } // Execute a template associated with this view, if it exists. A template function might not be // defined for the root component views. const templateFn = tView.template; if (templateFn !== null) { executeTemplate(tView, lView, templateFn, 1 /* Create */, context); } // This needs to be set before children are processed to support recursive components. // This must be set to false immediately after the first creation run because in an // ngFor loop, all the views will be created together before update mode runs and turns // off firstCreatePass. If we don't set it here, instances will perform directive // matching, etc again and again. if (tView.firstCreatePass) { tView.firstCreatePass = false; } // We resolve content queries specifically marked as `static` in creation mode. Dynamic // content queries are resolved during change detection (i.e. update mode), after embedded // views are refreshed (see block above). if (tView.staticContentQueries) { refreshContentQueries(tView, lView); } // We must materialize query results before child components are processed // in case a child component has projected a container. The LContainer needs // to exist so the embedded views are properly attached by the container. if (tView.staticViewQueries) { executeViewQueryFn(2 /* Update */, tView.viewQuery, context); } // Render child component views. const components = tView.components; if (components !== null) { renderChildComponents(lView, components); } } catch (error) { // If we didn't manage to get past the first template pass due to // an error, mark the view as corrupted so we can try to recover. if (tView.firstCreatePass) { tView.incompleteFirstPass = true; } throw error; } finally { lView[FLAGS] &= ~4 /* CreationMode */; leaveView(); } } /** * Processes a view in update mode. This includes a number of steps in a specific order: * - executing a template function in update mode; * - executing hooks; * - refreshing queries; * - setting host bindings; * - refreshing child (embedded and component) views. */ function refreshView(tView, lView, templateFn, context) { ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode'); const flags = lView[FLAGS]; if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */) return; enterView(lView); // Check no changes mode is a dev only mode used to verify that bindings have not changed // since they were assigned. We do not want to execute lifecycle hooks in that mode. const isInCheckNoChangesPass = isInCheckNoChangesMode(); try { resetPreOrderHookFlags(lView); setBindingIndex(tView.bindingStartIndex); if (templateFn !== null) { executeTemplate(tView, lView, templateFn, 2 /* Update */, context); } const hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */; // execute pre-order hooks (OnInit, OnChanges, DoCheck) // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const preOrderCheckHooks = tView.preOrderCheckHooks; if (preOrderCheckHooks !== null) { executeCheckHooks(lView, preOrderCheckHooks, null); } } else { const preOrderHooks = tView.preOrderHooks; if (preOrderHooks !== null) { executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, null); } incrementInitPhaseFlags(lView, 0 /* OnInitHooksToBeRun */); } } // First mark transplanted views that are declared in this lView as needing a refresh at their // insertion points. This is needed to avoid the situation where the template is defined in this // `LView` but its declaration appears after the insertion component. markTransplantedViewsForRefresh(lView); refreshEmbeddedViews(lView); // Content query results must be refreshed before content hooks are called. if (tView.contentQueries !== null) { refreshContentQueries(tView, lView); } // execute content hooks (AfterContentInit, AfterContentChecked) // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const contentCheckHooks = tView.contentCheckHooks; if (contentCheckHooks !== null) { executeCheckHooks(lView, contentCheckHooks); } } else { const contentHooks = tView.contentHooks; if (contentHooks !== null) { executeInitAndCheckHooks(lView, contentHooks, 1 /* AfterContentInitHooksToBeRun */); } incrementInitPhaseFlags(lView, 1 /* AfterContentInitHooksToBeRun */); } } processHostBindingOpCodes(tView, lView); // Refresh child component views. const components = tView.components; if (components !== null) { refreshChildComponents(lView, components); } // View queries must execute after refreshing child components because a template in this view // could be inserted in a child component. If the view query executes before child component // refresh, the template might not yet be inserted. const viewQuery = tView.viewQuery; if (viewQuery !== null) { executeViewQueryFn(2 /* Update */, viewQuery, context); } // execute view hooks (AfterViewInit, AfterViewChecked) // PERF WARNING: do NOT extract this to a separate function without running benchmarks if (!isInCheckNoChangesPass) { if (hooksInitPhaseCompleted) { const viewCheckHooks = tView.viewCheckHooks; if (viewCheckHooks !== null) { executeCheckHooks(lView, viewCheckHooks); } } else { const viewHooks = tView.viewHooks; if (viewHooks !== null) { executeInitAndCheckHooks(lView, viewHooks, 2 /* AfterViewInitHooksToBeRun */); } incrementInitPhaseFlags(lView, 2 /* AfterViewInitHooksToBeRun */); } } if (tView.firstUpdatePass === true) { // We need to make sure that we only flip the flag on successful `refreshView` only // Don't do this in `finally` block. // If we did this in `finally` block then an exception could block the execution of styling // instructions which in turn would be unable to insert themselves into the styling linked // list. The result of this would be that if the exception would not be throw on subsequent CD // the styling would be unable to process it data and reflect to the DOM. tView.firstUpdatePass = false; } // Do not reset the dirty state when running in check no changes mode. We don't want components // to behave differently depending on whether check no changes is enabled or not. For example: // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to // refresh a `NgClass` binding should work. If we would reset the dirty state in the check // no changes cycle, the component would be not be dirty for the next update pass. This would // be different in production mode where the component dirty state is not reset. if (!isInCheckNoChangesPass) { lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */); } if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) { lView[FLAGS] &= ~1024 /* RefreshTransplantedView */; updateTransplantedViewCount(lView[PARENT], -1); } } finally { leaveView(); } } function renderComponentOrTemplate(tView, lView, templateFn, context) { const rendererFactory = lView[RENDERER_FACTORY]; const normalExecutionPath = !isInCheckNoChangesMode(); const creationModeIsActive = isCreationMode(lView); try { if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) { rendererFactory.begin(); } if (creationModeIsActive) { renderView(tView, lView, context); } refreshView(tView, lView, templateFn, context); } finally { if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) { rendererFactory.end(); } } } function executeTemplate(tView, lView, templateFn, rf, context) { const prevSelectedIndex = getSelectedIndex(); const isUpdatePhase = rf & 2 /* Update */; try { setSelectedIndex(-1); if (isUpdatePhase && lView.length > HEADER_OFFSET) { // When we're updating, inherently select 0 so we don't // have to generate that instruction for most update blocks. selectIndexInternal(tView, lView, HEADER_OFFSET, isInCheckNoChangesMode()); } const preHookType = isUpdatePhase ? 2 /* TemplateUpdateStart */ : 0 /* TemplateCreateStart */; profiler(preHookType, context); templateFn(rf, context); } finally { setSelectedIndex(prevSelectedIndex); const postHookType = isUpdatePhase ? 3 /* TemplateUpdateEnd */ : 1 /* TemplateCreateEnd */; profiler(postHookType, context); } } ////////////////////////// //// Element ////////////////////////// function executeContentQueries(tView, tNode, lView) { if (isContentQueryHost(tNode)) { const start = tNode.directiveStart; const end = tNode.directiveEnd; for (let directiveIndex = start; directiveIndex < end; directiveIndex++) { const def = tView.data[directiveIndex]; if (def.contentQueries) { def.contentQueries(1 /* Create */, lView[directiveIndex], directiveIndex); } } } } /** * Creates directive instances. */ function createDirectivesInstances(tView, lView, tNode) { if (!getBindingsEnabled()) return; instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView)); if ((tNode.flags & 128 /* hasHostBindings */) === 128 /* hasHostBindings */) { invokeDirectivesHostBindings(tView, lView, tNode); } } /** * Takes a list of local names and indices and pushes the resolved local variable values * to LView in the same order as they are loaded in the template with load(). */ function saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) { const localNames = tNode.localNames; if (localNames !== null) { let localIndex = tNode.index + 1; for (let i = 0; i < localNames.length; i += 2) { const index = localNames[i + 1]; const value = index === -1 ? localRefExtractor(tNode, viewData) : viewData[index]; viewData[localIndex++] = value; } } } /** * Gets TView from a template function or creates a new TView * if it doesn't already exist. * * @param def ComponentDef * @returns TView */ function getOrCreateTComponentView(def) { const tView = def.tView; // Create a TView if there isn't one, or recreate it if the first create pass didn't // complete successfully since we can't know for sure whether it's in a usable shape. if (tView === null || tView.incompleteFirstPass) { // Declaration node here is null since this function is called when we dynamically create a // component and hence there is no declaration. const declTNode = null; return def.tView = createTView(1 /* Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts); } return tView; } /** * Creates a TView instance * * @param type Type of `TView`. * @param declTNode Declaration location of this `TView`. * @param templateFn Template function * @param decls The number of nodes, local refs, and pipes in this template * @param directives Registry of directives for this view * @param pipes Registry of pipes for this view * @param viewQuery View queries for this view * @param schemas Schemas for this view * @param consts Constants for this view */ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) { ngDevMode && ngDevMode.tView++; const bindingStartIndex = HEADER_OFFSET + decls; // This length does not yet contain host bindings from child directives because at this point, // we don't know which directives are active on this template. As soon as a directive is matched // that has a host binding, we will update the blueprint with that def's hostVars count. const initialViewLength = bindingStartIndex + vars; const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength); const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory; const tView = blueprint[TVIEW] = ngDevMode ? new TViewConstructor(type, // type: TViewType, blueprint, // blueprint: LView, templateFn, // template: ComponentTemplate<{}>|null, null, // queries: TQueries|null viewQuery, // viewQuery: ViewQueriesFunction<{}>|null, declTNode, // declTNode: TNode|null, cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData, bindingStartIndex, // bindingStartIndex: number, initialViewLength, // expandoStartIndex: number, null, // hostBindingOpCodes: HostBindingOpCodes, true, // firstCreatePass: boolean, true, // firstUpdatePass: boolean, false, // staticViewQueries: boolean, false, // staticContentQueries: boolean, null, // preOrderHooks: HookData|null, null, // preOrderCheckHooks: HookData|null, null, // contentHooks: HookData|null, null, // contentCheckHooks: HookData|null, null, // viewHooks: HookData|null, null, // viewCheckHooks: HookData|null, null, // destroyHooks: DestroyHookData|null, null, // cleanup: any[]|null, null, // contentQueries: number[]|null, null, // components: number[]|null, typeof directives === 'function' ? // directives() : // directives, // directiveRegistry: DirectiveDefList|null, typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null, null, // firstChild: TNode|null, schemas, // schemas: SchemaMetadata[]|null, consts, // consts: TConstants|null false, // incompleteFirstPass: boolean decls, // ngDevMode only: decls vars) : { type: type, blueprint: blueprint, template: templateFn, queries: null, viewQuery: viewQuery, declTNode: declTNode, data: blueprint.slice().fill(null, bindingStartIndex), bindingStartIndex: bindingStartIndex, expandoStartIndex: initialViewLength, hostBindingOpCodes: null, firstCreatePass: true, firstUpdatePass: true, staticViewQueries: false, staticContentQueries: false, preOrderHooks: null, preOrderCheckHooks: null, contentHooks: null, contentCheckHooks: null, viewHooks: null, viewCheckHooks: null, destroyHooks: null, cleanup: null, contentQueries: null, components: null, directiveRegistry: typeof directives === 'function' ? directives() : directives, pipeRegistry: typeof pipes === 'function' ? pipes() : pipes, firstChild: null, schemas: schemas, consts: consts, incompleteFirstPass: false }; if (ngDevMode) { // For performance reasons it is important that the tView retains the same shape during runtime. // (To make sure that all of the code is monomorphic.) For this reason we seal the object to // prevent class transitions. Object.seal(tView); } return tView; } function createViewBlueprint(bindingStartIndex, initialViewLength) { const blueprint = ngDevMode ? new LViewBlueprint() : []; for (let i = 0; i < initialViewLength; i++) { blueprint.push(i < bindingStartIndex ? null : NO_CHANGE); } return blueprint; } function createError(text, token) { return new Error(`Renderer: ${text} [${stringifyForError(token)}]`); } function assertHostNodeExists(rElement, elementOrSelector) { if (!rElement) { if (typeof elementOrSelector === 'string') { throw createError('Host node with selector not found:', elementOrSelector); } else { throw createError('Host node is required:', elementOrSelector); } } } /** * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline. * * @param rendererFactory Factory function to create renderer instance. * @param elementOrSelector Render element or CSS selector to locate the element. * @param encapsulation View Encapsulation defined for component that requests host element. */ function locateHostElement(renderer, elementOrSelector, encapsulation) { if (isProceduralRenderer(renderer)) { // When using native Shadow DOM, do not clear host element to allow native slot projection const preserveContent = encapsulation === ViewEncapsulation.ShadowDom; return renderer.selectRootElement(elementOrSelector, preserveContent); } let rElement = typeof elementOrSelector === 'string' ? renderer.querySelector(elementOrSelector) : elementOrSelector; ngDevMode && assertHostNodeExists(rElement, elementOrSelector); // Always clear host element's content when Renderer3 is in use. For procedural renderer case we // make it depend on whether ShadowDom encapsulation is used (in which case the content should be // preserved to allow native slot projection). ShadowDom encapsulation requires procedural // renderer, and procedural renderer case is handled above. rElement.textContent = ''; return rElement; } /** * Saves context for this cleanup function in LView.cleanupInstances. * * On the first template pass, saves in TView: * - Cleanup function * - Index of context we just saved in LView.cleanupInstances * * This function can also be used to store instance specific cleanup fns. In that case the `context` * is `null` and the function is store in `LView` (rather than it `TView`). */ function storeCleanupWithContext(tView, lView, context, cleanupFn) { const lCleanup = getOrCreateLViewCleanup(lView); if (context === null) { // If context is null that this is instance specific callback. These callbacks can only be // inserted after template shared instances. For this reason in ngDevMode we freeze the TView. if (ngDevMode) { Object.freeze(getOrCreateTViewCleanup(tView)); } lCleanup.push(cleanupFn); } else { lCleanup.push(context); if (tView.firstCreatePass) { getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1); } } } function createTNode(tView, tParent, type, index, value, attrs) { ngDevMode && index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in // `view_engine_compatibility` for additional context. assertGreaterThanOrEqual(index, HEADER_OFFSET, 'TNodes can\'t be in the LView header.'); ngDevMode && assertNotSame(attrs, undefined, '\'undefined\' is not valid value for \'attrs\''); ngDevMode && ngDevMode.tNode++; ngDevMode && tParent && assertTNodeForTView(tParent, tView); let injectorIndex = tParent ? tParent.injectorIndex : -1; const tNode = ngDevMode ? new TNodeDebug(tView, // tView_: TView type, // type: TNodeType index, // index: number null, // insertBeforeIndex: null|-1|number|number[] injectorIndex, // injectorIndex: number -1, // directiveStart: number -1, // directiveEnd: number -1, // directiveStylingLast: number null, // propertyBindings: number[]|null 0, // flags: TNodeFlags 0, // providerIndexes: TNodeProviderIndexes value, // value: string|null attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null null, // mergedAttrs null, // localNames: (string|number)[]|null undefined, // initialInputs: (string[]|null)[]|null|undefined null, // inputs: PropertyAliases|null null, // outputs: PropertyAliases|null null, // tViews: ITView|ITView[]|null null, // next: ITNode|null null, // projectionNext: ITNode|null null, // child: ITNode|null tParent, // parent: TElementNode|TContainerNode|null null, // projection: number|(ITNode|RNode[])[]|null null, // styles: string|null null, // stylesWithoutHost: string|null undefined, // residualStyles: string|null null, // classes: string|null null, // classesWithoutHost: string|null undefined, // residualClasses: string|null 0, // classBindings: TStylingRange; 0) : { type, index, insertBeforeIndex: null, injectorIndex, directiveStart: -1, directiveEnd: -1, directiveStylingLast: -1, propertyBindings: null, flags: 0, providerIndexes: 0, value: value, attrs: attrs, mergedAttrs: null, localNames: null, initialInputs: undefined, inputs: null, outputs: null, tViews: null, next: null, projectionNext: null, child: null, parent: tParent, projection: null, styles: null, stylesWithoutHost: null, residualStyles: undefined, classes: null, classesWithoutHost: null, residualClasses: undefined, classBindings: 0, styleBindings: 0, }; if (ngDevMode) { // For performance reasons it is important that the tNode retains the same shape during runtime. // (To make sure that all of the code is monomorphic.) For this reason we seal the object to // prevent class transitions. Object.seal(tNode); } return tNode; } function generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) { for (let publicName in inputAliasMap) { if (inputAliasMap.hasOwnProperty(publicName)) { propStore = propStore === null ? {} : propStore; const internalName = inputAliasMap[publicName]; if (propStore.hasOwnProperty(publicName)) { propStore[publicName].push(directiveDefIdx, internalName); } else { (propStore[publicName] = [directiveDefIdx, internalName]); } } } return propStore; } /** * Initializes data structures required to work with directive inputs and outputs. * Initialization is done for all directives matched on a given TNode. */ function initializeInputAndOutputAliases(tView, tNode) { ngDevMode && assertFirstCreatePass(tView); const start = tNode.directiveStart; const end = tNode.directiveEnd; const tViewData = tView.data; const tNodeAttrs = tNode.attrs; const inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : []; let inputsStore = null; let outputsStore = null; for (let i = start; i < end; i++) { const directiveDef = tViewData[i]; const directiveInputs = directiveDef.inputs; // Do not use unbound attributes as inputs to structural directives, since structural // directive inputs can only be set using microsyntax (e.g. `<div *dir="exp">`). // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which // should be set for inline templates. const initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ? generateInitialInputs(directiveInputs, tNodeAttrs) : null; inputsFromAttrs.push(initialInputs); inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore); outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore); } if (inputsStore !== null) { if (inputsStore.hasOwnProperty('class')) { tNode.flags |= 16 /* hasClassInput */; } if (inputsStore.hasOwnProperty('style')) { tNode.flags |= 32 /* hasStyleInput */; } } tNode.initialInputs = inputsFromAttrs; tNode.inputs = inputsStore; tNode.outputs = outputsStore; } /** * Mapping between attributes names that don't correspond to their element property names. * * Performance note: this function is written as a series of if checks (instead of, say, a property * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of * mapping property names. Do NOT change without benchmarking. * * Note: this mapping has to be kept in sync with the equally named mapping in the template * type-checking machinery of ngtsc. */ function mapPropName(name) { if (name === 'class') return 'className'; if (name === 'for') return 'htmlFor'; if (name === 'formaction') return 'formAction'; if (name === 'innerHtml') return 'innerHTML'; if (name === 'readonly') return 'readOnly'; if (name === 'tabindex') return 'tabIndex'; return name; } function elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) { ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.'); const element = getNativeByTNode(tNode, lView); let inputData = tNode.inputs; let dataValue; if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) { setInputsForProperty(tView, lView, dataValue, propName, value); if (isComponentHost(tNode)) markDirtyIfOnPush(lView, tNode.index); if (ngDevMode) { setNgReflectProperties(lView, element, tNode.type, dataValue, value); } } else if (tNode.type & 3 /* AnyRNode */) { propName = mapPropName(propName); if (ngDevMode) { validateAgainstEventProperties(propName); if (!validateProperty(tView, element, propName, tNode)) { // Return here since we only log warnings for unknown properties. logUnknownPropertyError(propName, tNode); return; } ngDevMode.rendererSetProperty++; } // It is assumed that the sanitizer is only added when the compiler determines that the // property is risky, so sanitization can be done without further checks. value = sanitizer != null ? sanitizer(value, tNode.value || '', propName) : value; if (isProceduralRenderer(renderer)) { renderer.setProperty(element, propName, value); } else if (!isAnimationProp(propName)) { element.setProperty ? element.setProperty(propName, value) : element[propName] = value; } } else if (tNode.type & 12 /* AnyContainer */) { // If the node is a container and the property didn't // match any of the inputs or schemas we should throw. if (ngDevMode && !matchingSchemas(tView, tNode.value)) { logUnknownPropertyError(propName, tNode); } } } /** If node is an OnPush component, marks its LView dirty. */ function markDirtyIfOnPush(lView, viewIndex) { ngDevMode && assertLView(lView); const childComponentLView = getComponentLViewByIndex(viewIndex, lView); if (!(childComponentLView[FLAGS] & 16 /* CheckAlways */)) { childComponentLView[FLAGS] |= 64 /* Dirty */; } } function setNgReflectProperty(lView, element, type, attrName, value) { const renderer = lView[RENDERER]; attrName = normalizeDebugBindingName(attrName); const debugValue = normalizeDebugBindingValue(value); if (type & 3 /* AnyRNode */) { if (value == null) { isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) : element.removeAttribute(attrName); } else { isProceduralRenderer(renderer) ? renderer.setAttribute(element, attrName, debugValue) : element.setAttribute(attrName, debugValue); } } else { const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`); if (isProceduralRenderer(renderer)) { renderer.setValue(element, textContent); } else { element.textContent = textContent; } } } function setNgReflectProperties(lView, element, type, dataValue, value) { if (type & (3 /* AnyRNode */ | 4 /* Container */)) { /** * dataValue is an array containing runtime input or output names for the directives: * i+0: directive instance index * i+1: privateName * * e.g. [0, 'change', 'change-minified'] * we want to set the reflected property with the privateName: dataValue[i+1] */ for (let i = 0; i < dataValue.length; i += 2) { setNgReflectProperty(lView, element, type, dataValue[i + 1], value); } } } function validateProperty(tView, element, propName, tNode) { // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT // mode where this check happens at compile time. In JIT mode, `schemas` is always present and // defined as an array (as an empty array in case `schemas` field is not defined) and we should // execute the check below. if (tView.schemas === null) return true; // The property is considered valid if the element matches the schema, it exists on the element // or it is synthetic, and we are in a browser context (web worker nodes should be skipped). if (matchingSchemas(tView, tNode.value) || propName in element || isAnimationProp(propName)) { return true; } // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we // need to account for both here, while being careful for `typeof null` also returning 'object'. return typeof Node === 'undefined' || Node === null || !(element instanceof Node); } function matchingSchemas(tView, tagName) { const schemas = tView.schemas; if (schemas !== null) { for (let i = 0; i < schemas.length; i++) { const schema = schemas[i]; if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) { return true; } } } return false; } /** * Logs an error that a property is not supported on an element. * @param propName Name of the invalid property. * @param tNode Node on which we encountered the property. */ function logUnknownPropertyError(propName, tNode) { let message = `Can't bind to '${propName}' since it isn't a known property of '${tNode.value}'.`; console.error(formatRuntimeError("303" /* UNKNOWN_BINDING */, message)); } /** * Instantiate a root component. */ function instantiateRootComponent(tView, lView, def) { const rootTNode = getCurrentTNode(); if (tView.firstCreatePass) { if (def.providersResolver) def.providersResolver(def); const directiveIndex = allocExpando(tView, lView, 1, null); ngDevMode && assertEqual(directiveIndex, rootTNode.directiveStart, 'Because this is a root component the allocated expando should match the TNode component.'); configureViewWithDirective(tView, rootTNode, lView, directiveIndex, def); } const directive = getNodeInjectable(lView, tView, rootTNode.directiveStart, rootTNode); attachPatchData(directive, lView); const native = getNativeByTNode(rootTNode, lView); if (native) { attachPatchData(native, lView); } return directive; } /** * Resolve the matched directives on a node. */ function resolveDirectives(tView, lView, tNode, localRefs) { // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in // tsickle. ngDevMode && assertFirstCreatePass(tView); let hasDirectives = false; if (getBindingsEnabled()) { const directiveDefs = findDirectiveDefMatches(tView, lView, tNode); const exportsMap = localRefs === null ? null : { '': -1 }; if (directiveDefs !== null) { hasDirectives = true; initTNodeFlags(tNode, tView.data.length, directiveDefs.length); // When the same token is provided by several directives on the same node, some rules apply in // the viewEngine: // - viewProviders have priority over providers // - the last directive in NgModule.declarations has priority over the previous one // So to match these rules, the order in which providers are added in the arrays is very // important. for (let i = 0; i < directiveDefs.length; i++) { const def = directiveDefs[i]; if (def.providersResolver) def.providersResolver(def); } let preOrderHooksFound = false; let preOrderCheckHooksFound = false; let directiveIdx = allocExpando(tView, lView, directiveDefs.length, null); ngDevMode && assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space'); for (let i = 0; i < directiveDefs.length; i++) { const def = directiveDefs[i]; // Merge the attrs in the order of matches. This assumes that the first directive is the // component itself, so that the component has the least priority. tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs); configureViewWithDirective(tView, tNode, lView, directiveIdx, def); saveNameToExportMap(directiveIdx, def, exportsMap); if (def.contentQueries !== null) tNode.flags |= 8 /* hasContentQuery */; if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0) tNode.flags |= 128 /* hasHostBindings */; const lifeCycleHooks = def.type.prototype; // Only push a node index into the preOrderHooks array if this is the first // pre-order hook found on this node. if (!preOrderHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) { // We will push the actual hook function into this array later during dir instantiation. // We cannot do it now because we must ensure hooks are registered in the same // order that directives are created (i.e. injection order). (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index); preOrderHooksFound = true; } if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) { (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(tNode.index); preOrderCheckHooksFound = true; } directiveIdx++; } initializeInputAndOutputAliases(tView, tNode); } if (exportsMap) cacheMatchingLocalNames(tNode, localRefs, exportsMap); } // Merge the template attrs last so that they have the highest priority. tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs); return hasDirectives; } /** * Add `hostBindings` to the `TView.hostBindingOpCodes`. * * @param tView `TView` to which the `hostBindings` should be added. * @param tNode `TNode` the element which contains the directive * @param lView `LView` current `LView` * @param directiveIdx Directive index in view. * @param directiveVarsIdx Where will the directive's vars be stored * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add. */ function registerHostBindingOpCodes(tView, tNode, lView, directiveIdx, directiveVarsIdx, def) { ngDevMode && assertFirstCreatePass(tView); const hostBindings = def.hostBindings; if (hostBindings) { let hostBindingOpCodes = tView.hostBindingOpCodes; if (hostBindingOpCodes === null) { hostBindingOpCodes = tView.hostBindingOpCodes = []; } const elementIndx = ~tNode.index; if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) { // Conditionally add select element so that we are more efficient in execution. // NOTE: this is strictly not necessary and it trades code size for runtime perf. // (We could just always add it.) hostBindingOpCodes.push(elementIndx); } hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings); } } /** * Returns the last selected element index in the `HostBindingOpCodes` * * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only * if it changes. This method returns the last index (or '0' if not found.) * * Selected element index are only the ones which are negative. */ function lastSelectedElementIdx(hostBindingOpCodes) { let i = hostBindingOpCodes.length; while (i > 0) { const value = hostBindingOpCodes[--i]; if (typeof value === 'number' && value < 0) { return value; } } return 0; } /** * Instantiate all the directives that were previously resolved on the current node. */ function instantiateAllDirectives(tView, lView, tNode, native) { const start = tNode.directiveStart; const end = tNode.directiveEnd; if (!tView.firstCreatePass) { getOrCreateNodeInjectorForNode(tNode, lView); } attachPatchData(native, lView); const initialInputs = tNode.initialInputs; for (let i = start; i < end; i++) { const def = tView.data[i]; const isComponent = isComponentDef(def); if (isComponent) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */); addComponentLogic(lView, tNode, def); } const directive = getNodeInjectable(lView, tView, i, tNode); attachPatchData(directive, lView); if (initialInputs !== null) { setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs); } if (isComponent) { const componentView = getComponentLViewByIndex(tNode.index, lView); componentView[CONTEXT] = directive; } } } function invokeDirectivesHostBindings(tView, lView, tNode) { const start = tNode.directiveStart; const end = tNode.directiveEnd; const firstCreatePass = tView.firstCreatePass; const elementIndex = tNode.index; const currentDirectiveIndex = getCurrentDirectiveIndex(); try { setSelectedIndex(elementIndex); for (let dirIndex = start; dirIndex < end; dirIndex++) { const def = tView.data[dirIndex]; const directive = lView[dirIndex]; setCurrentDirectiveIndex(dirIndex); if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) { invokeHostBindingsInCreationMode(def, directive); } } } finally { setSelectedIndex(-1); setCurrentDirectiveIndex(currentDirectiveIndex); } } /** * Invoke the host bindings in creation mode. * * @param def `DirectiveDef` which may contain the `hostBindings` function. * @param directive Instance of directive. */ function invokeHostBindingsInCreationMode(def, directive) { if (def.hostBindings !== null) { def.hostBindings(1 /* Create */, directive); } } /** * Matches the current node against all available selectors. * If a component is matched (at most one), it is returned in first position in the array. */ function findDirectiveDefMatches(tView, viewData, tNode) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */); const registry = tView.directiveRegistry; let matches = null; if (registry) { for (let i = 0; i < registry.length; i++) { const def = registry[i]; if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) { matches || (matches = ngDevMode ? new MatchesArray() : []); diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type); if (isComponentDef(def)) { if (ngDevMode) { assertTNodeType(tNode, 2 /* Element */, `"${tNode.value}" tags cannot be used as component hosts. ` + `Please use a different tag to activate the ${stringify(def.type)} component.`); if (tNode.flags & 2 /* isComponentHost */) throwMultipleComponentError(tNode); } markAsComponentHost(tView, tNode); // The component is always stored first with directives after. matches.unshift(def); } else { matches.push(def); } } } } return matches; } /** * Marks a given TNode as a component's host. This consists of: * - setting appropriate TNode flags; * - storing index of component's host element so it will be queued for view refresh during CD. */ function markAsComponentHost(tView, hostTNode) { ngDevMode && assertFirstCreatePass(tView); hostTNode.flags |= 2 /* isComponentHost */; (tView.components || (tView.components = ngDevMode ? new TViewComponents() : [])) .push(hostTNode.index); } /** Caches local names and their matching directive indices for query and template lookups. */ function cacheMatchingLocalNames(tNode, localRefs, exportsMap) { if (localRefs) { const localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : []; // Local names must be stored in tNode in the same order that localRefs are defined // in the template to ensure the data is loaded in the same slots as their refs // in the template (for template queries). for (let i = 0; i < localRefs.length; i += 2) { const index = exportsMap[localRefs[i + 1]]; if (index == null) throw new RuntimeError("301" /* EXPORT_NOT_FOUND */, `Export of name '${localRefs[i + 1]}' not found!`); localNames.push(localRefs[i], index); } } } /** * Builds up an export map as directives are created, so local refs can be quickly mapped * to their directive instances. */ function saveNameToExportMap(directiveIdx, def, exportsMap) { if (exportsMap) { if (def.exportAs) { for (let i = 0; i < def.exportAs.length; i++) { exportsMap[def.exportAs[i]] = directiveIdx; } } if (isComponentDef(def)) exportsMap[''] = directiveIdx; } } /** * Initializes the flags on the current node, setting all indices to the initial index, * the directive count to 0, and adding the isComponent flag. * @param index the initial index */ function initTNodeFlags(tNode, index, numberOfDirectives) { ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives'); tNode.flags |= 1 /* isDirectiveHost */; // When the first directive is created on a node, save the index tNode.directiveStart = index; tNode.directiveEnd = index + numberOfDirectives; tNode.providerIndexes = index; } /** * Setup directive for instantiation. * * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well * as `LView`. `TView` gets the `DirectiveDef`. * * @param tView `TView` * @param tNode `TNode` * @param lView `LView` * @param directiveIndex Index where the directive will be stored in the Expando. * @param def `DirectiveDef` */ function configureViewWithDirective(tView, tNode, lView, directiveIndex, def) { ngDevMode && assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section'); tView.data[directiveIndex] = def; const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true)); const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null); tView.blueprint[directiveIndex] = nodeInjectorFactory; lView[directiveIndex] = nodeInjectorFactory; registerHostBindingOpCodes(tView, tNode, lView, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def); } function addComponentLogic(lView, hostTNode, def) { const native = getNativeByTNode(hostTNode, lView); const tView = getOrCreateTComponentView(def); // Only component views should be added to the view tree directly. Embedded views are // accessed through their containers because they may be removed / re-added later. const rendererFactory = lView[RENDERER_FACTORY]; const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null)); // Component view will always be created before any injected LContainers, // so this is a regular element, wrap it with the component view lView[hostTNode.index] = componentView; } function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) { if (ngDevMode) { assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.'); validateAgainstEventAttributes(name); assertTNodeType(tNode, 2 /* Element */, `Attempted to set attribute \`${name}\` on a container node. ` + `Host bindings are not valid on ng-container or ng-template.`); } const element = getNativeByTNode(tNode, lView); setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer); } function setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) { if (value == null) { ngDevMode && ngDevMode.rendererRemoveAttribute++; isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) : element.removeAttribute(name); } else { ngDevMode && ngDevMode.rendererSetAttribute++; const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name); if (isProceduralRenderer(renderer)) { renderer.setAttribute(element, name, strValue, namespace); } else { namespace ? element.setAttributeNS(namespace, name, strValue) : element.setAttribute(name, strValue); } } } /** * Sets initial input properties on directive instances from attribute data * * @param lView Current LView that is being processed. * @param directiveIndex Index of the directive in directives array * @param instance Instance of the directive on which to set the initial inputs * @param def The directive def that contains the list of inputs * @param tNode The static data for this node */ function setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) { const initialInputs = initialInputData[directiveIndex]; if (initialInputs !== null) { const setInput = def.setInput; for (let i = 0; i < initialInputs.length;) { const publicName = initialInputs[i++]; const privateName = initialInputs[i++]; const value = initialInputs[i++]; if (setInput !== null) { def.setInput(instance, value, publicName, privateName); } else { instance[privateName] = value; } if (ngDevMode) { const nativeElement = getNativeByTNode(tNode, lView); setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value); } } } } /** * Generates initialInputData for a node and stores it in the template's static storage * so subsequent template invocations don't have to recalculate it. * * initialInputData is an array containing values that need to be set as input properties * for directives on this node, but only once on creation. We need this array to support * the case where you set an @Input property of a directive using attribute-like syntax. * e.g. if you have a `name` @Input, you can set it once like this: * * <my-component name="Bess"></my-component> * * @param inputs The list of inputs from the directive def * @param attrs The static attrs on this node */ function generateInitialInputs(inputs, attrs) { let inputsToStore = null; let i = 0; while (i < attrs.length) { const attrName = attrs[i]; if (attrName === 0 /* NamespaceURI */) { // We do not allow inputs on namespaced attributes. i += 4; continue; } else if (attrName === 5 /* ProjectAs */) { // Skip over the `ngProjectAs` value. i += 2; continue; } // If we hit any other attribute markers, we're done anyway. None of those are valid inputs. if (typeof attrName === 'number') break; if (inputs.hasOwnProperty(attrName)) { if (inputsToStore === null) inputsToStore = []; inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]); } i += 2; } return inputsToStore; } ////////////////////////// //// ViewContainer & View ////////////////////////// // Not sure why I need to do `any` here but TS complains later. const LContainerArray = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) && createNamedArrayType('LContainer'); /** * Creates a LContainer, either from a container instruction, or for a ViewContainerRef. * * @param hostNative The host element for the LContainer * @param hostTNode The host TNode for the LContainer * @param currentView The parent view of the LContainer * @param native The native comment element * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case * @returns LContainer */ function createLContainer(hostNative, currentView, native, tNode) { ngDevMode && assertLView(currentView); ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native); // https://jsperf.com/array-literal-vs-new-array-really const lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native true, // Boolean `true` in this position signifies that this is an `LContainer` false, // has transplanted views currentView, // parent null, // next 0, // transplanted views to refresh count tNode, // t_host native, // native, null, // view refs null); ngDevMode && assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.'); ngDevMode && attachLContainerDebug(lContainer); return lContainer; } /** * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes * them by executing an associated template function. */ function refreshEmbeddedViews(lView) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const embeddedLView = lContainer[i]; const embeddedTView = embeddedLView[TVIEW]; ngDevMode && assertDefined(embeddedTView, 'TView must be allocated'); if (viewAttachedToChangeDetector(embeddedLView)) { refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]); } } } } /** * Mark transplanted views as needing to be refreshed at their insertion points. * * @param lView The `LView` that may have transplanted views. */ function markTransplantedViewsForRefresh(lView) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { if (!lContainer[HAS_TRANSPLANTED_VIEWS]) continue; const movedViews = lContainer[MOVED_VIEWS]; ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS'); for (let i = 0; i < movedViews.length; i++) { const movedLView = movedViews[i]; const insertionLContainer = movedLView[PARENT]; ngDevMode && assertLContainer(insertionLContainer); // We don't want to increment the counter if the moved LView was already marked for // refresh. if ((movedLView[FLAGS] & 1024 /* RefreshTransplantedView */) === 0) { updateTransplantedViewCount(insertionLContainer, 1); } // Note, it is possible that the `movedViews` is tracking views that are transplanted *and* // those that aren't (declaration component === insertion component). In the latter case, // it's fine to add the flag, as we will clear it immediately in // `refreshEmbeddedViews` for the view currently being refreshed. movedLView[FLAGS] |= 1024 /* RefreshTransplantedView */; } } } ///////////// /** * Refreshes components by entering the component view and processing its bindings, queries, etc. * * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET) */ function refreshComponent(hostLView, componentHostIdx) { ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode'); const componentView = getComponentLViewByIndex(componentHostIdx, hostLView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed if (viewAttachedToChangeDetector(componentView)) { const tView = componentView[TVIEW]; if (componentView[FLAGS] & (16 /* CheckAlways */ | 64 /* Dirty */)) { refreshView(tView, componentView, tView.template, componentView[CONTEXT]); } else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) { // Only attached components that are CheckAlways or OnPush and dirty should be refreshed refreshContainsDirtyView(componentView); } } } /** * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are * children or descendants of the given lView. * * @param lView The lView which contains descendant transplanted views that need to be refreshed. */ function refreshContainsDirtyView(lView) { for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const embeddedLView = lContainer[i]; if (embeddedLView[FLAGS] & 1024 /* RefreshTransplantedView */) { const embeddedTView = embeddedLView[TVIEW]; ngDevMode && assertDefined(embeddedTView, 'TView must be allocated'); refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]); } else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) { refreshContainsDirtyView(embeddedLView); } } } const tView = lView[TVIEW]; // Refresh child component views. const components = tView.components; if (components !== null) { for (let i = 0; i < components.length; i++) { const componentView = getComponentLViewByIndex(components[i], lView); // Only attached components that are CheckAlways or OnPush and dirty should be refreshed if (viewAttachedToChangeDetector(componentView) && componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) { refreshContainsDirtyView(componentView); } } } } function renderComponent(hostLView, componentHostIdx) { ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode'); const componentView = getComponentLViewByIndex(componentHostIdx, hostLView); const componentTView = componentView[TVIEW]; syncViewWithBlueprint(componentTView, componentView); renderView(componentTView, componentView, componentView[CONTEXT]); } /** * Syncs an LView instance with its blueprint if they have gotten out of sync. * * Typically, blueprints and their view instances should always be in sync, so the loop here * will be skipped. However, consider this case of two components side-by-side: * * App template: * ``` * <comp></comp> * <comp></comp> * ``` * * The following will happen: * 1. App template begins processing. * 2. First <comp> is matched as a component and its LView is created. * 3. Second <comp> is matched as a component and its LView is created. * 4. App template completes processing, so it's time to check child templates. * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint. * 6. Second <comp> template is checked. Its blueprint has been updated by the first * <comp> template, but its LView was created before this update, so it is out of sync. * * Note that embedded views inside ngFor loops will never be out of sync because these views * are processed as soon as they are created. * * @param tView The `TView` that contains the blueprint for syncing * @param lView The view to sync */ function syncViewWithBlueprint(tView, lView) { for (let i = lView.length; i < tView.blueprint.length; i++) { lView.push(tView.blueprint[i]); } } /** * Adds LView or LContainer to the end of the current view tree. * * This structure will be used to traverse through nested views to remove listeners * and call onDestroy callbacks. * * @param lView The view where LView or LContainer should be added * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header * @param lViewOrLContainer The LView or LContainer to add to the view tree * @returns The state passed in */ function addToViewTree(lView, lViewOrLContainer) { // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out // of order, the change detection will run out of order, as the act of retrieving the the // LContainer from the RNode is what adds it to the queue. if (lView[CHILD_HEAD]) { lView[CHILD_TAIL][NEXT] = lViewOrLContainer; } else { lView[CHILD_HEAD] = lViewOrLContainer; } lView[CHILD_TAIL] = lViewOrLContainer; return lViewOrLContainer; } /////////////////////////////// //// Change detection /////////////////////////////// /** * Marks current view and all ancestors dirty. * * Returns the root view because it is found as a byproduct of marking the view tree * dirty, and can be used by methods that consume markViewDirty() to easily schedule * change detection. Otherwise, such methods would need to traverse up the view tree * an additional time to get the root view and schedule a tick on it. * * @param lView The starting LView to mark dirty * @returns the root LView */ function markViewDirty(lView) { while (lView) { lView[FLAGS] |= 64 /* Dirty */; const parent = getLViewParent(lView); // Stop traversing up as soon as you find a root view that wasn't attached to any container if (isRootView(lView) && !parent) { return lView; } // continue otherwise lView = parent; } return null; } /** * Used to schedule change detection on the whole application. * * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run. * It is usually called indirectly by calling `markDirty` when the view needs to be * re-rendered. * * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple * `scheduleTick` requests. The scheduling function can be overridden in * `renderComponent`'s `scheduler` option. */ function scheduleTick(rootContext, flags) { const nothingScheduled = rootContext.flags === 0 /* Empty */; if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) { // https://github.com/angular/angular/issues/39296 // should only attach the flags when really scheduling a tick rootContext.flags |= flags; let res; rootContext.clean = new Promise((r) => res = r); rootContext.scheduler(() => { if (rootContext.flags & 1 /* DetectChanges */) { rootContext.flags &= ~1 /* DetectChanges */; tickRootContext(rootContext); } if (rootContext.flags & 2 /* FlushPlayers */) { rootContext.flags &= ~2 /* FlushPlayers */; const playerHandler = rootContext.playerHandler; if (playerHandler) { playerHandler.flushPlayers(); } } rootContext.clean = _CLEAN_PROMISE; res(null); }); } } function tickRootContext(rootContext) { for (let i = 0; i < rootContext.components.length; i++) { const rootComponent = rootContext.components[i]; const lView = readPatchedLView(rootComponent); const tView = lView[TVIEW]; renderComponentOrTemplate(tView, lView, tView.template, rootComponent); } } function detectChangesInternal(tView, lView, context) { const rendererFactory = lView[RENDERER_FACTORY]; if (rendererFactory.begin) rendererFactory.begin(); try { refreshView(tView, lView, tView.template, context); } catch (error) { handleError(lView, error); throw error; } finally { if (rendererFactory.end) rendererFactory.end(); } } /** * Synchronously perform change detection on a root view and its components. * * @param lView The view which the change detection should be performed on. */ function detectChangesInRootView(lView) { tickRootContext(lView[CONTEXT]); } function checkNoChangesInternal(tView, view, context) { setIsInCheckNoChangesMode(true); try { detectChangesInternal(tView, view, context); } finally { setIsInCheckNoChangesMode(false); } } /** * Checks the change detector on a root view and its components, and throws if any changes are * detected. * * This is used in development mode to verify that running change detection doesn't * introduce other changes. * * @param lView The view which the change detection should be checked on. */ function checkNoChangesInRootView(lView) { setIsInCheckNoChangesMode(true); try { detectChangesInRootView(lView); } finally { setIsInCheckNoChangesMode(false); } } function executeViewQueryFn(flags, viewQueryFn, component) { ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.'); setCurrentQueryIndex(0); viewQueryFn(flags, component); } /////////////////////////////// //// Bindings & interpolations /////////////////////////////// /** * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`. * * In order to support TestBed's `DebugElement.properties` we need to save, for each binding: * - a bound property name; * - a static parts of interpolated strings; * * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a * property binding metadata will be stored in `TView.data` at the same index as a bound value in * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the * following format: * - `propertyName` for bound properties; * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for * interpolated properties. * * @param tData `TData` where meta-data will be saved; * @param tNode `TNode` that is a target of the binding; * @param propertyName bound property name; * @param bindingIndex binding index in `LView` * @param interpolationParts static interpolation parts (for property interpolations) */ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) { // Binding meta-data are stored only the first time a given property instruction is processed. // Since we don't have a concept of the "first update pass" we need to check for presence of the // binding meta-data to decide if one should be stored (or if was stored already). if (tData[bindingIndex] === null) { if (tNode.inputs == null || !tNode.inputs[propertyName]) { const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []); propBindingIdxs.push(bindingIndex); let bindingMetadata = propertyName; if (interpolationParts.length > 0) { bindingMetadata += INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER); } tData[bindingIndex] = bindingMetadata; } } } const CLEAN_PROMISE = _CLEAN_PROMISE; function getOrCreateLViewCleanup(view) { // top level variables should not be exported for performance reasons (PERF_NOTES.md) return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []); } function getOrCreateTViewCleanup(tView) { return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []); } /** * There are cases where the sub component's renderer needs to be included * instead of the current renderer (see the componentSyntheticHost* instructions). */ function loadComponentRenderer(currentDef, tNode, lView) { // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root // component (see packages/core/src/render3/component.ts). This is not consistent with the process // of creating inner components, when current directive index is available in the state. In order // to avoid relying on current def being `null` (thus special-casing root component creation), the // process of creating root component should be unified with the process of creating inner // components. if (currentDef === null || isComponentDef(currentDef)) { lView = unwrapLView(lView[tNode.index]); } return lView[RENDERER]; } /** Handles an error thrown in an LView. */ function handleError(lView, error) { const injector = lView[INJECTOR]; const errorHandler = injector ? injector.get(ErrorHandler, null) : null; errorHandler && errorHandler.handleError(error); } /** * Set the inputs of directives at the current node to corresponding value. * * @param tView The current TView * @param lView the `LView` which contains the directives. * @param inputs mapping between the public "input" name and privately-known, * possibly minified, property names to write to. * @param value Value to set. */ function setInputsForProperty(tView, lView, inputs, publicName, value) { for (let i = 0; i < inputs.length;) { const index = inputs[i++]; const privateName = inputs[i++]; const instance = lView[index]; ngDevMode && assertIndexInRange(lView, index); const def = tView.data[index]; if (def.setInput !== null) { def.setInput(instance, value, publicName, privateName); } else { instance[privateName] = value; } } } /** * Updates a text binding at a given index in a given LView. */ function textBindingInternal(lView, index, value) { ngDevMode && assertString(value, 'Value should be a string'); ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE'); ngDevMode && assertIndexInRange(lView, index); const element = getNativeByIndex(index, lView); ngDevMode && assertDefined(element, 'native element should exist'); updateTextNode(lView[RENDERER], element, value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Compute the static styling (class/style) from `TAttributes`. * * This function should be called during `firstCreatePass` only. * * @param tNode The `TNode` into which the styling information should be loaded. * @param attrs `TAttributes` containing the styling information. * @param writeToHost Where should the resulting static styles be written? * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost` * - `true` Write to `TNode.styles` / `TNode.classes` */ function computeStaticStyling(tNode, attrs, writeToHost) { ngDevMode && assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only'); let styles = writeToHost ? tNode.styles : null; let classes = writeToHost ? tNode.classes : null; let mode = 0; if (attrs !== null) { for (let i = 0; i < attrs.length; i++) { const value = attrs[i]; if (typeof value === 'number') { mode = value; } else if (mode == 1 /* Classes */) { classes = concatStringsWithSpace(classes, value); } else if (mode == 2 /* Styles */) { const style = value; const styleValue = attrs[++i]; styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';'); } } } writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles; writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Synchronously perform change detection on a component (and possibly its sub-components). * * This function triggers change detection in a synchronous way on a component. * * @param component The component which the change detection should be performed on. */ function detectChanges(component) { const view = getComponentViewByInstance(component); detectChangesInternal(view[TVIEW], view, component); } /** * Marks the component as dirty (needing change detection). Marking a component dirty will * schedule a change detection on it at some point in the future. * * Marking an already dirty component as dirty won't do anything. Only one outstanding change * detection can be scheduled per component tree. * * @param component Component to mark as dirty. */ function markDirty(component) { ngDevMode && assertDefined(component, 'component'); const rootView = markViewDirty(getComponentViewByInstance(component)); ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined'); scheduleTick(rootView[CONTEXT], 1 /* DetectChanges */); } /** * Used to perform change detection on the whole application. * * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick` * executes lifecycle hooks and conditionally checks components based on their * `ChangeDetectionStrategy` and dirtiness. * * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can * be changed when calling `renderComponent` and providing the `scheduler` option. */ function tick(component) { const rootView = getRootView(component); const rootContext = rootView[CONTEXT]; tickRootContext(rootContext); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors. * * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a * project. * * @publicApi */ const INJECTOR$1 = new InjectionToken('INJECTOR', // Dissable tslint because this is const enum which gets inlined not top level prop access. // tslint:disable-next-line: no-toplevel-property-access -1 /* Injector */); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NullInjector { get(token, notFoundValue = THROW_IF_NOT_FOUND) { if (notFoundValue === THROW_IF_NOT_FOUND) { const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`); error.name = 'NullInjectorError'; throw error; } return notFoundValue; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An internal token whose presence in an injector indicates that the injector should treat itself * as a root scoped injector when processing requests for unknown tokens which may indicate * they are provided in the root scope. */ const INJECTOR_SCOPE = new InjectionToken('Set Injector scope.'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marker which indicates that a value has not yet been created from the factory function. */ const NOT_YET = {}; /** * Marker which indicates that the factory function for a token is in the process of being called. * * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates * injection of a dependency has recursively attempted to inject the original token, and there is * a circular dependency among the providers. */ const CIRCULAR = {}; const EMPTY_ARRAY$2 = []; /** * A lazily initialized NullInjector. */ let NULL_INJECTOR = undefined; function getNullInjector() { if (NULL_INJECTOR === undefined) { NULL_INJECTOR = new NullInjector(); } return NULL_INJECTOR; } /** * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s. * * @publicApi */ function createInjector(defType, parent = null, additionalProviders = null, name) { const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name); injector._resolveInjectorDefTypes(); return injector; } /** * Creates a new injector without eagerly resolving its injector types. Can be used in places * where resolving the injector types immediately can lead to an infinite loop. The injector types * should be resolved at a later point by calling `_resolveInjectorDefTypes`. */ function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name) { return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name); } class R3Injector { constructor(def, additionalProviders, parent, source = null) { this.parent = parent; /** * Map of tokens to records which contain the instances of those tokens. * - `null` value implies that we don't have the record. Used by tree-shakable injectors * to prevent further searches. */ this.records = new Map(); /** * The transitive set of `InjectorType`s which define this injector. */ this.injectorDefTypes = new Set(); /** * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks. */ this.onDestroy = new Set(); this._destroyed = false; const dedupStack = []; // Start off by creating Records for every provider declared in every InjectorType // included transitively in additional providers then do the same for `def`. This order is // important because `def` may include providers that override ones in additionalProviders. additionalProviders && deepForEach(additionalProviders, provider => this.processProvider(provider, def, additionalProviders)); deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack)); // Make sure the INJECTOR token provides this injector. this.records.set(INJECTOR$1, makeRecord(undefined, this)); // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide // any injectable scoped to APP_ROOT_SCOPE. const record = this.records.get(INJECTOR_SCOPE); this.scope = record != null ? record.value : null; // Source name, used for debugging this.source = source || (typeof def === 'object' ? null : stringify(def)); } /** * Flag indicating that this injector was previously destroyed. */ get destroyed() { return this._destroyed; } /** * Destroy the injector and release references to every instance or provider associated with it. * * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a * hook was found. */ destroy() { this.assertNotDestroyed(); // Set destroyed = true first, in case lifecycle hooks re-enter destroy(). this._destroyed = true; try { // Call all the lifecycle hooks. this.onDestroy.forEach(service => service.ngOnDestroy()); } finally { // Release all references. this.records.clear(); this.onDestroy.clear(); this.injectorDefTypes.clear(); } } get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) { this.assertNotDestroyed(); // Set the injection context. const previousInjector = setCurrentInjector(this); try { // Check for the SkipSelf flag. if (!(flags & InjectFlags.SkipSelf)) { // SkipSelf isn't set, check if the record belongs to this injector. let record = this.records.get(token); if (record === undefined) { // No record, but maybe the token is scoped to this injector. Look for an injectable // def with a scope matching this injector. const def = couldBeInjectableType(token) && getInjectableDef(token); if (def && this.injectableDefInScope(def)) { // Found an injectable def and it's scoped to this injector. Pretend as if it was here // all along. record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET); } else { record = null; } this.records.set(token, record); } // If a record was found, get the instance for it and return it. if (record != null /* NOT null || undefined */) { return this.hydrate(token, record); } } // Select the next injector based on the Self flag - if self is set, the next injector is // the NullInjector, otherwise it's the parent. const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector(); // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue // is undefined, the value is null, otherwise it's the notFoundValue. notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue; return nextInjector.get(token, notFoundValue); } catch (e) { if (e.name === 'NullInjectorError') { const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || []; path.unshift(stringify(token)); if (previousInjector) { // We still have a parent injector, keep throwing throw e; } else { // Format & throw the final error message when we don't have any previous injector return catchInjectorError(e, token, 'R3InjectorError', this.source); } } else { throw e; } } finally { // Lastly, clean up the state by restoring the previous injector. setCurrentInjector(previousInjector); } } /** @internal */ _resolveInjectorDefTypes() { this.injectorDefTypes.forEach(defType => this.get(defType)); } toString() { const tokens = [], records = this.records; records.forEach((v, token) => tokens.push(stringify(token))); return `R3Injector[${tokens.join(', ')}]`; } assertNotDestroyed() { if (this._destroyed) { throw new Error('Injector has already been destroyed.'); } } /** * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers * to this injector. * * If an `InjectorTypeWithProviders` that declares providers besides the type is specified, * the function will return "true" to indicate that the providers of the type definition need * to be processed. This allows us to process providers of injector types after all imports of * an injector definition are processed. (following View Engine semantics: see FW-1349) */ processInjectorType(defOrWrappedDef, parents, dedupStack) { defOrWrappedDef = resolveForwardRef(defOrWrappedDef); if (!defOrWrappedDef) return false; // Either the defOrWrappedDef is an InjectorType (with injector def) or an // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic // read, so care is taken to only do the read once. // First attempt to read the injector def (`ɵinj`). let def = getInjectorDef(defOrWrappedDef); // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders. const ngModule = (def == null) && defOrWrappedDef.ngModule || undefined; // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`, // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type // is the `ngModule`. const defType = (ngModule === undefined) ? defOrWrappedDef : ngModule; // Check for circular dependencies. if (ngDevMode && parents.indexOf(defType) !== -1) { const defName = stringify(defType); const path = parents.map(stringify); throwCyclicDependencyError(defName, path); } // Check for multiple imports of the same module const isDuplicate = dedupStack.indexOf(defType) !== -1; // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual // `InjectorDef` is on its `ngModule`. if (ngModule !== undefined) { def = getInjectorDef(ngModule); } // If no definition was found, it might be from exports. Remove it. if (def == null) { return false; } // Add providers in the same way that @NgModule resolution did: // First, include providers from any imports. if (def.imports != null && !isDuplicate) { // Before processing defType's imports, add it to the set of parents. This way, if it ends // up deeply importing itself, this can be detected. ngDevMode && parents.push(defType); // Add it to the set of dedups. This way we can detect multiple imports of the same module dedupStack.push(defType); let importTypesWithProviders; try { deepForEach(def.imports, imported => { if (this.processInjectorType(imported, parents, dedupStack)) { if (importTypesWithProviders === undefined) importTypesWithProviders = []; // If the processed import is an injector type with providers, we store it in the // list of import types with providers, so that we can process those afterwards. importTypesWithProviders.push(imported); } }); } finally { // Remove it from the parents set when finished. ngDevMode && parents.pop(); } // Imports which are declared with providers (TypeWithProviders) need to be processed // after all imported modules are processed. This is similar to how View Engine // processes/merges module imports in the metadata resolver. See: FW-1349. if (importTypesWithProviders !== undefined) { for (let i = 0; i < importTypesWithProviders.length; i++) { const { ngModule, providers } = importTypesWithProviders[i]; deepForEach(providers, provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY$2)); } } } // Track the InjectorType and add a provider for it. It's important that this is done after the // def's imports. this.injectorDefTypes.add(defType); const factory = getFactoryDef(defType) || (() => new defType()); this.records.set(defType, makeRecord(factory, NOT_YET)); // Next, include providers listed on the definition itself. const defProviders = def.providers; if (defProviders != null && !isDuplicate) { const injectorType = defOrWrappedDef; deepForEach(defProviders, provider => this.processProvider(provider, injectorType, defProviders)); } return (ngModule !== undefined && defOrWrappedDef.providers !== undefined); } /** * Process a `SingleProvider` and add it. */ processProvider(provider, ngModuleType, providers) { // Determine the token from the provider. Either it's its own token, or has a {provide: ...} // property. provider = resolveForwardRef(provider); let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide); // Construct a `Record` for the provider. const record = providerToRecord(provider, ngModuleType, providers); if (!isTypeProvider(provider) && provider.multi === true) { // If the provider indicates that it's a multi-provider, process it specially. // First check whether it's been defined already. let multiRecord = this.records.get(token); if (multiRecord) { // It has. Throw a nice error if if (ngDevMode && multiRecord.multi === undefined) { throwMixedMultiProviderError(); } } else { multiRecord = makeRecord(undefined, NOT_YET, true); multiRecord.factory = () => injectArgs(multiRecord.multi); this.records.set(token, multiRecord); } token = provider; multiRecord.multi.push(provider); } else { const existing = this.records.get(token); if (ngDevMode && existing && existing.multi !== undefined) { throwMixedMultiProviderError(); } } this.records.set(token, record); } hydrate(token, record) { if (ngDevMode && record.value === CIRCULAR) { throwCyclicDependencyError(stringify(token)); } else if (record.value === NOT_YET) { record.value = CIRCULAR; record.value = record.factory(); } if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) { this.onDestroy.add(record.value); } return record.value; } injectableDefInScope(def) { if (!def.providedIn) { return false; } else if (typeof def.providedIn === 'string') { return def.providedIn === 'any' || (def.providedIn === this.scope); } else { return this.injectorDefTypes.has(def.providedIn); } } } function injectableDefOrInjectorDefFactory(token) { // Most tokens will have an injectable def directly on them, which specifies a factory directly. const injectableDef = getInjectableDef(token); const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token); if (factory !== null) { return factory; } // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above. // If it's missing that, it's an error. if (token instanceof InjectionToken) { throw new Error(`Token ${stringify(token)} is missing a ɵprov definition.`); } // Undecorated types can sometimes be created if they have no constructor arguments. if (token instanceof Function) { return getUndecoratedInjectableFactory(token); } // There was no way to resolve a factory for this token. throw new Error('unreachable'); } function getUndecoratedInjectableFactory(token) { // If the token has parameters then it has dependencies that we cannot resolve implicitly. const paramLength = token.length; if (paramLength > 0) { const args = newArray(paramLength, '?'); throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`); } // The constructor function appears to have no parameters. // This might be because it inherits from a super-class. In which case, use an injectable // def from an ancestor if there is one. // Otherwise this really is a simple class with no dependencies, so return a factory that // just instantiates the zero-arg constructor. const inheritedInjectableDef = getInheritedInjectableDef(token); if (inheritedInjectableDef !== null) { return () => inheritedInjectableDef.factory(token); } else { return () => new token(); } } function providerToRecord(provider, ngModuleType, providers) { if (isValueProvider(provider)) { return makeRecord(undefined, provider.useValue); } else { const factory = providerToFactory(provider, ngModuleType, providers); return makeRecord(factory, NOT_YET); } } /** * Converts a `SingleProvider` into a factory function. * * @param provider provider to convert to factory */ function providerToFactory(provider, ngModuleType, providers) { let factory = undefined; if (isTypeProvider(provider)) { const unwrappedProvider = resolveForwardRef(provider); return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider); } else { if (isValueProvider(provider)) { factory = () => resolveForwardRef(provider.useValue); } else if (isFactoryProvider(provider)) { factory = () => provider.useFactory(...injectArgs(provider.deps || [])); } else if (isExistingProvider(provider)) { factory = () => ɵɵinject(resolveForwardRef(provider.useExisting)); } else { const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide)); if (ngDevMode && !classRef) { throwInvalidProviderError(ngModuleType, providers, provider); } if (hasDeps(provider)) { factory = () => new (classRef)(...injectArgs(provider.deps)); } else { return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef); } } } return factory; } function makeRecord(factory, value, multi = false) { return { factory: factory, value: value, multi: multi ? [] : undefined, }; } function isValueProvider(value) { return value !== null && typeof value == 'object' && USE_VALUE in value; } function isExistingProvider(value) { return !!(value && value.useExisting); } function isFactoryProvider(value) { return !!(value && value.useFactory); } function isTypeProvider(value) { return typeof value === 'function'; } function isClassProvider(value) { return !!value.useClass; } function hasDeps(value) { return !!value.deps; } function hasOnDestroy(value) { return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function'; } function couldBeInjectableType(value) { return (typeof value === 'function') || (typeof value === 'object' && value instanceof InjectionToken); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function INJECTOR_IMPL__PRE_R3__(providers, parent, name) { return new StaticInjector(providers, parent, name); } function INJECTOR_IMPL__POST_R3__(providers, parent, name) { return createInjector({ name: name }, parent, providers, name); } const INJECTOR_IMPL = INJECTOR_IMPL__POST_R3__; /** * Concrete injectors implement this interface. Injectors are configured * with [providers](guide/glossary#provider) that associate * dependencies of various types with [injection tokens](guide/glossary#di-token). * * @see ["DI Providers"](guide/dependency-injection-providers). * @see `StaticProvider` * * @usageNotes * * The following example creates a service injector instance. * * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'} * * ### Usage example * * {@example core/di/ts/injector_spec.ts region='Injector'} * * `Injector` returns itself when given `Injector` as a token: * * {@example core/di/ts/injector_spec.ts region='injectInjector'} * * @publicApi */ class Injector { static create(options, parent) { if (Array.isArray(options)) { return INJECTOR_IMPL(options, parent, ''); } else { return INJECTOR_IMPL(options.providers, options.parent, options.name || ''); } } } Injector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND; Injector.NULL = new NullInjector(); /** @nocollapse */ Injector.ɵprov = ɵɵdefineInjectable({ token: Injector, providedIn: 'any', factory: () => ɵɵinject(INJECTOR$1), }); /** * @internal * @nocollapse */ Injector.__NG_ELEMENT_ID__ = -1 /* Injector */; const IDENT = function (value) { return value; }; const ɵ0$6 = IDENT; const EMPTY = []; const CIRCULAR$1 = IDENT; const MULTI_PROVIDER_FN = function () { return Array.prototype.slice.call(arguments); }; const ɵ1$1 = MULTI_PROVIDER_FN; const NO_NEW_LINE$1 = 'ɵ'; class StaticInjector { constructor(providers, parent = Injector.NULL, source = null) { this.parent = parent; this.source = source; const records = this._records = new Map(); records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false }); records.set(INJECTOR$1, { token: INJECTOR$1, fn: IDENT, deps: EMPTY, value: this, useNew: false }); this.scope = recursivelyProcessProviders(records, providers); } get(token, notFoundValue, flags = InjectFlags.Default) { const records = this._records; let record = records.get(token); if (record === undefined) { // This means we have never seen this record, see if it is tree shakable provider. const injectableDef = getInjectableDef(token); if (injectableDef) { const providedIn = injectableDef && injectableDef.providedIn; if (providedIn === 'any' || providedIn != null && providedIn === this.scope) { records.set(token, record = resolveProvider({ provide: token, useFactory: injectableDef.factory, deps: EMPTY })); } } if (record === undefined) { // Set record to null to make sure that we don't go through expensive lookup above again. records.set(token, null); } } let lastInjector = setCurrentInjector(this); try { return tryResolveToken(token, record, records, this.parent, notFoundValue, flags); } catch (e) { return catchInjectorError(e, token, 'StaticInjectorError', this.source); } finally { setCurrentInjector(lastInjector); } } toString() { const tokens = [], records = this._records; records.forEach((v, token) => tokens.push(stringify(token))); return `StaticInjector[${tokens.join(', ')}]`; } } function resolveProvider(provider) { const deps = computeDeps(provider); let fn = IDENT; let value = EMPTY; let useNew = false; let provide = resolveForwardRef(provider.provide); if (USE_VALUE in provider) { // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined. value = provider.useValue; } else if (provider.useFactory) { fn = provider.useFactory; } else if (provider.useExisting) { // Just use IDENT } else if (provider.useClass) { useNew = true; fn = resolveForwardRef(provider.useClass); } else if (typeof provide == 'function') { useNew = true; fn = provide; } else { throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider); } return { deps, fn, useNew, value }; } function multiProviderMixError(token) { return staticError('Cannot mix multi providers and regular providers', token); } function recursivelyProcessProviders(records, provider) { let scope = null; if (provider) { provider = resolveForwardRef(provider); if (Array.isArray(provider)) { // if we have an array recurse into the array for (let i = 0; i < provider.length; i++) { scope = recursivelyProcessProviders(records, provider[i]) || scope; } } else if (typeof provider === 'function') { // Functions were supported in ReflectiveInjector, but are not here. For safety give useful // error messages throw staticError('Function/Class not supported', provider); } else if (provider && typeof provider === 'object' && provider.provide) { // At this point we have what looks like a provider: {provide: ?, ....} let token = resolveForwardRef(provider.provide); const resolvedProvider = resolveProvider(provider); if (provider.multi === true) { // This is a multi provider. let multiProvider = records.get(token); if (multiProvider) { if (multiProvider.fn !== MULTI_PROVIDER_FN) { throw multiProviderMixError(token); } } else { // Create a placeholder factory which will look up the constituents of the multi provider. records.set(token, multiProvider = { token: provider.provide, deps: [], useNew: false, fn: MULTI_PROVIDER_FN, value: EMPTY }); } // Treat the provider as the token. token = provider; multiProvider.deps.push({ token, options: 6 /* Default */ }); } const record = records.get(token); if (record && record.fn == MULTI_PROVIDER_FN) { throw multiProviderMixError(token); } if (token === INJECTOR_SCOPE) { scope = resolvedProvider.value; } records.set(token, resolvedProvider); } else { throw staticError('Unexpected provider', provider); } } return scope; } function tryResolveToken(token, record, records, parent, notFoundValue, flags) { try { return resolveToken(token, record, records, parent, notFoundValue, flags); } catch (e) { // ensure that 'e' is of type Error. if (!(e instanceof Error)) { e = new Error(e); } const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || []; path.unshift(token); if (record && record.value == CIRCULAR$1) { // Reset the Circular flag. record.value = EMPTY; } throw e; } } function resolveToken(token, record, records, parent, notFoundValue, flags) { let value; if (record && !(flags & InjectFlags.SkipSelf)) { // If we don't have a record, this implies that we don't own the provider hence don't know how // to resolve it. value = record.value; if (value == CIRCULAR$1) { throw Error(NO_NEW_LINE$1 + 'Circular dependency'); } else if (value === EMPTY) { record.value = CIRCULAR$1; let obj = undefined; let useNew = record.useNew; let fn = record.fn; let depRecords = record.deps; let deps = EMPTY; if (depRecords.length) { deps = []; for (let i = 0; i < depRecords.length; i++) { const depRecord = depRecords[i]; const options = depRecord.options; const childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined; deps.push(tryResolveToken( // Current Token to resolve depRecord.token, // A record which describes how to resolve the token. // If undefined, this means we don't have such a record childRecord, // Other records we know about. records, // If we don't know how to resolve dependency and we should not check parent for it, // than pass in Null injector. !childRecord && !(options & 4 /* CheckParent */) ? Injector.NULL : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default)); } } record.value = value = useNew ? new fn(...deps) : fn.apply(obj, deps); } } else if (!(flags & InjectFlags.Self)) { value = parent.get(token, notFoundValue, InjectFlags.Default); } else if (!(flags & InjectFlags.Optional)) { value = Injector.NULL.get(token, notFoundValue); } else { value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null); } return value; } function computeDeps(provider) { let deps = EMPTY; const providerDeps = provider.deps; if (providerDeps && providerDeps.length) { deps = []; for (let i = 0; i < providerDeps.length; i++) { let options = 6 /* Default */; let token = resolveForwardRef(providerDeps[i]); if (Array.isArray(token)) { for (let j = 0, annotations = token; j < annotations.length; j++) { const annotation = annotations[j]; if (annotation instanceof Optional || annotation == Optional) { options = options | 1 /* Optional */; } else if (annotation instanceof SkipSelf || annotation == SkipSelf) { options = options & ~2 /* CheckSelf */; } else if (annotation instanceof Self || annotation == Self) { options = options & ~4 /* CheckParent */; } else if (annotation instanceof Inject) { token = annotation.token; } else { token = resolveForwardRef(annotation); } } } deps.push({ token, options }); } } else if (provider.useExisting) { const token = resolveForwardRef(provider.useExisting); deps = [{ token, options: 6 /* Default */ }]; } else if (!providerDeps && !(USE_VALUE in provider)) { // useValue & useExisting are the only ones which are exempt from deps all others need it. throw staticError('\'deps\' required', provider); } return deps; } function staticError(text, obj) { return new Error(formatError(text, obj, 'StaticInjectorError')); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieves the component instance associated with a given DOM element. * * @usageNotes * Given the following DOM structure: * ```html * <my-app> * <div> * <child-comp></child-comp> * </div> * </my-app> * ``` * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent` * associated with this DOM element. * * Calling the function on `<my-app>` will return the `MyApp` instance. * * * @param element DOM element from which the component should be retrieved. * @returns Component instance associated with the element or `null` if there * is no component associated with it. * * @publicApi * @globalApi ng */ function getComponent(element) { assertDomElement(element); const context = loadLContext(element, false); if (context === null) return null; if (context.component === undefined) { context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView); } return context.component; } /** * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded * view that the element is part of. Otherwise retrieves the instance of the component whose view * owns the element (in this case, the result is the same as calling `getOwningComponent`). * * @param element Element for which to get the surrounding component instance. * @returns Instance of the component that is around the element or null if the element isn't * inside any component. * * @publicApi * @globalApi ng */ function getContext(element) { assertDomElement(element); const context = loadLContext(element, false); return context === null ? null : context.lView[CONTEXT]; } /** * Retrieves the component instance whose view contains the DOM element. * * For example, if `<child-comp>` is used in the template of `<app-comp>` * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>` * would return `<app-comp>`. * * @param elementOrDir DOM element, component or directive instance * for which to retrieve the root components. * @returns Component instance whose view owns the DOM element or null if the element is not * part of a component view. * * @publicApi * @globalApi ng */ function getOwningComponent(elementOrDir) { const context = loadLContext(elementOrDir, false); if (context === null) return null; let lView = context.lView; let parent; ngDevMode && assertLView(lView); while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) { lView = parent; } return lView[FLAGS] & 512 /* IsRoot */ ? null : lView[CONTEXT]; } /** * Retrieves all root components associated with a DOM element, directive or component instance. * Root components are those which have been bootstrapped by Angular. * * @param elementOrDir DOM element, component or directive instance * for which to retrieve the root components. * @returns Root components associated with the target object. * * @publicApi * @globalApi ng */ function getRootComponents(elementOrDir) { return [...getRootContext(elementOrDir).components]; } /** * Retrieves an `Injector` associated with an element, component or directive instance. * * @param elementOrDir DOM element, component or directive instance for which to * retrieve the injector. * @returns Injector associated with the element, component or directive instance. * * @publicApi * @globalApi ng */ function getInjector(elementOrDir) { const context = loadLContext(elementOrDir, false); if (context === null) return Injector.NULL; const tNode = context.lView[TVIEW].data[context.nodeIndex]; return new NodeInjector(tNode, context.lView); } /** * Retrieve a set of injection tokens at a given DOM node. * * @param element Element for which the injection tokens should be retrieved. */ function getInjectionTokens(element) { const context = loadLContext(element, false); if (context === null) return []; const lView = context.lView; const tView = lView[TVIEW]; const tNode = tView.data[context.nodeIndex]; const providerTokens = []; const startIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */; const endIndex = tNode.directiveEnd; for (let i = startIndex; i < endIndex; i++) { let value = tView.data[i]; if (isDirectiveDefHack(value)) { // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a // design flaw. We should always store same type so that we can be monomorphic. The issue // is that for Components/Directives we store the def instead the type. The correct behavior // is that we should always be storing injectable type in this location. value = value.type; } providerTokens.push(value); } return providerTokens; } /** * Retrieves directive instances associated with a given DOM element. Does not include * component instances. * * @usageNotes * Given the following DOM structure: * ``` * <my-app> * <button my-button></button> * <my-comp></my-comp> * </my-app> * ``` * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton` * directive that is associated with the DOM element. * * Calling `getDirectives` on `<my-comp>` will return an empty array. * * @param element DOM element for which to get the directives. * @returns Array of directives associated with the element. * * @publicApi * @globalApi ng */ function getDirectives(element) { const context = loadLContext(element); if (context.directives === undefined) { context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false); } // The `directives` in this case are a named array called `LComponentView`. Clone the // result so we don't expose an internal data structure in the user's console. return context.directives === null ? [] : [...context.directives]; } function loadLContext(target, throwOnNotFound = true) { const context = getLContext(target); if (!context && throwOnNotFound) { throw new Error(ngDevMode ? `Unable to find context associated with ${stringifyForError(target)}` : 'Invalid ng target'); } return context; } /** * Retrieve map of local references. * * The references are retrieved as a map of local reference name to element or directive instance. * * @param target DOM element, component or directive instance for which to retrieve * the local references. */ function getLocalRefs(target) { const context = loadLContext(target, false); if (context === null) return {}; if (context.localRefs === undefined) { context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex); } return context.localRefs || {}; } /** * Retrieves the host element of a component or directive instance. * The host element is the DOM element that matched the selector of the directive. * * @param componentOrDirective Component or directive instance for which the host * element should be retrieved. * @returns Host element of the target. * * @publicApi * @globalApi ng */ function getHostElement(componentOrDirective) { return getLContext(componentOrDirective).native; } /** * Retrieves the rendered text for a given component. * * This function retrieves the host element of a component and * and then returns the `textContent` for that element. This implies * that the text returned will include re-projected content of * the component as well. * * @param component The component to return the content text for. */ function getRenderedText(component) { const hostElement = getHostElement(component); return hostElement.textContent || ''; } function loadLContextFromNode(node) { if (!(node instanceof Node)) throw new Error('Expecting instance of DOM Element'); return loadLContext(node); } /** * Retrieves a list of event listeners associated with a DOM element. The list does include host * listeners, but it does not include event listeners defined outside of the Angular context * (e.g. through `addEventListener`). * * @usageNotes * Given the following DOM structure: * ``` * <my-app> * <div (click)="doSomething()"></div> * </my-app> * * ``` * Calling `getListeners` on `<div>` will return an object that looks as follows: * ``` * { * name: 'click', * element: <div>, * callback: () => doSomething(), * useCapture: false * } * ``` * * @param element Element for which the DOM listeners should be retrieved. * @returns Array of event listeners on the DOM element. * * @publicApi * @globalApi ng */ function getListeners(element) { assertDomElement(element); const lContext = loadLContext(element, false); if (lContext === null) return []; const lView = lContext.lView; const tView = lView[TVIEW]; const lCleanup = lView[CLEANUP]; const tCleanup = tView.cleanup; const listeners = []; if (tCleanup && lCleanup) { for (let i = 0; i < tCleanup.length;) { const firstParam = tCleanup[i++]; const secondParam = tCleanup[i++]; if (typeof firstParam === 'string') { const name = firstParam; const listenerElement = unwrapRNode(lView[secondParam]); const callback = lCleanup[tCleanup[i++]]; const useCaptureOrIndx = tCleanup[i++]; // if useCaptureOrIndx is boolean then report it as is. // if useCaptureOrIndx is positive number then it in unsubscribe method // if useCaptureOrIndx is negative number then it is a Subscription const type = (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output'; const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false; if (element == listenerElement) { listeners.push({ element, name, callback, useCapture, type }); } } } } listeners.sort(sortListeners); return listeners; } function sortListeners(a, b) { if (a.name == b.name) return 0; return a.name < b.name ? -1 : 1; } /** * This function should not exist because it is megamorphic and only mostly correct. * * See call site for more info. */ function isDirectiveDefHack(obj) { return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined; } /** * Returns the attached `DebugNode` instance for an element in the DOM. * * @param element DOM element which is owned by an existing component's view. */ function getDebugNode(element) { let debugNode = null; const lContext = loadLContextFromNode(element); const lView = lContext.lView; const nodeIndex = lContext.nodeIndex; if (nodeIndex !== -1) { const valueInLView = lView[nodeIndex]; // this means that value in the lView is a component with its own // data. In this situation the TNode is not accessed at the same spot. const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex); ngDevMode && assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index'); debugNode = buildDebugNode(tNode, lView); } return debugNode; } /** * Retrieve the component `LView` from component/element. * * NOTE: `LView` is a private and should not be leaked outside. * Don't export this method to `ng.*` on window. * * @param target DOM element or component instance for which to retrieve the LView. */ function getComponentLView(target) { const lContext = loadLContext(target); const nodeIndx = lContext.nodeIndex; const lView = lContext.lView; const componentLView = lView[nodeIndx]; ngDevMode && assertLView(componentLView); return componentLView; } /** Asserts that a value is a DOM Element. */ function assertDomElement(value) { if (typeof Element !== 'undefined' && !(value instanceof Element)) { throw new Error('Expecting instance of DOM Element'); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marks a component for check (in case of OnPush components) and synchronously * performs change detection on the application this component belongs to. * * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}. * * @publicApi * @globalApi ng */ function applyChanges(component) { markDirty(component); getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file introduces series of globally accessible debug tools * to allow for the Angular debugging story to function. * * To see this in action run the following command: * * bazel run --config=ivy * //packages/core/test/bundling/todo:devserver * * Then load `localhost:5432` and start using the console tools. */ /** * This value reflects the property on the window where the dev * tools are patched (window.ng). * */ const GLOBAL_PUBLISH_EXPANDO_KEY = 'ng'; let _published = false; /** * Publishes a collection of default debug tools onto`window.ng`. * * These functions are available globally when Angular is in development * mode and are automatically stripped away from prod mode is on. */ function publishDefaultGlobalUtils() { if (!_published) { _published = true; /** * Warning: this function is *INTERNAL* and should not be relied upon in application's code. * The contract of the function might be changed in any release and/or the function can be * removed completely. */ publishGlobalUtil('ɵsetProfiler', setProfiler); publishGlobalUtil('getComponent', getComponent); publishGlobalUtil('getContext', getContext); publishGlobalUtil('getListeners', getListeners); publishGlobalUtil('getOwningComponent', getOwningComponent); publishGlobalUtil('getHostElement', getHostElement); publishGlobalUtil('getInjector', getInjector); publishGlobalUtil('getRootComponents', getRootComponents); publishGlobalUtil('getDirectives', getDirectives); publishGlobalUtil('applyChanges', applyChanges); } } /** * Publishes the given function to `window.ng` so that it can be * used from the browser console when an application is not in production. */ function publishGlobalUtil(name, fn) { if (typeof COMPILED === 'undefined' || !COMPILED) { // Note: we can't export `ng` when using closure enhanced optimization as: // - closure declares globals itself for minified names, which sometimes clobber our `ng` global // - we can't declare a closure extern as the namespace `ng` is already used within Google // for typings for AngularJS (via `goog.provide('ng....')`). const w = _global; ngDevMode && assertDefined(fn, 'function not defined'); if (w) { let container = w[GLOBAL_PUBLISH_EXPANDO_KEY]; if (!container) { container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {}; } container[name] = fn; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$7 = (token, notFoundValue) => { throwProviderNotFoundError(token, 'NullInjector'); }; // TODO: A hack to not pull in the NullInjector from @angular/core. const NULL_INJECTOR$1 = { get: ɵ0$7 }; /** * Bootstraps a Component into an existing host element and returns an instance * of the component. * * Use this function to bootstrap a component into the DOM tree. Each invocation * of this function will create a separate tree of components, injectors and * change detection cycles and lifetimes. To dynamically insert a new component * into an existing tree such that it shares the same injection, change detection * and object lifetime, use {@link ViewContainer#createComponent}. * * @param componentType Component to bootstrap * @param options Optional parameters which control bootstrapping */ function renderComponent$1(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts = {}) { ngDevMode && publishDefaultGlobalUtils(); ngDevMode && assertComponentType(componentType); const rendererFactory = opts.rendererFactory || domRendererFactory3; const sanitizer = opts.sanitizer || null; const componentDef = getComponentDef(componentType); if (componentDef.type != componentType) componentDef.type = componentType; // The first index of the first selector is the tag name. const componentTag = componentDef.selectors[0][0]; const hostRenderer = rendererFactory.createRenderer(null, null); const hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation); const rootFlags = componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ : 16 /* CheckAlways */ | 512 /* IsRoot */; const rootContext = createRootContext(opts.scheduler, opts.playerHandler); const renderer = rendererFactory.createRenderer(hostRNode, componentDef); const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null); const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null); enterView(rootView); let component; try { if (rendererFactory.begin) rendererFactory.begin(); const componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer); component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null); // create mode pass renderView(rootTView, rootView, null); // update mode pass refreshView(rootTView, rootView, null, null); } finally { leaveView(); if (rendererFactory.end) rendererFactory.end(); } return component; } /** * Creates the root component view and the root component node. * * @param rNode Render host element. * @param def ComponentDef * @param rootView The parent view where the host node is stored * @param rendererFactory Factory to be used for creating child renderers. * @param hostRenderer The current renderer * @param sanitizer The sanitizer, if provided * * @returns Component view created */ function createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) { const tView = rootView[TVIEW]; const index = HEADER_OFFSET; ngDevMode && assertIndexInRange(rootView, index); rootView[index] = rNode; // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at // the same time we want to communicate the debug `TNode` that this is a special `TNode` // representing a host element. const tNode = getOrCreateTNode(tView, index, 2 /* Element */, '#host', null); const mergedAttrs = tNode.mergedAttrs = def.hostAttrs; if (mergedAttrs !== null) { computeStaticStyling(tNode, mergedAttrs, true); if (rNode !== null) { setUpAttributes(hostRenderer, rNode, mergedAttrs); if (tNode.classes !== null) { writeDirectClass(hostRenderer, rNode, tNode.classes); } if (tNode.styles !== null) { writeDirectStyle(hostRenderer, rNode, tNode.styles); } } } const viewRenderer = rendererFactory.createRenderer(rNode, def); const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null); if (tView.firstCreatePass) { diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type); markAsComponentHost(tView, tNode); initTNodeFlags(tNode, rootView.length, 1); } addToViewTree(rootView, componentView); // Store component view at node index, with node as the HOST return rootView[index] = componentView; } /** * Creates a root component and sets it up with features and host bindings. Shared by * renderComponent() and ViewContainerRef.createComponent(). */ function createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) { const tView = rootLView[TVIEW]; // Create directive instance with factory() and store at next index in viewData const component = instantiateRootComponent(tView, rootLView, componentDef); rootContext.components.push(component); componentView[CONTEXT] = component; hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef)); // We want to generate an empty QueryList for root content queries for backwards // compatibility with ViewEngine. if (componentDef.contentQueries) { const tNode = getCurrentTNode(); ngDevMode && assertDefined(tNode, 'TNode expected'); componentDef.contentQueries(1 /* Create */, component, tNode.directiveStart); } const rootTNode = getCurrentTNode(); ngDevMode && assertDefined(rootTNode, 'tNode should have been already created'); if (tView.firstCreatePass && (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) { setSelectedIndex(rootTNode.index); const rootTView = rootLView[TVIEW]; registerHostBindingOpCodes(rootTView, rootTNode, rootLView, rootTNode.directiveStart, rootTNode.directiveEnd, componentDef); invokeHostBindingsInCreationMode(componentDef, component); } return component; } function createRootContext(scheduler, playerHandler) { return { components: [], scheduler: scheduler || defaultScheduler, clean: CLEAN_PROMISE, playerHandler: playerHandler || null, flags: 0 /* Empty */ }; } /** * Used to enable lifecycle hooks on the root component. * * Include this feature when calling `renderComponent` if the root component * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't * be called properly. * * Example: * * ``` * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]}); * ``` */ function LifecycleHooksFeature(component, def) { const lView = readPatchedLView(component); ngDevMode && assertDefined(lView, 'LView is required'); const tView = lView[TVIEW]; const tNode = getCurrentTNode(); ngDevMode && assertDefined(tNode, 'TNode is required'); registerPostOrderHooks(tView, tNode); } /** * Wait on component until it is rendered. * * This function returns a `Promise` which is resolved when the component's * change detection is executed. This is determined by finding the scheduler * associated with the `component`'s render tree and waiting until the scheduler * flushes. If nothing is scheduled, the function returns a resolved promise. * * Example: * ``` * await whenRendered(myComponent); * ``` * * @param component Component to wait upon * @returns Promise which resolves when the component is rendered. */ function whenRendered(component) { return getRootContext(component).clean; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getSuperType(type) { return Object.getPrototypeOf(type.prototype).constructor; } /** * Merges the definition from a super class to a sub class. * @param definition The definition that is a SubClass of another directive of component * * @codeGenApi */ function ɵɵInheritDefinitionFeature(definition) { let superType = getSuperType(definition.type); let shouldInheritFields = true; const inheritanceChain = [definition]; while (superType) { let superDef = undefined; if (isComponentDef(definition)) { // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵcmp || superType.ɵdir; } else { if (superType.ɵcmp) { throw new Error('Directives cannot inherit Components'); } // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵdir; } if (superDef) { if (shouldInheritFields) { inheritanceChain.push(superDef); // Some fields in the definition may be empty, if there were no values to put in them that // would've justified object creation. Unwrap them if necessary. const writeableDef = definition; writeableDef.inputs = maybeUnwrapEmpty(definition.inputs); writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs); writeableDef.outputs = maybeUnwrapEmpty(definition.outputs); // Merge hostBindings const superHostBindings = superDef.hostBindings; superHostBindings && inheritHostBindings(definition, superHostBindings); // Merge queries const superViewQuery = superDef.viewQuery; const superContentQueries = superDef.contentQueries; superViewQuery && inheritViewQuery(definition, superViewQuery); superContentQueries && inheritContentQueries(definition, superContentQueries); // Merge inputs and outputs fillProperties(definition.inputs, superDef.inputs); fillProperties(definition.declaredInputs, superDef.declaredInputs); fillProperties(definition.outputs, superDef.outputs); // Merge animations metadata. // If `superDef` is a Component, the `data` field is present (defaults to an empty object). if (isComponentDef(superDef) && superDef.data.animation) { // If super def is a Component, the `definition` is also a Component, since Directives can // not inherit Components (we throw an error above and cannot reach this code). const defData = definition.data; defData.animation = (defData.animation || []).concat(superDef.data.animation); } } // Run parent features const features = superDef.features; if (features) { for (let i = 0; i < features.length; i++) { const feature = features[i]; if (feature && feature.ngInherit) { feature(definition); } // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this // def already has all the necessary information inherited from its super class(es), so we // can stop merging fields from super classes. However we need to iterate through the // prototype chain to look for classes that might contain other "features" (like // NgOnChanges), which we should invoke for the original `definition`. We set the // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance // logic and only invoking functions from the "features" list. if (feature === ɵɵInheritDefinitionFeature) { shouldInheritFields = false; } } } } superType = Object.getPrototypeOf(superType); } mergeHostAttrsAcrossInheritance(inheritanceChain); } /** * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class. * * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child * type. */ function mergeHostAttrsAcrossInheritance(inheritanceChain) { let hostVars = 0; let hostAttrs = null; // We process the inheritance order from the base to the leaves here. for (let i = inheritanceChain.length - 1; i >= 0; i--) { const def = inheritanceChain[i]; // For each `hostVars`, we need to add the superclass amount. def.hostVars = (hostVars += def.hostVars); // for each `hostAttrs` we need to merge it with superclass. def.hostAttrs = mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs)); } } function maybeUnwrapEmpty(value) { if (value === EMPTY_OBJ) { return {}; } else if (value === EMPTY_ARRAY$1) { return []; } else { return value; } } function inheritViewQuery(definition, superViewQuery) { const prevViewQuery = definition.viewQuery; if (prevViewQuery) { definition.viewQuery = (rf, ctx) => { superViewQuery(rf, ctx); prevViewQuery(rf, ctx); }; } else { definition.viewQuery = superViewQuery; } } function inheritContentQueries(definition, superContentQueries) { const prevContentQueries = definition.contentQueries; if (prevContentQueries) { definition.contentQueries = (rf, ctx, directiveIndex) => { superContentQueries(rf, ctx, directiveIndex); prevContentQueries(rf, ctx, directiveIndex); }; } else { definition.contentQueries = superContentQueries; } } function inheritHostBindings(definition, superHostBindings) { const prevHostBindings = definition.hostBindings; if (prevHostBindings) { definition.hostBindings = (rf, ctx) => { superHostBindings(rf, ctx); prevHostBindings(rf, ctx); }; } else { definition.hostBindings = superHostBindings; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Fields which exist on either directive or component definitions, and need to be copied from * parent to child classes by the `ɵɵCopyDefinitionFeature`. */ const COPY_DIRECTIVE_FIELDS = [ // The child class should use the providers of its parent. 'providersResolver', ]; /** * Fields which exist only on component definitions, and need to be copied from parent to child * classes by the `ɵɵCopyDefinitionFeature`. * * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`, * since those should go in `COPY_DIRECTIVE_FIELDS` above. */ const COPY_COMPONENT_FIELDS = [ // The child class should use the template function of its parent, including all template // semantics. 'template', 'decls', 'consts', 'vars', 'onPush', 'ngContentSelectors', // The child class should use the CSS styles of its parent, including all styling semantics. 'styles', 'encapsulation', // The child class should be checked by the runtime in the same way as its parent. 'schemas', ]; /** * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a * definition. * * This exists primarily to support ngcc migration of an existing View Engine pattern, where an * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it * generates a skeleton definition on the child class, and applies this feature. * * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition, * including things like the component template function. * * @param definition The definition of a child class which inherits from a parent class with its * own definition. * * @codeGenApi */ function ɵɵCopyDefinitionFeature(definition) { let superType = getSuperType(definition.type); let superDef = undefined; if (isComponentDef(definition)) { // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵcmp; } else { // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance. superDef = superType.ɵdir; } // Needed because `definition` fields are readonly. const defAny = definition; // Copy over any fields that apply to either directives or components. for (const field of COPY_DIRECTIVE_FIELDS) { defAny[field] = superDef[field]; } if (isComponentDef(superDef)) { // Copy over any component-specific fields. for (const field of COPY_COMPONENT_FIELDS) { defAny[field] = superDef[field]; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _symbolIterator = null; function getSymbolIterator() { if (!_symbolIterator) { const Symbol = _global['Symbol']; if (Symbol && Symbol.iterator) { _symbolIterator = Symbol.iterator; } else { // es6-shim specific logic const keys = Object.getOwnPropertyNames(Map.prototype); for (let i = 0; i < keys.length; ++i) { const key = keys[i]; if (key !== 'entries' && key !== 'size' && Map.prototype[key] === Map.prototype['entries']) { _symbolIterator = key; } } } } return _symbolIterator; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function devModeEqual(a, b) { const isListLikeIterableA = isListLikeIterable(a); const isListLikeIterableB = isListLikeIterable(b); if (isListLikeIterableA && isListLikeIterableB) { return areIterablesEqual(a, b, devModeEqual); } else { const isAObject = a && (typeof a === 'object' || typeof a === 'function'); const isBObject = b && (typeof b === 'object' || typeof b === 'function'); if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) { return true; } else { return Object.is(a, b); } } } /** * Indicates that the result of a {@link Pipe} transformation has changed even though the * reference has not changed. * * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value * is stored. * * Example: * * ``` * if (this._latestValue === this._latestReturnedValue) { * return this._latestReturnedValue; * } else { * this._latestReturnedValue = this._latestValue; * return WrappedValue.wrap(this._latestValue); // this will force update * } * ``` * * @publicApi * @deprecated from v10 stop using. (No replacement, deemed unnecessary.) */ class WrappedValue { constructor(value) { this.wrapped = value; } /** Creates a wrapped value. */ static wrap(value) { return new WrappedValue(value); } /** * Returns the underlying value of a wrapped value. * Returns the given `value` when it is not wrapped. **/ static unwrap(value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; } /** Returns true if `value` is a wrapped value. */ static isWrapped(value) { return value instanceof WrappedValue; } } function isListLikeIterable(obj) { if (!isJsObject(obj)) return false; return Array.isArray(obj) || (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v] getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop } function areIterablesEqual(a, b, comparator) { const iterator1 = a[getSymbolIterator()](); const iterator2 = b[getSymbolIterator()](); while (true) { const item1 = iterator1.next(); const item2 = iterator2.next(); if (item1.done && item2.done) return true; if (item1.done || item2.done) return false; if (!comparator(item1.value, item2.value)) return false; } } function iterateListLike(obj, fn) { if (Array.isArray(obj)) { for (let i = 0; i < obj.length; i++) { fn(obj[i]); } } else { const iterator = obj[getSymbolIterator()](); let item; while (!((item = iterator.next()).done)) { fn(item.value); } } } function isJsObject(o) { return o !== null && (typeof o === 'function' || typeof o === 'object'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // TODO(misko): consider inlining /** Updates binding and returns the value. */ function updateBinding(lView, bindingIndex, value) { return lView[bindingIndex] = value; } /** Gets the current binding value. */ function getBinding(lView, bindingIndex) { ngDevMode && assertIndexInRange(lView, bindingIndex); ngDevMode && assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.'); return lView[bindingIndex]; } /** * Updates binding if changed, then returns whether it was updated. * * This function also checks the `CheckNoChangesMode` and throws if changes are made. * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE * behavior. * * @param lView current `LView` * @param bindingIndex The binding in the `LView` to check * @param value New value to check against `lView[bindingIndex]` * @returns `true` if the bindings has changed. (Throws if binding has changed during * `CheckNoChangesMode`) */ function bindingUpdated(lView, bindingIndex, value) { ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.'); ngDevMode && assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`); const oldValue = lView[bindingIndex]; if (Object.is(oldValue, value)) { return false; } else { if (ngDevMode && isInCheckNoChangesMode()) { // View engine didn't report undefined values as changed on the first checkNoChanges pass // (before the change detection was run). const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined; if (!devModeEqual(oldValueToCompare, value)) { const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value); throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName); } // There was a change, but the `devModeEqual` decided that the change is exempt from an error. // For this reason we exit as if no change. The early exit is needed to prevent the changed // value to be written into `LView` (If we would write the new value that we would not see it // as change on next CD.) return false; } lView[bindingIndex] = value; return true; } } /** Updates 2 bindings if changed, then returns whether either was updated. */ function bindingUpdated2(lView, bindingIndex, exp1, exp2) { const different = bindingUpdated(lView, bindingIndex, exp1); return bindingUpdated(lView, bindingIndex + 1, exp2) || different; } /** Updates 3 bindings if changed, then returns whether any was updated. */ function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) { const different = bindingUpdated2(lView, bindingIndex, exp1, exp2); return bindingUpdated(lView, bindingIndex + 2, exp3) || different; } /** Updates 4 bindings if changed, then returns whether any was updated. */ function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) { const different = bindingUpdated2(lView, bindingIndex, exp1, exp2); return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Updates the value of or removes a bound attribute on an Element. * * Used in the case of `[attr.title]="value"` * * @param name name The name of the attribute. * @param value value The attribute is removed when value is `null` or `undefined`. * Otherwise the attribute value is set to the stringified value. * @param sanitizer An optional function used to sanitize the value. * @param namespace Optional namespace to use when setting the attribute. * * @codeGenApi */ function ɵɵattribute(name, value, sanitizer, namespace) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex); } return ɵɵattribute; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Create interpolation bindings with a variable number of expressions. * * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead. * Those are faster because there is no need to create an array of expressions and iterate over it. * * `values`: * - has static text at even indexes, * - has evaluated expressions at odd indexes. * * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise. */ function interpolationV(lView, values) { ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values'); ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values'); let isBindingUpdated = false; let bindingIndex = getBindingIndex(); for (let i = 1; i < values.length; i += 2) { // Check if bindings (odd indexes) have changed isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated; } setBindingIndex(bindingIndex); if (!isBindingUpdated) { return NO_CHANGE; } // Build the updated content let content = values[0]; for (let i = 1; i < values.length; i += 2) { content += renderStringify(values[i]) + values[i + 1]; } return content; } /** * Creates an interpolation binding with 1 expression. * * @param prefix static value used for concatenation only. * @param v0 value checked for change. * @param suffix static value used for concatenation only. */ function interpolation1(lView, prefix, v0, suffix) { const different = bindingUpdated(lView, nextBindingIndex(), v0); return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 2 expressions. */ function interpolation2(lView, prefix, v0, i0, v1, suffix) { const bindingIndex = getBindingIndex(); const different = bindingUpdated2(lView, bindingIndex, v0, v1); incrementBindingIndex(2); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 3 expressions. */ function interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) { const bindingIndex = getBindingIndex(); const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2); incrementBindingIndex(3); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix : NO_CHANGE; } /** * Create an interpolation binding with 4 expressions. */ function interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const bindingIndex = getBindingIndex(); const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); incrementBindingIndex(4); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 5 expressions. */ function interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated(lView, bindingIndex + 4, v4) || different; incrementBindingIndex(5); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 6 expressions. */ function interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different; incrementBindingIndex(6); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 7 expressions. */ function interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different; incrementBindingIndex(7); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + suffix : NO_CHANGE; } /** * Creates an interpolation binding with 8 expressions. */ function interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const bindingIndex = getBindingIndex(); let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different; incrementBindingIndex(8); return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix : NO_CHANGE; } /** * * Update an interpolated attribute on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div attr.title="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix); } return ɵɵattributeInterpolate1; } /** * * Update an interpolated attribute on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix); } return ɵɵattributeInterpolate2; } /** * * Update an interpolated attribute on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate3( * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix); } return ɵɵattributeInterpolate3; } /** * * Update an interpolated attribute on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate4( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix); } return ɵɵattributeInterpolate4; } /** * * Update an interpolated attribute on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate5( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix); } return ɵɵattributeInterpolate5; } /** * * Update an interpolated attribute on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate6( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix); } return ɵɵattributeInterpolate6; } /** * * Update an interpolated attribute on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate7( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix); } return ɵɵattributeInterpolate7; } /** * * Update an interpolated attribute on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolate8( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * * @param attrName The name of the attribute to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); if (interpolatedValue !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace); ngDevMode && storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix); } return ɵɵattributeInterpolate8; } /** * Update an interpolated attribute on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵattributeInterpolateV( * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` * * @param attrName The name of the attribute to update. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) { const lView = getLView(); const interpolated = interpolationV(lView, values); if (interpolated !== NO_CHANGE) { const tNode = getSelectedTNode(); elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace); if (ngDevMode) { const interpolationInBetween = [values[0]]; // prefix for (let i = 2; i < values.length; i += 2) { interpolationInBetween.push(values[i]); } storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween); } } return ɵɵattributeInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && ngDevMode.firstCreatePass++; const tViewConsts = tView.consts; // TODO(pk): refactor getOrCreateTNode to have the "create" only version const tNode = getOrCreateTNode(tView, index, 4 /* Container */, tagName || null, getConstant(tViewConsts, attrsIndex)); resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex)); registerPostOrderHooks(tView, tNode); const embeddedTView = tNode.tViews = createTView(2 /* Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts); if (tView.queries !== null) { tView.queries.template(tView, tNode); embeddedTView.queries = tView.queries.embeddedTView(tNode); } return tNode; } /** * Creates an LContainer for an ng-template (dynamically-inserted view), e.g. * * <ng-template #foo> * <div></div> * </ng-template> * * @param index The index of the container in the data array * @param templateFn Inline template * @param decls The number of nodes, local refs, and pipes for this template * @param vars The number of bindings for this template * @param tagName The name of the container element, if applicable * @param attrsIndex Index of template attributes in the `consts` array. * @param localRefs Index of the local references in the `consts` array. * @param localRefExtractor A function which extracts local-refs values from the template. * Defaults to the current element associated with the local-ref. * * @codeGenApi */ function ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) { const lView = getLView(); const tView = getTView(); const adjustedIndex = index + HEADER_OFFSET; const tNode = tView.firstCreatePass ? templateFirstCreatePass(adjustedIndex, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) : tView.data[adjustedIndex]; setCurrentTNode(tNode, false); const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : ''); appendChild(tView, lView, comment, tNode); attachPatchData(comment, lView); addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode)); if (isDirectiveHost(tNode)) { createDirectivesInstances(tView, lView, tNode); } if (localRefsIndex != null) { saveResolvedLocalsInData(lView, tNode, localRefExtractor); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** Store a value in the `data` at a given `index`. */ function store(tView, lView, index, value) { // We don't store any static data for local variables, so the first time // we see the template, we should store as null to avoid a sparse array if (index >= tView.data.length) { tView.data[index] = null; tView.blueprint[index] = null; } lView[index] = value; } /** * Retrieves a local reference from the current contextViewData. * * If the reference to retrieve is in a parent view, this instruction is used in conjunction * with a nextContext() call, which walks up the tree and updates the contextViewData instance. * * @param index The index of the local ref in contextViewData. * * @codeGenApi */ function ɵɵreference(index) { const contextLView = getContextLView(); return load(contextLView, HEADER_OFFSET + index); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A mapping of the @angular/core API surface used in generated expressions to the actual symbols. * * This should be kept up to date with the public exports of @angular/core. */ const angularCoreDiEnv = { 'ɵɵdefineInjectable': ɵɵdefineInjectable, 'ɵɵdefineInjector': ɵɵdefineInjector, 'ɵɵinject': ɵɵinject, 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep, }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting * injectable def (`ɵprov`) onto the injectable type. */ function compileInjectable(type, srcMeta) { let ngInjectableDef = null; let ngFactoryDef = null; // if NG_PROV_DEF is already defined on this class then don't overwrite it if (!type.hasOwnProperty(NG_PROV_DEF)) { Object.defineProperty(type, NG_PROV_DEF, { get: () => { if (ngInjectableDef === null) { ngInjectableDef = getCompilerFacade().compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, srcMeta)); } return ngInjectableDef; }, }); } // if NG_FACTORY_DEF is already defined on this class then don't overwrite it if (!type.hasOwnProperty(NG_FACTORY_DEF)) { Object.defineProperty(type, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const metadata = getInjectableMetadata(type, srcMeta); const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, { name: metadata.name, type: metadata.type, typeArgumentCount: metadata.typeArgumentCount, deps: reflectDependencies(type), injectFn: 'inject', target: compiler.R3FactoryTarget.Injectable }); } return ngFactoryDef; }, // Leave this configurable so that the factories from directives or pipes can take precedence. configurable: true }); } } const ɵ0$8 = getClosureSafeProperty; const USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$8 }); function isUseClassProvider(meta) { return meta.useClass !== undefined; } function isUseValueProvider(meta) { return USE_VALUE$1 in meta; } function isUseFactoryProvider(meta) { return meta.useFactory !== undefined; } function isUseExistingProvider(meta) { return meta.useExisting !== undefined; } function getInjectableMetadata(type, srcMeta) { // Allow the compilation of a class with a `@Injectable()` decorator without parameters const meta = srcMeta || { providedIn: null }; const compilerMeta = { name: type.name, type: type, typeArgumentCount: 0, providedIn: meta.providedIn, userDeps: undefined, }; if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) { compilerMeta.userDeps = convertDependencies(meta.deps); } if (isUseClassProvider(meta)) { // The user explicitly specified useClass, and may or may not have provided deps. compilerMeta.useClass = resolveForwardRef(meta.useClass); } else if (isUseValueProvider(meta)) { // The user explicitly specified useValue. compilerMeta.useValue = resolveForwardRef(meta.useValue); } else if (isUseFactoryProvider(meta)) { // The user explicitly specified useFactory. compilerMeta.useFactory = meta.useFactory; } else if (isUseExistingProvider(meta)) { // The user explicitly specified useExisting. compilerMeta.useExisting = resolveForwardRef(meta.useExisting); } return compilerMeta; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$9 = getClosureSafeProperty; const USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$9 }); const EMPTY_ARRAY$3 = []; function convertInjectableProviderToFactory(type, provider) { if (!provider) { const reflectionCapabilities = new ReflectionCapabilities(); const deps = reflectionCapabilities.parameters(type); // TODO - convert to flags. return () => new type(...injectArgs(deps)); } if (USE_VALUE$2 in provider) { const valueProvider = provider; return () => valueProvider.useValue; } else if (provider.useExisting) { const existingProvider = provider; return () => ɵɵinject(resolveForwardRef(existingProvider.useExisting)); } else if (provider.useFactory) { const factoryProvider = provider; return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY$3)); } else if (provider.useClass) { const classProvider = provider; let deps = provider.deps; if (!deps) { const reflectionCapabilities = new ReflectionCapabilities(); deps = reflectionCapabilities.parameters(type); } return () => new (resolveForwardRef(classProvider.useClass))(...injectArgs(deps)); } else { let deps = provider.deps; if (!deps) { const reflectionCapabilities = new ReflectionCapabilities(); deps = reflectionCapabilities.parameters(type); } return () => new type(...injectArgs(deps)); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$a = (type, meta) => SWITCH_COMPILE_INJECTABLE(type, meta); /** * Injectable decorator and metadata. * * @Annotation * @publicApi */ const Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$a); /** * Supports @Injectable() in JIT mode for Render2. */ function render2CompileInjectable(injectableType, options) { if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) { injectableType.ɵprov = ɵɵdefineInjectable({ token: injectableType, providedIn: options.providedIn, factory: convertInjectableProviderToFactory(injectableType, options), }); } } const SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable; const SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable; const SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function findFirstClosedCycle(keys) { const res = []; for (let i = 0; i < keys.length; ++i) { if (res.indexOf(keys[i]) > -1) { res.push(keys[i]); return res; } res.push(keys[i]); } return res; } function constructResolvingPath(keys) { if (keys.length > 1) { const reversed = findFirstClosedCycle(keys.slice().reverse()); const tokenStrs = reversed.map(k => stringify(k.token)); return ' (' + tokenStrs.join(' -> ') + ')'; } return ''; } function injectionError(injector, key, constructResolvingMessage, originalError) { const keys = [key]; const errMsg = constructResolvingMessage(keys); const error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg)); error.addKey = addKey; error.keys = keys; error.injectors = [injector]; error.constructResolvingMessage = constructResolvingMessage; error[ERROR_ORIGINAL_ERROR] = originalError; return error; } function addKey(injector, key) { this.injectors.push(injector); this.keys.push(key); // Note: This updated message won't be reflected in the `.stack` property this.message = this.constructResolvingMessage(this.keys); } /** * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the * {@link Injector} does not have a {@link Provider} for the given key. * * @usageNotes * ### Example * * ```typescript * class A { * constructor(b:B) {} * } * * expect(() => Injector.resolveAndCreate([A])).toThrowError(); * ``` */ function noProviderError(injector, key) { return injectionError(injector, key, function (keys) { const first = stringify(keys[0].token); return `No provider for ${first}!${constructResolvingPath(keys)}`; }); } /** * Thrown when dependencies form a cycle. * * @usageNotes * ### Example * * ```typescript * var injector = Injector.resolveAndCreate([ * {provide: "one", useFactory: (two) => "two", deps: [[new Inject("two")]]}, * {provide: "two", useFactory: (one) => "one", deps: [[new Inject("one")]]} * ]); * * expect(() => injector.get("one")).toThrowError(); * ``` * * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed. */ function cyclicDependencyError(injector, key) { return injectionError(injector, key, function (keys) { return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`; }); } /** * Thrown when a constructing type returns with an Error. * * The `InstantiationError` class contains the original error plus the dependency graph which caused * this object to be instantiated. * * @usageNotes * ### Example * * ```typescript * class A { * constructor() { * throw new Error('message'); * } * } * * var injector = Injector.resolveAndCreate([A]); * try { * injector.get(A); * } catch (e) { * expect(e instanceof InstantiationError).toBe(true); * expect(e.originalException.message).toEqual("message"); * expect(e.originalStack).toBeDefined(); * } * ``` */ function instantiationError(injector, originalException, originalStack, key) { return injectionError(injector, key, function (keys) { const first = stringify(keys[0].token); return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`; }, originalException); } /** * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector} * creation. * * @usageNotes * ### Example * * ```typescript * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError(); * ``` */ function invalidProviderError(provider) { return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`); } /** * Thrown when the class has no annotation information. * * Lack of annotation information prevents the {@link Injector} from determining which dependencies * need to be injected into the constructor. * * @usageNotes * ### Example * * ```typescript * class A { * constructor(b) {} * } * * expect(() => Injector.resolveAndCreate([A])).toThrowError(); * ``` * * This error is also thrown when the class not marked with {@link Injectable} has parameter types. * * ```typescript * class B {} * * class A { * constructor(b:B) {} // no information about the parameter types of A is available at runtime. * } * * expect(() => Injector.resolveAndCreate([A,B])).toThrowError(); * ``` * */ function noAnnotationError(typeOrFunc, params) { const signature = []; for (let i = 0, ii = params.length; i < ii; i++) { const parameter = params[i]; if (!parameter || parameter.length == 0) { signature.push('?'); } else { signature.push(parameter.map(stringify).join(' ')); } } return Error('Cannot resolve all parameters for \'' + stringify(typeOrFunc) + '\'(' + signature.join(', ') + '). ' + 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \'' + stringify(typeOrFunc) + '\' is decorated with Injectable.'); } /** * Thrown when getting an object by index. * * @usageNotes * ### Example * * ```typescript * class A {} * * var injector = Injector.resolveAndCreate([A]); * * expect(() => injector.getAt(100)).toThrowError(); * ``` * */ function outOfBoundsError(index) { return Error(`Index ${index} is out-of-bounds.`); } // TODO: add a working example after alpha38 is released /** * Thrown when a multi provider and a regular provider are bound to the same token. * * @usageNotes * ### Example * * ```typescript * expect(() => Injector.resolveAndCreate([ * { provide: "Strings", useValue: "string1", multi: true}, * { provide: "Strings", useValue: "string2", multi: false} * ])).toThrowError(); * ``` */ function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) { return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A unique object used for retrieving items from the {@link ReflectiveInjector}. * * Keys have: * - a system-wide unique `id`. * - a `token`. * * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows * the * injector to store created objects in a more efficient way. * * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when * resolving * providers. * * @deprecated No replacement * @publicApi */ class ReflectiveKey { /** * Private */ constructor(token, id) { this.token = token; this.id = id; if (!token) { throw new Error('Token must be defined!'); } this.displayName = stringify(this.token); } /** * Retrieves a `Key` for a token. */ static get(token) { return _globalKeyRegistry.get(resolveForwardRef(token)); } /** * @returns the number of keys registered in the system. */ static get numberOfKeys() { return _globalKeyRegistry.numberOfKeys; } } class KeyRegistry { constructor() { this._allKeys = new Map(); } get(token) { if (token instanceof ReflectiveKey) return token; if (this._allKeys.has(token)) { return this._allKeys.get(token); } const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys); this._allKeys.set(token, newKey); return newKey; } get numberOfKeys() { return this._allKeys.size; } } const _globalKeyRegistry = new KeyRegistry(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides access to reflection data about symbols. Used internally by Angular * to power dependency injection and compilation. */ class Reflector { constructor(reflectionCapabilities) { this.reflectionCapabilities = reflectionCapabilities; } updateCapabilities(caps) { this.reflectionCapabilities = caps; } factory(type) { return this.reflectionCapabilities.factory(type); } parameters(typeOrFunc) { return this.reflectionCapabilities.parameters(typeOrFunc); } annotations(typeOrFunc) { return this.reflectionCapabilities.annotations(typeOrFunc); } propMetadata(typeOrFunc) { return this.reflectionCapabilities.propMetadata(typeOrFunc); } hasLifecycleHook(type, lcProperty) { return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty); } getter(name) { return this.reflectionCapabilities.getter(name); } setter(name) { return this.reflectionCapabilities.setter(name); } method(name) { return this.reflectionCapabilities.method(name); } importUri(type) { return this.reflectionCapabilities.importUri(type); } resourceUri(type) { return this.reflectionCapabilities.resourceUri(type); } resolveIdentifier(name, moduleUrl, members, runtime) { return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime); } resolveEnum(identifier, name) { return this.reflectionCapabilities.resolveEnum(identifier, name); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The {@link Reflector} used internally in Angular to access metadata * about symbols. */ const reflector = new Reflector(new ReflectionCapabilities()); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * `Dependency` is used by the framework to extend DI. * This is internal to Angular and should not be used directly. */ class ReflectiveDependency { constructor(key, optional, visibility) { this.key = key; this.optional = optional; this.visibility = visibility; } static fromKey(key) { return new ReflectiveDependency(key, false, null); } } const _EMPTY_LIST = []; class ResolvedReflectiveProvider_ { constructor(key, resolvedFactories, multiProvider) { this.key = key; this.resolvedFactories = resolvedFactories; this.multiProvider = multiProvider; this.resolvedFactory = this.resolvedFactories[0]; } } /** * An internal resolved representation of a factory function created by resolving `Provider`. * @publicApi */ class ResolvedReflectiveFactory { constructor( /** * Factory function which can return an instance of an object represented by a key. */ factory, /** * Arguments (dependencies) to the `factory` function. */ dependencies) { this.factory = factory; this.dependencies = dependencies; } } /** * Resolve a single provider. */ function resolveReflectiveFactory(provider) { let factoryFn; let resolvedDeps; if (provider.useClass) { const useClass = resolveForwardRef(provider.useClass); factoryFn = reflector.factory(useClass); resolvedDeps = _dependenciesFor(useClass); } else if (provider.useExisting) { factoryFn = (aliasInstance) => aliasInstance; resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))]; } else if (provider.useFactory) { factoryFn = provider.useFactory; resolvedDeps = constructDependencies(provider.useFactory, provider.deps); } else { factoryFn = () => provider.useValue; resolvedDeps = _EMPTY_LIST; } return new ResolvedReflectiveFactory(factoryFn, resolvedDeps); } /** * Converts the `Provider` into `ResolvedProvider`. * * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider * syntax. */ function resolveReflectiveProvider(provider) { return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false); } /** * Resolve a list of Providers. */ function resolveReflectiveProviders(providers) { const normalized = _normalizeProviders(providers, []); const resolved = normalized.map(resolveReflectiveProvider); const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map()); return Array.from(resolvedProviderMap.values()); } /** * Merges a list of ResolvedProviders into a list where each key is contained exactly once and * multi providers have been merged. */ function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) { for (let i = 0; i < providers.length; i++) { const provider = providers[i]; const existing = normalizedProvidersMap.get(provider.key.id); if (existing) { if (provider.multiProvider !== existing.multiProvider) { throw mixingMultiProvidersWithRegularProvidersError(existing, provider); } if (provider.multiProvider) { for (let j = 0; j < provider.resolvedFactories.length; j++) { existing.resolvedFactories.push(provider.resolvedFactories[j]); } } else { normalizedProvidersMap.set(provider.key.id, provider); } } else { let resolvedProvider; if (provider.multiProvider) { resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider); } else { resolvedProvider = provider; } normalizedProvidersMap.set(provider.key.id, resolvedProvider); } } return normalizedProvidersMap; } function _normalizeProviders(providers, res) { providers.forEach(b => { if (b instanceof Type) { res.push({ provide: b, useClass: b }); } else if (b && typeof b == 'object' && b.provide !== undefined) { res.push(b); } else if (Array.isArray(b)) { _normalizeProviders(b, res); } else { throw invalidProviderError(b); } }); return res; } function constructDependencies(typeOrFunc, dependencies) { if (!dependencies) { return _dependenciesFor(typeOrFunc); } else { const params = dependencies.map(t => [t]); return dependencies.map(t => _extractToken(typeOrFunc, t, params)); } } function _dependenciesFor(typeOrFunc) { const params = reflector.parameters(typeOrFunc); if (!params) return []; if (params.some(p => p == null)) { throw noAnnotationError(typeOrFunc, params); } return params.map(p => _extractToken(typeOrFunc, p, params)); } function _extractToken(typeOrFunc, metadata, params) { let token = null; let optional = false; if (!Array.isArray(metadata)) { if (metadata instanceof Inject) { return _createDependency(metadata.token, optional, null); } else { return _createDependency(metadata, optional, null); } } let visibility = null; for (let i = 0; i < metadata.length; ++i) { const paramMetadata = metadata[i]; if (paramMetadata instanceof Type) { token = paramMetadata; } else if (paramMetadata instanceof Inject) { token = paramMetadata.token; } else if (paramMetadata instanceof Optional) { optional = true; } else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) { visibility = paramMetadata; } else if (paramMetadata instanceof InjectionToken) { token = paramMetadata; } } token = resolveForwardRef(token); if (token != null) { return _createDependency(token, optional, visibility); } else { throw noAnnotationError(typeOrFunc, params); } } function _createDependency(token, optional, visibility) { return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Threshold for the dynamic version const UNDEFINED = {}; /** * A ReflectiveDependency injection container used for instantiating objects and resolving * dependencies. * * An `Injector` is a replacement for a `new` operator, which can automatically resolve the * constructor dependencies. * * In typical use, application code asks for the dependencies in the constructor and they are * resolved by the `Injector`. * * @usageNotes * ### Example * * The following example creates an `Injector` configured to create `Engine` and `Car`. * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]); * var car = injector.get(Car); * expect(car instanceof Car).toBe(true); * expect(car.engine instanceof Engine).toBe(true); * ``` * * Notice, we don't use the `new` operator because we explicitly want to have the `Injector` * resolve all of the object's dependencies automatically. * * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead. * @publicApi */ class ReflectiveInjector { /** * Turns an array of provider definitions into an array of resolved providers. * * A resolution is a process of flattening multiple nested arrays and converting individual * providers into an array of `ResolvedReflectiveProvider`s. * * @usageNotes * ### Example * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]); * * expect(providers.length).toEqual(2); * * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true); * expect(providers[0].key.displayName).toBe("Car"); * expect(providers[0].dependencies.length).toEqual(1); * expect(providers[0].factory).toBeDefined(); * * expect(providers[1].key.displayName).toBe("Engine"); * }); * ``` * */ static resolve(providers) { return resolveReflectiveProviders(providers); } /** * Resolves an array of providers and creates an injector from those providers. * * The passed-in providers can be an array of `Type`, `Provider`, * or a recursive array of more providers. * * @usageNotes * ### Example * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]); * expect(injector.get(Car) instanceof Car).toBe(true); * ``` */ static resolveAndCreate(providers, parent) { const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers); return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent); } /** * Creates an injector from previously resolved providers. * * This API is the recommended way to construct injectors in performance-sensitive parts. * * @usageNotes * ### Example * * ```typescript * @Injectable() * class Engine { * } * * @Injectable() * class Car { * constructor(public engine:Engine) {} * } * * var providers = ReflectiveInjector.resolve([Car, Engine]); * var injector = ReflectiveInjector.fromResolvedProviders(providers); * expect(injector.get(Car) instanceof Car).toBe(true); * ``` */ static fromResolvedProviders(providers, parent) { return new ReflectiveInjector_(providers, parent); } } class ReflectiveInjector_ { /** * Private */ constructor(_providers, _parent) { /** @internal */ this._constructionCounter = 0; this._providers = _providers; this.parent = _parent || null; const len = _providers.length; this.keyIds = []; this.objs = []; for (let i = 0; i < len; i++) { this.keyIds[i] = _providers[i].key.id; this.objs[i] = UNDEFINED; } } get(token, notFoundValue = THROW_IF_NOT_FOUND) { return this._getByKey(ReflectiveKey.get(token), null, notFoundValue); } resolveAndCreateChild(providers) { const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers); return this.createChildFromResolved(ResolvedReflectiveProviders); } createChildFromResolved(providers) { const inj = new ReflectiveInjector_(providers); inj.parent = this; return inj; } resolveAndInstantiate(provider) { return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]); } instantiateResolved(provider) { return this._instantiateProvider(provider); } getProviderAtIndex(index) { if (index < 0 || index >= this._providers.length) { throw outOfBoundsError(index); } return this._providers[index]; } /** @internal */ _new(provider) { if (this._constructionCounter++ > this._getMaxNumberOfObjects()) { throw cyclicDependencyError(this, provider.key); } return this._instantiateProvider(provider); } _getMaxNumberOfObjects() { return this.objs.length; } _instantiateProvider(provider) { if (provider.multiProvider) { const res = []; for (let i = 0; i < provider.resolvedFactories.length; ++i) { res[i] = this._instantiate(provider, provider.resolvedFactories[i]); } return res; } else { return this._instantiate(provider, provider.resolvedFactories[0]); } } _instantiate(provider, ResolvedReflectiveFactory) { const factory = ResolvedReflectiveFactory.factory; let deps; try { deps = ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep)); } catch (e) { if (e.addKey) { e.addKey(this, provider.key); } throw e; } let obj; try { obj = factory(...deps); } catch (e) { throw instantiationError(this, e, e.stack, provider.key); } return obj; } _getByReflectiveDependency(dep) { return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND); } _getByKey(key, visibility, notFoundValue) { if (key === ReflectiveInjector_.INJECTOR_KEY) { return this; } if (visibility instanceof Self) { return this._getByKeySelf(key, notFoundValue); } else { return this._getByKeyDefault(key, notFoundValue, visibility); } } _getObjByKeyId(keyId) { for (let i = 0; i < this.keyIds.length; i++) { if (this.keyIds[i] === keyId) { if (this.objs[i] === UNDEFINED) { this.objs[i] = this._new(this._providers[i]); } return this.objs[i]; } } return UNDEFINED; } /** @internal */ _throwOrNull(key, notFoundValue) { if (notFoundValue !== THROW_IF_NOT_FOUND) { return notFoundValue; } else { throw noProviderError(this, key); } } /** @internal */ _getByKeySelf(key, notFoundValue) { const obj = this._getObjByKeyId(key.id); return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue); } /** @internal */ _getByKeyDefault(key, notFoundValue, visibility) { let inj; if (visibility instanceof SkipSelf) { inj = this.parent; } else { inj = this; } while (inj instanceof ReflectiveInjector_) { const inj_ = inj; const obj = inj_._getObjByKeyId(key.id); if (obj !== UNDEFINED) return obj; inj = inj_.parent; } if (inj !== null) { return inj.get(key.token, notFoundValue); } else { return this._throwOrNull(key, notFoundValue); } } get displayName() { const providers = _mapProviders(this, (b) => ' "' + b.key.displayName + '" ') .join(', '); return `ReflectiveInjector(providers: [${providers}])`; } toString() { return this.displayName; } } ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector); function _mapProviders(injector, fn) { const res = []; for (let i = 0; i < injector._providers.length; ++i) { res[i] = fn(injector.getProviderAtIndex(i)); } return res; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function ɵɵdirectiveInject(token, flags = InjectFlags.Default) { const lView = getLView(); // Fall back to inject() if view hasn't been created. This situation can happen in tests // if inject utilities are used before bootstrapping. if (lView === null) { // Verify that we will not get into infinite loop. ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject); return ɵɵinject(token, flags); } const tNode = getCurrentTNode(); return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags); } /** * Throws an error indicating that a factory function could not be generated by the compiler for a * particular class. * * This instruction allows the actual error message to be optimized away when ngDevMode is turned * off, saving bytes of generated code while still providing a good experience in dev mode. * * The name of the class is not mentioned here, but will be in the generated factory function name * and thus in the stack trace. * * @codeGenApi */ function ɵɵinvalidFactory() { const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid'; throw new Error(msg); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Update a property on a selected element. * * Operates on the element selected by index via the {@link select} instruction. * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled * * @param propName Name of property. Because it is going to DOM, this is not subject to * renaming as part of minification. * @param value New value to write. * @param sanitizer An optional function used to sanitize the value. * @returns This function returns itself so that it may be chained * (e.g. `property('name', ctx.name)('title', ctx.title)`) * * @codeGenApi */ function ɵɵproperty(propName, value, sanitizer) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex); } return ɵɵproperty; } /** * Given `<div style="..." my-dir>` and `MyDir` with `@Input('style')` we need to write to * directive input. */ function setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) { const inputs = tNode.inputs; const property = isClassBased ? 'class' : 'style'; // We support both 'class' and `className` hence the fallback. setInputsForProperty(tView, lView, inputs[property], property, value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) { ngDevMode && assertFirstCreatePass(tView); ngDevMode && ngDevMode.firstCreatePass++; const tViewConsts = tView.consts; const attrs = getConstant(tViewConsts, attrsIndex); const tNode = getOrCreateTNode(tView, index, 2 /* Element */, name, attrs); const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex)); ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives); if (tNode.attrs !== null) { computeStaticStyling(tNode, tNode.attrs, false); } if (tNode.mergedAttrs !== null) { computeStaticStyling(tNode, tNode.mergedAttrs, true); } if (tView.queries !== null) { tView.queries.elementStart(tView, tNode); } return tNode; } /** * Create DOM element. The instruction must later be followed by `elementEnd()` call. * * @param index Index of the element in the LView array * @param name Name of the DOM Node * @param attrsIndex Index of the element's attributes in the `consts` array. * @param localRefsIndex Index of the element's local references in the `consts` array. * * Attributes and localRefs are passed as an array of strings where elements with an even index * hold an attribute name and elements with an odd index hold an attribute value, ex.: * ['id', 'warning5', 'class', 'alert'] * * @codeGenApi */ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) { const lView = getLView(); const tView = getTView(); const adjustedIndex = HEADER_OFFSET + index; ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings'); ngDevMode && assertIndexInRange(lView, adjustedIndex); const renderer = lView[RENDERER]; const native = lView[adjustedIndex] = createElementNode(renderer, name, getNamespace()); const tNode = tView.firstCreatePass ? elementStartFirstCreatePass(adjustedIndex, tView, lView, native, name, attrsIndex, localRefsIndex) : tView.data[adjustedIndex]; setCurrentTNode(tNode, true); const mergedAttrs = tNode.mergedAttrs; if (mergedAttrs !== null) { setUpAttributes(renderer, native, mergedAttrs); } const classes = tNode.classes; if (classes !== null) { writeDirectClass(renderer, native, classes); } const styles = tNode.styles; if (styles !== null) { writeDirectStyle(renderer, native, styles); } if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) { // In the i18n case, the translation may have removed this element, so only add it if it is not // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context. appendChild(tView, lView, native, tNode); } // any immediate children of a component or template container must be pre-emptively // monkey-patched with the component view data so that the element can be inspected // later on using any element discovery utility methods (see `element_discovery.ts`) if (getElementDepthCount() === 0) { attachPatchData(native, lView); } increaseElementDepthCount(); if (isDirectiveHost(tNode)) { createDirectivesInstances(tView, lView, tNode); executeContentQueries(tView, tNode, lView); } if (localRefsIndex !== null) { saveResolvedLocalsInData(lView, tNode); } } /** * Mark the end of the element. * * @codeGenApi */ function ɵɵelementEnd() { let currentTNode = getCurrentTNode(); ngDevMode && assertDefined(currentTNode, 'No parent node to close.'); if (isCurrentTNodeParent()) { setCurrentTNodeAsNotParent(); } else { ngDevMode && assertHasParent(getCurrentTNode()); currentTNode = currentTNode.parent; setCurrentTNode(currentTNode, false); } const tNode = currentTNode; ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */); decreaseElementDepthCount(); const tView = getTView(); if (tView.firstCreatePass) { registerPostOrderHooks(tView, currentTNode); if (isContentQueryHost(currentTNode)) { tView.queries.elementEnd(currentTNode); } } if (tNode.classesWithoutHost != null && hasClassInput(tNode)) { setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true); } if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) { setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false); } } /** * Creates an empty element using {@link elementStart} and {@link elementEnd} * * @param index Index of the element in the data array * @param name Name of the DOM Node * @param attrsIndex Index of the element's attributes in the `consts` array. * @param localRefsIndex Index of the element's local references in the `consts` array. * * @codeGenApi */ function ɵɵelement(index, name, attrsIndex, localRefsIndex) { ɵɵelementStart(index, name, attrsIndex, localRefsIndex); ɵɵelementEnd(); } function logUnknownElementError(tView, element, tNode, hasDirectives) { const schemas = tView.schemas; // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT // mode where this check happens at compile time. In JIT mode, `schemas` is always present and // defined as an array (as an empty array in case `schemas` field is not defined) and we should // execute the check below. if (schemas === null) return; const tagName = tNode.value; // If the element matches any directive, it's considered as valid. if (!hasDirectives && tagName !== null) { // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered // as a custom element. Note that unknown elements with a dash in their name won't be instances // of HTMLUnknownElement in browsers that support web components. const isUnknown = // Note that we can't check for `typeof HTMLUnknownElement === 'function'`, // because while most browsers return 'function', IE returns 'object'. (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement && element instanceof HTMLUnknownElement) || (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName)); if (isUnknown && !matchingSchemas(tView, tagName)) { let message = `'${tagName}' is not a known element:\n`; message += `1. If '${tagName}' is an Angular component, then verify that it is part of this module.\n`; if (tagName && tagName.indexOf('-') > -1) { message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.`; } else { message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`; } console.error(formatRuntimeError("304" /* UNKNOWN_ELEMENT */, message)); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) { ngDevMode && ngDevMode.firstCreatePass++; const tViewConsts = tView.consts; const attrs = getConstant(tViewConsts, attrsIndex); const tNode = getOrCreateTNode(tView, index, 8 /* ElementContainer */, 'ng-container', attrs); // While ng-container doesn't necessarily support styling, we use the style context to identify // and execute directives on the ng-container. if (attrs !== null) { computeStaticStyling(tNode, attrs, true); } const localRefs = getConstant(tViewConsts, localRefsIndex); resolveDirectives(tView, lView, tNode, localRefs); if (tView.queries !== null) { tView.queries.elementStart(tView, tNode); } return tNode; } /** * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM. * The instruction must later be followed by `elementContainerEnd()` call. * * @param index Index of the element in the LView array * @param attrsIndex Index of the container attributes in the `consts` array. * @param localRefsIndex Index of the container's local references in the `consts` array. * * Even if this instruction accepts a set of attributes no actual attribute values are propagated to * the DOM (as a comment node can't have attributes). Attributes are here only for directive * matching purposes and setting initial inputs of directives. * * @codeGenApi */ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) { const lView = getLView(); const tView = getTView(); const adjustedIndex = index + HEADER_OFFSET; ngDevMode && assertIndexInRange(lView, adjustedIndex); ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings'); const tNode = tView.firstCreatePass ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex) : tView.data[adjustedIndex]; setCurrentTNode(tNode, true); ngDevMode && ngDevMode.rendererCreateComment++; const native = lView[adjustedIndex] = lView[RENDERER].createComment(ngDevMode ? 'ng-container' : ''); appendChild(tView, lView, native, tNode); attachPatchData(native, lView); if (isDirectiveHost(tNode)) { createDirectivesInstances(tView, lView, tNode); executeContentQueries(tView, tNode, lView); } if (localRefsIndex != null) { saveResolvedLocalsInData(lView, tNode); } } /** * Mark the end of the <ng-container>. * * @codeGenApi */ function ɵɵelementContainerEnd() { let currentTNode = getCurrentTNode(); const tView = getTView(); if (isCurrentTNodeParent()) { setCurrentTNodeAsNotParent(); } else { ngDevMode && assertHasParent(currentTNode); currentTNode = currentTNode.parent; setCurrentTNode(currentTNode, false); } ngDevMode && assertTNodeType(currentTNode, 8 /* ElementContainer */); if (tView.firstCreatePass) { registerPostOrderHooks(tView, currentTNode); if (isContentQueryHost(currentTNode)) { tView.queries.elementEnd(currentTNode); } } } /** * Creates an empty logical container using {@link elementContainerStart} * and {@link elementContainerEnd} * * @param index Index of the element in the LView array * @param attrsIndex Index of the container attributes in the `consts` array. * @param localRefsIndex Index of the container's local references in the `consts` array. * * @codeGenApi */ function ɵɵelementContainer(index, attrsIndex, localRefsIndex) { ɵɵelementContainerStart(index, attrsIndex, localRefsIndex); ɵɵelementContainerEnd(); } /** * Returns the current OpaqueViewState instance. * * Used in conjunction with the restoreView() instruction to save a snapshot * of the current view and restore it when listeners are invoked. This allows * walking the declaration view tree in listeners to get vars from parent views. * * @codeGenApi */ function ɵɵgetCurrentView() { return getLView(); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Determine if the argument is shaped like a Promise */ function isPromise(obj) { // allow any Promise/A+ compliant thenable. // It's up to the caller to ensure that obj.then conforms to the spec return !!obj && typeof obj.then === 'function'; } /** * Determine if the argument is a Subscribable */ function isSubscribable(obj) { return !!obj && typeof obj.subscribe === 'function'; } /** * Determine if the argument is an Observable * * Strictly this tests that the `obj` is `Subscribable`, since `Observable` * types need additional methods, such as `lift()`. But it is adequate for our * needs since within the Angular framework code we only ever need to use the * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects * into `Observable` as needed. */ const isObservable = isSubscribable; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Adds an event listener to the current node. * * If an output exists on one of the node's directives, it also subscribes to the output * and saves the subscription for later cleanup. * * @param eventName Name of the event * @param listenerFn The function to be called when event emits * @param useCapture Whether or not to use capture in event listener * @param eventTargetResolver Function that returns global target information in case this listener * should be attached to a global object like window, document or body * * @codeGenApi */ function ɵɵlistener(eventName, listenerFn, useCapture = false, eventTargetResolver) { const lView = getLView(); const tView = getTView(); const tNode = getCurrentTNode(); listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, useCapture, eventTargetResolver); return ɵɵlistener; } /** * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive. * * This instruction is for compatibility purposes and is designed to ensure that a * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered * in the component's renderer. Normally all host listeners are evaluated with the * parent component's renderer, but, in the case of animation @triggers, they need * to be evaluated with the sub component's renderer (because that's where the * animation triggers are defined). * * Do not use this instruction as a replacement for `listener`. This instruction * only exists to ensure compatibility with the ViewEngine's host binding behavior. * * @param eventName Name of the event * @param listenerFn The function to be called when event emits * @param useCapture Whether or not to use capture in event listener * @param eventTargetResolver Function that returns global target information in case this listener * should be attached to a global object like window, document or body * * @codeGenApi */ function ɵɵsyntheticHostListener(eventName, listenerFn, useCapture = false, eventTargetResolver) { const tNode = getCurrentTNode(); const lView = getLView(); const tView = getTView(); const currentDef = getCurrentDirectiveDef(tView.data); const renderer = loadComponentRenderer(currentDef, tNode, lView); listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver); return ɵɵsyntheticHostListener; } /** * A utility function that checks if a given element has already an event handler registered for an * event with a specified name. The TView.cleanup data structure is used to find out which events * are registered for a given element. */ function findExistingListener(tView, lView, eventName, tNodeIdx) { const tCleanup = tView.cleanup; if (tCleanup != null) { for (let i = 0; i < tCleanup.length - 1; i += 2) { const cleanupEventName = tCleanup[i]; if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) { // We have found a matching event name on the same node but it might not have been // registered yet, so we must explicitly verify entries in the LView cleanup data // structures. const lCleanup = lView[CLEANUP]; const listenerIdxInLCleanup = tCleanup[i + 2]; return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null; } // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or // 2-element entries (for directive and queries destroy hooks). As such we can encounter // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check // documentation of TView.cleanup for more details of this data structure layout. if (typeof cleanupEventName === 'string') { i += 2; } } } return null; } function listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture = false, eventTargetResolver) { const isTNodeDirectiveHost = isDirectiveHost(tNode); const firstCreatePass = tView.firstCreatePass; const tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView); const context = lView[CONTEXT]; // When the ɵɵlistener instruction was generated and is executed we know that there is either a // native listener or a directive output on this element. As such we we know that we will have to // register a listener and store its cleanup function on LView. const lCleanup = getOrCreateLViewCleanup(lView); ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */); let processOutputs = true; // add native event listener - applicable to elements only if (tNode.type & 3 /* AnyRNode */) { const native = getNativeByTNode(tNode, lView); const resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ; const target = resolved.target || native; const lCleanupIndex = lCleanup.length; const idxOrTargetGetter = eventTargetResolver ? (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])).target : tNode.index; // In order to match current behavior, native DOM event listeners must be added for all // events (including outputs). if (isProceduralRenderer(renderer)) { // There might be cases where multiple directives on the same element try to register an event // handler function for the same event. In this situation we want to avoid registration of // several native listeners as each registration would be intercepted by NgZone and // trigger change detection. This would mean that a single user action would result in several // change detections being invoked. To avoid this situation we want to have only one call to // native handler registration (for the same element and same type of event). // // In order to have just one native event handler in presence of multiple handler functions, // we just register a first handler function as a native event listener and then chain // (coalesce) other handler functions on top of the first native handler function. let existingListener = null; // Please note that the coalescing described here doesn't happen for events specifying an // alternative target (ex. (document:click)) - this is to keep backward compatibility with the // view engine. // Also, we don't have to search for existing listeners is there are no directives // matching on a given node as we can't register multiple event handlers for the same event in // a template (this would mean having duplicate attributes). if (!eventTargetResolver && isTNodeDirectiveHost) { existingListener = findExistingListener(tView, lView, eventName, tNode.index); } if (existingListener !== null) { // Attach a new listener to coalesced listeners list, maintaining the order in which // listeners are registered. For performance reasons, we keep a reference to the last // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through // the entire set each time we need to add a new listener. const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener; lastListenerFn.__ngNextListenerFn__ = listenerFn; existingListener.__ngLastListenerFn__ = listenerFn; processOutputs = false; } else { // The first argument of `listen` function in Procedural Renderer is: // - either a target name (as a string) in case of global target (window, document, body) // - or element reference (in all other cases) listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */); const cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn); ngDevMode && ngDevMode.rendererAddEventListener++; lCleanup.push(listenerFn, cleanupFn); tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1); } } else { listenerFn = wrapListener(tNode, lView, context, listenerFn, true /** preventDefault */); target.addEventListener(eventName, listenerFn, useCapture); ngDevMode && ngDevMode.rendererAddEventListener++; lCleanup.push(listenerFn); tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture); } } else { // Even if there is no native listener to add, we still need to wrap the listener so that OnPush // ancestors are marked dirty when an event occurs. listenerFn = wrapListener(tNode, lView, context, listenerFn, false /** preventDefault */); } // subscribe to directive outputs const outputs = tNode.outputs; let props; if (processOutputs && outputs !== null && (props = outputs[eventName])) { const propsLength = props.length; if (propsLength) { for (let i = 0; i < propsLength; i += 2) { const index = props[i]; ngDevMode && assertIndexInRange(lView, index); const minifiedName = props[i + 1]; const directiveInstance = lView[index]; const output = directiveInstance[minifiedName]; if (ngDevMode && !isObservable(output)) { throw new Error(`@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`); } const subscription = output.subscribe(listenerFn); const idx = lCleanup.length; lCleanup.push(listenerFn, subscription); tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1)); } } } } function executeListenerWithErrorHandling(lView, context, listenerFn, e) { try { profiler(6 /* OutputStart */, context, listenerFn); // Only explicitly returning false from a listener should preventDefault return listenerFn(e) !== false; } catch (error) { handleError(lView, error); return false; } finally { profiler(7 /* OutputEnd */, context, listenerFn); } } /** * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior, * if applicable. * * @param tNode The TNode associated with this listener * @param lView The LView that contains this listener * @param listenerFn The listener function to call * @param wrapWithPreventDefault Whether or not to prevent default behavior * (the procedural renderer does this already, so in those cases, we should skip) */ function wrapListener(tNode, lView, context, listenerFn, wrapWithPreventDefault) { // Note: we are performing most of the work in the listener function itself // to optimize listener registration. return function wrapListenerIn_markDirtyAndPreventDefault(e) { // Ivy uses `Function` as a special token that allows us to unwrap the function // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. if (e === Function) { return listenerFn; } // In order to be backwards compatible with View Engine, events on component host nodes // must also mark the component view itself dirty (i.e. the view that it owns). const startView = tNode.flags & 2 /* isComponentHost */ ? getComponentLViewByIndex(tNode.index, lView) : lView; // See interfaces/view.ts for more on LViewFlags.ManualOnPush if ((lView[FLAGS] & 32 /* ManualOnPush */) === 0) { markViewDirty(startView); } let result = executeListenerWithErrorHandling(lView, context, listenerFn, e); // A just-invoked listener function might have coalesced listeners so we need to check for // their presence and invoke as needed. let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__; while (nextListenerFn) { // We should prevent default if any of the listeners explicitly return false result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result; nextListenerFn = nextListenerFn.__ngNextListenerFn__; } if (wrapWithPreventDefault && result === false) { e.preventDefault(); // Necessary for legacy browsers that don't support preventDefault (e.g. IE) e.returnValue = false; } return result; }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieves a context at the level specified and saves it as the global, contextViewData. * Will get the next level up if level is not specified. * * This is used to save contexts of parent views so they can be bound in embedded views, or * in conjunction with reference() to bind a ref from a parent view. * * @param level The relative level of the view from which to grab context compared to contextVewData * @returns context * * @codeGenApi */ function ɵɵnextContext(level = 1) { return nextContextImpl(level); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Checks a given node against matching projection slots and returns the * determined slot index. Returns "null" if no slot matched the given node. * * This function takes into account the parsed ngProjectAs selector from the * node's attributes. If present, it will check whether the ngProjectAs selector * matches any of the projection slot selectors. */ function matchingProjectionSlotIndex(tNode, projectionSlots) { let wildcardNgContentIndex = null; const ngProjectAsAttrVal = getProjectAsAttrValue(tNode); for (let i = 0; i < projectionSlots.length; i++) { const slotValue = projectionSlots[i]; // The last wildcard projection slot should match all nodes which aren't matching // any selector. This is necessary to be backwards compatible with view engine. if (slotValue === '*') { wildcardNgContentIndex = i; continue; } // If we ran into an `ngProjectAs` attribute, we should match its parsed selector // to the list of selectors, otherwise we fall back to matching against the node. if (ngProjectAsAttrVal === null ? isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) : isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) { return i; // first matching selector "captures" a given node } } return wildcardNgContentIndex; } /** * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template. * It takes all the selectors from the entire component's template and decides where * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is * backed by a selector). * * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text, * un-parsed form. * * The parsed form is needed for efficient matching of a node against a given CSS selector. * The un-parsed, textual form is needed for support of the ngProjectAs attribute. * * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more * drawbacks: * - having only a textual form would require runtime parsing of CSS selectors; * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a * template author). * * @param projectionSlots? A collection of projection slots. A projection slot can be based * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match * all nodes which do not match any selector. If not specified, a single wildcard * selector projection slot will be defined. * * @codeGenApi */ function ɵɵprojectionDef(projectionSlots) { const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST]; if (!componentNode.projection) { // If no explicit projection slots are defined, fall back to a single // projection slot with the wildcard selector. const numProjectionSlots = projectionSlots ? projectionSlots.length : 1; const projectionHeads = componentNode.projection = newArray(numProjectionSlots, null); const tails = projectionHeads.slice(); let componentChild = componentNode.child; while (componentChild !== null) { const slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0; if (slotIndex !== null) { if (tails[slotIndex]) { tails[slotIndex].projectionNext = componentChild; } else { projectionHeads[slotIndex] = componentChild; } tails[slotIndex] = componentChild; } componentChild = componentChild.next; } } } /** * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call * to the projectionDef instruction. * * @param nodeIndex * @param selectorIndex: * - 0 when the selector is `*` (or unspecified as this is the default value), * - 1 based index of the selector from the {@link projectionDef} * * @codeGenApi */ function ɵɵprojection(nodeIndex, selectorIndex = 0, attrs) { const lView = getLView(); const tView = getTView(); const tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16 /* Projection */, null, attrs || null); // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views. if (tProjectionNode.projection === null) tProjectionNode.projection = selectorIndex; // `<ng-content>` has no content setCurrentTNodeAsNotParent(); if ((tProjectionNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) { // re-distribution of projectable nodes is stored on a component's view level applyProjection(tView, lView, tProjectionNode); } } /** * * Update an interpolated property on an element with a lone bound value * * Used when the value passed to a property has 1 interpolated value in it, an no additional text * surrounds that interpolated value: * * ```html * <div title="{{v0}}"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate('title', v0); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate(propName, v0, sanitizer) { ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer); return ɵɵpropertyInterpolate; } /** * * Update an interpolated property on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div title="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix); } return ɵɵpropertyInterpolate1; } /** * * Update an interpolated property on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix); } return ɵɵpropertyInterpolate2; } /** * * Update an interpolated property on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate3( * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix); } return ɵɵpropertyInterpolate3; } /** * * Update an interpolated property on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate4( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix); } return ɵɵpropertyInterpolate4; } /** * * Update an interpolated property on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate5( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix); } return ɵɵpropertyInterpolate5; } /** * * Update an interpolated property on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate6( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix); } return ɵɵpropertyInterpolate6; } /** * * Update an interpolated property on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate7( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix); } return ɵɵpropertyInterpolate7; } /** * * Update an interpolated property on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolate8( * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix); } return ɵɵpropertyInterpolate8; } /** * Update an interpolated property on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div> * ``` * * Its compiled representation is:: * * ```ts * ɵɵpropertyInterpolateV( * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` * * If the property name also exists as an input property on one of the element's directives, * the component property will be set instead of the element property. This check must * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled. * * @param propName The name of the property to update. * @param values The collection of values and the strings inbetween those values, beginning with a * string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @param sanitizer An optional sanitizer function * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵpropertyInterpolateV(propName, values, sanitizer) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); if (interpolatedValue !== NO_CHANGE) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false); if (ngDevMode) { const interpolationInBetween = [values[0]]; // prefix for (let i = 2; i < values.length; i += 2) { interpolationInBetween.push(values[i]); } storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween); } } return ɵɵpropertyInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * NOTE: The word `styling` is used interchangeably as style or class styling. * * This file contains code to link styling instructions together so that they can be replayed in * priority order. The file exists because Ivy styling instruction execution order does not match * that of the priority order. The purpose of this code is to create a linked list so that the * instructions can be traversed in priority order when computing the styles. * * Assume we are dealing with the following code: * ``` * @Component({ * template: ` * <my-cmp [style]=" {color: '#001'} " * [style.color]=" #002 " * dir-style-color-1 * dir-style-color-2> ` * }) * class ExampleComponent { * static ngComp = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#001'}); * ɵɵstyleProp('color', '#002'); * ... * } * } * * @Directive({ * selector: `[dir-style-color-1]', * }) * class Style1Directive { * @HostBinding('style') style = {color: '#005'}; * @HostBinding('style.color') color = '#006'; * * static ngDir = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#005'}); * ɵɵstyleProp('color', '#006'); * ... * } * } * * @Directive({ * selector: `[dir-style-color-2]', * }) * class Style2Directive { * @HostBinding('style') style = {color: '#007'}; * @HostBinding('style.color') color = '#008'; * * static ngDir = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#007'}); * ɵɵstyleProp('color', '#008'); * ... * } * } * * @Directive({ * selector: `my-cmp', * }) * class MyComponent { * @HostBinding('style') style = {color: '#003'}; * @HostBinding('style.color') color = '#004'; * * static ngComp = ... { * ... * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap` * ɵɵstyleMap({color: '#003'}); * ɵɵstyleProp('color', '#004'); * ... * } * } * ``` * * The Order of instruction execution is: * * NOTE: the comment binding location is for illustrative purposes only. * * ``` * // Template: (ExampleComponent) * ɵɵstyleMap({color: '#001'}); // Binding index: 10 * ɵɵstyleProp('color', '#002'); // Binding index: 12 * // MyComponent * ɵɵstyleMap({color: '#003'}); // Binding index: 20 * ɵɵstyleProp('color', '#004'); // Binding index: 22 * // Style1Directive * ɵɵstyleMap({color: '#005'}); // Binding index: 24 * ɵɵstyleProp('color', '#006'); // Binding index: 26 * // Style2Directive * ɵɵstyleMap({color: '#007'}); // Binding index: 28 * ɵɵstyleProp('color', '#008'); // Binding index: 30 * ``` * * The correct priority order of concatenation is: * * ``` * // MyComponent * ɵɵstyleMap({color: '#003'}); // Binding index: 20 * ɵɵstyleProp('color', '#004'); // Binding index: 22 * // Style1Directive * ɵɵstyleMap({color: '#005'}); // Binding index: 24 * ɵɵstyleProp('color', '#006'); // Binding index: 26 * // Style2Directive * ɵɵstyleMap({color: '#007'}); // Binding index: 28 * ɵɵstyleProp('color', '#008'); // Binding index: 30 * // Template: (ExampleComponent) * ɵɵstyleMap({color: '#001'}); // Binding index: 10 * ɵɵstyleProp('color', '#002'); // Binding index: 12 * ``` * * What color should be rendered? * * Once the items are correctly sorted in the list, the answer is simply the last item in the * concatenation list which is `#002`. * * To do so we keep a linked list of all of the bindings which pertain to this element. * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows * us to traverse them in the order of priority. * * |Idx|`TView.data`|`LView` | Notes * |---|------------|-----------------|-------------- * |...| | | * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})` * |11 |`30 | 12` | ... | * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')` * |13 |`10 | 0` | ... | * |...| | | * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})` * |21 |`0 | 22` | ... | * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')` * |23 |`20 | 24` | ... | * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})` * |25 |`22 | 26` | ... | * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')` * |27 |`24 | 28` | ... | * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})` * |29 |`26 | 30` | ... | * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')` * |31 |`28 | 10` | ... | * * The above data structure allows us to re-concatenate the styling no matter which data binding * changes. * * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next * duplicate bit. The duplicate bit if true says there either is a binding with the same name or * there is a map (which may contain the name). This information is useful in knowing if other * styles with higher priority need to be searched for overwrites. * * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in * `tnode_linked_list_spec.ts` for working example. */ let __unused_const_as_closure_does_not_like_standalone_comment_blocks__; /** * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked * list of styles and compute the duplicate flag. * * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`. * * The function works by keeping track of `tStylingRange` which contains two pointers pointing to * the head/tail of the template portion of the styles. * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange` * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange` * * @param tData The `TData` to insert into. * @param tNode `TNode` associated with the styling element. * @param tStylingKey See `TStylingKey`. * @param index location of where `tStyleValue` should be stored (and linked into list.) * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of * template.) * @param isClassBinding True if the associated `tStylingKey` as a `class` styling. * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.) */ function insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) { ngDevMode && assertFirstUpdatePass(getTView()); let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings; let tmplHead = getTStylingRangePrev(tBindings); let tmplTail = getTStylingRangeNext(tBindings); tData[index] = tStylingKeyWithStatic; let isKeyDuplicateOfStatic = false; let tStylingKey; if (Array.isArray(tStylingKeyWithStatic)) { // We are case when the `TStylingKey` contains static fields as well. const staticKeyValueArray = tStylingKeyWithStatic; tStylingKey = staticKeyValueArray[1]; // unwrap. // We need to check if our key is present in the static so that we can mark it as duplicate. if (tStylingKey === null || keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) { // tStylingKey is present in the statics, need to mark it as duplicate. isKeyDuplicateOfStatic = true; } } else { tStylingKey = tStylingKeyWithStatic; } if (isHostBinding) { // We are inserting host bindings // If we don't have template bindings then `tail` is 0. const hasTemplateBindings = tmplTail !== 0; // This is important to know because that means that the `head` can't point to the first // template bindings (there are none.) Instead the head points to the tail of the template. if (hasTemplateBindings) { // template head's "prev" will point to last host binding or to 0 if no host bindings yet const previousNode = getTStylingRangePrev(tData[tmplHead + 1]); tData[index + 1] = toTStylingRange(previousNode, tmplHead); // if a host binding has already been registered, we need to update the next of that host // binding to point to this one if (previousNode !== 0) { // We need to update the template-tail value to point to us. tData[previousNode + 1] = setTStylingRangeNext(tData[previousNode + 1], index); } // The "previous" of the template binding head should point to this host binding tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index); } else { tData[index + 1] = toTStylingRange(tmplHead, 0); // if a host binding has already been registered, we need to update the next of that host // binding to point to this one if (tmplHead !== 0) { // We need to update the template-tail value to point to us. tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index); } // if we don't have template, the head points to template-tail, and needs to be advanced. tmplHead = index; } } else { // We are inserting in template section. // We need to set this binding's "previous" to the current template tail tData[index + 1] = toTStylingRange(tmplTail, 0); ngDevMode && assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.'); if (tmplHead === 0) { tmplHead = index; } else { // We need to update the previous value "next" to point to this binding tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index); } tmplTail = index; } // Now we need to update / compute the duplicates. // Starting with our location search towards head (least priority) if (isKeyDuplicateOfStatic) { tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]); } markDuplicates(tData, tStylingKey, index, true, isClassBinding); markDuplicates(tData, tStylingKey, index, false, isClassBinding); markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding); tBindings = toTStylingRange(tmplHead, tmplTail); if (isClassBinding) { tNode.classBindings = tBindings; } else { tNode.styleBindings = tBindings; } } /** * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual. * * @param tNode `TNode` where the residual is stored. * @param tStylingKey `TStylingKey` to store. * @param tData `TData` associated with the current `LView`. * @param index location of where `tStyleValue` should be stored (and linked into list.) * @param isClassBinding True if the associated `tStylingKey` as a `class` styling. * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.) */ function markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) { const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles; if (residual != null /* or undefined */ && typeof tStylingKey == 'string' && keyValueArrayIndexOf(residual, tStylingKey) >= 0) { // We have duplicate in the residual so mark ourselves as duplicate. tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]); } } /** * Marks `TStyleValue`s as duplicates if another style binding in the list has the same * `TStyleValue`. * * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once * with it set to `false` to search both the previous as well as next items in the list. * * No duplicate case * ``` * [style.color] * [style.width.px] <<- index * [style.height.px] * ``` * * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no * duplicates because `width` is not found in any other part of the linked list. * * Duplicate case * ``` * [style.color] * [style.width.em] * [style.width.px] <<- index * ``` * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]` * because `width` is found in the chain. * * Map case 1 * ``` * [style.width.px] * [style.color] * [style] <<- index * ``` * In the above case adding `[style]` will produce a duplicate with any other bindings because * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`. * * Map case 2 * ``` * [style] * [style.width.px] * [style.color] <<- index * ``` * In the above case adding `[style.color]` will produce a duplicate because there is already a * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or * `width`. * * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates. * NOTE: We use `style` as example, but same logic is applied to `class`es as well. * * @param tData `TData` where the linked list is stored. * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in * the linked list. * @param index Starting location in the linked list to search from * @param isPrevDir Direction. * - `true` for previous (lower priority); * - `false` for next (higher priority). */ function markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) { const tStylingAtIndex = tData[index + 1]; const isMap = tStylingKey === null; let cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex); let foundDuplicate = false; // We keep iterating as long as we have a cursor // AND either: // - we found what we are looking for, OR // - we are a map in which case we have to continue searching even after we find what we were // looking for since we are a wild card and everything needs to be flipped to duplicate. while (cursor !== 0 && (foundDuplicate === false || isMap)) { ngDevMode && assertIndexInRange(tData, cursor); const tStylingValueAtCursor = tData[cursor]; const tStyleRangeAtCursor = tData[cursor + 1]; if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) { foundDuplicate = true; tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) : setTStylingRangePrevDuplicate(tStyleRangeAtCursor); } cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) : getTStylingRangeNext(tStyleRangeAtCursor); } if (foundDuplicate) { // if we found a duplicate, than mark ourselves. tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) : setTStylingRangeNextDuplicate(tStylingAtIndex); } } /** * Determines if two `TStylingKey`s are a match. * * When computing whether a binding contains a duplicate, we need to compare if the instruction * `TStylingKey` has a match. * * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is: * - `color` * - `color` // Match another color * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction * - `['', 'color', 'other', true]` // wrapped `color` so match * - `['', null, 'other', true]` // wrapped `null` so match * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'` * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction * * @param tStylingKeyCursor * @param tStylingKey */ function isStylingMatch(tStylingKeyCursor, tStylingKey) { ngDevMode && assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \'tStylingKey\' has been unwrapped'); if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that // location so we must assume that we have a match. tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it // contains a match. (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) === tStylingKey // If the keys match explicitly than we are a match. ) { return true; } else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') { // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has // statics and we need to check those as well. return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >= 0; // see if we are matching the key } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Global state of the parser. (This makes parser non-reentrant, but that is not an issue) const parserState = { textEnd: 0, key: 0, keyEnd: 0, value: 0, valueEnd: 0, }; /** * Retrieves the last parsed `key` of style. * @param text the text to substring the key from. */ function getLastParsedKey(text) { return text.substring(parserState.key, parserState.keyEnd); } /** * Retrieves the last parsed `value` of style. * @param text the text to substring the key from. */ function getLastParsedValue(text) { return text.substring(parserState.value, parserState.valueEnd); } /** * Initializes `className` string for parsing and parses the first token. * * This function is intended to be used in this format: * ``` * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) { * const key = getLastParsedKey(); * ... * } * ``` * @param text `className` to parse * @returns index where the next invocation of `parseClassNameNext` should resume. */ function parseClassName(text) { resetParserState(text); return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd)); } /** * Parses next `className` token. * * This function is intended to be used in this format: * ``` * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) { * const key = getLastParsedKey(); * ... * } * ``` * * @param text `className` to parse * @param index where the parsing should resume. * @returns index where the next invocation of `parseClassNameNext` should resume. */ function parseClassNameNext(text, index) { const end = parserState.textEnd; if (end === index) { return -1; } index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end); return consumeWhitespace(text, index, end); } /** * Initializes `cssText` string for parsing and parses the first key/values. * * This function is intended to be used in this format: * ``` * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) { * const key = getLastParsedKey(); * const value = getLastParsedValue(); * ... * } * ``` * @param text `cssText` to parse * @returns index where the next invocation of `parseStyleNext` should resume. */ function parseStyle(text) { resetParserState(text); return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd)); } /** * Parses the next `cssText` key/values. * * This function is intended to be used in this format: * ``` * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) { * const key = getLastParsedKey(); * const value = getLastParsedValue(); * ... * } * * @param text `cssText` to parse * @param index where the parsing should resume. * @returns index where the next invocation of `parseStyleNext` should resume. */ function parseStyleNext(text, startIndex) { const end = parserState.textEnd; let index = parserState.key = consumeWhitespace(text, startIndex, end); if (end === index) { // we reached an end so just quit return -1; } index = parserState.keyEnd = consumeStyleKey(text, index, end); index = consumeSeparator(text, index, end, 58 /* COLON */); index = parserState.value = consumeWhitespace(text, index, end); index = parserState.valueEnd = consumeStyleValue(text, index, end); return consumeSeparator(text, index, end, 59 /* SEMI_COLON */); } /** * Reset the global state of the styling parser. * @param text The styling text to parse. */ function resetParserState(text) { parserState.key = 0; parserState.keyEnd = 0; parserState.value = 0; parserState.valueEnd = 0; parserState.textEnd = text.length; } /** * Returns index of next non-whitespace character. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at * that location.) */ function consumeWhitespace(text, startIndex, endIndex) { while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* SPACE */) { startIndex++; } return startIndex; } /** * Returns index of last char in class token. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after last char in class token. */ function consumeClassToken(text, startIndex, endIndex) { while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* SPACE */) { startIndex++; } return startIndex; } /** * Consumes all of the characters belonging to style key and token. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after last style key character. */ function consumeStyleKey(text, startIndex, endIndex) { let ch; while (startIndex < endIndex && ((ch = text.charCodeAt(startIndex)) === 45 /* DASH */ || ch === 95 /* UNDERSCORE */ || ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */) || (ch >= 48 /* ZERO */ && ch <= 57 /* NINE */))) { startIndex++; } return startIndex; } /** * Consumes all whitespace and the separator `:` after the style key. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after separator and surrounding whitespace. */ function consumeSeparator(text, startIndex, endIndex, separator) { startIndex = consumeWhitespace(text, startIndex, endIndex); if (startIndex < endIndex) { if (ngDevMode && text.charCodeAt(startIndex) !== separator) { malformedStyleError(text, String.fromCharCode(separator), startIndex); } startIndex++; } return startIndex; } /** * Consumes style value honoring `url()` and `""` text. * * @param text Text to scan * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after last style value character. */ function consumeStyleValue(text, startIndex, endIndex) { let ch1 = -1; // 1st previous character let ch2 = -1; // 2nd previous character let ch3 = -1; // 3rd previous character let i = startIndex; let lastChIndex = i; while (i < endIndex) { const ch = text.charCodeAt(i++); if (ch === 59 /* SEMI_COLON */) { return lastChIndex; } else if (ch === 34 /* DOUBLE_QUOTE */ || ch === 39 /* SINGLE_QUOTE */) { lastChIndex = i = consumeQuotedText(text, ch, i, endIndex); } else if (startIndex === i - 4 && // We have seen only 4 characters so far "URL(" (Ignore "foo_URL()") ch3 === 85 /* U */ && ch2 === 82 /* R */ && ch1 === 76 /* L */ && ch === 40 /* OPEN_PAREN */) { lastChIndex = i = consumeQuotedText(text, 41 /* CLOSE_PAREN */, i, endIndex); } else if (ch > 32 /* SPACE */) { // if we have a non-whitespace character then capture its location lastChIndex = i; } ch3 = ch2; ch2 = ch1; ch1 = ch & -33 /* UPPER_CASE */; } return lastChIndex; } /** * Consumes all of the quoted characters. * * @param text Text to scan * @param quoteCharCode CharCode of either `"` or `'` quote or `)` for `url(...)`. * @param startIndex Starting index of character where the scan should start. * @param endIndex Ending index of character where the scan should end. * @returns Index after quoted characters. */ function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) { let ch1 = -1; // 1st previous character let index = startIndex; while (index < endIndex) { const ch = text.charCodeAt(index++); if (ch == quoteCharCode && ch1 !== 92 /* BACK_SLASH */) { return index; } if (ch == 92 /* BACK_SLASH */ && ch1 === 92 /* BACK_SLASH */) { // two back slashes cancel each other out. For example `"\\"` should properly end the // quotation. (It should not assume that the last `"` is escaped.) ch1 = 0; } else { ch1 = ch; } } throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) : new Error(); } function malformedStyleError(text, expecting, index) { ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here'); throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' + text.substring(index, index + 1) + '<<]' + text.substr(index + 1) + `'. Expecting '${expecting}'.`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Update a style binding on an element with the provided value. * * If the style value is falsy then it will be removed from the element * (or assigned a different value depending if there are any styles placed * on the element with `styleMap` or any static styles that are * present from when the element was created with `styling`). * * Note that the styling element is updated as part of `stylingApply`. * * @param prop A valid CSS property. * @param value New value to write (`null` or an empty string to remove). * @param suffix Optional suffix. Used with scalar values to add unit such as `px`. * * Note that this will apply the provided style value to the host element if this function is called * within a host binding function. * * @codeGenApi */ function ɵɵstyleProp(prop, value, suffix) { checkStylingProperty(prop, value, suffix, false); return ɵɵstyleProp; } /** * Update a class binding on an element with the provided value. * * This instruction is meant to handle the `[class.foo]="exp"` case and, * therefore, the class binding itself must already be allocated using * `styling` within the creation block. * * @param prop A valid CSS class (only one). * @param value A true/false value which will turn the class on or off. * * Note that this will apply the provided class value to the host element if this function * is called within a host binding function. * * @codeGenApi */ function ɵɵclassProp(className, value) { checkStylingProperty(className, value, null, true); return ɵɵclassProp; } /** * Update style bindings using an object literal on an element. * * This instruction is meant to apply styling via the `[style]="exp"` template bindings. * When styles are applied to the element they will then be updated with respect to * any styles/classes set via `styleProp`. If any styles are set to falsy * then they will be removed from the element. * * Note that the styling instruction will not be applied until `stylingApply` is called. * * @param styles A key/value style map of the styles that will be applied to the given element. * Any missing styles (that have already been applied to the element beforehand) will be * removed (unset) from the element's styling. * * Note that this will apply the provided styleMap value to the host element if this function * is called within a host binding. * * @codeGenApi */ function ɵɵstyleMap(styles) { checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false); } /** * Parse text as style and add values to KeyValueArray. * * This code is pulled out to a separate function so that it can be tree shaken away if it is not * needed. It is only referenced from `ɵɵstyleMap`. * * @param keyValueArray KeyValueArray to add parsed values to. * @param text text to parse. */ function styleStringParser(keyValueArray, text) { for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) { styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text)); } } /** * Update class bindings using an object literal or class-string on an element. * * This instruction is meant to apply styling via the `[class]="exp"` template bindings. * When classes are applied to the element they will then be updated with * respect to any styles/classes set via `classProp`. If any * classes are set to falsy then they will be removed from the element. * * Note that the styling instruction will not be applied until `stylingApply` is called. * Note that this will the provided classMap value to the host element if this function is called * within a host binding. * * @param classes A key/value map or string of CSS classes that will be added to the * given element. Any missing classes (that have already been applied to the element * beforehand) will be removed (unset) from the element's list of CSS classes. * * @codeGenApi */ function ɵɵclassMap(classes) { checkStylingMap(keyValueArraySet, classStringParser, classes, true); } /** * Parse text as class and add values to KeyValueArray. * * This code is pulled out to a separate function so that it can be tree shaken away if it is not * needed. It is only referenced from `ɵɵclassMap`. * * @param keyValueArray KeyValueArray to add parsed values to. * @param text text to parse. */ function classStringParser(keyValueArray, text) { for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) { keyValueArraySet(keyValueArray, getLastParsedKey(text), true); } } /** * Common code between `ɵɵclassProp` and `ɵɵstyleProp`. * * @param prop property name. * @param value binding value. * @param suffix suffix for the property (e.g. `em` or `px`) * @param isClassBased `true` if `class` change (`false` if `style`) */ function checkStylingProperty(prop, value, suffix, isClassBased) { const lView = getLView(); const tView = getTView(); // Styling instructions use 2 slots per binding. // 1. one for the value / TStylingKey // 2. one for the intermittent-value / TStylingRange const bindingIndex = incrementBindingIndex(2); if (tView.firstUpdatePass) { stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased); } if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) { const tNode = tView.data[getSelectedIndex()]; updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex); } } /** * Common code between `ɵɵclassMap` and `ɵɵstyleMap`. * * @param keyValueArraySet (See `keyValueArraySet` in "util/array_utils") Gets passed in as a * function so that `style` can be processed. This is done for tree shaking purposes. * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class` * have different parsers.) * @param value bound value from application * @param isClassBased `true` if `class` change (`false` if `style`) */ function checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) { const tView = getTView(); const bindingIndex = incrementBindingIndex(2); if (tView.firstUpdatePass) { stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased); } const lView = getLView(); if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) { // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the // if so as not to read unnecessarily. const tNode = tView.data[getSelectedIndex()]; if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) { if (ngDevMode) { // verify that if we are shadowing then `TData` is appropriately marked so that we skip // processing this binding in styling resolution. const tStylingKey = tView.data[bindingIndex]; assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \'false\''); } // VE does not concatenate the static portion like we are doing here. // Instead VE just ignores the static completely if dynamic binding is present. // Because of locality we have already set the static portion because we don't know if there // is a dynamic portion until later. If we would ignore the static portion it would look like // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong // thing as it would think that the static portion was removed. For this reason we // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed. let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost; ngDevMode && isClassBased === false && staticPrefix !== null && assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \';\''); if (staticPrefix !== null) { // We want to make sure that falsy values of `value` become empty strings. value = concatStringsWithSpace(staticPrefix, value ? value : ''); } // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`. // This takes over the `[style]` binding. (Same for `[class]`) setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased); } else { updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex); } } } /** * Determines when the binding is in `hostBindings` section * * @param tView Current `TView` * @param bindingIndex index of binding which we would like if it is in `hostBindings` */ function isInHostBindings(tView, bindingIndex) { // All host bindings are placed after the expando section. return bindingIndex >= tView.expandoStartIndex; } /** * Collects the necessary information to insert the binding into a linked list of style bindings * using `insertTStylingBinding`. * * @param tView `TView` where the binding linked list will be stored. * @param tStylingKey Property/key of the binding. * @param bindingIndex Index of binding associated with the `prop` * @param isClassBased `true` if `class` change (`false` if `style`) */ function stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) { ngDevMode && assertFirstUpdatePass(tView); const tData = tView.data; if (tData[bindingIndex + 1] === null) { // The above check is necessary because we don't clear first update pass until first successful // (no exception) template execution. This prevents the styling instruction from double adding // itself to the list. // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the // if so as not to read unnecessarily. const tNode = tData[getSelectedIndex()]; ngDevMode && assertDefined(tNode, 'TNode expected'); const isHostBindings = isInHostBindings(tView, bindingIndex); if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) { // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding. // If there is a directive which uses `@Input('style')` or `@Input('class')` than // we need to neutralize this binding since that directive is shadowing it. // We turn this into a noop by setting the key to `false` tStylingKey = false; } tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased); insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased); } } /** * Adds static styling information to the binding if applicable. * * The linked list of styles not only stores the list and keys, but also stores static styling * information on some of the keys. This function determines if the key should contain the styling * information and computes it. * * See `TStylingStatic` for more details. * * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey` * @param isClassBased `true` if `class` (`false` if `style`) */ function wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) { const hostDirectiveDef = getCurrentDirectiveDef(tData); let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles; if (hostDirectiveDef === null) { // We are in template node. // If template node already had styling instruction then it has already collected the static // styling and there is no need to collect them again. We know that we are the first styling // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet). const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0; if (isFirstStylingInstructionInTemplate) { // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point // they are already merged and it would not be possible to figure which property belongs where // in the priority. stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased); stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased); // We know that if we have styling binding in template we can't have residual. residual = null; } } else { // We are in host binding node and there was no binding instruction in template node. // This means that we need to compute the residual. const directiveStylingLast = tNode.directiveStylingLast; const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef; if (isFirstStylingInstructionInHostBinding) { stylingKey = collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased); if (residual === null) { // - If `null` than either: // - Template styling instruction already ran and it has consumed the static // styling into its `TStylingKey` and so there is no need to update residual. Instead // we need to update the `TStylingKey` associated with the first template node // instruction. OR // - Some other styling instruction ran and determined that there are no residuals let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased); if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) { // Only recompute if `templateStylingKey` had static values. (If no static value found // then there is nothing to do since this operation can only produce less static keys, not // more.) templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased); templateStylingKey = collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased); setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey); } } else { // We only need to recompute residual if it is not `null`. // - If existing residual (implies there was no template styling). This means that some of // the statics may have moved from the residual to the `stylingKey` and so we have to // recompute. // - If `undefined` this is the first time we are running. residual = collectResidual(tData, tNode, isClassBased); } } } if (residual !== undefined) { isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual); } return stylingKey; } /** * Retrieve the `TStylingKey` for the template styling instruction. * * This is needed since `hostBinding` styling instructions are inserted after the template * instruction. While the template instruction needs to update the residual in `TNode` the * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because * the template instruction is downstream from the `hostBindings` instructions. * * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param isClassBased `true` if `class` (`false` if `style`) * @return `TStylingKey` if found or `undefined` if not found. */ function getTemplateHeadTStylingKey(tData, tNode, isClassBased) { const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings; if (getTStylingRangeNext(bindings) === 0) { // There does not seem to be a styling instruction in the `template`. return undefined; } return tData[getTStylingRangePrev(bindings)]; } /** * Update the `TStylingKey` of the first template instruction in `TNode`. * * Logically `hostBindings` styling instructions are of lower priority than that of the template. * However, they execute after the template styling instructions. This means that they get inserted * in front of the template styling instructions. * * If we have a template styling instruction and a new `hostBindings` styling instruction is * executed it means that it may need to steal static fields from the template instruction. This * method allows us to update the first template instruction `TStylingKey` with a new value. * * Assume: * ``` * <div my-dir style="color: red" [style.color]="tmplExp"></div> * * @Directive({ * host: { * 'style': 'width: 100px', * '[style.color]': 'dirExp', * } * }) * class MyDir {} * ``` * * when `[style.color]="tmplExp"` executes it creates this data structure. * ``` * ['', 'color', 'color', 'red', 'width', '100px'], * ``` * * The reason for this is that the template instruction does not know if there are styling * instructions and must assume that there are none and must collect all of the static styling. * (both * `color' and 'width`) * * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list. * ``` * ['', 'color', 'width', '100px'], // newly inserted * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong * ``` * * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to * update it like so: * ``` * ['', 'color', 'width', '100px'], * ['', 'color', 'color', 'red'], // UPDATE * ``` * * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param isClassBased `true` if `class` (`false` if `style`) * @param tStylingKey New `TStylingKey` which is replacing the old one. */ function setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) { const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings; ngDevMode && assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.'); tData[getTStylingRangePrev(bindings)] = tStylingKey; } /** * Collect all static values after the current `TNode.directiveStylingLast` index. * * Collect the remaining styling information which has not yet been collected by an existing * styling instruction. * * @param tData `TData` where the `DirectiveDefs` are stored. * @param tNode `TNode` which contains the directive range. * @param isClassBased `true` if `class` (`false` if `style`) */ function collectResidual(tData, tNode, isClassBased) { let residual = undefined; const directiveEnd = tNode.directiveEnd; ngDevMode && assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.'); // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are // collecting things after the last `hostBindings` directive which had a styling instruction.) for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) { const attrs = tData[i].hostAttrs; residual = collectStylingFromTAttrs(residual, attrs, isClassBased); } return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased); } /** * Collect the static styling information with lower priority than `hostDirectiveDef`. * * (This is opposite of residual styling.) * * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static * styling. (Or `null` if template styling) * @param tData `TData` where the linked list is stored. * @param tNode `TNode` for which the styling is being computed. * @param stylingKey Existing `TStylingKey` to update or wrap. * @param isClassBased `true` if `class` (`false` if `style`) */ function collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) { // We need to loop because there can be directives which have `hostAttrs` but don't have // `hostBindings` so this loop catches up to the current directive.. let currentDirective = null; const directiveEnd = tNode.directiveEnd; let directiveStylingLast = tNode.directiveStylingLast; if (directiveStylingLast === -1) { directiveStylingLast = tNode.directiveStart; } else { directiveStylingLast++; } while (directiveStylingLast < directiveEnd) { currentDirective = tData[directiveStylingLast]; ngDevMode && assertDefined(currentDirective, 'expected to be defined'); stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased); if (currentDirective === hostDirectiveDef) break; directiveStylingLast++; } if (hostDirectiveDef !== null) { // we only advance the styling cursor if we are collecting data from host bindings. // Template executes before host bindings and so if we would update the index, // host bindings would not get their statics. tNode.directiveStylingLast = directiveStylingLast; } return stylingKey; } /** * Convert `TAttrs` into `TStylingStatic`. * * @param stylingKey existing `TStylingKey` to update or wrap. * @param attrs `TAttributes` to process. * @param isClassBased `true` if `class` (`false` if `style`) */ function collectStylingFromTAttrs(stylingKey, attrs, isClassBased) { const desiredMarker = isClassBased ? 1 /* Classes */ : 2 /* Styles */; let currentMarker = -1 /* ImplicitAttributes */; if (attrs !== null) { for (let i = 0; i < attrs.length; i++) { const item = attrs[i]; if (typeof item === 'number') { currentMarker = item; } else { if (currentMarker === desiredMarker) { if (!Array.isArray(stylingKey)) { stylingKey = stylingKey === undefined ? [] : ['', stylingKey]; } keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]); } } } } return stylingKey === undefined ? null : stylingKey; } /** * Convert user input to `KeyValueArray`. * * This function takes user input which could be `string`, Object literal, or iterable and converts * it into a consistent representation. The output of this is `KeyValueArray` (which is an array * where * even indexes contain keys and odd indexes contain values for those keys). * * The advantage of converting to `KeyValueArray` is that we can perform diff in an input * independent * way. * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be * applied) * * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the * difference in linear fashion without the need to allocate any additional data. * * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine * which values need to be deleted, over the new `Map` to determine additions, and we would have to * keep additional `Map` to keep track of duplicates or items which have not yet been visited. * * @param keyValueArraySet (See `keyValueArraySet` in "util/array_utils") Gets passed in as a * function so that `style` can be processed. This is done * for tree shaking purposes. * @param stringParser The parser is passed in so that it will be tree shakable. See * `styleStringParser` and `classStringParser` * @param value The value to parse/convert to `KeyValueArray` */ function toStylingKeyValueArray(keyValueArraySet, stringParser, value) { if (value == null /*|| value === undefined */ || value === '') return EMPTY_ARRAY; const styleKeyValueArray = []; const unwrappedValue = unwrapSafeValue(value); if (Array.isArray(unwrappedValue)) { for (let i = 0; i < unwrappedValue.length; i++) { keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true); } } else if (typeof unwrappedValue === 'object') { for (const key in unwrappedValue) { if (unwrappedValue.hasOwnProperty(key)) { keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]); } } } else if (typeof unwrappedValue === 'string') { stringParser(styleKeyValueArray, unwrappedValue); } else { ngDevMode && throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue); } return styleKeyValueArray; } /** * Set a `value` for a `key`. * * See: `keyValueArraySet` for details * * @param keyValueArray KeyValueArray to add to. * @param key Style key to add. * @param value The value to set. */ function styleKeyValueArraySet(keyValueArray, key, value) { keyValueArraySet(keyValueArray, key, unwrapSafeValue(value)); } /** * Update map based styling. * * Map based styling could be anything which contains more than one binding. For example `string`, * or object literal. Dealing with all of these types would complicate the logic so * instead this function expects that the complex input is first converted into normalized * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it * very cheap to compute deltas between the previous and current value. * * @param tView Associated `TView.data` contains the linked list of binding priorities. * @param tNode `TNode` where the binding is located. * @param lView `LView` contains the values associated with other styling binding at this `TNode`. * @param renderer Renderer to use if any updates. * @param oldKeyValueArray Previous value represented as `KeyValueArray` * @param newKeyValueArray Current value represented as `KeyValueArray` * @param isClassBased `true` if `class` (`false` if `style`) * @param bindingIndex Binding index of the binding. */ function updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) { if (oldKeyValueArray === NO_CHANGE) { // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray. oldKeyValueArray = EMPTY_ARRAY; } let oldIndex = 0; let newIndex = 0; let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null; let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null; while (oldKey !== null || newKey !== null) { ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?'); ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?'); const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined; const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined; let setKey = null; let setValue = undefined; if (oldKey === newKey) { // UPDATE: Keys are equal => new value is overwriting old value. oldIndex += 2; newIndex += 2; if (oldValue !== newValue) { setKey = newKey; setValue = newValue; } } else if (newKey === null || oldKey !== null && oldKey < newKey) { // DELETE: oldKey key is missing or we did not find the oldKey in the newValue // (because the keyValueArray is sorted and `newKey` is found later alphabetically). // `"background" < "color"` so we need to delete `"background"` because it is not found in the // new array. oldIndex += 2; setKey = oldKey; } else { // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key. // `"color" > "background"` so we need to add `color` because it is in new array but not in // old array. ngDevMode && assertDefined(newKey, 'Expecting to have a valid key'); newIndex += 2; setKey = newKey; setValue = newValue; } if (setKey !== null) { updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex); } oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null; newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null; } } /** * Update a simple (property name) styling. * * This function takes `prop` and updates the DOM to that value. The function takes the binding * value as well as binding priority into consideration to determine which value should be written * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.) * * @param tView Associated `TView.data` contains the linked list of binding priorities. * @param tNode `TNode` where the binding is located. * @param lView `LView` contains the values associated with other styling binding at this `TNode`. * @param renderer Renderer to use if any updates. * @param prop Either style property name or a class name. * @param value Either style value for `prop` or `true`/`false` if `prop` is class. * @param isClassBased `true` if `class` (`false` if `style`) * @param bindingIndex Binding index of the binding. */ function updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) { if (!(tNode.type & 3 /* AnyRNode */)) { // It is possible to have styling on non-elements (such as ng-container). // This is rare, but it does happen. In such a case, just ignore the binding. return; } const tData = tView.data; const tRange = tData[bindingIndex + 1]; const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ? findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) : undefined; if (!isStylingValuePresent(higherPriorityValue)) { // We don't have a next duplicate, or we did not find a duplicate value. if (!isStylingValuePresent(value)) { // We should delete current value or restore to lower priority value. if (getTStylingRangePrevDuplicate(tRange)) { // We have a possible prev duplicate, let's retrieve it. value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased); } } const rNode = getNativeByIndex(getSelectedIndex(), lView); applyStyling(renderer, isClassBased, rNode, prop, value); } } /** * Search for styling value with higher priority which is overwriting current value, or a * value of lower priority to which we should fall back if the value is `undefined`. * * When value is being applied at a location, related values need to be consulted. * - If there is a higher priority binding, we should be using that one instead. * For example `<div [style]="{color:exp1}" [style.color]="exp2">` change to `exp1` * requires that we check `exp2` to see if it is set to value other than `undefined`. * - If there is a lower priority binding and we are changing to `undefined` * For example `<div [style]="{color:exp1}" [style.color]="exp2">` change to `exp2` to * `undefined` requires that we check `exp1` (and static values) and use that as new value. * * NOTE: The styling stores two values. * 1. The raw value which came from the application is stored at `index + 0` location. (This value * is used for dirty checking). * 2. The normalized value is stored at `index + 1`. * * @param tData `TData` used for traversing the priority. * @param tNode `TNode` to use for resolving static styling. Also controls search direction. * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true. * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value. * - `null` search prev and go all the way to end. Return last value where * `isStylingValuePresent(value)` is true. * @param lView `LView` used for retrieving the actual values. * @param prop Property which we are interested in. * @param index Starting index in the linked list of styling bindings where the search should start. * @param isClassBased `true` if `class` (`false` if `style`) */ function findStylingValue(tData, tNode, lView, prop, index, isClassBased) { // `TNode` to use for resolving static styling. Also controls search direction. // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true. // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value. // - `null` search prev and go all the way to end. Return last value where // `isStylingValuePresent(value)` is true. const isPrevDirection = tNode === null; let value = undefined; while (index > 0) { const rawKey = tData[index]; const containsStatics = Array.isArray(rawKey); // Unwrap the key if we contain static values. const key = containsStatics ? rawKey[1] : rawKey; const isStylingMap = key === null; let valueAtLViewIndex = lView[index + 1]; if (valueAtLViewIndex === NO_CHANGE) { // In firstUpdatePass the styling instructions create a linked list of styling. // On subsequent passes it is possible for a styling instruction to try to read a binding // which // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that // we have `undefined` (or empty array in case of styling-map instruction) instead. This // allows the resolution to apply the value (which may later be overwritten when the // binding actually executes.) valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY : undefined; } let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) : key === prop ? valueAtLViewIndex : undefined; if (containsStatics && !isStylingValuePresent(currentValue)) { currentValue = keyValueArrayGet(rawKey, prop); } if (isStylingValuePresent(currentValue)) { value = currentValue; if (isPrevDirection) { return value; } } const tRange = tData[index + 1]; index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange); } if (tNode !== null) { // in case where we are going in next direction AND we did not find anything, we need to // consult residual styling let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles; if (residual != null /** OR residual !=== undefined */) { value = keyValueArrayGet(residual, prop); } } return value; } /** * Determines if the binding value should be used (or if the value is 'undefined' and hence priority * resolution should be used.) * * @param value Binding style value. */ function isStylingValuePresent(value) { // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't // have an opinion as to what this binding should be and you should consult other bindings by // priority to determine the valid value. // This is extracted into a single function so that we have a single place to control this. return value !== undefined; } /** * Normalizes and/or adds a suffix to the value. * * If value is `null`/`undefined` no suffix is added * @param value * @param suffix */ function normalizeSuffix(value, suffix) { if (value == null /** || value === undefined */) { // do nothing } else if (typeof suffix === 'string') { value = value + suffix; } else if (typeof value === 'object') { value = stringify(unwrapSafeValue(value)); } return value; } /** * Tests if the `TNode` has input shadow. * * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or * `@Input('class')` as input. * * @param tNode `TNode` which we would like to see if it has shadow. * @param isClassBased `true` if `class` (`false` if `style`) */ function hasStylingInputShadow(tNode, isClassBased) { return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Create static text node * * @param index Index of the node in the data array * @param value Static string value to write. * * @codeGenApi */ function ɵɵtext(index, value = '') { const lView = getLView(); const tView = getTView(); const adjustedIndex = index + HEADER_OFFSET; ngDevMode && assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings'); ngDevMode && assertIndexInRange(lView, adjustedIndex); const tNode = tView.firstCreatePass ? getOrCreateTNode(tView, adjustedIndex, 1 /* Text */, value, null) : tView.data[adjustedIndex]; const textNative = lView[adjustedIndex] = createTextNode(lView[RENDERER], value); appendChild(tView, lView, textNative, tNode); // Text nodes are self closing. setCurrentTNode(tNode, false); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update text content with a lone bound value * * Used when a text node has 1 interpolated value in it, an no additional text * surrounds that interpolated value: * * ```html * <div>{{v0}}</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate(v0); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate(v0) { ɵɵtextInterpolate1('', v0, ''); return ɵɵtextInterpolate; } /** * * Update text content with single bound value surrounded by other text. * * Used when a text node has 1 interpolated value in it: * * ```html * <div>prefix{{v0}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate1('prefix', v0, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate1(prefix, v0, suffix) { const lView = getLView(); const interpolated = interpolation1(lView, prefix, v0, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate1; } /** * * Update text content with 2 bound values surrounded by other text. * * Used when a text node has 2 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) { const lView = getLView(); const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate2; } /** * * Update text content with 3 bound values surrounded by other text. * * Used when a text node has 3 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate3( * 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) { const lView = getLView(); const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate3; } /** * * Update text content with 4 bound values surrounded by other text. * * Used when a text node has 4 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate4( * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see ɵɵtextInterpolateV * @codeGenApi */ function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const lView = getLView(); const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate4; } /** * * Update text content with 5 bound values surrounded by other text. * * Used when a text node has 5 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate5( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const lView = getLView(); const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate5; } /** * * Update text content with 6 bound values surrounded by other text. * * Used when a text node has 6 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate6( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const lView = getLView(); const interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate6; } /** * * Update text content with 7 bound values surrounded by other text. * * Used when a text node has 7 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate7( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const lView = getLView(); const interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate7; } /** * * Update text content with 8 bound values surrounded by other text. * * Used when a text node has 8 interpolated values in it: * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolate8( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * @returns itself, so that it may be chained. * @see textInterpolateV * @codeGenApi */ function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const lView = getLView(); const interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolate8; } /** * Update text content with 9 or more bound values other surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div> * ``` * * Its compiled representation is: * * ```ts * ɵɵtextInterpolateV( * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` *. * @param values The collection of values and the strings in between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵtextInterpolateV(values) { const lView = getLView(); const interpolated = interpolationV(lView, values); if (interpolated !== NO_CHANGE) { textBindingInternal(lView, getSelectedIndex(), interpolated); } return ɵɵtextInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update an interpolated class on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div class="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate1('prefix', v0, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate1(prefix, v0, suffix) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate3( * 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate4( * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate5( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate6( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate7( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * * Update an interpolated class on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolate8( * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * Update an interpolated class on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵclassMapInterpolateV( * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` *. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @codeGenApi */ function ɵɵclassMapInterpolateV(values) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update an interpolated style on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div style="key: {{v0}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate1(prefix, v0, suffix) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate3( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate4( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate5( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; * key5: {{v5}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate6( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}}; * key6: {{v6}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate7( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * '; key6: ', v6, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); ɵɵstyleMap(interpolatedValue); } /** * * Update an interpolated style on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}}; * key6: {{v6}}; key7: {{v7}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolate8( * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * '; key6: ', v6, '; key7: ', v7, 'suffix'); * ``` * * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @codeGenApi */ function ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); ɵɵstyleMap(interpolatedValue); } /** * Update an interpolated style on an element with 9 or more bound values surrounded by text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}}; * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstyleMapInterpolateV( * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5, * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']); * ``` *. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`) * @codeGenApi */ function ɵɵstyleMapInterpolateV(values) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); ɵɵstyleMap(interpolatedValue); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * Update an interpolated style property on an element with single bound value surrounded by text. * * Used when the value passed to a property has 1 interpolated value in it: * * ```html * <div style.color="prefix{{v0}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation1(lView, prefix, v0, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate1; } /** * * Update an interpolated style property on an element with 2 bound values surrounded by text. * * Used when the value passed to a property has 2 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate2; } /** * * Update an interpolated style property on an element with 3 bound values surrounded by text. * * Used when the value passed to a property has 3 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate3; } /** * * Update an interpolated style property on an element with 4 bound values surrounded by text. * * Used when the value passed to a property has 4 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate4; } /** * * Update an interpolated style property on an element with 5 bound values surrounded by text. * * Used when the value passed to a property has 5 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate5; } /** * * Update an interpolated style property on an element with 6 bound values surrounded by text. * * Used when the value passed to a property has 6 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate6; } /** * * Update an interpolated style property on an element with 7 bound values surrounded by text. * * Used when the value passed to a property has 7 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate7( * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate7; } /** * * Update an interpolated style property on an element with 8 bound values surrounded by text. * * Used when the value passed to a property has 8 interpolated values in it: * * ```html * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, * '-', v7, 'suffix'); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`. * @param prefix Static value used for concatenation only. * @param v0 Value checked for change. * @param i0 Static value used for concatenation only. * @param v1 Value checked for change. * @param i1 Static value used for concatenation only. * @param v2 Value checked for change. * @param i2 Static value used for concatenation only. * @param v3 Value checked for change. * @param i3 Static value used for concatenation only. * @param v4 Value checked for change. * @param i4 Static value used for concatenation only. * @param v5 Value checked for change. * @param i5 Static value used for concatenation only. * @param v6 Value checked for change. * @param i6 Static value used for concatenation only. * @param v7 Value checked for change. * @param suffix Static value used for concatenation only. * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolate8; } /** * Update an interpolated style property on an element with 9 or more bound values surrounded by * text. * * Used when the number of interpolated values exceeds 8. * * ```html * <div * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"> * </div> * ``` * * Its compiled representation is: * * ```ts * ɵɵstylePropInterpolateV( * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9, * 'suffix']); * ``` * * @param styleIndex Index of style to update. This index value refers to the * index of the style in the style bindings array that was passed into * `styling`.. * @param values The collection of values and the strings in-between those values, beginning with * a string prefix and ending with a string suffix. * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`) * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`. * @returns itself, so that it may be chained. * @codeGenApi */ function ɵɵstylePropInterpolateV(prop, values, valueSuffix) { const lView = getLView(); const interpolatedValue = interpolationV(lView, values); checkStylingProperty(prop, interpolatedValue, valueSuffix, false); return ɵɵstylePropInterpolateV; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Update a property on a host element. Only applies to native node properties, not inputs. * * Operates on the element selected by index via the {@link select} instruction. * * @param propName Name of property. Because it is going to DOM, this is not subject to * renaming as part of minification. * @param value New value to write. * @param sanitizer An optional function used to sanitize the value. * @returns This function returns itself so that it may be chained * (e.g. `property('name', ctx.name)('title', ctx.title)`) * * @codeGenApi */ function ɵɵhostProperty(propName, value, sanitizer) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex); } return ɵɵhostProperty; } /** * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive. * * This instruction is for compatibility purposes and is designed to ensure that a * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in * the component's renderer. Normally all host bindings are evaluated with the parent * component's renderer, but, in the case of animation @triggers, they need to be * evaluated with the sub component's renderer (because that's where the animation * triggers are defined). * * Do not use this instruction as a replacement for `elementProperty`. This instruction * only exists to ensure compatibility with the ViewEngine's host binding behavior. * * @param index The index of the element to update in the data array * @param propName Name of property. Because it is going to DOM, this is not subject to * renaming as part of minification. * @param value New value to write. * @param sanitizer An optional function used to sanitize the value. * * @codeGenApi */ function ɵɵsyntheticHostProperty(propName, value, sanitizer) { const lView = getLView(); const bindingIndex = nextBindingIndex(); if (bindingUpdated(lView, bindingIndex, value)) { const tView = getTView(); const tNode = getSelectedTNode(); const currentDef = getCurrentDirectiveDef(tView.data); const renderer = loadComponentRenderer(currentDef, tNode, lView); elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true); ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex); } return ɵɵsyntheticHostProperty; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`. */ if (typeof ngI18nClosureMode === 'undefined') { // These property accesses can be ignored because ngI18nClosureMode will be set to false // when optimizing code and the whole if statement will be dropped. // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure. // NOTE: we need to have it in IIFE so that the tree-shaker is happy. (function () { // tslint:disable-next-line:no-toplevel-property-access _global['ngI18nClosureMode'] = // TODO(FW-1250): validate that this actually, you know, works. // tslint:disable-next-line:no-toplevel-property-access typeof goog !== 'undefined' && typeof goog.getMsg === 'function'; })(); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js const u = undefined; function plural(n) { let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length; if (i === 1 && v === 0) return 1; return 5; } var localeEn = [ 'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u], [ ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'] ], u, [ ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ] ], u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0], ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'], ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \'at\' {0}', u], ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'], ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], 'USD', '$', 'US Dollar', {}, 'ltr', plural ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This const is used to store the locale data registered with `registerLocaleData` */ let LOCALE_DATA = {}; /** * Register locale data to be used internally by Angular. See the * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data. * * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1 */ function registerLocaleData(data, localeId, extraData) { if (typeof localeId !== 'string') { extraData = localeId; localeId = data[LocaleDataIndex.LocaleId]; } localeId = localeId.toLowerCase().replace(/_/g, '-'); LOCALE_DATA[localeId] = data; if (extraData) { LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData; } } /** * Finds the locale data for a given locale. * * @param locale The locale code. * @returns The locale data. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function findLocaleData(locale) { const normalizedLocale = normalizeLocale(locale); let match = getLocaleData(normalizedLocale); if (match) { return match; } // let's try to find a parent locale const parentLocale = normalizedLocale.split('-')[0]; match = getLocaleData(parentLocale); if (match) { return match; } if (parentLocale === 'en') { return localeEn; } throw new Error(`Missing locale data for the locale "${locale}".`); } /** * Retrieves the default currency code for the given locale. * * The default is defined as the first currency which is still in use. * * @param locale The code of the locale whose currency code we want. * @returns The code of the default currency for the given locale. * */ function getLocaleCurrencyCode(locale) { const data = findLocaleData(locale); return data[LocaleDataIndex.CurrencyCode] || null; } /** * Retrieves the plural function used by ICU expressions to determine the plural case to use * for a given locale. * @param locale A locale code for the locale format rules to use. * @returns The plural function for the locale. * @see `NgPlural` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function getLocalePluralCase(locale) { const data = findLocaleData(locale); return data[LocaleDataIndex.PluralCase]; } /** * Helper function to get the given `normalizedLocale` from `LOCALE_DATA` * or from the global `ng.common.locale`. */ function getLocaleData(normalizedLocale) { if (!(normalizedLocale in LOCALE_DATA)) { LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales && _global.ng.common.locales[normalizedLocale]; } return LOCALE_DATA[normalizedLocale]; } /** * Helper function to remove all the locale data from `LOCALE_DATA`. */ function unregisterAllLocaleData() { LOCALE_DATA = {}; } /** * Index of each type of locale data from the locale data array */ var LocaleDataIndex; (function (LocaleDataIndex) { LocaleDataIndex[LocaleDataIndex["LocaleId"] = 0] = "LocaleId"; LocaleDataIndex[LocaleDataIndex["DayPeriodsFormat"] = 1] = "DayPeriodsFormat"; LocaleDataIndex[LocaleDataIndex["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone"; LocaleDataIndex[LocaleDataIndex["DaysFormat"] = 3] = "DaysFormat"; LocaleDataIndex[LocaleDataIndex["DaysStandalone"] = 4] = "DaysStandalone"; LocaleDataIndex[LocaleDataIndex["MonthsFormat"] = 5] = "MonthsFormat"; LocaleDataIndex[LocaleDataIndex["MonthsStandalone"] = 6] = "MonthsStandalone"; LocaleDataIndex[LocaleDataIndex["Eras"] = 7] = "Eras"; LocaleDataIndex[LocaleDataIndex["FirstDayOfWeek"] = 8] = "FirstDayOfWeek"; LocaleDataIndex[LocaleDataIndex["WeekendRange"] = 9] = "WeekendRange"; LocaleDataIndex[LocaleDataIndex["DateFormat"] = 10] = "DateFormat"; LocaleDataIndex[LocaleDataIndex["TimeFormat"] = 11] = "TimeFormat"; LocaleDataIndex[LocaleDataIndex["DateTimeFormat"] = 12] = "DateTimeFormat"; LocaleDataIndex[LocaleDataIndex["NumberSymbols"] = 13] = "NumberSymbols"; LocaleDataIndex[LocaleDataIndex["NumberFormats"] = 14] = "NumberFormats"; LocaleDataIndex[LocaleDataIndex["CurrencyCode"] = 15] = "CurrencyCode"; LocaleDataIndex[LocaleDataIndex["CurrencySymbol"] = 16] = "CurrencySymbol"; LocaleDataIndex[LocaleDataIndex["CurrencyName"] = 17] = "CurrencyName"; LocaleDataIndex[LocaleDataIndex["Currencies"] = 18] = "Currencies"; LocaleDataIndex[LocaleDataIndex["Directionality"] = 19] = "Directionality"; LocaleDataIndex[LocaleDataIndex["PluralCase"] = 20] = "PluralCase"; LocaleDataIndex[LocaleDataIndex["ExtraData"] = 21] = "ExtraData"; })(LocaleDataIndex || (LocaleDataIndex = {})); /** * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`. */ function normalizeLocale(locale) { return locale.toLowerCase().replace(/_/g, '-'); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const pluralMapping = ['zero', 'one', 'two', 'few', 'many']; /** * Returns the plural case based on the locale */ function getPluralCase(value, locale) { const plural = getLocalePluralCase(locale)(parseInt(value, 10)); const result = pluralMapping[plural]; return (result !== undefined) ? result : 'other'; } /** * The locale id that the application is using by default (for translations and ICU expressions). */ const DEFAULT_LOCALE_ID = 'en-US'; /** * USD currency code that the application uses by default for CurrencyPipe when no * DEFAULT_CURRENCY_CODE is provided. */ const USD_CURRENCY_CODE = 'USD'; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marks that the next string is an element name. * * See `I18nMutateOpCodes` documentation. */ const ELEMENT_MARKER = { marker: 'element' }; /** * Marks that the next string is comment text need for ICU. * * See `I18nMutateOpCodes` documentation. */ const ICU_MARKER = { marker: 'ICU' }; /** * See `I18nCreateOpCodes` */ var I18nCreateOpCode; (function (I18nCreateOpCode) { /** * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and * `COMMENT`. */ I18nCreateOpCode[I18nCreateOpCode["SHIFT"] = 2] = "SHIFT"; /** * Should the node be appended to parent imedditatly after creation. */ I18nCreateOpCode[I18nCreateOpCode["APPEND_EAGERLY"] = 1] = "APPEND_EAGERLY"; /** * If set the node should be comment (rather than a text) node. */ I18nCreateOpCode[I18nCreateOpCode["COMMENT"] = 2] = "COMMENT"; })(I18nCreateOpCode || (I18nCreateOpCode = {})); // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$6 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The locale id that the application is currently using (for translations and ICU expressions). * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine * but is now defined as a global value. */ let LOCALE_ID = DEFAULT_LOCALE_ID; /** * Sets the locale id that will be used for translations and ICU expressions. * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine * but is now defined as a global value. * * @param localeId */ function setLocaleId(localeId) { assertDefined(localeId, `Expected localeId to be defined`); if (typeof localeId === 'string') { LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-'); } } /** * Gets the locale id that will be used for translations and ICU expressions. * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine * but is now defined as a global value. */ function getLocaleId() { return LOCALE_ID; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Find a node in front of which `currentTNode` should be inserted (takes i18n into account). * * This method determines the `RNode` in front of which we should insert the `currentRNode`. This * takes `TNode.insertBeforeIndex` into account. * * @param parentTNode parent `TNode` * @param currentTNode current `TNode` (The node which we would like to insert into the DOM) * @param lView current `LView` */ function getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) { const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex; const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex) ? tNodeInsertBeforeIndex[0] : tNodeInsertBeforeIndex; if (insertBeforeIndex === null) { return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView); } else { ngDevMode && assertIndexInRange(lView, insertBeforeIndex); return unwrapRNode(lView[insertBeforeIndex]); } } /** * Process `TNode.insertBeforeIndex` by adding i18n text nodes. * * See `TNode.insertBeforeIndex` */ function processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) { const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex; if (Array.isArray(tNodeInsertBeforeIndex)) { // An array indicates that there are i18n nodes that need to be added as children of this // `childRNode`. These i18n nodes were created before this `childRNode` was available and so // only now can be added. The first element of the array is the normal index where we should // insert the `childRNode`. Additional elements are the extra nodes to be added as children of // `childRNode`. ngDevMode && assertDomNode(childRNode); let i18nParent = childRNode; let anchorRNode = null; if (!(childTNode.type & 3 /* AnyRNode */)) { anchorRNode = i18nParent; i18nParent = parentRElement; } if (i18nParent !== null && (childTNode.flags & 2 /* isComponentHost */) === 0) { for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) { // No need to `unwrapRNode` because all of the indexes point to i18n text nodes. // see `assertDomNode` below. const i18nChild = lView[tNodeInsertBeforeIndex[i]]; nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false); } } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list * `tNode.insertBeforeIndex`. * * Things to keep in mind: * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the * `ɵɵi18nStart` instruction. * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by * `ɵɵelementStart` instruction. * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a * smaller index `TNode` is guaranteed to be created before a larger one) * * We use the above three invariants to determine `TNode.insertBeforeIndex`. * * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However, * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that * the next node is not yet created and therefore we can't insert in front of it. * * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't * know if there will be further `TNode`s inserted after.) * Rule2: If `previousTNode` is created after the `tNode` being inserted, then * `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check * previous to see if we can update its `insertBeforeTNode`) * * See `TNode.insertBeforeIndex` for more context. * * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in * reverse order. (If `TNode` would have `previous` this would not be necessary.) * @param newTNode A TNode to add to the `previousTNodes` list. */ function addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) { // Start with Rule1 ngDevMode && assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set'); previousTNodes.push(newTNode); if (previousTNodes.length > 1) { for (let i = previousTNodes.length - 2; i >= 0; i--) { const existingTNode = previousTNodes[i]; // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated. // It is safe to ignore them. if (!isI18nText(existingTNode)) { if (isNewTNodeCreatedBefore(existingTNode, newTNode) && getInsertBeforeIndex(existingTNode) === null) { // If it was created before us in time, (and it does not yet have `insertBeforeIndex`) // then add the `insertBeforeIndex`. setInsertBeforeIndex(existingTNode, newTNode.index); } } } } } function isI18nText(tNode) { return !(tNode.type & 64 /* Placeholder */); } function isNewTNodeCreatedBefore(existingTNode, newTNode) { return isI18nText(newTNode) || existingTNode.index > newTNode.index; } function getInsertBeforeIndex(tNode) { const index = tNode.insertBeforeIndex; return Array.isArray(index) ? index[0] : index; } function setInsertBeforeIndex(tNode, value) { const index = tNode.insertBeforeIndex; if (Array.isArray(index)) { // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex` index[0] = value; } else { setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore); tNode.insertBeforeIndex = value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieve `TIcu` at a given `index`. * * The `TIcu` can be stored either directly (if it is nested ICU) OR * it is stored inside tho `TIcuContainer` if it is top level ICU. * * The reason for this is that the top level ICU need a `TNode` so that they are part of the render * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is * expressed (parent ICU may have selected a case which does not contain it.) * * @param tView Current `TView`. * @param index Index where the value should be read from. */ function getTIcu(tView, index) { const value = tView.data[index]; if (value === null || typeof value === 'string') return null; if (ngDevMode && !(value.hasOwnProperty('tViews') || value.hasOwnProperty('currentCaseLViewIndex'))) { throwError('We expect to get \'null\'|\'TIcu\'|\'TIcuContainer\', but got: ' + value); } // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it // will be just two cases which fits into the browser inline cache (inline cache can take up to // 4) const tIcu = value.hasOwnProperty('currentCaseLViewIndex') ? value : value.value; ngDevMode && assertTIcu(tIcu); return tIcu; } /** * Store `TIcu` at a give `index`. * * The `TIcu` can be stored either directly (if it is nested ICU) OR * it is stored inside tho `TIcuContainer` if it is top level ICU. * * The reason for this is that the top level ICU need a `TNode` so that they are part of the render * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is * expressed (parent ICU may have selected a case which does not contain it.) * * @param tView Current `TView`. * @param index Index where the value should be stored at in `Tview.data` * @param tIcu The TIcu to store. */ function setTIcu(tView, index, tIcu) { const tNode = tView.data[index]; ngDevMode && assertEqual(tNode === null || tNode.hasOwnProperty('tViews'), true, 'We expect to get \'null\'|\'TIcuContainer\''); if (tNode === null) { tView.data[index] = tIcu; } else { ngDevMode && assertTNodeType(tNode, 32 /* Icu */); tNode.value = tIcu; } } /** * Set `TNode.insertBeforeIndex` taking the `Array` into account. * * See `TNode.insertBeforeIndex` */ function setTNodeInsertBeforeIndex(tNode, index) { ngDevMode && assertTNode(tNode); let insertBeforeIndex = tNode.insertBeforeIndex; if (insertBeforeIndex === null) { setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore); insertBeforeIndex = tNode.insertBeforeIndex = [null /* may be updated to number later */, index]; } else { assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here'); insertBeforeIndex.push(index); } } /** * Create `TNode.type=TNodeType.Placeholder` node. * * See `TNodeType.Placeholder` for more information. */ function createTNodePlaceholder(tView, previousTNodes, index) { const tNode = createTNodeAtIndex(tView, index, 64 /* Placeholder */, null, null); addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode); return tNode; } /** * Returns current ICU case. * * ICU cases are stored as index into the `TIcu.cases`. * At times it is necessary to communicate that the ICU case just switched and that next ICU update * should update all bindings regardless of the mask. In such a case the we store negative numbers * for cases which have just been switched. This function removes the negative flag. */ function getCurrentICUCaseIndex(tIcu, lView) { const currentCase = lView[tIcu.currentCaseLViewIndex]; return currentCase === null ? currentCase : (currentCase < 0 ? ~currentCase : currentCase); } function getParentFromIcuCreateOpCode(mergedCode) { return mergedCode >>> 17 /* SHIFT_PARENT */; } function getRefFromIcuCreateOpCode(mergedCode) { return (mergedCode & 131070 /* MASK_REF */) >>> 1 /* SHIFT_REF */; } function getInstructionFromIcuCreateOpCode(mergedCode) { return mergedCode & 1 /* MASK_INSTRUCTION */; } function icuCreateOpCode(opCode, parentIdx, refIdx) { ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index'); ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index'); return opCode | parentIdx << 17 /* SHIFT_PARENT */ | refIdx << 1 /* SHIFT_REF */; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Keep track of which input bindings in `ɵɵi18nExp` have changed. * * This is used to efficiently update expressions in i18n only when the corresponding input has * changed. * * 1) Each bit represents which of the `ɵɵi18nExp` has changed. * 2) There are 32 bits allowed in JS. * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare * so in practice it should not be an issue.) */ let changeMask = 0b0; /** * Keeps track of which bit needs to be updated in `changeMask` * * This value gets incremented on every call to `ɵɵi18nExp` */ let changeMaskCounter = 0; /** * Keep track of which input bindings in `ɵɵi18nExp` have changed. * * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`. * * @param hasChange did `ɵɵi18nExp` detect a change. */ function setMaskBit(hasChange) { if (hasChange) { changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31)); } changeMaskCounter++; } function applyI18n(tView, lView, index) { if (changeMaskCounter > 0) { ngDevMode && assertDefined(tView, `tView should be defined`); const tI18n = tView.data[index]; // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n` const updateOpCodes = Array.isArray(tI18n) ? tI18n : tI18n.update; const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1; applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask); } // Reset changeMask & maskBit to default for the next update cycle changeMask = 0b0; changeMaskCounter = 0; } /** * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`. * * Creates text (and comment) nodes which are internationalized. * * @param lView Current lView * @param createOpCodes Set of op-codes to apply * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is * a root node. * @param insertInFrontOf DOM node that should be used as an anchor. */ function applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) { const renderer = lView[RENDERER]; for (let i = 0; i < createOpCodes.length; i++) { const opCode = createOpCodes[i++]; const text = createOpCodes[i]; const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT; const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY; const index = opCode >>> I18nCreateOpCode.SHIFT; let rNode = lView[index]; if (rNode === null) { // We only create new DOM nodes if they don't already exist: If ICU switches case back to a // case which was already instantiated, no need to create new DOM nodes. rNode = lView[index] = isComment ? renderer.createComment(text) : createTextNode(renderer, text); } if (appendNow && parentRNode !== null) { nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false); } } } /** * Apply `I18nMutateOpCodes` OpCodes. * * @param tView Current `TView` * @param mutableOpCodes Mutable OpCodes to process * @param lView Current `LView` * @param anchorRNode place where the i18n node should be inserted. */ function applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) { ngDevMode && assertDomNode(anchorRNode); const renderer = lView[RENDERER]; // `rootIdx` represents the node into which all inserts happen. let rootIdx = null; // `rootRNode` represents the real node into which we insert. This can be different from // `lView[rootIdx]` if we have projection. // - null we don't have a parent (as can be the case in when we are inserting into a root of // LView which has no parent.) // - `RElement` The element representing the root after taking projection into account. let rootRNode; for (let i = 0; i < mutableOpCodes.length; i++) { const opCode = mutableOpCodes[i]; if (typeof opCode == 'string') { const textNodeIndex = mutableOpCodes[++i]; if (lView[textNodeIndex] === null) { ngDevMode && ngDevMode.rendererCreateTextNode++; ngDevMode && assertIndexInRange(lView, textNodeIndex); lView[textNodeIndex] = createTextNode(renderer, opCode); } } else if (typeof opCode == 'number') { switch (opCode & 1 /* MASK_INSTRUCTION */) { case 0 /* AppendChild */: const parentIdx = getParentFromIcuCreateOpCode(opCode); if (rootIdx === null) { // The first operation should save the `rootIdx` because the first operation // must insert into the root. (Only subsequent operations can insert into a dynamic // parent) rootIdx = parentIdx; rootRNode = nativeParentNode(renderer, anchorRNode); } let insertInFrontOf; let parentRNode; if (parentIdx === rootIdx) { insertInFrontOf = anchorRNode; parentRNode = rootRNode; } else { insertInFrontOf = null; parentRNode = unwrapRNode(lView[parentIdx]); } // FIXME(misko): Refactor with `processI18nText` if (parentRNode !== null) { // This can happen if the `LView` we are adding to is not attached to a parent `LView`. // In such a case there is no "root" we can attach to. This is fine, as we still need to // create the elements. When the `LView` gets later added to a parent these "root" nodes // get picked up and added. ngDevMode && assertDomNode(parentRNode); const refIdx = getRefFromIcuCreateOpCode(opCode); ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref'); // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n // which can't have components. const child = lView[refIdx]; ngDevMode && assertDomNode(child); nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false); const tIcu = getTIcu(tView, refIdx); if (tIcu !== null && typeof tIcu === 'object') { // If we just added a comment node which has ICU then that ICU may have already been // rendered and therefore we need to re-add it here. ngDevMode && assertTIcu(tIcu); const caseIndex = getCurrentICUCaseIndex(tIcu, lView); if (caseIndex !== null) { applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]); } } } break; case 1 /* Attr */: const elementNodeIndex = opCode >>> 1 /* SHIFT_REF */; const attrName = mutableOpCodes[++i]; const attrValue = mutableOpCodes[++i]; // This code is used for ICU expressions only, since we don't support // directives/components in ICUs, we don't need to worry about inputs here setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null); break; default: throw new Error(`Unable to determine the type of mutate operation for "${opCode}"`); } } else { switch (opCode) { case ICU_MARKER: const commentValue = mutableOpCodes[++i]; const commentNodeIndex = mutableOpCodes[++i]; if (lView[commentNodeIndex] === null) { ngDevMode && assertEqual(typeof commentValue, 'string', `Expected "${commentValue}" to be a comment node value`); ngDevMode && ngDevMode.rendererCreateComment++; ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex); const commentRNode = lView[commentNodeIndex] = createCommentNode(renderer, commentValue); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests) attachPatchData(commentRNode, lView); } break; case ELEMENT_MARKER: const tagName = mutableOpCodes[++i]; const elementNodeIndex = mutableOpCodes[++i]; if (lView[elementNodeIndex] === null) { ngDevMode && assertEqual(typeof tagName, 'string', `Expected "${tagName}" to be an element node tag name`); ngDevMode && ngDevMode.rendererCreateElement++; ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex); const elementRNode = lView[elementNodeIndex] = createElementNode(renderer, tagName, null); // FIXME(misko): Attaching patch data is only needed for the root (Also add tests) attachPatchData(elementRNode, lView); } break; default: ngDevMode && throwError(`Unable to determine the type of mutate operation for "${opCode}"`); } } } } /** * Apply `I18nUpdateOpCodes` OpCodes * * @param tView Current `TView` * @param lView Current `LView` * @param updateOpCodes OpCodes to process * @param bindingsStartIndex Location of the first `ɵɵi18nApply` * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from * `bindingsStartIndex`) */ function applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) { for (let i = 0; i < updateOpCodes.length; i++) { // bit code to check if we should apply the next update const checkBit = updateOpCodes[i]; // Number of opCodes to skip until next set of update codes const skipCodes = updateOpCodes[++i]; if (checkBit & changeMask) { // The value has been updated since last checked let value = ''; for (let j = i + 1; j <= (i + skipCodes); j++) { const opCode = updateOpCodes[j]; if (typeof opCode == 'string') { value += opCode; } else if (typeof opCode == 'number') { if (opCode < 0) { // Negative opCode represent `i18nExp` values offset. value += renderStringify(lView[bindingsStartIndex - opCode]); } else { const nodeIndex = (opCode >>> 2 /* SHIFT_REF */); switch (opCode & 3 /* MASK_OPCODE */) { case 1 /* Attr */: const propName = updateOpCodes[++j]; const sanitizeFn = updateOpCodes[++j]; const tNodeOrTagName = tView.data[nodeIndex]; ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string'); if (typeof tNodeOrTagName === 'string') { // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does // not have TNode), in which case we know that there are no directives, and hence // we use attribute setting. setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn); } else { elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false); } break; case 0 /* Text */: const rText = lView[nodeIndex]; rText !== null && updateTextNode(lView[RENDERER], rText, value); break; case 2 /* IcuSwitch */: applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value); break; case 3 /* IcuUpdate */: applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView); break; } } } } } else { const opCode = updateOpCodes[i + 1]; if (opCode > 0 && (opCode & 3 /* MASK_OPCODE */) === 3 /* IcuUpdate */) { // Special case for the `icuUpdateCase`. It could be that the mask did not match, but // we still need to execute `icuUpdateCase` because the case has changed recently due to // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in // pairs.) const nodeIndex = (opCode >>> 2 /* SHIFT_REF */); const tIcu = getTIcu(tView, nodeIndex); const currentIndex = lView[tIcu.currentCaseLViewIndex]; if (currentIndex < 0) { applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView); } } } i += skipCodes; } } /** * Apply OpCodes associated with updating an existing ICU. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param bindingsStartIndex Location of the first `ɵɵi18nApply` * @param lView Current `LView` */ function applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) { ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex); let activeCaseIndex = lView[tIcu.currentCaseLViewIndex]; if (activeCaseIndex !== null) { let mask = changeMask; if (activeCaseIndex < 0) { // Clear the flag. // Negative number means that the ICU was freshly created and we need to force the update. activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex; // -1 is same as all bits on, which simulates creation since it marks all bits dirty mask = -1; } applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask); } } /** * Apply OpCodes associated with switching a case on ICU. * * This involves tearing down existing case and than building up a new case. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param lView Current `LView` * @param value Value of the case to update to. */ function applyIcuSwitchCase(tView, tIcu, lView, value) { // Rebuild a new case for this ICU const caseIndex = getCaseIndex(tIcu, value); let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView); if (activeCaseIndex !== caseIndex) { applyIcuSwitchCaseRemove(tView, tIcu, lView); lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex; if (caseIndex !== null) { // Add the nodes for the new case const anchorRNode = lView[tIcu.anchorIdx]; if (anchorRNode) { ngDevMode && assertDomNode(anchorRNode); applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode); } } } } /** * Apply OpCodes associated with tearing ICU case. * * This involves tearing down existing case and than building up a new case. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param lView Current `LView` */ function applyIcuSwitchCaseRemove(tView, tIcu, lView) { let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView); if (activeCaseIndex !== null) { const removeCodes = tIcu.remove[activeCaseIndex]; for (let i = 0; i < removeCodes.length; i++) { const nodeOrIcuIndex = removeCodes[i]; if (nodeOrIcuIndex > 0) { // Positive numbers are `RNode`s. const rNode = getNativeByIndex(nodeOrIcuIndex, lView); rNode !== null && nativeRemoveNode(lView[RENDERER], rNode); } else { // Negative numbers are ICUs applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView); } } } } /** * Returns the index of the current case of an ICU expression depending on the main binding value * * @param icuExpression * @param bindingValue The value of the main binding used by this ICU expression */ function getCaseIndex(icuExpression, bindingValue) { let index = icuExpression.cases.indexOf(bindingValue); if (index === -1) { switch (icuExpression.type) { case 1 /* plural */: { const resolvedCase = getPluralCase(bindingValue, getLocaleId()); index = icuExpression.cases.indexOf(resolvedCase); if (index === -1 && resolvedCase !== 'other') { index = icuExpression.cases.indexOf('other'); } break; } case 0 /* select */: { index = icuExpression.cases.indexOf('other'); break; } } } return index === -1 ? null : index; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function loadIcuContainerVisitor() { const _stack = []; let _index = -1; let _lView; let _removes; /** * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer` * to determine which root belong to the ICU. * * Example of usage. * ``` * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView); * let rNode: RNode|null; * while(rNode = nextRNode()) { * console.log(rNode); * } * ``` * * @param tIcuContainerNode Current `TIcuContainerNode` * @param lView `LView` where the `RNode`s should be looked up. */ function icuContainerIteratorStart(tIcuContainerNode, lView) { _lView = lView; while (_stack.length) _stack.pop(); ngDevMode && assertTNodeForLView(tIcuContainerNode, lView); enterIcu(tIcuContainerNode.value, lView); return icuContainerIteratorNext; } function enterIcu(tIcu, lView) { _index = 0; const currentCase = getCurrentICUCaseIndex(tIcu, lView); if (currentCase !== null) { ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1); _removes = tIcu.remove[currentCase]; } else { _removes = EMPTY_ARRAY$1; } } function icuContainerIteratorNext() { if (_index < _removes.length) { const removeOpCode = _removes[_index++]; ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number'); if (removeOpCode > 0) { const rNode = _lView[removeOpCode]; ngDevMode && assertDomNode(rNode); return rNode; } else { _stack.push(_index, _removes); // ICUs are represented by negative indices const tIcuIndex = ~removeOpCode; const tIcu = _lView[TVIEW].data[tIcuIndex]; ngDevMode && assertTIcu(tIcu); enterIcu(tIcu, _lView); return icuContainerIteratorNext(); } } else { if (_stack.length === 0) { return null; } else { _removes = _stack.pop(); _index = _stack.pop(); return icuContainerIteratorNext(); } } } return icuContainerIteratorStart; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Converts `I18nCreateOpCodes` array into a human readable format. * * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled. * This function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nCreateOpCodes` if attached as a method. * @param opcodes `I18nCreateOpCodes` if invoked as a function. */ function i18nCreateOpCodesToString(opcodes) { const createOpCodes = opcodes || (Array.isArray(this) ? this : []); let lines = []; for (let i = 0; i < createOpCodes.length; i++) { const opCode = createOpCodes[i++]; const text = createOpCodes[i]; const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT; const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY; const index = opCode >>> I18nCreateOpCode.SHIFT; lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${JSON.stringify(text)});`); if (appendNow) { lines.push(`parent.appendChild(lView[${index}]);`); } } return lines; } /** * Converts `I18nUpdateOpCodes` array into a human readable format. * * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled. * This function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nUpdateOpCodes` if attached as a method. * @param opcodes `I18nUpdateOpCodes` if invoked as a function. */ function i18nUpdateOpCodesToString(opcodes) { const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : [])); let lines = []; function consumeOpCode(value) { const ref = value >>> 2 /* SHIFT_REF */; const opCode = value & 3 /* MASK_OPCODE */; switch (opCode) { case 0 /* Text */: return `(lView[${ref}] as Text).textContent = $$$`; case 1 /* Attr */: const attrName = parser.consumeString(); const sanitizationFn = parser.consumeFunction(); const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$'; return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`; case 2 /* IcuSwitch */: return `icuSwitchCase(${ref}, $$$)`; case 3 /* IcuUpdate */: return `icuUpdateCase(${ref})`; } throw new Error('unexpected OpCode'); } while (parser.hasMore()) { let mask = parser.consumeNumber(); let size = parser.consumeNumber(); const end = parser.i + size; const statements = []; let statement = ''; while (parser.i < end) { let value = parser.consumeNumberOrString(); if (typeof value === 'string') { statement += value; } else if (value < 0) { // Negative numbers are ref indexes // Here `i` refers to current binding index. It is to signify that the value is relative, // rather than absolute. statement += '${lView[i' + value + ']}'; } else { // Positive numbers are operations. const opCodeText = consumeOpCode(value); statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';'); statement = ''; } } lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`); } return lines; } /** * Converts `I18nCreateOpCodes` array into a human readable format. * * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This * function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nCreateOpCodes` if attached as a method. * @param opcodes `I18nCreateOpCodes` if invoked as a function. */ function icuCreateOpCodesToString(opcodes) { const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : [])); let lines = []; function consumeOpCode(opCode) { const parent = getParentFromIcuCreateOpCode(opCode); const ref = getRefFromIcuCreateOpCode(opCode); switch (getInstructionFromIcuCreateOpCode(opCode)) { case 0 /* AppendChild */: return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`; case 1 /* Attr */: return `(lView[${ref}] as Element).setAttribute("${parser.consumeString()}", "${parser.consumeString()}")`; } throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode)); } let lastRef = -1; while (parser.hasMore()) { let value = parser.consumeNumberStringOrMarker(); if (value === ICU_MARKER) { const text = parser.consumeString(); lastRef = parser.consumeNumber(); lines.push(`lView[${lastRef}] = document.createComment("${text}")`); } else if (value === ELEMENT_MARKER) { const text = parser.consumeString(); lastRef = parser.consumeNumber(); lines.push(`lView[${lastRef}] = document.createElement("${text}")`); } else if (typeof value === 'string') { lastRef = parser.consumeNumber(); lines.push(`lView[${lastRef}] = document.createTextNode("${value}")`); } else if (typeof value === 'number') { const line = consumeOpCode(value); line && lines.push(line); } else { throw new Error('Unexpected value'); } } return lines; } /** * Converts `I18nRemoveOpCodes` array into a human readable format. * * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This * function provides a human readable view of the opcodes. This is useful when debugging the * application as well as writing more readable tests. * * @param this `I18nRemoveOpCodes` if attached as a method. * @param opcodes `I18nRemoveOpCodes` if invoked as a function. */ function i18nRemoveOpCodesToString(opcodes) { const removeCodes = opcodes || (Array.isArray(this) ? this : []); let lines = []; for (let i = 0; i < removeCodes.length; i++) { const nodeOrIcuIndex = removeCodes[i]; if (nodeOrIcuIndex > 0) { // Positive numbers are `RNode`s. lines.push(`remove(lView[${nodeOrIcuIndex}])`); } else { // Negative numbers are ICUs lines.push(`removeNestedICU(${~nodeOrIcuIndex})`); } } return lines; } class OpCodeParser { constructor(codes) { this.i = 0; this.codes = codes; } hasMore() { return this.i < this.codes.length; } consumeNumber() { let value = this.codes[this.i++]; assertNumber(value, 'expecting number in OpCode'); return value; } consumeString() { let value = this.codes[this.i++]; assertString(value, 'expecting string in OpCode'); return value; } consumeFunction() { let value = this.codes[this.i++]; if (value === null || typeof value === 'function') { return value; } throw new Error('expecting function in OpCode'); } consumeNumberOrString() { let value = this.codes[this.i++]; if (typeof value === 'string') { return value; } assertNumber(value, 'expecting number or string in OpCode'); return value; } consumeNumberStringOrMarker() { let value = this.codes[this.i++]; if (typeof value === 'string' || typeof value === 'number' || value == ICU_MARKER || value == ELEMENT_MARKER) { return value; } assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode'); return value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const BINDING_REGEXP = /�(\d+):?\d*�/gi; const ICU_REGEXP = /({\s*�\d+:?\d*�\s*,\s*\S{6}\s*,[\s\S]*})/gi; const NESTED_ICU = /�(\d+)�/; const ICU_BLOCK_REGEXP = /^\s*(�\d+:?\d*�)\s*,\s*(select|plural)\s*,/; const MARKER = `�`; const SUBTEMPLATE_REGEXP = /�\/?\*(\d+:\d+)�/gi; const PH_REGEXP = /�(\/?[#*]\d+):?\d*�/gi; /** * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see: * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32 * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character * and later on replaced by a space. We are re-implementing the same idea here, since translations * might contain this special character. */ const NGSP_UNICODE_REGEXP = /\uE500/g; function replaceNgsp(value) { return value.replace(NGSP_UNICODE_REGEXP, ' '); } /** * Create dynamic nodes from i18n translation block. * * - Text nodes are created synchronously * - TNodes are linked into tree lazily * * @param tView Current `TView` * @parentTNodeIndex index to the parent TNode of this i18n block * @param lView Current `LView` * @param index Index of `ɵɵi18nStart` instruction. * @param message Message to translate. * @param subTemplateIndex Index into the sub template of message translation. (ie in case of * `ngIf`) (-1 otherwise) */ function i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) { const rootTNode = getCurrentParentTNode(); const createOpCodes = []; const updateOpCodes = []; const existingTNodeStack = [[]]; if (ngDevMode) { attachDebugGetter(createOpCodes, i18nCreateOpCodesToString); attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString); } message = getTranslationForTemplate(message, subTemplateIndex); const msgParts = replaceNgsp(message).split(PH_REGEXP); for (let i = 0; i < msgParts.length; i++) { let value = msgParts[i]; if ((i & 1) === 0) { // Even indexes are text (including bindings & ICU expressions) const parts = i18nParseTextIntoPartsAndICU(value); for (let j = 0; j < parts.length; j++) { let part = parts[j]; if ((j & 1) === 0) { // `j` is odd therefore `part` is string const text = part; ngDevMode && assertString(text, 'Parsed ICU part should be string'); if (text !== '') { i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text); } } else { // `j` is Even therefor `part` is an `ICUExpression` const icuExpression = part; // Verify that ICU expression has the right shape. Translations might contain invalid // constructions (while original messages were correct), so ICU parsing at runtime may // not succeed (thus `icuExpression` remains a string). // Note: we intentionally retain the error here by not using `ngDevMode`, because // the value can change based on the locale and users aren't guaranteed to hit // an invalid string while they're developing. if (typeof icuExpression !== 'object') { throw new Error(`Unable to parse ICU expression in "${message}" message.`); } const icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true); const icuNodeIndex = icuContainerTNode.index; ngDevMode && assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset'); icuStart(tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex); } } } else { // Odd indexes are placeholders (elements and sub-templates) // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�') const isClosing = value.charCodeAt(0) === 47 /* SLASH */; const type = value.charCodeAt(isClosing ? 1 : 0); ngDevMode && assertOneOf(type, 42 /* STAR */, 35 /* HASH */); const index = HEADER_OFFSET + Number.parseInt(value.substring((isClosing ? 2 : 1))); if (isClosing) { existingTNodeStack.shift(); setCurrentTNode(getCurrentParentTNode(), false); } else { const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index); existingTNodeStack.unshift([]); setCurrentTNode(tNode, true); } } } tView.data[index] = { create: createOpCodes, update: updateOpCodes, }; } /** * Allocate space in i18n Range add create OpCode instruction to crete a text or comment node. * * @param tView Current `TView` needed to allocate space in i18n range. * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be * added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`. * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`. * @param lView Current `LView` needed to allocate space in i18n range. * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added. * @param text Text to be added when the `Text` or `Comment` node will be created. * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created. */ function createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) { const i18nNodeIdx = allocExpando(tView, lView, 1, null); let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT; let parentTNode = getCurrentParentTNode(); if (rootTNode === parentTNode) { // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary. // (there is no parent), but in some circumstances (because we are inconsistent about how we set // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around. parentTNode = null; } if (parentTNode === null) { // If we don't have a parent that means that we can eagerly add nodes. // If we have a parent than these nodes can't be added now (as the parent has not been created // yet) and instead the `parentTNode` is responsible for adding it. See // `TNode.insertBeforeIndex` opCode |= I18nCreateOpCode.APPEND_EAGERLY; } if (isICU) { opCode |= I18nCreateOpCode.COMMENT; ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor); } createOpCodes.push(opCode, text === null ? '' : text); // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the // bindings are. const tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 /* Icu */ : 1 /* Text */, text === null ? (ngDevMode ? '{{?}}' : '') : text, null); addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode); const tNodeIdx = tNode.index; setCurrentTNode(tNode, false /* Text nodes are self closing */); if (parentTNode !== null && rootTNode !== parentTNode) { // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.) // We have to make sure to add ourselves to the parent. setTNodeInsertBeforeIndex(parentTNode, tNodeIdx); } return tNode; } /** * Processes text node in i18n block. * * Text nodes can have: * - Create instruction in `createOpCodes` for creating the text node. * - Allocate spec for text node in i18n range of `LView` * - If contains binding: * - bindings => allocate space in i18n range of `LView` to store the binding value. * - populate `updateOpCodes` with update instructions. * * @param tView Current `TView` * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will * be added as part of the `i18nStart` instruction or as part of the * `TNode.insertBeforeIndex`. * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`. * @param createOpCodes Location where the creation OpCodes will be stored. * @param lView Current `LView` * @param text The translated text (which may contain binding) */ function i18nStartFirstCreatePassProcessTextNode(tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) { const hasBinding = text.match(BINDING_REGEXP); const tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false); if (hasBinding) { generateBindingUpdateOpCodes(updateOpCodes, text, tNode.index); } } /** * See `i18nAttributes` above. */ function i18nAttributesFirstPass(tView, index, values) { const previousElement = getCurrentTNode(); const previousElementIndex = previousElement.index; const updateOpCodes = []; if (ngDevMode) { attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString); } if (tView.firstCreatePass && tView.data[index] === null) { for (let i = 0; i < values.length; i += 2) { const attrName = values[i]; const message = values[i + 1]; if (message !== '') { // Check if attribute value contains an ICU and throw an error if that's the case. // ICUs in element attributes are not supported. // Note: we intentionally retain the error here by not using `ngDevMode`, because // the `value` can change based on the locale and users aren't guaranteed to hit // an invalid string while they're developing. if (ICU_REGEXP.test(message)) { throw new Error(`ICU expressions are not supported in attributes. Message: "${message}".`); } // i18n attributes that hit this code path are guaranteed to have bindings, because // the compiler treats static i18n attributes as regular attribute bindings. generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName); } } tView.data[index] = updateOpCodes; } } /** * Generate the OpCodes to update the bindings of a string. * * @param updateOpCodes Place where the update opcodes will be stored. * @param str The string containing the bindings. * @param destinationNode Index of the destination node which will receive the binding. * @param attrName Name of the attribute, if the string belongs to an attribute. * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary. */ function generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, sanitizeFn = null) { ngDevMode && assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset'); const maskIndex = updateOpCodes.length; // Location of mask const sizeIndex = maskIndex + 1; // location of size for skipping updateOpCodes.push(null, null); // Alloc space for mask and size const startIndex = maskIndex + 2; // location of first allocation. if (ngDevMode) { attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString); } const textParts = str.split(BINDING_REGEXP); let mask = 0; for (let j = 0; j < textParts.length; j++) { const textValue = textParts[j]; if (j & 1) { // Odd indexes are bindings const bindingIndex = parseInt(textValue, 10); updateOpCodes.push(-1 - bindingIndex); mask = mask | toMaskBit(bindingIndex); } else if (textValue !== '') { // Even indexes are text updateOpCodes.push(textValue); } } updateOpCodes.push(destinationNode << 2 /* SHIFT_REF */ | (attrName ? 1 /* Attr */ : 0 /* Text */)); if (attrName) { updateOpCodes.push(attrName, sanitizeFn); } updateOpCodes[maskIndex] = mask; updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex; return mask; } /** * Convert binding index to mask bit. * * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner * case is that we will execute binding code more often than necessary. (penalty of performance) */ function toMaskBit(bindingIndex) { return 1 << Math.min(bindingIndex, 31); } function isRootTemplateMessage(subTemplateIndex) { return subTemplateIndex === -1; } /** * Removes everything inside the sub-templates of a message. */ function removeInnerTemplateTranslation(message) { let match; let res = ''; let index = 0; let inTemplate = false; let tagMatched; while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) { if (!inTemplate) { res += message.substring(index, match.index + match[0].length); tagMatched = match[1]; inTemplate = true; } else { if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) { index = match.index; inTemplate = false; } } } ngDevMode && assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation "${message}"`); res += message.substr(index); return res; } /** * Extracts a part of a message and removes the rest. * * This method is used for extracting a part of the message associated with a template. A * translated message can span multiple templates. * * Example: * ``` * <div i18n>Translate <span *ngIf>me</span>!</div> * ``` * * @param message The message to crop * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the * external template and removes all sub-templates. */ function getTranslationForTemplate(message, subTemplateIndex) { if (isRootTemplateMessage(subTemplateIndex)) { // We want the root template message, ignore all sub-templates return removeInnerTemplateTranslation(message); } else { // We want a specific sub-template const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length; const end = message.search(new RegExp(`${MARKER}\\/\\*\\d+:${subTemplateIndex}${MARKER}`)); return removeInnerTemplateTranslation(message.substring(start, end)); } } /** * Generate the OpCodes for ICU expressions. * * @param icuExpression * @param index Index where the anchor is stored and an optional `TIcuContainerNode` * - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU. * - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise) */ function icuStart(tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) { ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined'); let bindingMask = 0; const tIcu = { type: icuExpression.type, currentCaseLViewIndex: allocExpando(tView, lView, 1, null), anchorIdx, cases: [], create: [], remove: [], update: [] }; addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx); setTIcu(tView, anchorIdx, tIcu); const values = icuExpression.values; for (let i = 0; i < values.length; i++) { // Each value is an array of strings & other ICU expressions const valueArr = values[i]; const nestedIcus = []; for (let j = 0; j < valueArr.length; j++) { const value = valueArr[j]; if (typeof value !== 'string') { // It is an nested ICU expression const icuIndex = nestedIcus.push(value) - 1; // Replace nested ICU expression by a comment node valueArr[j] = `<!--�${icuIndex}�-->`; } } bindingMask = parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) | bindingMask; } if (bindingMask) { addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx); } } /** * Parses text containing an ICU expression and produces a JSON object for it. * Original code from closure library, modified for Angular. * * @param pattern Text containing an ICU expression that needs to be parsed. * */ function parseICUBlock(pattern) { const cases = []; const values = []; let icuType = 1 /* plural */; let mainBinding = 0; pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) { if (type === 'select') { icuType = 0 /* select */; } else { icuType = 1 /* plural */; } mainBinding = parseInt(binding.substr(1), 10); return ''; }); const parts = i18nParseTextIntoPartsAndICU(pattern); // Looking for (key block)+ sequence. One of the keys has to be "other". for (let pos = 0; pos < parts.length;) { let key = parts[pos++].trim(); if (icuType === 1 /* plural */) { // Key can be "=x", we just want "x" key = key.replace(/\s*(?:=)?(\w+)\s*/, '$1'); } if (key.length) { cases.push(key); } const blocks = i18nParseTextIntoPartsAndICU(parts[pos++]); if (cases.length > values.length) { values.push(blocks); } } // TODO(ocombe): support ICU expressions in attributes, see #21615 return { type: icuType, mainBinding: mainBinding, cases, values }; } /** * Breaks pattern into strings and top level {...} blocks. * Can be used to break a message into text and ICU expressions, or to break an ICU expression * into keys and cases. Original code from closure library, modified for Angular. * * @param pattern (sub)Pattern to be broken. * @returns An `Array<string|IcuExpression>` where: * - odd positions: `string` => text between ICU expressions * - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record. */ function i18nParseTextIntoPartsAndICU(pattern) { if (!pattern) { return []; } let prevPos = 0; const braceStack = []; const results = []; const braces = /[{}]/g; // lastIndex doesn't get set to 0 so we have to. braces.lastIndex = 0; let match; while (match = braces.exec(pattern)) { const pos = match.index; if (match[0] == '}') { braceStack.pop(); if (braceStack.length == 0) { // End of the block. const block = pattern.substring(prevPos, pos); if (ICU_BLOCK_REGEXP.test(block)) { results.push(parseICUBlock(block)); } else { results.push(block); } prevPos = pos + 1; } } else { if (braceStack.length == 0) { const substring = pattern.substring(prevPos, pos); results.push(substring); prevPos = pos + 1; } braceStack.push('{'); } } const substring = pattern.substring(prevPos); results.push(substring); return results; } /** * Parses a node, its children and its siblings, and generates the mutate & update OpCodes. * */ function parseIcuCase(tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) { const create = []; const remove = []; const update = []; if (ngDevMode) { attachDebugGetter(create, icuCreateOpCodesToString); attachDebugGetter(remove, i18nRemoveOpCodesToString); attachDebugGetter(update, i18nUpdateOpCodesToString); } tIcu.cases.push(caseName); tIcu.create.push(create); tIcu.remove.push(remove); tIcu.update.push(update); const inertBodyHelper = getInertBodyHelper(getDocument()); const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml); ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element'); const inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement; if (inertRootNode) { return walkIcuTree(tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0); } else { return 0; } } function walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) { let bindingMask = 0; let currentNode = parentNode.firstChild; while (currentNode) { const newIndex = allocExpando(tView, lView, 1, null); switch (currentNode.nodeType) { case Node.ELEMENT_NODE: const element = currentNode; const tagName = element.tagName.toLowerCase(); if (VALID_ELEMENTS.hasOwnProperty(tagName)) { addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex); tView.data[newIndex] = tagName; const elAttrs = element.attributes; for (let i = 0; i < elAttrs.length; i++) { const attr = elAttrs.item(i); const lowerAttrName = attr.name.toLowerCase(); const hasBinding = !!attr.value.match(BINDING_REGEXP); // we assume the input string is safe, unless it's using a binding if (hasBinding) { if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) { if (URI_ATTRS[lowerAttrName]) { generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, _sanitizeUrl); } else if (SRCSET_ATTRS[lowerAttrName]) { generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, sanitizeSrcset); } else { generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name); } } else { ngDevMode && console.warn(`WARNING: ignoring unsafe attribute value ` + `${lowerAttrName} on element ${tagName} ` + `(see https://g.co/ng/security#xss)`); } } else { addCreateAttribute(create, newIndex, attr); } } // Parse the children of this node (if any) bindingMask = walkIcuTree(tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) | bindingMask; addRemoveNode(remove, newIndex, depth); } break; case Node.TEXT_NODE: const value = currentNode.textContent || ''; const hasBinding = value.match(BINDING_REGEXP); addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex); addRemoveNode(remove, newIndex, depth); if (hasBinding) { bindingMask = generateBindingUpdateOpCodes(update, value, newIndex) | bindingMask; } break; case Node.COMMENT_NODE: // Check if the comment node is a placeholder for a nested ICU const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || ''); if (isNestedIcu) { const nestedIcuIndex = parseInt(isNestedIcu[1], 10); const icuExpression = nestedIcus[nestedIcuIndex]; // Create the comment node that will anchor the ICU expression addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx, newIndex); icuStart(tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex); addRemoveNestedIcu(remove, newIndex, depth); } break; } currentNode = currentNode.nextSibling; } return bindingMask; } function addRemoveNode(remove, index, depth) { if (depth === 0) { remove.push(index); } } function addRemoveNestedIcu(remove, index, depth) { if (depth === 0) { remove.push(~index); // remove ICU at `index` remove.push(index); // remove ICU comment at `index` } } function addUpdateIcuSwitch(update, icuExpression, index) { update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, index << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */); } function addUpdateIcuUpdate(update, bindingMask, index) { update.push(bindingMask, 1, index << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */); } function addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) { if (marker !== null) { create.push(marker); } create.push(text, createAtIdx, icuCreateOpCode(0 /* AppendChild */, appendToParentIdx, createAtIdx)); } function addCreateAttribute(create, newIndex, attr) { create.push(newIndex << 1 /* SHIFT_REF */ | 1 /* Attr */, attr.name, attr.value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // i18nPostprocess consts const ROOT_TEMPLATE_ID = 0; const PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]/; const PP_PLACEHOLDERS_REGEXP = /\[(�.+?�?)\]|(�\/?\*\d+:\d+�)/g; const PP_ICU_VARS_REGEXP = /({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g; const PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g; const PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\d+)?)�/g; const PP_CLOSE_TEMPLATE_REGEXP = /\/\*/; const PP_TEMPLATE_ID_REGEXP = /\d+\:(\d+)/; /** * Handles message string post-processing for internationalization. * * Handles message string post-processing by transforming it from intermediate * format (that might contain some markers that we need to replace) to the final * form, consumable by i18nStart instruction. Post processing steps include: * * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�]) * 2. Replace all ICU vars (like "VAR_PLURAL") * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER} * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) * in case multiple ICUs have the same placeholder name * * @param message Raw translation string for post processing * @param replacements Set of replacements that should be applied * * @returns Transformed string that can be consumed by i18nStart instruction * * @codeGenApi */ function i18nPostprocess(message, replacements = {}) { /** * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�] * * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in * front of �#6�. The post processing step restores the right order by keeping track of the * template id stack and looks for placeholders that belong to the currently active template. */ let result = message; if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) { const matches = {}; const templateIdsStack = [ROOT_TEMPLATE_ID]; result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => { const content = phs || tmpl; const placeholders = matches[content] || []; if (!placeholders.length) { content.split('|').forEach((placeholder) => { const match = placeholder.match(PP_TEMPLATE_ID_REGEXP); const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID; const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder); placeholders.push([templateId, isCloseTemplateTag, placeholder]); }); matches[content] = placeholders; } if (!placeholders.length) { throw new Error(`i18n postprocess: unmatched placeholder - ${content}`); } const currentTemplateId = templateIdsStack[templateIdsStack.length - 1]; let idx = 0; // find placeholder index that matches current template id for (let i = 0; i < placeholders.length; i++) { if (placeholders[i][0] === currentTemplateId) { idx = i; break; } } // update template id stack based on the current tag extracted const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx]; if (isCloseTemplateTag) { templateIdsStack.pop(); } else if (currentTemplateId !== templateId) { templateIdsStack.push(templateId); } // remove processed tag from the list placeholders.splice(idx, 1); return placeholder; }); } // return current result if no replacements specified if (!Object.keys(replacements).length) { return result; } /** * Step 2: replace all ICU vars (like "VAR_PLURAL") */ result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end) => { return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match; }); /** * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER} */ result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key) => { return replacements.hasOwnProperty(key) ? replacements[key] : match; }); /** * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case * multiple ICUs have the same placeholder name */ result = result.replace(PP_ICUS_REGEXP, (match, key) => { if (replacements.hasOwnProperty(key)) { const list = replacements[key]; if (!list.length) { throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`); } return list.shift(); } return match; }); return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Marks a block of text as translatable. * * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template. * The translation `message` is the value which is locale specific. The translation string may * contain placeholders which associate inner elements and sub-templates within the translation. * * The translation `message` placeholders are: * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be * interpolated into. The placeholder `index` points to the expression binding index. An optional * `block` that matches the sub-template in which it was declared. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning * and end of DOM element that were embedded in the original translation block. The placeholder * `index` points to the element index in the template instructions set. An optional `block` that * matches the sub-template in which it was declared. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be * split up and translated separately in each angular template function. The `index` points to the * `template` instruction index. A `block` that matches the sub-template in which it was declared. * * @param index A unique index of the translation in the static block. * @param messageIndex An index of the translation message from the `def.consts` array. * @param subTemplateIndex Optional sub-template index in the `message`. * * @codeGenApi */ function ɵɵi18nStart(index, messageIndex, subTemplateIndex = -1) { const tView = getTView(); const lView = getLView(); const adjustedIndex = HEADER_OFFSET + index; ngDevMode && assertDefined(tView, `tView should be defined`); const message = getConstant(tView.consts, messageIndex); const parentTNode = getCurrentParentTNode(); if (tView.firstCreatePass) { i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex); } const tI18n = tView.data[adjustedIndex]; const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode; const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView); // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`. // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`. const insertInFrontOf = parentTNode && (parentTNode.type & 8 /* ElementContainer */) ? lView[parentTNode.index] : null; applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf); setInI18nBlock(true); } /** * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes * into the render tree, moves the placeholder nodes and removes the deleted nodes. * * @codeGenApi */ function ɵɵi18nEnd() { setInI18nBlock(false); } /** * * Use this instruction to create a translation block that doesn't contain any placeholder. * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction. * * The translation `message` is the value which is locale specific. The translation string may * contain placeholders which associate inner elements and sub-templates within the translation. * * The translation `message` placeholders are: * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be * interpolated into. The placeholder `index` points to the expression binding index. An optional * `block` that matches the sub-template in which it was declared. * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning * and end of DOM element that were embedded in the original translation block. The placeholder * `index` points to the element index in the template instructions set. An optional `block` that * matches the sub-template in which it was declared. * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be * split up and translated separately in each angular template function. The `index` points to the * `template` instruction index. A `block` that matches the sub-template in which it was declared. * * @param index A unique index of the translation in the static block. * @param messageIndex An index of the translation message from the `def.consts` array. * @param subTemplateIndex Optional sub-template index in the `message`. * * @codeGenApi */ function ɵɵi18n(index, messageIndex, subTemplateIndex) { ɵɵi18nStart(index, messageIndex, subTemplateIndex); ɵɵi18nEnd(); } /** * Marks a list of attributes as translatable. * * @param index A unique index in the static block * @param values * * @codeGenApi */ function ɵɵi18nAttributes(index, attrsIndex) { const tView = getTView(); ngDevMode && assertDefined(tView, `tView should be defined`); const attrs = getConstant(tView.consts, attrsIndex); i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs); } /** * Stores the values of the bindings during each update cycle in order to determine if we need to * update the translated nodes. * * @param value The binding's value * @returns This function returns itself so that it may be chained * (e.g. `i18nExp(ctx.name)(ctx.title)`) * * @codeGenApi */ function ɵɵi18nExp(value) { const lView = getLView(); setMaskBit(bindingUpdated(lView, nextBindingIndex(), value)); return ɵɵi18nExp; } /** * Updates a translation block or an i18n attribute when the bindings have changed. * * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes} * (i18n attribute) on which it should update the content. * * @codeGenApi */ function ɵɵi18nApply(index) { applyI18n(getTView(), getLView(), index + HEADER_OFFSET); } /** * Handles message string post-processing for internationalization. * * Handles message string post-processing by transforming it from intermediate * format (that might contain some markers that we need to replace) to the final * form, consumable by i18nStart instruction. Post processing steps include: * * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�]) * 2. Replace all ICU vars (like "VAR_PLURAL") * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER} * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) * in case multiple ICUs have the same placeholder name * * @param message Raw translation string for post processing * @param replacements Set of replacements that should be applied * * @returns Transformed string that can be consumed by i18nStart instruction * * @codeGenApi */ function ɵɵi18nPostprocess(message, replacements = {}) { return i18nPostprocess(message, replacements); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Resolves the providers which are defined in the DirectiveDef. * * When inserting the tokens and the factories in their respective arrays, we can assume that * this method is called first for the component (if any), and then for other directives on the same * node. * As a consequence,the providers are always processed in that order: * 1) The view providers of the component * 2) The providers of the component * 3) The providers of the other directives * This matches the structure of the injectables arrays of a view (for each node). * So the tokens and the factories can be pushed at the end of the arrays, except * in one case for multi providers. * * @param def the directive definition * @param providers: Array of `providers`. * @param viewProviders: Array of `viewProviders`. */ function providersResolver(def, providers, viewProviders) { const tView = getTView(); if (tView.firstCreatePass) { const isComponent = isComponentDef(def); // The list of view providers is processed first, and the flags are updated resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true); // Then, the list of providers is processed, and the flags are updated resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false); } } /** * Resolves a provider and publishes it to the DI system. */ function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) { provider = resolveForwardRef(provider); if (Array.isArray(provider)) { // Recursively call `resolveProvider` // Recursion is OK in this case because this code will not be in hot-path once we implement // cloning of the initial state. for (let i = 0; i < provider.length; i++) { resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider); } } else { const tView = getTView(); const lView = getLView(); let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide); let providerFactory = providerToFactory(provider); const tNode = getCurrentTNode(); const beginIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */; const endIndex = tNode.directiveStart; const cptViewProvidersCount = tNode.providerIndexes >> 20 /* CptViewProvidersCountShift */; if (isTypeProvider(provider) || !provider.multi) { // Single provider case: the factory is created and pushed immediately const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject); const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex); if (existingFactoryIndex === -1) { diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token); registerDestroyHooksIfSupported(tView, provider, tInjectables.length); tInjectables.push(token); tNode.directiveStart++; tNode.directiveEnd++; if (isViewProvider) { tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */; } lInjectablesBlueprint.push(factory); lView.push(factory); } else { lInjectablesBlueprint[existingFactoryIndex] = factory; lView[existingFactoryIndex] = factory; } } else { // Multi provider case: // We create a multi factory which is going to aggregate all the values. // Since the output of such a factory depends on content or view injection, // we create two of them, which are linked together. // // The first one (for view providers) is always in the first block of the injectables array, // and the second one (for providers) is always in the second block. // This is important because view providers have higher priority. When a multi token // is being looked up, the view providers should be found first. // Note that it is not possible to have a multi factory in the third block (directive block). // // The algorithm to process multi providers is as follows: // 1) If the multi provider comes from the `viewProviders` of the component: // a) If the special view providers factory doesn't exist, it is created and pushed. // b) Else, the multi provider is added to the existing multi factory. // 2) If the multi provider comes from the `providers` of the component or of another // directive: // a) If the multi factory doesn't exist, it is created and provider pushed into it. // It is also linked to the multi factory for view providers, if it exists. // b) Else, the multi provider is added to the existing multi factory. const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex); const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount); const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex]; const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex]; if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) { // Cases 1.a and 2.a diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token); const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory); if (!isViewProvider && doesViewProvidersFactoryExist) { lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory; } registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0); tInjectables.push(token); tNode.directiveStart++; tNode.directiveEnd++; if (isViewProvider) { tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */; } lInjectablesBlueprint.push(factory); lView.push(factory); } else { // Cases 1.b and 2.b const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent); registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory); } if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) { lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++; } } } } /** * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks. * @param tView `TView` in which to register the hook. * @param provider Provider whose hook should be registered. * @param contextIndex Index under which to find the context for the hook when it's being invoked. * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi * provider factory. */ function registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) { const providerIsTypeProvider = isTypeProvider(provider); if (providerIsTypeProvider || isClassProvider(provider)) { const prototype = (provider.useClass || provider).prototype; const ngOnDestroy = prototype.ngOnDestroy; if (ngOnDestroy) { const hooks = tView.destroyHooks || (tView.destroyHooks = []); if (!providerIsTypeProvider && provider.multi) { ngDevMode && assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook'); const existingCallbacksIndex = hooks.indexOf(contextIndex); if (existingCallbacksIndex === -1) { hooks.push(contextIndex, [indexInFactory, ngOnDestroy]); } else { hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy); } } else { hooks.push(contextIndex, ngOnDestroy); } } } } /** * Add a factory in a multi factory. * @returns Index at which the factory was inserted. */ function multiFactoryAdd(multiFactory, factory, isComponentProvider) { if (isComponentProvider) { multiFactory.componentProviders++; } return multiFactory.multi.push(factory) - 1; } /** * Returns the index of item in the array, but only in the begin to end range. */ function indexOf(item, arr, begin, end) { for (let i = begin; i < end; i++) { if (arr[i] === item) return i; } return -1; } /** * Use this with `multi` `providers`. */ function multiProvidersFactoryResolver(_, tData, lData, tNode) { return multiResolve(this.multi, []); } /** * Use this with `multi` `viewProviders`. * * This factory knows how to concatenate itself with the existing `multi` `providers`. */ function multiViewProvidersFactoryResolver(_, tData, lView, tNode) { const factories = this.multi; let result; if (this.providerFactory) { const componentCount = this.providerFactory.componentProviders; const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode); // Copy the section of the array which contains `multi` `providers` from the component result = multiProviders.slice(0, componentCount); // Insert the `viewProvider` instances. multiResolve(factories, result); // Copy the section of the array which contains `multi` `providers` from other directives for (let i = componentCount; i < multiProviders.length; i++) { result.push(multiProviders[i]); } } else { result = []; // Insert the `viewProvider` instances. multiResolve(factories, result); } return result; } /** * Maps an array of factories into an array of values. */ function multiResolve(factories, result) { for (let i = 0; i < factories.length; i++) { const factory = factories[i]; result.push(factory()); } return result; } /** * Creates a multi factory. */ function multiFactory(factoryFn, index, isViewProvider, isComponent, f) { const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject); factory.multi = []; factory.index = index; factory.componentProviders = 0; multiFactoryAdd(factory, f, isComponent && !isViewProvider); return factory; } /** * This feature resolves the providers of a directive (or component), * and publish them into the DI system, making it visible to others for injection. * * For example: * ```ts * class ComponentWithProviders { * constructor(private greeter: GreeterDE) {} * * static ɵcmp = defineComponent({ * type: ComponentWithProviders, * selectors: [['component-with-providers']], * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)), * decls: 1, * vars: 1, * template: function(fs: RenderFlags, ctx: ComponentWithProviders) { * if (fs & RenderFlags.Create) { * ɵɵtext(0); * } * if (fs & RenderFlags.Update) { * ɵɵtextInterpolate(ctx.greeter.greet()); * } * }, * features: [ɵɵProvidersFeature([GreeterDE])] * }); * } * ``` * * @param definition * * @codeGenApi */ function ɵɵProvidersFeature(providers, viewProviders = []) { return (definition) => { definition.providersResolver = (def, processProvidersFn) => { return providersResolver(def, // processProvidersFn ? processProvidersFn(providers) : providers, // viewProviders); }; }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents a component created by a `ComponentFactory`. * Provides access to the component instance and related objects, * and provides the means of destroying the instance. * * @publicApi */ class ComponentRef { } /** * Base class for a factory that can create a component dynamically. * Instantiate a factory for a given type of component with `resolveComponentFactory()`. * Use the resulting `ComponentFactory.create()` method to create a component of that type. * * @see [Dynamic Components](guide/dynamic-component-loader) * * @publicApi */ class ComponentFactory { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function noComponentFactoryError(component) { const error = Error(`No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`); error[ERROR_COMPONENT] = component; return error; } const ERROR_COMPONENT = 'ngComponent'; function getComponent$1(error) { return error[ERROR_COMPONENT]; } class _NullComponentFactoryResolver { resolveComponentFactory(component) { throw noComponentFactoryError(component); } } /** * A simple registry that maps `Components` to generated `ComponentFactory` classes * that can be used to create instances of components. * Use to obtain the factory for a given component type, * then use the factory's `create()` method to create a component of that type. * * @see [Dynamic Components](guide/dynamic-component-loader) * @publicApi */ class ComponentFactoryResolver { } ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver(); class CodegenComponentFactoryResolver { constructor(factories, _parent, _ngModule) { this._parent = _parent; this._ngModule = _ngModule; this._factories = new Map(); for (let i = 0; i < factories.length; i++) { const factory = factories[i]; this._factories.set(factory.componentType, factory); } } resolveComponentFactory(component) { let factory = this._factories.get(component); if (!factory && this._parent) { factory = this._parent.resolveComponentFactory(component); } if (!factory) { throw noComponentFactoryError(component); } return new ComponentFactoryBoundToModule(factory, this._ngModule); } } class ComponentFactoryBoundToModule extends ComponentFactory { constructor(factory, ngModule) { super(); this.factory = factory; this.ngModule = ngModule; this.selector = factory.selector; this.componentType = factory.componentType; this.ngContentSelectors = factory.ngContentSelectors; this.inputs = factory.inputs; this.outputs = factory.outputs; } create(injector, projectableNodes, rootSelectorOrNode, ngModule) { return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function noop(...args) { // Do nothing. } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Creates an ElementRef from the most recent node. * * @returns The ElementRef instance to use */ function injectElementRef() { return createElementRef(getCurrentTNode(), getLView()); } /** * Creates an ElementRef given a node. * * @param tNode The node for which you'd like an ElementRef * @param lView The view to which the node belongs * @returns The ElementRef instance to use */ function createElementRef(tNode, lView) { return new ElementRef(getNativeByTNode(tNode, lView)); } const SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef; const SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop; const SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__POST_R3__; /** * A wrapper around a native element inside of a View. * * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM * element. * * @security Permitting direct access to the DOM can make your application more vulnerable to * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the * [Security Guide](https://g.co/ng/security). * * @publicApi */ // Note: We don't expose things like `Injector`, `ViewContainer`, ... here, // i.e. users have to ask for what they need. With that, we can build better analysis tools // and could do better codegen in the future. class ElementRef { constructor(nativeElement) { this.nativeElement = nativeElement; } } /** * @internal * @nocollapse */ ElementRef.__NG_ELEMENT_ID__ = SWITCH_ELEMENT_REF_FACTORY; /** * Unwraps `ElementRef` and return the `nativeElement`. * * @param value value to unwrap * @returns `nativeElement` if `ElementRef` otherwise returns value as is. */ function unwrapElementRef(value) { return value instanceof ElementRef ? value.nativeElement : value; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor'); /** * Creates and initializes a custom renderer that implements the `Renderer2` base class. * * @publicApi */ class RendererFactory2 { } /** * Extend this base class to implement custom rendering. By default, Angular * renders a template into DOM. You can use custom rendering to intercept * rendering calls, or to render to something other than DOM. * * Create your custom renderer using `RendererFactory2`. * * Use a custom renderer to bypass Angular's templating and * make custom UI changes that can't be expressed declaratively. * For example if you need to set a property or an attribute whose name is * not statically known, use the `setProperty()` or * `setAttribute()` method. * * @publicApi */ class Renderer2 { } /** * @internal * @nocollapse */ Renderer2.__NG_ELEMENT_ID__ = () => SWITCH_RENDERER2_FACTORY(); const SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2; const SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop; const SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__POST_R3__; /** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */ function getOrCreateRenderer2(lView) { const renderer = lView[RENDERER]; if (ngDevMode && !isProceduralRenderer(renderer)) { throw new Error('Cannot inject Renderer2 when the application uses Renderer3!'); } return renderer; } /** Injects a Renderer2 for the current component. */ function injectRenderer2() { // We need the Renderer to be based on the component that it's being injected into, however since // DI happens before we've entered its view, `getLView` will return the parent view instead. const lView = getLView(); const tNode = getCurrentTNode(); const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView); return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Sanitizer is used by the views to sanitize potentially dangerous values. * * @publicApi */ class Sanitizer { } /** @nocollapse */ Sanitizer.ɵprov = ɵɵdefineInjectable({ token: Sanitizer, providedIn: 'root', factory: () => null, }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description Represents the version of Angular * * @publicApi */ class Version { constructor(full) { this.full = full; this.major = full.split('.')[0]; this.minor = full.split('.')[1]; this.patch = full.split('.').slice(2).join('.'); } } /** * @publicApi */ const VERSION = new Version('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class DefaultIterableDifferFactory { constructor() { } supports(obj) { return isListLikeIterable(obj); } create(trackByFn) { return new DefaultIterableDiffer(trackByFn); } } const trackByIdentity = (index, item) => item; const ɵ0$b = trackByIdentity; /** * @deprecated v4.0.0 - Should not be part of public API. * @publicApi */ class DefaultIterableDiffer { constructor(trackByFn) { this.length = 0; // Keeps track of the used records at any point in time (during & across `_check()` calls) this._linkedRecords = null; // Keeps track of the removed records at any point in time during `_check()` calls. this._unlinkedRecords = null; this._previousItHead = null; this._itHead = null; this._itTail = null; this._additionsHead = null; this._additionsTail = null; this._movesHead = null; this._movesTail = null; this._removalsHead = null; this._removalsTail = null; // Keeps track of records where custom track by is the same, but item identity has changed this._identityChangesHead = null; this._identityChangesTail = null; this._trackByFn = trackByFn || trackByIdentity; } forEachItem(fn) { let record; for (record = this._itHead; record !== null; record = record._next) { fn(record); } } forEachOperation(fn) { let nextIt = this._itHead; let nextRemove = this._removalsHead; let addRemoveOffset = 0; let moveOffsets = null; while (nextIt || nextRemove) { // Figure out which is the next record to process // Order: remove, add, move const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove; const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets); const currentIndex = record.currentIndex; // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary if (record === nextRemove) { addRemoveOffset--; nextRemove = nextRemove._nextRemoved; } else { nextIt = nextIt._next; if (record.previousIndex == null) { addRemoveOffset++; } else { // INVARIANT: currentIndex < previousIndex if (!moveOffsets) moveOffsets = []; const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset; const localCurrentIndex = currentIndex - addRemoveOffset; if (localMovePreviousIndex != localCurrentIndex) { for (let i = 0; i < localMovePreviousIndex; i++) { const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0); const index = offset + i; if (localCurrentIndex <= index && index < localMovePreviousIndex) { moveOffsets[i] = offset + 1; } } const previousIndex = record.previousIndex; moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex; } } } if (adjPreviousIndex !== currentIndex) { fn(record, adjPreviousIndex, currentIndex); } } } forEachPreviousItem(fn) { let record; for (record = this._previousItHead; record !== null; record = record._nextPrevious) { fn(record); } } forEachAddedItem(fn) { let record; for (record = this._additionsHead; record !== null; record = record._nextAdded) { fn(record); } } forEachMovedItem(fn) { let record; for (record = this._movesHead; record !== null; record = record._nextMoved) { fn(record); } } forEachRemovedItem(fn) { let record; for (record = this._removalsHead; record !== null; record = record._nextRemoved) { fn(record); } } forEachIdentityChange(fn) { let record; for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) { fn(record); } } diff(collection) { if (collection == null) collection = []; if (!isListLikeIterable(collection)) { throw new Error(`Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`); } if (this.check(collection)) { return this; } else { return null; } } onDestroy() { } check(collection) { this._reset(); let record = this._itHead; let mayBeDirty = false; let index; let item; let itemTrackBy; if (Array.isArray(collection)) { this.length = collection.length; for (let index = 0; index < this.length; index++) { item = collection[index]; itemTrackBy = this._trackByFn(index, item); if (record === null || !Object.is(record.trackById, itemTrackBy)) { record = this._mismatch(record, item, itemTrackBy, index); mayBeDirty = true; } else { if (mayBeDirty) { // TODO(misko): can we limit this to duplicates only? record = this._verifyReinsertion(record, item, itemTrackBy, index); } if (!Object.is(record.item, item)) this._addIdentityChange(record, item); } record = record._next; } } else { index = 0; iterateListLike(collection, (item) => { itemTrackBy = this._trackByFn(index, item); if (record === null || !Object.is(record.trackById, itemTrackBy)) { record = this._mismatch(record, item, itemTrackBy, index); mayBeDirty = true; } else { if (mayBeDirty) { // TODO(misko): can we limit this to duplicates only? record = this._verifyReinsertion(record, item, itemTrackBy, index); } if (!Object.is(record.item, item)) this._addIdentityChange(record, item); } record = record._next; index++; }); this.length = index; } this._truncate(record); this.collection = collection; return this.isDirty; } /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity * changes. */ get isDirty() { return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null; } /** * Reset the state of the change objects to show no changes. This means set previousKey to * currentKey, and clear all of the queues (additions, moves, removals). * Set the previousIndexes of moved and added items to their currentIndexes * Reset the list of additions, moves and removals * * @internal */ _reset() { if (this.isDirty) { let record; for (record = this._previousItHead = this._itHead; record !== null; record = record._next) { record._nextPrevious = record._next; } for (record = this._additionsHead; record !== null; record = record._nextAdded) { record.previousIndex = record.currentIndex; } this._additionsHead = this._additionsTail = null; for (record = this._movesHead; record !== null; record = record._nextMoved) { record.previousIndex = record.currentIndex; } this._movesHead = this._movesTail = null; this._removalsHead = this._removalsTail = null; this._identityChangesHead = this._identityChangesTail = null; // TODO(vicb): when assert gets supported // assert(!this.isDirty); } } /** * This is the core function which handles differences between collections. * * - `record` is the record which we saw at this position last time. If null then it is a new * item. * - `item` is the current item in the collection * - `index` is the position of the item in the collection * * @internal */ _mismatch(record, item, itemTrackBy, index) { // The previous record after which we will append the current one. let previousRecord; if (record === null) { previousRecord = this._itTail; } else { previousRecord = record._prev; // Remove the record from the collection since we know it does not match the item. this._remove(record); } // See if we have evicted the item, which used to be at some anterior position of _itHead list. record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null); if (record !== null) { // It is an item which we have evicted earlier: reinsert it back into the list. // But first we need to check if identity changed, so we can update in view if necessary. if (!Object.is(record.item, item)) this._addIdentityChange(record, item); this._reinsertAfter(record, previousRecord, index); } else { // Attempt to see if the item is at some posterior position of _itHead list. record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index); if (record !== null) { // We have the item in _itHead at/after `index` position. We need to move it forward in the // collection. // But first we need to check if identity changed, so we can update in view if necessary. if (!Object.is(record.item, item)) this._addIdentityChange(record, item); this._moveAfter(record, previousRecord, index); } else { // It is a new item: add it. record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index); } } return record; } /** * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty) * * Use case: `[a, a]` => `[b, a, a]` * * If we did not have this check then the insertion of `b` would: * 1) evict first `a` * 2) insert `b` at `0` index. * 3) leave `a` at index `1` as is. <-- this is wrong! * 3) reinsert `a` at index 2. <-- this is wrong! * * The correct behavior is: * 1) evict first `a` * 2) insert `b` at `0` index. * 3) reinsert `a` at index 1. * 3) move `a` at from `1` to `2`. * * * Double check that we have not evicted a duplicate item. We need to check if the item type may * have already been removed: * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a' * at the end. * * @internal */ _verifyReinsertion(record, item, itemTrackBy, index) { let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null); if (reinsertRecord !== null) { record = this._reinsertAfter(reinsertRecord, record._prev, index); } else if (record.currentIndex != index) { record.currentIndex = index; this._addToMoves(record, index); } return record; } /** * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection * * - `record` The first excess {@link IterableChangeRecord_}. * * @internal */ _truncate(record) { // Anything after that needs to be removed; while (record !== null) { const nextRecord = record._next; this._addToRemovals(this._unlink(record)); record = nextRecord; } if (this._unlinkedRecords !== null) { this._unlinkedRecords.clear(); } if (this._additionsTail !== null) { this._additionsTail._nextAdded = null; } if (this._movesTail !== null) { this._movesTail._nextMoved = null; } if (this._itTail !== null) { this._itTail._next = null; } if (this._removalsTail !== null) { this._removalsTail._nextRemoved = null; } if (this._identityChangesTail !== null) { this._identityChangesTail._nextIdentityChange = null; } } /** @internal */ _reinsertAfter(record, prevRecord, index) { if (this._unlinkedRecords !== null) { this._unlinkedRecords.remove(record); } const prev = record._prevRemoved; const next = record._nextRemoved; if (prev === null) { this._removalsHead = next; } else { prev._nextRemoved = next; } if (next === null) { this._removalsTail = prev; } else { next._prevRemoved = prev; } this._insertAfter(record, prevRecord, index); this._addToMoves(record, index); return record; } /** @internal */ _moveAfter(record, prevRecord, index) { this._unlink(record); this._insertAfter(record, prevRecord, index); this._addToMoves(record, index); return record; } /** @internal */ _addAfter(record, prevRecord, index) { this._insertAfter(record, prevRecord, index); if (this._additionsTail === null) { // TODO(vicb): // assert(this._additionsHead === null); this._additionsTail = this._additionsHead = record; } else { // TODO(vicb): // assert(_additionsTail._nextAdded === null); // assert(record._nextAdded === null); this._additionsTail = this._additionsTail._nextAdded = record; } return record; } /** @internal */ _insertAfter(record, prevRecord, index) { // TODO(vicb): // assert(record != prevRecord); // assert(record._next === null); // assert(record._prev === null); const next = prevRecord === null ? this._itHead : prevRecord._next; // TODO(vicb): // assert(next != record); // assert(prevRecord != record); record._next = next; record._prev = prevRecord; if (next === null) { this._itTail = record; } else { next._prev = record; } if (prevRecord === null) { this._itHead = record; } else { prevRecord._next = record; } if (this._linkedRecords === null) { this._linkedRecords = new _DuplicateMap(); } this._linkedRecords.put(record); record.currentIndex = index; return record; } /** @internal */ _remove(record) { return this._addToRemovals(this._unlink(record)); } /** @internal */ _unlink(record) { if (this._linkedRecords !== null) { this._linkedRecords.remove(record); } const prev = record._prev; const next = record._next; // TODO(vicb): // assert((record._prev = null) === null); // assert((record._next = null) === null); if (prev === null) { this._itHead = next; } else { prev._next = next; } if (next === null) { this._itTail = prev; } else { next._prev = prev; } return record; } /** @internal */ _addToMoves(record, toIndex) { // TODO(vicb): // assert(record._nextMoved === null); if (record.previousIndex === toIndex) { return record; } if (this._movesTail === null) { // TODO(vicb): // assert(_movesHead === null); this._movesTail = this._movesHead = record; } else { // TODO(vicb): // assert(_movesTail._nextMoved === null); this._movesTail = this._movesTail._nextMoved = record; } return record; } _addToRemovals(record) { if (this._unlinkedRecords === null) { this._unlinkedRecords = new _DuplicateMap(); } this._unlinkedRecords.put(record); record.currentIndex = null; record._nextRemoved = null; if (this._removalsTail === null) { // TODO(vicb): // assert(_removalsHead === null); this._removalsTail = this._removalsHead = record; record._prevRemoved = null; } else { // TODO(vicb): // assert(_removalsTail._nextRemoved === null); // assert(record._nextRemoved === null); record._prevRemoved = this._removalsTail; this._removalsTail = this._removalsTail._nextRemoved = record; } return record; } /** @internal */ _addIdentityChange(record, item) { record.item = item; if (this._identityChangesTail === null) { this._identityChangesTail = this._identityChangesHead = record; } else { this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record; } return record; } } class IterableChangeRecord_ { constructor(item, trackById) { this.item = item; this.trackById = trackById; this.currentIndex = null; this.previousIndex = null; /** @internal */ this._nextPrevious = null; /** @internal */ this._prev = null; /** @internal */ this._next = null; /** @internal */ this._prevDup = null; /** @internal */ this._nextDup = null; /** @internal */ this._prevRemoved = null; /** @internal */ this._nextRemoved = null; /** @internal */ this._nextAdded = null; /** @internal */ this._nextMoved = null; /** @internal */ this._nextIdentityChange = null; } } // A linked list of IterableChangeRecords with the same IterableChangeRecord_.item class _DuplicateItemRecordList { constructor() { /** @internal */ this._head = null; /** @internal */ this._tail = null; } /** * Append the record to the list of duplicates. * * Note: by design all records in the list of duplicates hold the same value in record.item. */ add(record) { if (this._head === null) { this._head = this._tail = record; record._nextDup = null; record._prevDup = null; } else { // TODO(vicb): // assert(record.item == _head.item || // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN); this._tail._nextDup = record; record._prevDup = this._tail; record._nextDup = null; this._tail = record; } } // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and // IterableChangeRecord_.currentIndex >= atOrAfterIndex get(trackById, atOrAfterIndex) { let record; for (record = this._head; record !== null; record = record._nextDup) { if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) { return record; } } return null; } /** * Remove one {@link IterableChangeRecord_} from the list of duplicates. * * Returns whether the list of duplicates is empty. */ remove(record) { // TODO(vicb): // assert(() { // // verify that the record being removed is in the list. // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) { // if (identical(cursor, record)) return true; // } // return false; //}); const prev = record._prevDup; const next = record._nextDup; if (prev === null) { this._head = next; } else { prev._nextDup = next; } if (next === null) { this._tail = prev; } else { next._prevDup = prev; } return this._head === null; } } class _DuplicateMap { constructor() { this.map = new Map(); } put(record) { const key = record.trackById; let duplicates = this.map.get(key); if (!duplicates) { duplicates = new _DuplicateItemRecordList(); this.map.set(key, duplicates); } duplicates.add(record); } /** * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there. * * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we * have any more `a`s needs to return the second `a`. */ get(trackById, atOrAfterIndex) { const key = trackById; const recordList = this.map.get(key); return recordList ? recordList.get(trackById, atOrAfterIndex) : null; } /** * Removes a {@link IterableChangeRecord_} from the list of duplicates. * * The list of duplicates also is removed from the map if it gets empty. */ remove(record) { const key = record.trackById; const recordList = this.map.get(key); // Remove the list of duplicates when it gets empty if (recordList.remove(record)) { this.map.delete(key); } return record; } get isEmpty() { return this.map.size === 0; } clear() { this.map.clear(); } } function getPreviousIndex(item, addRemoveOffset, moveOffsets) { const previousIndex = item.previousIndex; if (previousIndex === null) return previousIndex; let moveOffset = 0; if (moveOffsets && previousIndex < moveOffsets.length) { moveOffset = moveOffsets[previousIndex]; } return previousIndex + addRemoveOffset + moveOffset; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class DefaultKeyValueDifferFactory { constructor() { } supports(obj) { return obj instanceof Map || isJsObject(obj); } create() { return new DefaultKeyValueDiffer(); } } class DefaultKeyValueDiffer { constructor() { this._records = new Map(); this._mapHead = null; // _appendAfter is used in the check loop this._appendAfter = null; this._previousMapHead = null; this._changesHead = null; this._changesTail = null; this._additionsHead = null; this._additionsTail = null; this._removalsHead = null; this._removalsTail = null; } get isDirty() { return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null; } forEachItem(fn) { let record; for (record = this._mapHead; record !== null; record = record._next) { fn(record); } } forEachPreviousItem(fn) { let record; for (record = this._previousMapHead; record !== null; record = record._nextPrevious) { fn(record); } } forEachChangedItem(fn) { let record; for (record = this._changesHead; record !== null; record = record._nextChanged) { fn(record); } } forEachAddedItem(fn) { let record; for (record = this._additionsHead; record !== null; record = record._nextAdded) { fn(record); } } forEachRemovedItem(fn) { let record; for (record = this._removalsHead; record !== null; record = record._nextRemoved) { fn(record); } } diff(map) { if (!map) { map = new Map(); } else if (!(map instanceof Map || isJsObject(map))) { throw new Error(`Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`); } return this.check(map) ? this : null; } onDestroy() { } /** * Check the current state of the map vs the previous. * The algorithm is optimised for when the keys do no change. */ check(map) { this._reset(); let insertBefore = this._mapHead; this._appendAfter = null; this._forEach(map, (value, key) => { if (insertBefore && insertBefore.key === key) { this._maybeAddToChanges(insertBefore, value); this._appendAfter = insertBefore; insertBefore = insertBefore._next; } else { const record = this._getOrCreateRecordForKey(key, value); insertBefore = this._insertBeforeOrAppend(insertBefore, record); } }); // Items remaining at the end of the list have been deleted if (insertBefore) { if (insertBefore._prev) { insertBefore._prev._next = null; } this._removalsHead = insertBefore; for (let record = insertBefore; record !== null; record = record._nextRemoved) { if (record === this._mapHead) { this._mapHead = null; } this._records.delete(record.key); record._nextRemoved = record._next; record.previousValue = record.currentValue; record.currentValue = null; record._prev = null; record._next = null; } } // Make sure tails have no next records from previous runs if (this._changesTail) this._changesTail._nextChanged = null; if (this._additionsTail) this._additionsTail._nextAdded = null; return this.isDirty; } /** * Inserts a record before `before` or append at the end of the list when `before` is null. * * Notes: * - This method appends at `this._appendAfter`, * - This method updates `this._appendAfter`, * - The return value is the new value for the insertion pointer. */ _insertBeforeOrAppend(before, record) { if (before) { const prev = before._prev; record._next = before; record._prev = prev; before._prev = record; if (prev) { prev._next = record; } if (before === this._mapHead) { this._mapHead = record; } this._appendAfter = before; return before; } if (this._appendAfter) { this._appendAfter._next = record; record._prev = this._appendAfter; } else { this._mapHead = record; } this._appendAfter = record; return null; } _getOrCreateRecordForKey(key, value) { if (this._records.has(key)) { const record = this._records.get(key); this._maybeAddToChanges(record, value); const prev = record._prev; const next = record._next; if (prev) { prev._next = next; } if (next) { next._prev = prev; } record._next = null; record._prev = null; return record; } const record = new KeyValueChangeRecord_(key); this._records.set(key, record); record.currentValue = value; this._addToAdditions(record); return record; } /** @internal */ _reset() { if (this.isDirty) { let record; // let `_previousMapHead` contain the state of the map before the changes this._previousMapHead = this._mapHead; for (record = this._previousMapHead; record !== null; record = record._next) { record._nextPrevious = record._next; } // Update `record.previousValue` with the value of the item before the changes // We need to update all changed items (that's those which have been added and changed) for (record = this._changesHead; record !== null; record = record._nextChanged) { record.previousValue = record.currentValue; } for (record = this._additionsHead; record != null; record = record._nextAdded) { record.previousValue = record.currentValue; } this._changesHead = this._changesTail = null; this._additionsHead = this._additionsTail = null; this._removalsHead = null; } } // Add the record or a given key to the list of changes only when the value has actually changed _maybeAddToChanges(record, newValue) { if (!Object.is(newValue, record.currentValue)) { record.previousValue = record.currentValue; record.currentValue = newValue; this._addToChanges(record); } } _addToAdditions(record) { if (this._additionsHead === null) { this._additionsHead = this._additionsTail = record; } else { this._additionsTail._nextAdded = record; this._additionsTail = record; } } _addToChanges(record) { if (this._changesHead === null) { this._changesHead = this._changesTail = record; } else { this._changesTail._nextChanged = record; this._changesTail = record; } } /** @internal */ _forEach(obj, fn) { if (obj instanceof Map) { obj.forEach(fn); } else { Object.keys(obj).forEach(k => fn(obj[k], k)); } } } class KeyValueChangeRecord_ { constructor(key) { this.key = key; this.previousValue = null; this.currentValue = null; /** @internal */ this._nextPrevious = null; /** @internal */ this._next = null; /** @internal */ this._prev = null; /** @internal */ this._nextAdded = null; /** @internal */ this._nextRemoved = null; /** @internal */ this._nextChanged = null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function defaultIterableDiffersFactory() { return new IterableDiffers([new DefaultIterableDifferFactory()]); } /** * A repository of different iterable diffing strategies used by NgFor, NgClass, and others. * * @publicApi */ class IterableDiffers { constructor(factories) { this.factories = factories; } static create(factories, parent) { if (parent != null) { const copied = parent.factories.slice(); factories = factories.concat(copied); } return new IterableDiffers(factories); } /** * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the * inherited {@link IterableDiffers} instance with the provided factories and return a new * {@link IterableDiffers} instance. * * @usageNotes * ### Example * * The following example shows how to extend an existing list of factories, * which will only be applied to the injector for this component and its children. * This step is all that's required to make a new {@link IterableDiffer} available. * * ``` * @Component({ * viewProviders: [ * IterableDiffers.extend([new ImmutableListDiffer()]) * ] * }) * ``` */ static extend(factories) { return { provide: IterableDiffers, useFactory: (parent) => { // if parent is null, it means that we are in the root injector and we have just overridden // the default injection mechanism for IterableDiffers, in such a case just assume // `defaultIterableDiffersFactory`. return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory()); }, // Dependency technically isn't optional, but we can provide a better error message this way. deps: [[IterableDiffers, new SkipSelf(), new Optional()]] }; } find(iterable) { const factory = this.factories.find(f => f.supports(iterable)); if (factory != null) { return factory; } else { throw new Error(`Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`); } } } /** @nocollapse */ IterableDiffers.ɵprov = ɵɵdefineInjectable({ token: IterableDiffers, providedIn: 'root', factory: defaultIterableDiffersFactory }); function getTypeNameForDebugging(type) { return type['name'] || typeof type; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function defaultKeyValueDiffersFactory() { return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]); } /** * A repository of different Map diffing strategies used by NgClass, NgStyle, and others. * * @publicApi */ class KeyValueDiffers { constructor(factories) { this.factories = factories; } static create(factories, parent) { if (parent) { const copied = parent.factories.slice(); factories = factories.concat(copied); } return new KeyValueDiffers(factories); } /** * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the * inherited {@link KeyValueDiffers} instance with the provided factories and return a new * {@link KeyValueDiffers} instance. * * @usageNotes * ### Example * * The following example shows how to extend an existing list of factories, * which will only be applied to the injector for this component and its children. * This step is all that's required to make a new {@link KeyValueDiffer} available. * * ``` * @Component({ * viewProviders: [ * KeyValueDiffers.extend([new ImmutableMapDiffer()]) * ] * }) * ``` */ static extend(factories) { return { provide: KeyValueDiffers, useFactory: (parent) => { // if parent is null, it means that we are in the root injector and we have just overridden // the default injection mechanism for KeyValueDiffers, in such a case just assume // `defaultKeyValueDiffersFactory`. return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory()); }, // Dependency technically isn't optional, but we can provide a better error message this way. deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]] }; } find(kv) { const factory = this.factories.find(f => f.supports(kv)); if (factory) { return factory; } throw new Error(`Cannot find a differ supporting object '${kv}'`); } } /** @nocollapse */ KeyValueDiffers.ɵprov = ɵɵdefineInjectable({ token: KeyValueDiffers, providedIn: 'root', factory: defaultKeyValueDiffersFactory }); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function collectNativeNodes(tView, lView, tNode, result, isProjection = false) { while (tNode !== null) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */ | 16 /* Projection */ | 32 /* Icu */); const lNode = lView[tNode.index]; if (lNode !== null) { result.push(unwrapRNode(lNode)); } // A given lNode can represent either a native node or a LContainer (when it is a host of a // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes // from the views in this container. if (isLContainer(lNode)) { for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) { const lViewInAContainer = lNode[i]; const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild; if (lViewFirstChildTNode !== null) { collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result); } } } const tNodeType = tNode.type; if (tNodeType & 8 /* ElementContainer */) { collectNativeNodes(tView, lView, tNode.child, result); } else if (tNodeType & 32 /* Icu */) { const nextRNode = icuContainerIterate(tNode, lView); let rNode; while (rNode = nextRNode()) { result.push(rNode); } } else if (tNodeType & 16 /* Projection */) { const nodesInSlot = getProjectionNodes(lView, tNode); if (Array.isArray(nodesInSlot)) { result.push(...nodesInSlot); } else { const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]); ngDevMode && assertParentView(parentView); collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true); } } tNode = isProjection ? tNode.projectionNext : tNode.next; } return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class ViewRef { constructor( /** * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef. * * When ViewRef is created for a dynamic component, this also represents the `LView` for the * component. * * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded * view. * * @internal */ _lView, /** * This represents the `LView` associated with the point where `ChangeDetectorRef` was * requested. * * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view. */ _cdRefInjectingView) { this._lView = _lView; this._cdRefInjectingView = _cdRefInjectingView; this._appRef = null; this._attachedToViewContainer = false; } get rootNodes() { const lView = this._lView; const tView = lView[TVIEW]; return collectNativeNodes(tView, lView, tView.firstChild, []); } get context() { return this._lView[CONTEXT]; } get destroyed() { return (this._lView[FLAGS] & 256 /* Destroyed */) === 256 /* Destroyed */; } destroy() { if (this._appRef) { this._appRef.detachView(this); } else if (this._attachedToViewContainer) { const parent = this._lView[PARENT]; if (isLContainer(parent)) { const viewRefs = parent[VIEW_REFS]; const index = viewRefs ? viewRefs.indexOf(this) : -1; if (index > -1) { ngDevMode && assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.'); detachView(parent, index); removeFromArray(viewRefs, index); } } this._attachedToViewContainer = false; } destroyLView(this._lView[TVIEW], this._lView); } onDestroy(callback) { storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback); } /** * Marks a view and all of its ancestors dirty. * * It also triggers change detection by calling `scheduleTick` internally, which coalesces * multiple `markForCheck` calls to into one change detection run. * * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is * checked when it needs to be re-rendered but the two normal triggers haven't marked it * dirty (i.e. inputs haven't changed and events haven't fired in the view). * * <!-- TODO: Add a link to a chapter on OnPush components --> * * @usageNotes * ### Example * * ```typescript * @Component({ * selector: 'my-app', * template: `Number of ticks: {{numberOfTicks}}` * changeDetection: ChangeDetectionStrategy.OnPush, * }) * class AppComponent { * numberOfTicks = 0; * * constructor(private ref: ChangeDetectorRef) { * setInterval(() => { * this.numberOfTicks++; * // the following is required, otherwise the view will not be updated * this.ref.markForCheck(); * }, 1000); * } * } * ``` */ markForCheck() { markViewDirty(this._cdRefInjectingView || this._lView); } /** * Detaches the view from the change detection tree. * * Detached views will not be checked during change detection runs until they are * re-attached, even if they are dirty. `detach` can be used in combination with * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change * detection checks. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * <!-- TODO: Add a live demo once ref.detectChanges is merged into master --> * * @usageNotes * ### Example * * The following example defines a component with a large list of readonly data. * Imagine the data changes constantly, many times per second. For performance reasons, * we want to check and update the list every five seconds. We can do that by detaching * the component's change detector and doing a local check every five seconds. * * ```typescript * class DataProvider { * // in a real application the returned data will be different every time * get data() { * return [1,2,3,4,5]; * } * } * * @Component({ * selector: 'giant-list', * template: ` * <li *ngFor="let d of dataProvider.data">Data {{d}}</li> * `, * }) * class GiantList { * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) { * ref.detach(); * setInterval(() => { * this.ref.detectChanges(); * }, 5000); * } * } * * @Component({ * selector: 'app', * providers: [DataProvider], * template: ` * <giant-list><giant-list> * `, * }) * class App { * } * ``` */ detach() { this._lView[FLAGS] &= ~128 /* Attached */; } /** * Re-attaches a view to the change detection tree. * * This can be used to re-attach views that were previously detached from the tree * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * * @usageNotes * ### Example * * The following example creates a component displaying `live` data. The component will detach * its change detector from the main change detector tree when the component's live property * is set to false. * * ```typescript * class DataProvider { * data = 1; * * constructor() { * setInterval(() => { * this.data = this.data * 2; * }, 500); * } * } * * @Component({ * selector: 'live-data', * inputs: ['live'], * template: 'Data: {{dataProvider.data}}' * }) * class LiveData { * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {} * * set live(value) { * if (value) { * this.ref.reattach(); * } else { * this.ref.detach(); * } * } * } * * @Component({ * selector: 'my-app', * providers: [DataProvider], * template: ` * Live Update: <input type="checkbox" [(ngModel)]="live"> * <live-data [live]="live"><live-data> * `, * }) * class AppComponent { * live = true; * } * ``` */ reattach() { this._lView[FLAGS] |= 128 /* Attached */; } /** * Checks the view and its children. * * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement * local change detection checks. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * <!-- TODO: Add a live demo once ref.detectChanges is merged into master --> * * @usageNotes * ### Example * * The following example defines a component with a large list of readonly data. * Imagine, the data changes constantly, many times per second. For performance reasons, * we want to check and update the list every five seconds. * * We can do that by detaching the component's change detector and doing a local change detection * check every five seconds. * * See {@link ChangeDetectorRef#detach detach} for more information. */ detectChanges() { detectChangesInternal(this._lView[TVIEW], this._lView, this.context); } /** * Checks the change detector and its children, and throws if any changes are detected. * * This is used in development mode to verify that running change detection doesn't * introduce other changes. */ checkNoChanges() { checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context); } attachToViewContainerRef() { if (this._appRef) { throw new Error('This view is already attached directly to the ApplicationRef!'); } this._attachedToViewContainer = true; } detachFromAppRef() { this._appRef = null; renderDetachView(this._lView[TVIEW], this._lView); } attachToAppRef(appRef) { if (this._attachedToViewContainer) { throw new Error('This view is already attached to a ViewContainer!'); } this._appRef = appRef; } } /** @internal */ class RootViewRef extends ViewRef { constructor(_view) { super(_view); this._view = _view; } detectChanges() { detectChangesInRootView(this._view); } checkNoChanges() { checkNoChangesInRootView(this._view); } get context() { return null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef; const SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = noop; const SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__; /** * Base class that provides change detection functionality. * A change-detection tree collects all views that are to be checked for changes. * Use the methods to add and remove views from the tree, initiate change-detection, * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered. * * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks) * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection) * * @usageNotes * * The following examples demonstrate how to modify default change-detection behavior * to perform explicit detection when needed. * * ### Use `markForCheck()` with `CheckOnce` strategy * * The following example sets the `OnPush` change-detection strategy for a component * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview). * * <code-example path="core/ts/change_detect/change-detection.ts" * region="mark-for-check"></code-example> * * ### Detach change detector to limit how often check occurs * * The following example defines a component with a large list of read-only data * that is expected to change constantly, many times per second. * To improve performance, we want to check and update the list * less often than the changes actually occur. To do that, we detach * the component's change detector and perform an explicit local check every five seconds. * * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example> * * * ### Reattaching a detached component * * The following example creates a component displaying live data. * The component detaches its change detector from the main change detector tree * when the `live` property is set to false, and reattaches it when the property * becomes true. * * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example> * * @publicApi */ class ChangeDetectorRef { } /** * @internal * @nocollapse */ ChangeDetectorRef.__NG_ELEMENT_ID__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY; /** * This marker is need so that the JIT compiler can correctly identify this class as special. * * @internal * @nocollapse */ ChangeDetectorRef.__ChangeDetectorRef__ = true; /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */ function injectChangeDetectorRef(isPipe = false) { return createViewRef(getCurrentTNode(), getLView(), isPipe); } /** * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias). * * @param tNode The node that is requesting a ChangeDetectorRef * @param lView The view to which the node belongs * @param isPipe Whether the view is being injected into a pipe. * @returns The ChangeDetectorRef to use */ function createViewRef(tNode, lView, isPipe) { // `isComponentView` will be true for Component and Directives (but not for Pipes). // See https://github.com/angular/angular/pull/33072 for proper fix const isComponentView = !isPipe && isComponentHost(tNode); if (isComponentView) { // The LView represents the location where the component is declared. // Instead we want the LView for the component View and so we need to look it up. const componentView = getComponentLViewByIndex(tNode.index, lView); // look down return new ViewRef(componentView, componentView); } else if (tNode.type & (3 /* AnyRNode */ | 12 /* AnyContainer */ | 32 /* Icu */)) { // The LView represents the location where the injection is requested from. // We need to locate the containing LView (in case where the `lView` is an embedded view) const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up return new ViewRef(hostComponentView, lView); } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Structural diffing for `Object`s and `Map`s. */ const keyValDiff = [new DefaultKeyValueDifferFactory()]; /** * Structural diffing for `Iterable` types such as `Array`s. */ const iterableDiff = [new DefaultIterableDifferFactory()]; const defaultIterableDiffers = new IterableDiffers(iterableDiff); const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef; const SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop; const SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__POST_R3__; /** * Represents an embedded template that can be used to instantiate embedded views. * To instantiate embedded views based on a template, use the `ViewContainerRef` * method `createEmbeddedView()`. * * Access a `TemplateRef` instance by placing a directive on an `<ng-template>` * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view * is injected into the constructor of the directive, * using the `TemplateRef` token. * * You can also use a `Query` to find a `TemplateRef` associated with * a component or a directive. * * @see `ViewContainerRef` * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree) * * @publicApi */ class TemplateRef { } /** * @internal * @nocollapse */ TemplateRef.__NG_ELEMENT_ID__ = SWITCH_TEMPLATE_REF_FACTORY; const ViewEngineTemplateRef = TemplateRef; const R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef { constructor(_declarationLView, _declarationTContainer, elementRef) { super(); this._declarationLView = _declarationLView; this._declarationTContainer = _declarationTContainer; this.elementRef = elementRef; } createEmbeddedView(context) { const embeddedTView = this._declarationTContainer.tViews; const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null); const declarationLContainer = this._declarationLView[this._declarationTContainer.index]; ngDevMode && assertLContainer(declarationLContainer); embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer; const declarationViewLQueries = this._declarationLView[QUERIES]; if (declarationViewLQueries !== null) { embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView); } renderView(embeddedTView, embeddedLView, context); return new ViewRef(embeddedLView); } }; /** * Creates a TemplateRef given a node. * * @returns The TemplateRef instance to use */ function injectTemplateRef() { return createTemplateRef(getCurrentTNode(), getLView()); } /** * Creates a TemplateRef and stores it on the injector. * * @param hostTNode The node on which a TemplateRef is requested * @param hostLView The `LView` to which the node belongs * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type */ function createTemplateRef(hostTNode, hostLView) { if (hostTNode.type & 4 /* Container */) { ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated'); return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView)); } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents an instance of an `NgModule` created by an `NgModuleFactory`. * Provides access to the `NgModule` instance and related objects. * * @publicApi */ class NgModuleRef { } /** * @publicApi */ class NgModuleFactory { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef; const SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop; const SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__; /** * Represents a container where one or more views can be attached to a component. * * Can contain *host views* (created by instantiating a * component with the `createComponent()` method), and *embedded views* * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method). * * A view container instance can contain other view containers, * creating a [view hierarchy](guide/glossary#view-tree). * * @see `ComponentRef` * @see `EmbeddedViewRef` * * @publicApi */ class ViewContainerRef { } /** * @internal * @nocollapse */ ViewContainerRef.__NG_ELEMENT_ID__ = SWITCH_VIEW_CONTAINER_REF_FACTORY; /** * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef * already exists, retrieves the existing ViewContainerRef. * * @returns The ViewContainerRef instance to use */ function injectViewContainerRef() { const previousTNode = getCurrentTNode(); return createContainerRef(previousTNode, getLView()); } const VE_ViewContainerRef = ViewContainerRef; const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef { constructor(_lContainer, _hostTNode, _hostLView) { super(); this._lContainer = _lContainer; this._hostTNode = _hostTNode; this._hostLView = _hostLView; } get element() { return createElementRef(this._hostTNode, this._hostLView); } get injector() { return new NodeInjector(this._hostTNode, this._hostLView); } /** @deprecated No replacement */ get parentInjector() { const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView); if (hasParentInjector(parentLocation)) { const parentView = getParentInjectorView(parentLocation, this._hostLView); const injectorIndex = getParentInjectorIndex(parentLocation); ngDevMode && assertNodeInjector(parentView, injectorIndex); const parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* TNODE */]; return new NodeInjector(parentTNode, parentView); } else { return new NodeInjector(null, this._hostLView); } } clear() { while (this.length > 0) { this.remove(this.length - 1); } } get(index) { const viewRefs = getViewRefs(this._lContainer); return viewRefs !== null && viewRefs[index] || null; } get length() { return this._lContainer.length - CONTAINER_HEADER_OFFSET; } createEmbeddedView(templateRef, context, index) { const viewRef = templateRef.createEmbeddedView(context || {}); this.insert(viewRef, index); return viewRef; } createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) { const contextInjector = injector || this.parentInjector; if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) { // DO NOT REFACTOR. The code here used to have a `value || undefined` expression // which seems to cause internal google apps to fail. This is documented in the // following internal bug issue: go/b/142967802 const result = contextInjector.get(NgModuleRef, null); if (result) { ngModuleRef = result; } } const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef); this.insert(componentRef.hostView, index); return componentRef; } insert(viewRef, index) { const lView = viewRef._lView; const tView = lView[TVIEW]; if (ngDevMode && viewRef.destroyed) { throw new Error('Cannot insert a destroyed View in a ViewContainer!'); } if (viewAttachedToContainer(lView)) { // If view is already attached, detach it first so we clean up references appropriately. const prevIdx = this.indexOf(viewRef); // A view might be attached either to this or a different container. The `prevIdx` for // those cases will be: // equal to -1 for views attached to this ViewContainerRef // >= 0 for views attached to a different ViewContainerRef if (prevIdx !== -1) { this.detach(prevIdx); } else { const prevLContainer = lView[PARENT]; ngDevMode && assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.'); // We need to re-create a R3ViewContainerRef instance since those are not stored on // LView (nor anywhere else). const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]); prevVCRef.detach(prevVCRef.indexOf(viewRef)); } } // Logical operation of adding `LView` to `LContainer` const adjustedIdx = this._adjustIndex(index); const lContainer = this._lContainer; insertView(tView, lView, lContainer, adjustedIdx); // Physical operation of adding the DOM nodes. const beforeNode = getBeforeNodeForView(adjustedIdx, lContainer); const renderer = lView[RENDERER]; const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]); if (parentRNode !== null) { addViewToContainer(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode); } viewRef.attachToViewContainerRef(); addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef); return viewRef; } move(viewRef, newIndex) { if (ngDevMode && viewRef.destroyed) { throw new Error('Cannot move a destroyed View in a ViewContainer!'); } return this.insert(viewRef, newIndex); } indexOf(viewRef) { const viewRefsArr = getViewRefs(this._lContainer); return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1; } remove(index) { const adjustedIdx = this._adjustIndex(index, -1); const detachedView = detachView(this._lContainer, adjustedIdx); if (detachedView) { // Before destroying the view, remove it from the container's array of `ViewRef`s. // This ensures the view container length is updated before calling // `destroyLView`, which could recursively call view container methods that // rely on an accurate container length. // (e.g. a method on this view container being called by a child directive's OnDestroy // lifecycle hook) removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx); destroyLView(detachedView[TVIEW], detachedView); } } detach(index) { const adjustedIdx = this._adjustIndex(index, -1); const view = detachView(this._lContainer, adjustedIdx); const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null; return wasDetached ? new ViewRef(view) : null; } _adjustIndex(index, shift = 0) { if (index == null) { return this.length + shift; } if (ngDevMode) { assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`); // +1 because it's legal to insert at the end. assertLessThan(index, this.length + 1 + shift, 'index'); } return index; } }; function getViewRefs(lContainer) { return lContainer[VIEW_REFS]; } function getOrCreateViewRefs(lContainer) { return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = [])); } /** * Creates a ViewContainerRef and stores it on the injector. * * @param ViewContainerRefToken The ViewContainerRef type * @param ElementRefToken The ElementRef type * @param hostTNode The node that is requesting a ViewContainerRef * @param hostLView The view to which the node belongs * @returns The ViewContainerRef instance to use */ function createContainerRef(hostTNode, hostLView) { ngDevMode && assertTNodeType(hostTNode, 12 /* AnyContainer */ | 3 /* AnyRNode */); let lContainer; const slotValue = hostLView[hostTNode.index]; if (isLContainer(slotValue)) { // If the host is a container, we don't need to create a new LContainer lContainer = slotValue; } else { let commentNode; // If the host is an element container, the native host element is guaranteed to be a // comment and we can reuse that comment as anchor element for the new LContainer. // The comment node in question is already part of the DOM structure so we don't need to append // it again. if (hostTNode.type & 8 /* ElementContainer */) { commentNode = unwrapRNode(slotValue); } else { // If the host is a regular element, we have to insert a comment node manually which will // be used as an anchor when inserting elements. In this specific case we use low-level DOM // manipulation to insert it. const renderer = hostLView[RENDERER]; ngDevMode && ngDevMode.rendererCreateComment++; commentNode = renderer.createComment(ngDevMode ? 'container' : ''); const hostNative = getNativeByTNode(hostTNode, hostLView); const parentOfHostNative = nativeParentNode(renderer, hostNative); nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false); } hostLView[hostTNode.index] = lContainer = createLContainer(slotValue, hostLView, commentNode, hostTNode); addToViewTree(hostLView, lContainer); } return new R3ViewContainerRef(lContainer, hostTNode, hostLView); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) { let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`; if (isFirstCheck) { msg += ` It seems like the view has been created after its parent and its children have been dirty checked.` + ` Has it been created in a change detection hook ?`; } return viewDebugError(msg, context); } function viewWrappedDebugError(err, context) { if (!(err instanceof Error)) { // errors that are not Error instances don't have a stack, // so it is ok to wrap them into a new Error object... err = new Error(err.toString()); } _addDebugContext(err, context); return err; } function viewDebugError(msg, context) { const err = new Error(msg); _addDebugContext(err, context); return err; } function _addDebugContext(err, context) { err[ERROR_DEBUG_CONTEXT] = context; err[ERROR_LOGGER] = context.logError.bind(context); } function isViewDebugError(err) { return !!getDebugContext(err); } function viewDestroyedError(action) { return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Called before each cycle of a view's check to detect whether this is in the // initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit // lifecycle methods. Returns true if this check cycle should call lifecycle // methods. function shiftInitState(view, priorInitState, newInitState) { // Only update the InitState if we are currently in the prior state. // For example, only move into CallingInit if we are in BeforeInit. Only // move into CallingContentInit if we are in CallingInit. Normally this will // always be true because of how checkCycle is called in checkAndUpdateView. // However, if checkAndUpdateView is called recursively or if an exception is // thrown while checkAndUpdateView is running, checkAndUpdateView starts over // from the beginning. This ensures the state is monotonically increasing, // terminating in the AfterInit state, which ensures the Init methods are called // at least once and only once. const state = view.state; const initState = state & 1792 /* InitState_Mask */; if (initState === priorInitState) { view.state = (state & ~1792 /* InitState_Mask */) | newInitState; view.initIndex = -1; return true; } return initState === newInitState; } // Returns true if the lifecycle init method should be called for the node with // the given init index. function shouldCallLifecycleInitHook(view, initState, index) { if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) { view.initIndex = index + 1; return true; } return false; } /** * Node instance data. * * We have a separate type per NodeType to save memory * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>) * * To keep our code monomorphic, * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...). * This way, no usage site can get a `NodeData` from view.nodes and then use it for different * purposes. */ class NodeData { } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asTextData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asElementData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asProviderData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asPureExpressionData(view, index) { return view.nodes[index]; } /** * Accessor for view.nodes, enforcing that every usage site stays monomorphic. */ function asQueryList(view, index) { return view.nodes[index]; } class DebugContext { } /** * This object is used to prevent cycles in the source files and to have a place where * debug mode can hook it. It is lazily filled when `isDevMode` is known. */ const Services = { setCurrentNode: undefined, createRootView: undefined, createEmbeddedView: undefined, createComponentView: undefined, createNgModuleRef: undefined, overrideProvider: undefined, overrideComponentView: undefined, clearOverrides: undefined, checkAndUpdateView: undefined, checkNoChangesView: undefined, destroyView: undefined, resolveDep: undefined, createDebugContext: undefined, handleEvent: undefined, updateDirectives: undefined, updateRenderer: undefined, dirtyParentQueries: undefined, }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NOOP = () => { }; const _tokenKeyCache = new Map(); function tokenKey(token) { let key = _tokenKeyCache.get(token); if (!key) { key = stringify(token) + '_' + _tokenKeyCache.size; _tokenKeyCache.set(token, key); } return key; } function unwrapValue(view, nodeIdx, bindingIdx, value) { if (WrappedValue.isWrapped(value)) { value = WrappedValue.unwrap(value); const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx; const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]); view.oldValues[globalBindingIdx] = new WrappedValue(oldValue); } return value; } const UNDEFINED_RENDERER_TYPE_ID = '$$undefined'; const EMPTY_RENDERER_TYPE_ID = '$$empty'; // Attention: this function is called as top level function. // Putting any logic in here will destroy closure tree shaking! function createRendererType2(values) { return { id: UNDEFINED_RENDERER_TYPE_ID, styles: values.styles, encapsulation: values.encapsulation, data: values.data }; } let _renderCompCount$1 = 0; function resolveRendererType2(type) { if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) { // first time we see this RendererType2. Initialize it... const isFilled = ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) || type.styles.length || Object.keys(type.data).length); if (isFilled) { type.id = `c${_renderCompCount$1++}`; } else { type.id = EMPTY_RENDERER_TYPE_ID; } } if (type && type.id === EMPTY_RENDERER_TYPE_ID) { type = null; } return type || null; } function checkBinding(view, def, bindingIdx, value) { const oldValues = view.oldValues; if ((view.state & 2 /* FirstCheck */) || !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) { return true; } return false; } function checkAndUpdateBinding(view, def, bindingIdx, value) { if (checkBinding(view, def, bindingIdx, value)) { view.oldValues[def.bindingIndex + bindingIdx] = value; return true; } return false; } function checkBindingNoChanges(view, def, bindingIdx, value) { const oldValue = view.oldValues[def.bindingIndex + bindingIdx]; if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) { const bindingName = def.bindings[bindingIdx].name; throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`, `${bindingName}: ${value}`, (view.state & 1 /* BeforeFirstCheck */) !== 0); } } function markParentViewsForCheck(view) { let currView = view; while (currView) { if (currView.def.flags & 2 /* OnPush */) { currView.state |= 8 /* ChecksEnabled */; } currView = currView.viewContainerParent || currView.parent; } } function markParentViewsForCheckProjectedViews(view, endView) { let currView = view; while (currView && currView !== endView) { currView.state |= 64 /* CheckProjectedViews */; currView = currView.viewContainerParent || currView.parent; } } function dispatchEvent(view, nodeIndex, eventName, event) { try { const nodeDef = view.def.nodes[nodeIndex]; const startView = nodeDef.flags & 33554432 /* ComponentView */ ? asElementData(view, nodeIndex).componentView : view; markParentViewsForCheck(startView); return Services.handleEvent(view, nodeIndex, eventName, event); } catch (e) { // Attention: Don't rethrow, as it would cancel Observable subscriptions! view.root.errorHandler.handleError(e); } } function declaredViewContainer(view) { if (view.parent) { const parentView = view.parent; return asElementData(parentView, view.parentNodeDef.nodeIndex); } return null; } /** * for component views, this is the host element. * for embedded views, this is the index of the parent node * that contains the view container. */ function viewParentEl(view) { const parentView = view.parent; if (parentView) { return view.parentNodeDef.parent; } else { return null; } } function renderNode(view, def) { switch (def.flags & 201347067 /* Types */) { case 1 /* TypeElement */: return asElementData(view, def.nodeIndex).renderElement; case 2 /* TypeText */: return asTextData(view, def.nodeIndex).renderText; } } function elementEventFullName(target, name) { return target ? `${target}:${name}` : name; } function isComponentView(view) { return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */); } function isEmbeddedView(view) { return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */); } function filterQueryId(queryId) { return 1 << (queryId % 32); } function splitMatchedQueriesDsl(matchedQueriesDsl) { const matchedQueries = {}; let matchedQueryIds = 0; const references = {}; if (matchedQueriesDsl) { matchedQueriesDsl.forEach(([queryId, valueType]) => { if (typeof queryId === 'number') { matchedQueries[queryId] = valueType; matchedQueryIds |= filterQueryId(queryId); } else { references[queryId] = valueType; } }); } return { matchedQueries, references, matchedQueryIds }; } function splitDepsDsl(deps, sourceName) { return deps.map(value => { let token; let flags; if (Array.isArray(value)) { [flags, token] = value; } else { flags = 0 /* None */; token = value; } if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) { Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true }); } return { flags, token, tokenKey: tokenKey(token) }; }); } function getParentRenderElement(view, renderHost, def) { let renderParent = def.renderParent; if (renderParent) { if ((renderParent.flags & 1 /* TypeElement */) === 0 || (renderParent.flags & 33554432 /* ComponentView */) === 0 || (renderParent.element.componentRendererType && (renderParent.element.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom || // TODO(FW-2290): remove the `encapsulation === 1` fallback logic in v12. renderParent.element.componentRendererType.encapsulation === 1))) { // only children of non components, or children of components with native encapsulation should // be attached. return asElementData(view, def.renderParent.nodeIndex).renderElement; } } else { return renderHost; } } const DEFINITION_CACHE = new WeakMap(); function resolveDefinition(factory) { let value = DEFINITION_CACHE.get(factory); if (!value) { value = factory(() => NOOP); value.factory = factory; DEFINITION_CACHE.set(factory, value); } return value; } function rootRenderNodes(view) { const renderNodes = []; visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes); return renderNodes; } function visitRootRenderNodes(view, action, parentNode, nextSibling, target) { // We need to re-compute the parent node in case the nodes have been moved around manually if (action === 3 /* RemoveChild */) { parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode)); } visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target); } function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) { for (let i = startIndex; i <= endIndex; i++) { const nodeDef = view.def.nodes[i]; if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) { visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target); } // jump to next sibling i += nodeDef.childCount; } } function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) { let compView = view; while (compView && !isComponentView(compView)) { compView = compView.parent; } const hostView = compView.parent; const hostElDef = viewParentEl(compView); const startIndex = hostElDef.nodeIndex + 1; const endIndex = hostElDef.nodeIndex + hostElDef.childCount; for (let i = startIndex; i <= endIndex; i++) { const nodeDef = hostView.def.nodes[i]; if (nodeDef.ngContentIndex === ngContentIndex) { visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target); } // jump to next sibling i += nodeDef.childCount; } if (!hostView.parent) { // a root view const projectedNodes = view.root.projectableNodes[ngContentIndex]; if (projectedNodes) { for (let i = 0; i < projectedNodes.length; i++) { execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target); } } } } function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) { if (nodeDef.flags & 8 /* TypeNgContent */) { visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target); } else { const rn = renderNode(view, nodeDef); if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) && (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) { // Note: we might need to do both actions. if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) { execRenderNodeAction(view, rn, action, parentNode, nextSibling, target); } if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) { const compView = asElementData(view, nodeDef.nodeIndex).componentView; execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target); } } else { execRenderNodeAction(view, rn, action, parentNode, nextSibling, target); } if (nodeDef.flags & 16777216 /* EmbeddedViews */) { const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews; for (let k = 0; k < embeddedViews.length; k++) { visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target); } } if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) { visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target); } } } function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) { const renderer = view.renderer; switch (action) { case 1 /* AppendChild */: renderer.appendChild(parentNode, renderNode); break; case 2 /* InsertBefore */: renderer.insertBefore(parentNode, renderNode, nextSibling); break; case 3 /* RemoveChild */: renderer.removeChild(parentNode, renderNode); break; case 0 /* Collect */: target.push(renderNode); break; } } const NS_PREFIX_RE = /^:([^:]+):(.+)$/; function splitNamespace(name) { if (name[0] === ':') { const match = name.match(NS_PREFIX_RE); return [match[1], match[2]]; } return ['', name]; } function calcBindingFlags(bindings) { let flags = 0; for (let i = 0; i < bindings.length; i++) { flags |= bindings[i].flags; } return flags; } function interpolate(valueCount, constAndInterp) { let result = ''; for (let i = 0; i < valueCount * 2; i = i + 2) { result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]); } return result + constAndInterp[valueCount * 2]; } function inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) { switch (valueCount) { case 1: return c0 + _toStringWithNull(a1) + c1; case 2: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2; case 3: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3; case 4: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4; case 5: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5; case 6: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6; case 7: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7; case 8: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8; case 9: return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) + c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9; default: throw new Error(`Does not support more than 9 expressions`); } } function _toStringWithNull(v) { return v != null ? v.toString() : ''; } const EMPTY_ARRAY$4 = []; const EMPTY_MAP = {}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const UNDEFINED_VALUE = {}; const InjectorRefTokenKey = tokenKey(Injector); const INJECTORRefTokenKey = tokenKey(INJECTOR$1); const NgModuleRefTokenKey = tokenKey(NgModuleRef); function moduleProvideDef(flags, token, value, deps) { // Need to resolve forwardRefs as e.g. for `useValue` we // lowered the expression and then stopped evaluating it, // i.e. also didn't unwrap it. value = resolveForwardRef(value); const depDefs = splitDepsDsl(deps, stringify(token)); return { // will bet set by the module definition index: -1, deps: depDefs, flags, token, value }; } function moduleDef(providers) { const providersByKey = {}; const modules = []; let scope = null; for (let i = 0; i < providers.length; i++) { const provider = providers[i]; if (provider.token === INJECTOR_SCOPE) { scope = provider.value; } if (provider.flags & 1073741824 /* TypeNgModule */) { modules.push(provider.token); } provider.index = i; providersByKey[tokenKey(provider.token)] = provider; } return { // Will be filled later... factory: null, providersByKey, providers, modules, scope: scope, }; } function initNgModule(data) { const def = data._def; const providers = data._providers = newArray(def.providers.length); for (let i = 0; i < def.providers.length; i++) { const provDef = def.providers[i]; if (!(provDef.flags & 4096 /* LazyProvider */)) { // Make sure the provider has not been already initialized outside this loop. if (providers[i] === undefined) { providers[i] = _createProviderInstance(data, provDef); } } } } function resolveNgModuleDep(data, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) { const former = setCurrentInjector(data); try { if (depDef.flags & 8 /* Value */) { return depDef.token; } if (depDef.flags & 2 /* Optional */) { notFoundValue = null; } if (depDef.flags & 1 /* SkipSelf */) { return data._parent.get(depDef.token, notFoundValue); } const tokenKey = depDef.tokenKey; switch (tokenKey) { case InjectorRefTokenKey: case INJECTORRefTokenKey: case NgModuleRefTokenKey: return data; } const providerDef = data._def.providersByKey[tokenKey]; let injectableDef; if (providerDef) { let providerInstance = data._providers[providerDef.index]; if (providerInstance === undefined) { providerInstance = data._providers[providerDef.index] = _createProviderInstance(data, providerDef); } return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance; } else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) { const index = data._providers.length; data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = { flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */, value: injectableDef.factory, deps: [], index, token: depDef.token, }; data._providers[index] = UNDEFINED_VALUE; return (data._providers[index] = _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey])); } else if (depDef.flags & 4 /* Self */) { return notFoundValue; } return data._parent.get(depDef.token, notFoundValue); } finally { setCurrentInjector(former); } } function moduleTransitivelyPresent(ngModule, scope) { return ngModule._def.modules.indexOf(scope) > -1; } function targetsModule(ngModule, def) { const providedIn = def.providedIn; return providedIn != null && (providedIn === 'any' || providedIn === ngModule._def.scope || moduleTransitivelyPresent(ngModule, providedIn)); } function _createProviderInstance(ngModule, providerDef) { let injectable; switch (providerDef.flags & 201347067 /* Types */) { case 512 /* TypeClassProvider */: injectable = _createClass(ngModule, providerDef.value, providerDef.deps); break; case 1024 /* TypeFactoryProvider */: injectable = _callFactory(ngModule, providerDef.value, providerDef.deps); break; case 2048 /* TypeUseExistingProvider */: injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]); break; case 256 /* TypeValueProvider */: injectable = providerDef.value; break; } // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already // set (ngOnDestroy was detected statically). if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' && !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') { providerDef.flags |= 131072 /* OnDestroy */; } return injectable === undefined ? UNDEFINED_VALUE : injectable; } function _createClass(ngModule, ctor, deps) { const len = deps.length; switch (len) { case 0: return new ctor(); case 1: return new ctor(resolveNgModuleDep(ngModule, deps[0])); case 2: return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1])); case 3: return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues[i] = resolveNgModuleDep(ngModule, deps[i]); } return new ctor(...depValues); } } function _callFactory(ngModule, factory, deps) { const len = deps.length; switch (len) { case 0: return factory(); case 1: return factory(resolveNgModuleDep(ngModule, deps[0])); case 2: return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1])); case 3: return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues[i] = resolveNgModuleDep(ngModule, deps[i]); } return factory(...depValues); } } function callNgModuleLifecycle(ngModule, lifecycles) { const def = ngModule._def; const destroyed = new Set(); for (let i = 0; i < def.providers.length; i++) { const provDef = def.providers[i]; if (provDef.flags & 131072 /* OnDestroy */) { const instance = ngModule._providers[i]; if (instance && instance !== UNDEFINED_VALUE) { const onDestroy = instance.ngOnDestroy; if (typeof onDestroy === 'function' && !destroyed.has(instance)) { onDestroy.apply(instance); destroyed.add(instance); } } } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function attachEmbeddedView(parentView, elementData, viewIndex, view) { let embeddedViews = elementData.viewContainer._embeddedViews; if (viewIndex === null || viewIndex === undefined) { viewIndex = embeddedViews.length; } view.viewContainerParent = parentView; addToArray(embeddedViews, viewIndex, view); attachProjectedView(elementData, view); Services.dirtyParentQueries(view); const prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null; renderAttachEmbeddedView(elementData, prevView, view); } function attachProjectedView(vcElementData, view) { const dvcElementData = declaredViewContainer(view); if (!dvcElementData || dvcElementData === vcElementData || view.state & 16 /* IsProjectedView */) { return; } // Note: For performance reasons, we // - add a view to template._projectedViews only 1x throughout its lifetime, // and remove it not until the view is destroyed. // (hard, as when a parent view is attached/detached we would need to attach/detach all // nested projected views as well, even across component boundaries). // - don't track the insertion order of views in the projected views array // (hard, as when the views of the same template are inserted different view containers) view.state |= 16 /* IsProjectedView */; let projectedViews = dvcElementData.template._projectedViews; if (!projectedViews) { projectedViews = dvcElementData.template._projectedViews = []; } projectedViews.push(view); // Note: we are changing the NodeDef here as we cannot calculate // the fact whether a template is used for projection during compilation. markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef); } function markNodeAsProjectedTemplate(viewDef, nodeDef) { if (nodeDef.flags & 4 /* ProjectedTemplate */) { return; } viewDef.nodeFlags |= 4 /* ProjectedTemplate */; nodeDef.flags |= 4 /* ProjectedTemplate */; let parentNodeDef = nodeDef.parent; while (parentNodeDef) { parentNodeDef.childFlags |= 4 /* ProjectedTemplate */; parentNodeDef = parentNodeDef.parent; } } function detachEmbeddedView(elementData, viewIndex) { const embeddedViews = elementData.viewContainer._embeddedViews; if (viewIndex == null || viewIndex >= embeddedViews.length) { viewIndex = embeddedViews.length - 1; } if (viewIndex < 0) { return null; } const view = embeddedViews[viewIndex]; view.viewContainerParent = null; removeFromArray(embeddedViews, viewIndex); // See attachProjectedView for why we don't update projectedViews here. Services.dirtyParentQueries(view); renderDetachView$1(view); return view; } function detachProjectedView(view) { if (!(view.state & 16 /* IsProjectedView */)) { return; } const dvcElementData = declaredViewContainer(view); if (dvcElementData) { const projectedViews = dvcElementData.template._projectedViews; if (projectedViews) { removeFromArray(projectedViews, projectedViews.indexOf(view)); Services.dirtyParentQueries(view); } } } function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) { const embeddedViews = elementData.viewContainer._embeddedViews; const view = embeddedViews[oldViewIndex]; removeFromArray(embeddedViews, oldViewIndex); if (newViewIndex == null) { newViewIndex = embeddedViews.length; } addToArray(embeddedViews, newViewIndex, view); // Note: Don't need to change projectedViews as the order in there // as always invalid... Services.dirtyParentQueries(view); renderDetachView$1(view); const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null; renderAttachEmbeddedView(elementData, prevView, view); return view; } function renderAttachEmbeddedView(elementData, prevView, view) { const prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : elementData.renderElement; const parentNode = view.renderer.parentNode(prevRenderNode); const nextSibling = view.renderer.nextSibling(prevRenderNode); // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be! // However, browsers automatically do `appendChild` when there is no `nextSibling`. visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined); } function renderDetachView$1(view) { visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const EMPTY_CONTEXT = {}; // Attention: this function is called as top level function. // Putting any logic in here will destroy closure tree shaking! function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) { return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors); } function getComponentViewDefinitionFactory(componentFactory) { return componentFactory.viewDefFactory; } class ComponentFactory_ extends ComponentFactory { constructor(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) { // Attention: this ctor is called as top level function. // Putting any logic in here will destroy closure tree shaking! super(); this.selector = selector; this.componentType = componentType; this._inputs = _inputs; this._outputs = _outputs; this.ngContentSelectors = ngContentSelectors; this.viewDefFactory = viewDefFactory; } get inputs() { const inputsArr = []; const inputs = this._inputs; for (let propName in inputs) { const templateName = inputs[propName]; inputsArr.push({ propName, templateName }); } return inputsArr; } get outputs() { const outputsArr = []; for (let propName in this._outputs) { const templateName = this._outputs[propName]; outputsArr.push({ propName, templateName }); } return outputsArr; } /** * Creates a new component. */ create(injector, projectableNodes, rootSelectorOrNode, ngModule) { if (!ngModule) { throw new Error('ngModule should be provided'); } const viewDef = resolveDefinition(this.viewDefFactory); const componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex; const view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT); const component = asProviderData(view, componentNodeIndex).instance; if (rootSelectorOrNode) { view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full); } return new ComponentRef_(view, new ViewRef_(view), component); } } class ComponentRef_ extends ComponentRef { constructor(_view, _viewRef, _component) { super(); this._view = _view; this._viewRef = _viewRef; this._component = _component; this._elDef = this._view.def.nodes[0]; this.hostView = _viewRef; this.changeDetectorRef = _viewRef; this.instance = _component; } get location() { return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement); } get injector() { return new Injector_(this._view, this._elDef); } get componentType() { return this._component.constructor; } destroy() { this._viewRef.destroy(); } onDestroy(callback) { this._viewRef.onDestroy(callback); } } function createViewContainerData(view, elDef, elData) { return new ViewContainerRef_(view, elDef, elData); } class ViewContainerRef_ { constructor(_view, _elDef, _data) { this._view = _view; this._elDef = _elDef; this._data = _data; /** * @internal */ this._embeddedViews = []; } get element() { return new ElementRef(this._data.renderElement); } get injector() { return new Injector_(this._view, this._elDef); } /** @deprecated No replacement */ get parentInjector() { let view = this._view; let elDef = this._elDef.parent; while (!elDef && view) { elDef = viewParentEl(view); view = view.parent; } return view ? new Injector_(view, elDef) : new Injector_(this._view, null); } clear() { const len = this._embeddedViews.length; for (let i = len - 1; i >= 0; i--) { const view = detachEmbeddedView(this._data, i); Services.destroyView(view); } } get(index) { const view = this._embeddedViews[index]; if (view) { const ref = new ViewRef_(view); ref.attachToViewContainerRef(this); return ref; } return null; } get length() { return this._embeddedViews.length; } createEmbeddedView(templateRef, context, index) { const viewRef = templateRef.createEmbeddedView(context || {}); this.insert(viewRef, index); return viewRef; } createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) { const contextInjector = injector || this.parentInjector; if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) { ngModuleRef = contextInjector.get(NgModuleRef); } const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef); this.insert(componentRef.hostView, index); return componentRef; } insert(viewRef, index) { if (viewRef.destroyed) { throw new Error('Cannot insert a destroyed View in a ViewContainer!'); } const viewRef_ = viewRef; const viewData = viewRef_._view; attachEmbeddedView(this._view, this._data, index, viewData); viewRef_.attachToViewContainerRef(this); return viewRef; } move(viewRef, currentIndex) { if (viewRef.destroyed) { throw new Error('Cannot move a destroyed View in a ViewContainer!'); } const previousIndex = this._embeddedViews.indexOf(viewRef._view); moveEmbeddedView(this._data, previousIndex, currentIndex); return viewRef; } indexOf(viewRef) { return this._embeddedViews.indexOf(viewRef._view); } remove(index) { const viewData = detachEmbeddedView(this._data, index); if (viewData) { Services.destroyView(viewData); } } detach(index) { const view = detachEmbeddedView(this._data, index); return view ? new ViewRef_(view) : null; } } function createChangeDetectorRef(view) { return new ViewRef_(view); } class ViewRef_ { constructor(_view) { this._view = _view; this._viewContainerRef = null; this._appRef = null; } get rootNodes() { return rootRenderNodes(this._view); } get context() { return this._view.context; } get destroyed() { return (this._view.state & 128 /* Destroyed */) !== 0; } markForCheck() { markParentViewsForCheck(this._view); } detach() { this._view.state &= ~4 /* Attached */; } detectChanges() { const fs = this._view.root.rendererFactory; if (fs.begin) { fs.begin(); } try { Services.checkAndUpdateView(this._view); } finally { if (fs.end) { fs.end(); } } } checkNoChanges() { Services.checkNoChangesView(this._view); } reattach() { this._view.state |= 4 /* Attached */; } onDestroy(callback) { if (!this._view.disposables) { this._view.disposables = []; } this._view.disposables.push(callback); } destroy() { if (this._appRef) { this._appRef.detachView(this); } else if (this._viewContainerRef) { this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)); } Services.destroyView(this._view); } detachFromAppRef() { this._appRef = null; renderDetachView$1(this._view); Services.dirtyParentQueries(this._view); } attachToAppRef(appRef) { if (this._viewContainerRef) { throw new Error('This view is already attached to a ViewContainer!'); } this._appRef = appRef; } attachToViewContainerRef(vcRef) { if (this._appRef) { throw new Error('This view is already attached directly to the ApplicationRef!'); } this._viewContainerRef = vcRef; } } function createTemplateData(view, def) { return new TemplateRef_(view, def); } class TemplateRef_ extends TemplateRef { constructor(_parentView, _def) { super(); this._parentView = _parentView; this._def = _def; } createEmbeddedView(context) { return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context)); } get elementRef() { return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement); } } function createInjector$1(view, elDef) { return new Injector_(view, elDef); } class Injector_ { constructor(view, elDef) { this.view = view; this.elDef = elDef; } get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND) { const allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false; return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token, tokenKey: tokenKey(token) }, notFoundValue); } } function nodeValue(view, index) { const def = view.def.nodes[index]; if (def.flags & 1 /* TypeElement */) { const elData = asElementData(view, def.nodeIndex); return def.element.template ? elData.template : elData.renderElement; } else if (def.flags & 2 /* TypeText */) { return asTextData(view, def.nodeIndex).renderText; } else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) { return asProviderData(view, def.nodeIndex).instance; } throw new Error(`Illegal state: read nodeValue for node index ${index}`); } function createNgModuleRef(moduleType, parent, bootstrapComponents, def) { return new NgModuleRef_(moduleType, parent, bootstrapComponents, def); } class NgModuleRef_ { constructor(_moduleType, _parent, _bootstrapComponents, _def) { this._moduleType = _moduleType; this._parent = _parent; this._bootstrapComponents = _bootstrapComponents; this._def = _def; this._destroyListeners = []; this._destroyed = false; this.injector = this; initNgModule(this); } get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) { let flags = 0 /* None */; if (injectFlags & InjectFlags.SkipSelf) { flags |= 1 /* SkipSelf */; } else if (injectFlags & InjectFlags.Self) { flags |= 4 /* Self */; } return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue); } get instance() { return this.get(this._moduleType); } get componentFactoryResolver() { return this.get(ComponentFactoryResolver); } destroy() { if (this._destroyed) { throw new Error(`The ng module ${stringify(this.instance.constructor)} has already been destroyed.`); } this._destroyed = true; callNgModuleLifecycle(this, 131072 /* OnDestroy */); this._destroyListeners.forEach((listener) => listener()); } onDestroy(callback) { this._destroyListeners.push(callback); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const Renderer2TokenKey = tokenKey(Renderer2); const ElementRefTokenKey = tokenKey(ElementRef); const ViewContainerRefTokenKey = tokenKey(ViewContainerRef); const TemplateRefTokenKey = tokenKey(TemplateRef); const ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef); const InjectorRefTokenKey$1 = tokenKey(Injector); const INJECTORRefTokenKey$1 = tokenKey(INJECTOR$1); function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) { const bindings = []; if (props) { for (let prop in props) { const [bindingIndex, nonMinifiedName] = props[prop]; bindings[bindingIndex] = { flags: 8 /* TypeProperty */, name: prop, nonMinifiedName, ns: null, securityContext: null, suffix: null }; } } const outputDefs = []; if (outputs) { for (let propName in outputs) { outputDefs.push({ type: 1 /* DirectiveOutput */, propName, target: null, eventName: outputs[propName] }); } } flags |= 16384 /* TypeDirective */; return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs); } function pipeDef(flags, ctor, deps) { flags |= 16 /* TypePipe */; return _def(-1, flags, null, 0, ctor, ctor, deps); } function providerDef(flags, matchedQueries, token, value, deps) { return _def(-1, flags, matchedQueries, 0, token, value, deps); } function _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) { const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl); if (!outputs) { outputs = []; } if (!bindings) { bindings = []; } // Need to resolve forwardRefs as e.g. for `useValue` we // lowered the expression and then stopped evaluating it, // i.e. also didn't unwrap it. value = resolveForwardRef(value); const depDefs = splitDepsDsl(deps, stringify(token)); return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex: -1, childCount, bindings, bindingFlags: calcBindingFlags(bindings), outputs, element: null, provider: { token, value, deps: depDefs }, text: null, query: null, ngContent: null }; } function createProviderInstance(view, def) { return _createProviderInstance$1(view, def); } function createPipeInstance(view, def) { // deps are looked up from component. let compView = view; while (compView.parent && !isComponentView(compView)) { compView = compView.parent; } // pipes can see the private services of the component const allowPrivateServices = true; // pipes are always eager and classes! return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps); } function createDirectiveInstance(view, def) { // components can see other private services, other directives can't. const allowPrivateServices = (def.flags & 32768 /* Component */) > 0; // directives are always eager and classes! const instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps); if (def.outputs.length) { for (let i = 0; i < def.outputs.length; i++) { const output = def.outputs[i]; const outputObservable = instance[output.propName]; if (isObservable(outputObservable)) { const subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName)); view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription); } else { throw new Error(`@Output ${output.propName} not initialized in '${instance.constructor.name}'.`); } } } return instance; } function eventHandlerClosure(view, index, eventName) { return (event) => dispatchEvent(view, index, eventName, event); } function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const providerData = asProviderData(view, def.nodeIndex); const directive = providerData.instance; let changed = false; let changes = undefined; const bindLen = def.bindings.length; if (bindLen > 0 && checkBinding(view, def, 0, v0)) { changed = true; changes = updateProp(view, providerData, def, 0, v0, changes); } if (bindLen > 1 && checkBinding(view, def, 1, v1)) { changed = true; changes = updateProp(view, providerData, def, 1, v1, changes); } if (bindLen > 2 && checkBinding(view, def, 2, v2)) { changed = true; changes = updateProp(view, providerData, def, 2, v2, changes); } if (bindLen > 3 && checkBinding(view, def, 3, v3)) { changed = true; changes = updateProp(view, providerData, def, 3, v3, changes); } if (bindLen > 4 && checkBinding(view, def, 4, v4)) { changed = true; changes = updateProp(view, providerData, def, 4, v4, changes); } if (bindLen > 5 && checkBinding(view, def, 5, v5)) { changed = true; changes = updateProp(view, providerData, def, 5, v5, changes); } if (bindLen > 6 && checkBinding(view, def, 6, v6)) { changed = true; changes = updateProp(view, providerData, def, 6, v6, changes); } if (bindLen > 7 && checkBinding(view, def, 7, v7)) { changed = true; changes = updateProp(view, providerData, def, 7, v7, changes); } if (bindLen > 8 && checkBinding(view, def, 8, v8)) { changed = true; changes = updateProp(view, providerData, def, 8, v8, changes); } if (bindLen > 9 && checkBinding(view, def, 9, v9)) { changed = true; changes = updateProp(view, providerData, def, 9, v9, changes); } if (changes) { directive.ngOnChanges(changes); } if ((def.flags & 65536 /* OnInit */) && shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) { directive.ngOnInit(); } if (def.flags & 262144 /* DoCheck */) { directive.ngDoCheck(); } return changed; } function checkAndUpdateDirectiveDynamic(view, def, values) { const providerData = asProviderData(view, def.nodeIndex); const directive = providerData.instance; let changed = false; let changes = undefined; for (let i = 0; i < values.length; i++) { if (checkBinding(view, def, i, values[i])) { changed = true; changes = updateProp(view, providerData, def, i, values[i], changes); } } if (changes) { directive.ngOnChanges(changes); } if ((def.flags & 65536 /* OnInit */) && shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) { directive.ngOnInit(); } if (def.flags & 262144 /* DoCheck */) { directive.ngDoCheck(); } return changed; } function _createProviderInstance$1(view, def) { // private services can see other private services const allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0; const providerDef = def.provider; switch (def.flags & 201347067 /* Types */) { case 512 /* TypeClassProvider */: return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps); case 1024 /* TypeFactoryProvider */: return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps); case 2048 /* TypeUseExistingProvider */: return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]); case 256 /* TypeValueProvider */: return providerDef.value; } } function createClass(view, elDef, allowPrivateServices, ctor, deps) { const len = deps.length; switch (len) { case 0: return new ctor(); case 1: return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0])); case 2: return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1])); case 3: return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i])); } return new ctor(...depValues); } } function callFactory(view, elDef, allowPrivateServices, factory, deps) { const len = deps.length; switch (len) { case 0: return factory(); case 1: return factory(resolveDep(view, elDef, allowPrivateServices, deps[0])); case 2: return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1])); case 3: return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2])); default: const depValues = []; for (let i = 0; i < len; i++) { depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i])); } return factory(...depValues); } } // This default value is when checking the hierarchy for a token. // // It means both: // - the token is not provided by the current injector, // - only the element injectors should be checked (ie do not check module injectors // // mod1 // / // el1 mod2 // \ / // el2 // // When requesting el2.injector.get(token), we should check in the following order and return the // first found value: // - el2.injector.get(token, default) // - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module // - mod2.injector.get(token, default) const NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {}; function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) { if (depDef.flags & 8 /* Value */) { return depDef.token; } const startView = view; if (depDef.flags & 2 /* Optional */) { notFoundValue = null; } const tokenKey = depDef.tokenKey; if (tokenKey === ChangeDetectorRefTokenKey) { // directives on the same element as a component should be able to control the change detector // of that component as well. allowPrivateServices = !!(elDef && elDef.element.componentView); } if (elDef && (depDef.flags & 1 /* SkipSelf */)) { allowPrivateServices = false; elDef = elDef.parent; } let searchView = view; while (searchView) { if (elDef) { switch (tokenKey) { case Renderer2TokenKey: { const compView = findCompView(searchView, elDef, allowPrivateServices); return compView.renderer; } case ElementRefTokenKey: return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement); case ViewContainerRefTokenKey: return asElementData(searchView, elDef.nodeIndex).viewContainer; case TemplateRefTokenKey: { if (elDef.element.template) { return asElementData(searchView, elDef.nodeIndex).template; } break; } case ChangeDetectorRefTokenKey: { let cdView = findCompView(searchView, elDef, allowPrivateServices); return createChangeDetectorRef(cdView); } case InjectorRefTokenKey$1: case INJECTORRefTokenKey$1: return createInjector$1(searchView, elDef); default: const providerDef = (allowPrivateServices ? elDef.element.allProviders : elDef.element.publicProviders)[tokenKey]; if (providerDef) { let providerData = asProviderData(searchView, providerDef.nodeIndex); if (!providerData) { providerData = { instance: _createProviderInstance$1(searchView, providerDef) }; searchView.nodes[providerDef.nodeIndex] = providerData; } return providerData.instance; } } } allowPrivateServices = isComponentView(searchView); elDef = viewParentEl(searchView); searchView = searchView.parent; if (depDef.flags & 4 /* Self */) { searchView = null; } } const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR); if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) { // Return the value from the root element injector when // - it provides it // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) // - the module injector should not be checked // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) return value; } return startView.root.ngModule.injector.get(depDef.token, notFoundValue); } function findCompView(view, elDef, allowPrivateServices) { let compView; if (allowPrivateServices) { compView = asElementData(view, elDef.nodeIndex).componentView; } else { compView = view; while (compView.parent && !isComponentView(compView)) { compView = compView.parent; } } return compView; } function updateProp(view, providerData, def, bindingIdx, value, changes) { if (def.flags & 32768 /* Component */) { const compView = asElementData(view, def.parent.nodeIndex).componentView; if (compView.def.flags & 2 /* OnPush */) { compView.state |= 8 /* ChecksEnabled */; } } const binding = def.bindings[bindingIdx]; const propName = binding.name; // Note: This is still safe with Closure Compiler as // the user passed in the property name as an object has to `providerDef`, // so Closure Compiler will have renamed the property correctly already. providerData.instance[propName] = value; if (def.flags & 524288 /* OnChanges */) { changes = changes || {}; const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]); const binding = def.bindings[bindingIdx]; changes[binding.nonMinifiedName] = new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0); } view.oldValues[def.bindingIndex + bindingIdx] = value; return changes; } // This function calls the ngAfterContentCheck, ngAfterContentInit, // ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node // flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are // called during a pre-order traversal of the view tree (that is calling the // parent hooks before the child hooks) these events are sent in using a // post-order traversal of the tree (children before parents). This changes the // meaning of initIndex in the view state. For ngOnInit, initIndex tracks the // expected nodeIndex which a ngOnInit should be called. When sending // ngAfterContentInit and ngAfterViewInit it is the expected count of // ngAfterContentInit or ngAfterViewInit methods that have been called. This // ensure that despite being called recursively or after picking up after an // exception, the ngAfterContentInit or ngAfterViewInit will be called on the // correct nodes. Consider for example, the following (where E is an element // and D is a directive) // Tree: pre-order index post-order index // E1 0 6 // E2 1 1 // D3 2 0 // E4 3 5 // E5 4 4 // E6 5 2 // E7 6 3 // As can be seen, the post-order index has an unclear relationship to the // pre-order index (postOrderIndex === preOrderIndex - parentCount + // childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit // are stable (will be the same for the same view regardless of exceptions or // recursion) we just need to count them which will roughly correspond to the // post-order index (it skips elements and directives that do not have // lifecycle hooks). // // For example, if an exception is raised in the E6.onAfterViewInit() the // initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to // initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will // not have their ngAfterViewInit() called but, starting with E7, the rest of // the view will begin getting ngAfterViewInit() called until a check and // pass is complete. // // This algorthim also handles recursion. Consider if E4's ngAfterViewInit() // indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected // initIndex is set to 6, the recusive checkAndUpdateView() starts walk again. // D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1. // When the recursion returns the initIndex will be 7 so E1 is skipped as it // has already been called in the recursively called checkAnUpdateView(). function callLifecycleHooksChildrenFirst(view, lifecycles) { if (!(view.def.nodeFlags & lifecycles)) { return; } const nodes = view.def.nodes; let initIndex = 0; for (let i = 0; i < nodes.length; i++) { const nodeDef = nodes[i]; let parent = nodeDef.parent; if (!parent && nodeDef.flags & lifecycles) { // matching root node (e.g. a pipe) callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++); } if ((nodeDef.childFlags & lifecycles) === 0) { // no child matches one of the lifecycles i += nodeDef.childCount; } while (parent && (parent.flags & 1 /* TypeElement */) && i === parent.nodeIndex + parent.childCount) { // last child of an element if (parent.directChildFlags & lifecycles) { initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex); } parent = parent.parent; } } } function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) { for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) { const nodeDef = view.def.nodes[i]; if (nodeDef.flags & lifecycles) { callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++); } // only visit direct children i += nodeDef.childCount; } return initIndex; } function callProviderLifecycles(view, index, lifecycles, initIndex) { const providerData = asProviderData(view, index); if (!providerData) { return; } const provider = providerData.instance; if (!provider) { return; } Services.setCurrentNode(view, index); if (lifecycles & 1048576 /* AfterContentInit */ && shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) { provider.ngAfterContentInit(); } if (lifecycles & 2097152 /* AfterContentChecked */) { provider.ngAfterContentChecked(); } if (lifecycles & 4194304 /* AfterViewInit */ && shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) { provider.ngAfterViewInit(); } if (lifecycles & 8388608 /* AfterViewChecked */) { provider.ngAfterViewChecked(); } if (lifecycles & 131072 /* OnDestroy */) { provider.ngOnDestroy(); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class ComponentFactoryResolver$1 extends ComponentFactoryResolver { /** * @param ngModule The NgModuleRef to which all resolved factories are bound. */ constructor(ngModule) { super(); this.ngModule = ngModule; } resolveComponentFactory(component) { ngDevMode && assertComponentType(component); const componentDef = getComponentDef(component); return new ComponentFactory$1(componentDef, this.ngModule); } } function toRefArray(map) { const array = []; for (let nonMinified in map) { if (map.hasOwnProperty(nonMinified)) { const minified = map[nonMinified]; array.push({ propName: minified, templateName: nonMinified }); } } return array; } function getNamespace$1(elementName) { const name = elementName.toLowerCase(); return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null); } /** * A change detection scheduler token for {@link RootContext}. This token is the default value used * for the default `RootContext` found in the {@link ROOT_CONTEXT} token. */ const SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', { providedIn: 'root', factory: () => defaultScheduler, }); function createChainedInjector(rootViewInjector, moduleInjector) { return { get: (token, notFoundValue, flags) => { const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags); if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) { // Return the value from the root element injector when // - it provides it // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) // - the module injector should not be checked // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) return value; } return moduleInjector.get(token, notFoundValue, flags); } }; } /** * Render3 implementation of {@link viewEngine_ComponentFactory}. */ class ComponentFactory$1 extends ComponentFactory { /** * @param componentDef The component definition. * @param ngModule The NgModuleRef to which the factory is bound. */ constructor(componentDef, ngModule) { super(); this.componentDef = componentDef; this.ngModule = ngModule; this.componentType = componentDef.type; this.selector = stringifyCSSSelectorList(componentDef.selectors); this.ngContentSelectors = componentDef.ngContentSelectors ? componentDef.ngContentSelectors : []; this.isBoundToModule = !!ngModule; } get inputs() { return toRefArray(this.componentDef.inputs); } get outputs() { return toRefArray(this.componentDef.outputs); } create(injector, projectableNodes, rootSelectorOrNode, ngModule) { ngModule = ngModule || this.ngModule; const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector; const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3); const sanitizer = rootViewInjector.get(Sanitizer, null); const hostRenderer = rendererFactory.createRenderer(null, this.componentDef); // Determine a tag name used for creating host elements when this component is created // dynamically. Default to 'div' if this component did not specify any tag name in its selector. const elementName = this.componentDef.selectors[0][0] || 'div'; const hostRNode = rootSelectorOrNode ? locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) : createElementNode(rendererFactory.createRenderer(null, this.componentDef), elementName, getNamespace$1(elementName)); const rootFlags = this.componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ : 16 /* CheckAlways */ | 512 /* IsRoot */; const rootContext = createRootContext(); // Create the root view. Uses empty TView and ContentTemplate. const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null); const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector); // rootView is the parent when bootstrapping // TODO(misko): it looks like we are entering view here but we don't really need to as // `renderView` does that. However as the code is written it is needed because // `createRootComponentView` and `createRootComponent` both read global state. Fixing those // issues would allow us to drop this. enterView(rootLView); let component; let tElementNode; try { const componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer); if (hostRNode) { if (rootSelectorOrNode) { setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]); } else { // If host element is created as a part of this function call (i.e. `rootSelectorOrNode` // is not defined), also apply attributes and classes extracted from component selector. // Extract attributes and classes from the first selector only to match VE behavior. const { attrs, classes } = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]); if (attrs) { setUpAttributes(hostRenderer, hostRNode, attrs); } if (classes && classes.length > 0) { writeDirectClass(hostRenderer, hostRNode, classes.join(' ')); } } } tElementNode = getTNode(rootTView, HEADER_OFFSET); if (projectableNodes !== undefined) { const projection = tElementNode.projection = []; for (let i = 0; i < this.ngContentSelectors.length; i++) { const nodesforSlot = projectableNodes[i]; // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade // case). Here we do normalize passed data structure to be an array of arrays to avoid // complex checks down the line. // We also normalize the length of the passed in projectable nodes (to match the number of // <ng-container> slots defined by a component). projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null); } } // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and // executed here? // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]); renderView(rootTView, rootLView, null); } finally { leaveView(); } return new ComponentRef$1(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode); } } const componentFactoryResolver = new ComponentFactoryResolver$1(); /** * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the * ComponentFactoryResolver * already exists, retrieves the existing ComponentFactoryResolver. * * @returns The ComponentFactoryResolver instance to use */ function injectComponentFactoryResolver() { return componentFactoryResolver; } /** * Represents an instance of a Component created via a {@link ComponentFactory}. * * `ComponentRef` provides access to the Component Instance as well other objects related to this * Component Instance and allows you to destroy the Component Instance via the {@link #destroy} * method. * */ class ComponentRef$1 extends ComponentRef { constructor(componentType, instance, location, _rootLView, _tNode) { super(); this.location = location; this._rootLView = _rootLView; this._tNode = _tNode; this.instance = instance; this.hostView = this.changeDetectorRef = new RootViewRef(_rootLView); this.componentType = componentType; } get injector() { return new NodeInjector(this._tNode, this._rootLView); } destroy() { this.hostView.destroy(); } onDestroy(callback) { this.hostView.onDestroy(callback); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Adds decorator, constructor, and property metadata to a given type via static metadata fields * on the type. * * These metadata fields can later be read with Angular's `ReflectionCapabilities` API. * * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments * being tree-shaken away during production builds. */ function setClassMetadata(type, decorators, ctorParameters, propDecorators) { return noSideEffects(() => { const clazz = type; if (decorators !== null) { if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) { clazz.decorators.push(...decorators); } else { clazz.decorators = decorators; } } if (ctorParameters !== null) { // Rather than merging, clobber the existing parameters. If other projects exist which // use tsickle-style annotations and reflect over them in the same way, this could // cause issues, but that is vanishingly unlikely. clazz.ctorParameters = ctorParameters; } if (propDecorators !== null) { // The property decorator objects are merged as it is possible different fields have // different decorator types. Decorators on individual fields are not merged, as it's // also incredibly unlikely that a field will be decorated both with an Angular // decorator and a non-Angular decorator that's also been downleveled. if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) { clazz.propDecorators = Object.assign(Object.assign({}, clazz.propDecorators), propDecorators); } else { clazz.propDecorators = propDecorators; } } }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Map of module-id to the corresponding NgModule. * - In pre Ivy we track NgModuleFactory, * - In post Ivy we track the NgModuleType */ const modules = new Map(); /** * Registers a loaded module. Should only be called from generated NgModuleFactory code. * @publicApi */ function registerModuleFactory(id, factory) { const existing = modules.get(id); assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType); modules.set(id, factory); } function assertSameOrNotExisting(id, type, incoming) { if (type && type !== incoming) { throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`); } } function registerNgModuleType(ngModuleType) { const visited = new Set(); recurse(ngModuleType); function recurse(ngModuleType) { // The imports array of an NgModule must refer to other NgModules, // so an error is thrown if no module definition is available. const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true); const id = def.id; if (id !== null) { const existing = modules.get(id); assertSameOrNotExisting(id, existing, ngModuleType); modules.set(id, ngModuleType); } const imports = maybeUnwrapFn(def.imports); for (const i of imports) { if (!visited.has(i)) { visited.add(i); recurse(i); } } } } function clearModulesForTest() { modules.clear(); } function getRegisteredNgModuleType(id) { return modules.get(id) || autoRegisterModuleById[id]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NgModuleRef$1 extends NgModuleRef { constructor(ngModuleType, _parent) { super(); this._parent = _parent; // tslint:disable-next-line:require-internal-with-underscore this._bootstrapComponents = []; this.injector = this; this.destroyCbs = []; // When bootstrapping a module we have a dependency graph that looks like this: // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the // module being resolved tries to inject the ComponentFactoryResolver, it'll create a // circular dependency which will result in a runtime error, because the injector doesn't // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves // and providing it, rather than letting the injector resolve it. this.componentFactoryResolver = new ComponentFactoryResolver$1(this); const ngModuleDef = getNgModuleDef(ngModuleType); ngDevMode && assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`); const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType); ngLocaleIdDef && setLocaleId(ngLocaleIdDef); this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap); this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [ { provide: NgModuleRef, useValue: this }, { provide: ComponentFactoryResolver, useValue: this.componentFactoryResolver } ], stringify(ngModuleType)); // We need to resolve the injector types separately from the injector creation, because // the module might be trying to use this ref in its contructor for DI which will cause a // circular error that will eventually error out, because the injector isn't created yet. this._r3Injector._resolveInjectorDefTypes(); this.instance = this.get(ngModuleType); } get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) { if (token === Injector || token === NgModuleRef || token === INJECTOR$1) { return this; } return this._r3Injector.get(token, notFoundValue, injectFlags); } destroy() { ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed'); const injector = this._r3Injector; !injector.destroyed && injector.destroy(); this.destroyCbs.forEach(fn => fn()); this.destroyCbs = null; } onDestroy(callback) { ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed'); this.destroyCbs.push(callback); } } class NgModuleFactory$1 extends NgModuleFactory { constructor(moduleType) { super(); this.moduleType = moduleType; const ngModuleDef = getNgModuleDef(moduleType); if (ngModuleDef !== null) { // Register the NgModule with Angular's module registry. The location (and hence timing) of // this call is critical to ensure this works correctly (modules get registered when expected) // without bloating bundles (modules are registered when otherwise not referenced). // // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has // several practical consequences: // // - If an .ngfactory file is not imported from, the module won't be registered (and can be // tree shaken). // - If an .ngfactory file is imported from, the module will be registered even if an instance // is not actually created (via `create` below). // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's // imports, // // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are // not a required API to use - there are other ways to obtain an NgModuleFactory for a given // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead, // the side effect of registration is added here, in the constructor of NgModuleFactory, // ensuring no matter how a factory is created, the module is registered correctly. // // An alternative would be to include the registration side effect inline following the actual // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules // will be registered and retained even if they're otherwise never referenced. registerNgModuleType(moduleType); } } create(parentInjector) { return new NgModuleRef$1(this.moduleType, parentInjector); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Bindings for pure functions are stored after regular bindings. * * |-------decls------|---------vars---------| |----- hostVars (dir1) ------| * ------------------------------------------------------------------------------------------ * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots | * ------------------------------------------------------------------------------------------ * ^ ^ * TView.bindingStartIndex TView.expandoStartIndex * * Pure function instructions are given an offset from the binding root. Adding the offset to the * binding root gives the first index where the bindings are stored. In component views, the binding * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex + * any directive instances + any hostVars in directives evaluated before it. * * See VIEW_DATA.md for more information about host binding resolution. */ /** * If the value hasn't been saved, calls the pure function to store and return the * value. If it has been saved, returns the saved value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn Function that returns a value * @param thisArg Optional calling context of pureFn * @returns value * * @codeGenApi */ function ɵɵpureFunction0(slotOffset, pureFn, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); return lView[bindingIndex] === NO_CHANGE ? updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) : getBinding(lView, bindingIndex); } /** * If the value of the provided exp has changed, calls the pure function to return * an updated value. Or if the value has not changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn Function that returns an updated value * @param exp Updated expression value * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) { return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) { return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) { return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) { return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated(lView, bindingIndex + 4, exp5) || different ? updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) : pureFn(exp1, exp2, exp3, exp4, exp5)) : getBinding(lView, bindingIndex + 5); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param exp6 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ? updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) : getBinding(lView, bindingIndex + 6); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param exp6 * @param exp7 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ? updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) : getBinding(lView, bindingIndex + 7); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param exp5 * @param exp6 * @param exp7 * @param exp8 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) { const bindingIndex = getBindingRoot() + slotOffset; const lView = getLView(); const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4); return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ? updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) : getBinding(lView, bindingIndex + 8); } /** * pureFunction instruction that can support any number of bindings. * * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param slotOffset the offset from binding root to the reserved slot * @param pureFn A pure function that takes binding values and builds an object or array * containing those values. * @param exps An array of binding values * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * * @codeGenApi */ function ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) { return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg); } /** * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert * it to `undefined`. */ function getPureFunctionReturnValue(lView, returnValueIndex) { ngDevMode && assertIndexInRange(lView, returnValueIndex); const lastReturnValue = lView[returnValueIndex]; return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue; } /** * If the value of the provided exp has changed, calls the pure function to return * an updated value. Or if the value has not changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn Function that returns an updated value * @param exp Updated expression value * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated(lView, bindingIndex, exp) ? updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) : getPureFunctionReturnValue(lView, bindingIndex + 1); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated2(lView, bindingIndex, exp1, exp2) ? updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) : getPureFunctionReturnValue(lView, bindingIndex + 2); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ? updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) : getPureFunctionReturnValue(lView, bindingIndex + 3); } /** * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn * @param exp1 * @param exp2 * @param exp3 * @param exp4 * @param thisArg Optional calling context of pureFn * @returns Updated or cached value * */ function pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) { const bindingIndex = bindingRoot + slotOffset; return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ? updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) : getPureFunctionReturnValue(lView, bindingIndex + 4); } /** * pureFunction instruction that can support any number of bindings. * * If the value of any provided exp has changed, calls the pure function to return * an updated value. Or if no values have changed, returns cached value. * * @param lView LView in which the function is being executed. * @param bindingRoot Binding root index. * @param slotOffset the offset from binding root to the reserved slot * @param pureFn A pure function that takes binding values and builds an object or array * containing those values. * @param exps An array of binding values * @param thisArg Optional calling context of pureFn * @returns Updated or cached value */ function pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) { let bindingIndex = bindingRoot + slotOffset; let different = false; for (let i = 0; i < exps.length; i++) { bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true); } return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) : getPureFunctionReturnValue(lView, bindingIndex); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Create a pipe. * * @param index Pipe index where the pipe will be stored. * @param pipeName The name of the pipe * @returns T the instance of the pipe. * * @codeGenApi */ function ɵɵpipe(index, pipeName) { const tView = getTView(); let pipeDef; const adjustedIndex = index + HEADER_OFFSET; if (tView.firstCreatePass) { pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry); tView.data[adjustedIndex] = pipeDef; if (pipeDef.onDestroy) { (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy); } } else { pipeDef = tView.data[adjustedIndex]; } const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true)); const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject); try { // DI for pipes is supposed to behave like directives when placed on a component // host node, which means that we have to disable access to `viewProviders`. const previousIncludeViewProviders = setIncludeViewProviders(false); const pipeInstance = pipeFactory(); setIncludeViewProviders(previousIncludeViewProviders); store(tView, getLView(), adjustedIndex, pipeInstance); return pipeInstance; } finally { // we have to restore the injector implementation in finally, just in case the creation of the // pipe throws an error. setInjectImplementation(previousInjectImplementation); } } /** * Searches the pipe registry for a pipe with the given name. If one is found, * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved. * * @param name Name of pipe to resolve * @param registry Full list of available pipes * @returns Matching PipeDef */ function getPipeDef$1(name, registry) { if (registry) { for (let i = registry.length - 1; i >= 0; i--) { const pipeDef = registry[i]; if (name === pipeDef.name) { return pipeDef; } } } throw new RuntimeError("302" /* PIPE_NOT_FOUND */, `The pipe '${name}' could not be found!`); } /** * Invokes a pipe with 1 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind1(index, slotOffset, v1) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) : pipeInstance.transform(v1)); } /** * Invokes a pipe with 2 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * @param v2 2nd argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind2(index, slotOffset, v1, v2) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) : pipeInstance.transform(v1, v2)); } /** * Invokes a pipe with 3 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * @param v2 2nd argument to {@link PipeTransform#transform}. * @param v3 4rd argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind3(index, slotOffset, v1, v2, v3) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) : pipeInstance.transform(v1, v2, v3)); } /** * Invokes a pipe with 4 arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param v1 1st argument to {@link PipeTransform#transform}. * @param v2 2nd argument to {@link PipeTransform#transform}. * @param v3 3rd argument to {@link PipeTransform#transform}. * @param v4 4th argument to {@link PipeTransform#transform}. * * @codeGenApi */ function ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) : pipeInstance.transform(v1, v2, v3, v4)); } /** * Invokes a pipe with variable number of arguments. * * This instruction acts as a guard to {@link PipeTransform#transform} invoking * the pipe only when an input to the pipe changes. * * @param index Pipe index where the pipe was stored on creation. * @param slotOffset the offset in the reserved slot space * @param values Array of arguments to pass to {@link PipeTransform#transform} method. * * @codeGenApi */ function ɵɵpipeBindV(index, slotOffset, values) { const adjustedIndex = index + HEADER_OFFSET; const lView = getLView(); const pipeInstance = load(lView, adjustedIndex); return unwrapValue$1(lView, isPure(lView, adjustedIndex) ? pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) : pipeInstance.transform.apply(pipeInstance, values)); } function isPure(lView, index) { return lView[TVIEW].data[index].pure; } /** * Unwrap the output of a pipe transformation. * In order to trick change detection into considering that the new value is always different from * the old one, the old value is overwritten by NO_CHANGE. * * @param newValue the pipe transformation output. */ function unwrapValue$1(lView, newValue) { if (WrappedValue.isWrapped(newValue)) { newValue = WrappedValue.unwrap(newValue); // The NO_CHANGE value needs to be written at the index where the impacted binding value is // stored const bindingToInvalidateIdx = getBindingIndex(); lView[bindingToInvalidateIdx] = NO_CHANGE; } return newValue; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class EventEmitter_ extends rxjs__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor(isAsync = false) { super(); this.__isAsync = isAsync; } emit(value) { super.next(value); } subscribe(observerOrNext, error, complete) { let schedulerFn; let errorFn = (err) => null; let completeFn = () => null; if (observerOrNext && typeof observerOrNext === 'object') { schedulerFn = this.__isAsync ? (value) => { setTimeout(() => observerOrNext.next(value)); } : (value) => { observerOrNext.next(value); }; if (observerOrNext.error) { errorFn = this.__isAsync ? (err) => { setTimeout(() => observerOrNext.error(err)); } : (err) => { observerOrNext.error(err); }; } if (observerOrNext.complete) { completeFn = this.__isAsync ? () => { setTimeout(() => observerOrNext.complete()); } : () => { observerOrNext.complete(); }; } } else { schedulerFn = this.__isAsync ? (value) => { setTimeout(() => observerOrNext(value)); } : (value) => { observerOrNext(value); }; if (error) { errorFn = this.__isAsync ? (err) => { setTimeout(() => error(err)); } : (err) => { error(err); }; } if (complete) { completeFn = this.__isAsync ? () => { setTimeout(() => complete()); } : () => { complete(); }; } } const sink = super.subscribe(schedulerFn, errorFn, completeFn); if (observerOrNext instanceof rxjs__WEBPACK_IMPORTED_MODULE_0__["Subscription"]) { observerOrNext.add(sink); } return sink; } } /** * @publicApi */ const EventEmitter = EventEmitter_; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function symbolIterator() { return this._results[getSymbolIterator()](); } /** * An unmodifiable list of items that Angular keeps up to date when the state * of the application changes. * * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList} * provide. * * Implements an iterable interface, therefore it can be used in both ES6 * javascript `for (var i of items)` loops as well as in Angular templates with * `*ngFor="let i of myList"`. * * Changes can be observed by subscribing to the changes `Observable`. * * NOTE: In the future this class will implement an `Observable` interface. * * @usageNotes * ### Example * ```typescript * @Component({...}) * class Container { * @ViewChildren(Item) items:QueryList<Item>; * } * ``` * * @publicApi */ class QueryList { /** * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in * the same result) This is set to `false` for backwards compatibility but will be changed to * true in v12. */ constructor(_emitDistinctChangesOnly = false) { this._emitDistinctChangesOnly = _emitDistinctChangesOnly; this.dirty = true; this._results = []; this._changesDetected = false; this._changes = null; this.length = 0; this.first = undefined; this.last = undefined; // This function should be declared on the prototype, but doing so there will cause the class // declaration to have side-effects and become not tree-shakable. For this reason we do it in // the constructor. // [getSymbolIterator()](): Iterator<T> { ... } const symbol = getSymbolIterator(); const proto = QueryList.prototype; if (!proto[symbol]) proto[symbol] = symbolIterator; } /** * Returns `Observable` of `QueryList` notifying the subscriber of changes. */ get changes() { return this._changes || (this._changes = new EventEmitter()); } /** * Returns the QueryList entry at `index`. */ get(index) { return this._results[index]; } /** * See * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) */ map(fn) { return this._results.map(fn); } /** * See * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) */ filter(fn) { return this._results.filter(fn); } /** * See * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) */ find(fn) { return this._results.find(fn); } /** * See * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) */ reduce(fn, init) { return this._results.reduce(fn, init); } /** * See * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) */ forEach(fn) { this._results.forEach(fn); } /** * See * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) */ some(fn) { return this._results.some(fn); } /** * Returns a copy of the internal results list as an Array. */ toArray() { return this._results.slice(); } toString() { return this._results.toString(); } /** * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that * on change detection, it will not notify of changes to the queries, unless a new change * occurs. * * @param resultsTree The query results to store * @param identityAccessor Optional function for extracting stable object identity from a value * in the array. This function is executed for each element of the query result list while * comparing current query list with the new one (provided as a first argument of the `reset` * function) to detect if the lists are different. If the function is not provided, elements * are compared as is (without any pre-processing). */ reset(resultsTree, identityAccessor) { // Cast to `QueryListInternal` so that we can mutate fields which are readonly for the usage of // QueryList (but not for QueryList itself.) const self = this; self.dirty = false; const newResultFlat = flatten(resultsTree); if (this._changesDetected = !arrayEquals(self._results, newResultFlat, identityAccessor)) { self._results = newResultFlat; self.length = newResultFlat.length; self.last = newResultFlat[this.length - 1]; self.first = newResultFlat[0]; } } /** * Triggers a change event by emitting on the `changes` {@link EventEmitter}. */ notifyOnChanges() { if (this._changes && (this._changesDetected || !this._emitDistinctChangesOnly)) this._changes.emit(this); } /** internal */ setDirty() { this.dirty = true; } /** internal */ destroy() { this.changes.complete(); this.changes.unsubscribe(); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$7 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This hack is necessary so we don't erroneously get a circular dependency // failure based on types. const unusedValueExportToPlacateAjd$8 = 1; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8; class LQuery_ { constructor(queryList) { this.queryList = queryList; this.matches = null; } clone() { return new LQuery_(this.queryList); } setDirty() { this.queryList.setDirty(); } } class LQueries_ { constructor(queries = []) { this.queries = queries; } createEmbeddedView(tView) { const tQueries = tView.queries; if (tQueries !== null) { const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length; const viewLQueries = []; // An embedded view has queries propagated from a declaration view at the beginning of the // TQueries collection and up until a first content query declared in the embedded view. Only // propagated LQueries are created at this point (LQuery corresponding to declared content // queries will be instantiated from the content query instructions for each directive). for (let i = 0; i < noOfInheritedQueries; i++) { const tQuery = tQueries.getByIndex(i); const parentLQuery = this.queries[tQuery.indexInDeclarationView]; viewLQueries.push(parentLQuery.clone()); } return new LQueries_(viewLQueries); } return null; } insertView(tView) { this.dirtyQueriesWithMatches(tView); } detachView(tView) { this.dirtyQueriesWithMatches(tView); } dirtyQueriesWithMatches(tView) { for (let i = 0; i < this.queries.length; i++) { if (getTQuery(tView, i).matches !== null) { this.queries[i].setDirty(); } } } } class TQueryMetadata_ { constructor(predicate, flags, read = null) { this.predicate = predicate; this.flags = flags; this.read = read; } } class TQueries_ { constructor(queries = []) { this.queries = queries; } elementStart(tView, tNode) { ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only'); for (let i = 0; i < this.queries.length; i++) { this.queries[i].elementStart(tView, tNode); } } elementEnd(tNode) { for (let i = 0; i < this.queries.length; i++) { this.queries[i].elementEnd(tNode); } } embeddedTView(tNode) { let queriesForTemplateRef = null; for (let i = 0; i < this.length; i++) { const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0; const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex); if (tqueryClone) { tqueryClone.indexInDeclarationView = i; if (queriesForTemplateRef !== null) { queriesForTemplateRef.push(tqueryClone); } else { queriesForTemplateRef = [tqueryClone]; } } } return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null; } template(tView, tNode) { ngDevMode && assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only'); for (let i = 0; i < this.queries.length; i++) { this.queries[i].template(tView, tNode); } } getByIndex(index) { ngDevMode && assertIndexInRange(this.queries, index); return this.queries[index]; } get length() { return this.queries.length; } track(tquery) { this.queries.push(tquery); } } class TQuery_ { constructor(metadata, nodeIndex = -1) { this.metadata = metadata; this.matches = null; this.indexInDeclarationView = -1; this.crossesNgTemplate = false; /** * A flag indicating if a given query still applies to nodes it is crossing. We use this flag * (alongside with _declarationNodeIndex) to know when to stop applying content queries to * elements in a template. */ this._appliesToNextNode = true; this._declarationNodeIndex = nodeIndex; } elementStart(tView, tNode) { if (this.isApplyingToNode(tNode)) { this.matchTNode(tView, tNode); } } elementEnd(tNode) { if (this._declarationNodeIndex === tNode.index) { this._appliesToNextNode = false; } } template(tView, tNode) { this.elementStart(tView, tNode); } embeddedTView(tNode, childQueryIndex) { if (this.isApplyingToNode(tNode)) { this.crossesNgTemplate = true; // A marker indicating a `<ng-template>` element (a placeholder for query results from // embedded views created based on this `<ng-template>`). this.addMatch(-tNode.index, childQueryIndex); return new TQuery_(this.metadata); } return null; } isApplyingToNode(tNode) { if (this._appliesToNextNode && (this.metadata.flags & 1 /* descendants */) !== 1 /* descendants */) { const declarationNodeIdx = this._declarationNodeIndex; let parent = tNode.parent; // Determine if a given TNode is a "direct" child of a node on which a content query was // declared (only direct children of query's host node can match with the descendants: false // option). There are 3 main use-case / conditions to consider here: // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query // host node; // - <needs-target><ng-template [ngIf]="true"><i #target></i></ng-template></needs-target>: // here <i #target> parent node is null; // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse // up past the query's host node!). while (parent !== null && (parent.type & 8 /* ElementContainer */) && parent.index !== declarationNodeIdx) { parent = parent.parent; } return declarationNodeIdx === (parent !== null ? parent.index : -1); } return this._appliesToNextNode; } matchTNode(tView, tNode) { const predicate = this.metadata.predicate; if (Array.isArray(predicate)) { for (let i = 0; i < predicate.length; i++) { const name = predicate[i]; this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name)); // Also try matching the name to a provider since strings can be used as DI tokens too. this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false)); } } else { if (predicate === TemplateRef) { if (tNode.type & 4 /* Container */) { this.matchTNodeWithReadOption(tView, tNode, -1); } } else { this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false)); } } } matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) { if (nodeMatchIdx !== null) { const read = this.metadata.read; if (read !== null) { if (read === ElementRef || read === ViewContainerRef || read === TemplateRef && (tNode.type & 4 /* Container */)) { this.addMatch(tNode.index, -2); } else { const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false); if (directiveOrProviderIdx !== null) { this.addMatch(tNode.index, directiveOrProviderIdx); } } } else { this.addMatch(tNode.index, nodeMatchIdx); } } } addMatch(tNodeIdx, matchIdx) { if (this.matches === null) { this.matches = [tNodeIdx, matchIdx]; } else { this.matches.push(tNodeIdx, matchIdx); } } } /** * Iterates over local names for a given node and returns directive index * (or -1 if a local name points to an element). * * @param tNode static data of a node to check * @param selector selector to match * @returns directive index, -1 or null if a selector didn't match any of the local names */ function getIdxOfMatchingSelector(tNode, selector) { const localNames = tNode.localNames; if (localNames !== null) { for (let i = 0; i < localNames.length; i += 2) { if (localNames[i] === selector) { return localNames[i + 1]; } } } return null; } function createResultByTNodeType(tNode, currentView) { if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) { return createElementRef(tNode, currentView); } else if (tNode.type & 4 /* Container */) { return createTemplateRef(tNode, currentView); } return null; } function createResultForNode(lView, tNode, matchingIdx, read) { if (matchingIdx === -1) { // if read token and / or strategy is not specified, detect it using appropriate tNode type return createResultByTNodeType(tNode, lView); } else if (matchingIdx === -2) { // read a special token from a node injector return createSpecialToken(lView, tNode, read); } else { // read a token return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode); } } function createSpecialToken(lView, tNode, read) { if (read === ElementRef) { return createElementRef(tNode, lView); } else if (read === TemplateRef) { return createTemplateRef(tNode, lView); } else if (read === ViewContainerRef) { ngDevMode && assertTNodeType(tNode, 3 /* AnyRNode */ | 12 /* AnyContainer */); return createContainerRef(tNode, lView); } else { ngDevMode && throwError(`Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`); } } /** * A helper function that creates query results for a given view. This function is meant to do the * processing once and only once for a given view instance (a set of results for a given view * doesn't change). */ function materializeViewResults(tView, lView, tQuery, queryIndex) { const lQuery = lView[QUERIES].queries[queryIndex]; if (lQuery.matches === null) { const tViewData = tView.data; const tQueryMatches = tQuery.matches; const result = []; for (let i = 0; i < tQueryMatches.length; i += 2) { const matchedNodeIdx = tQueryMatches[i]; if (matchedNodeIdx < 0) { // we at the <ng-template> marker which might have results in views created based on this // <ng-template> - those results will be in separate views though, so here we just leave // null as a placeholder result.push(null); } else { ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx); const tNode = tViewData[matchedNodeIdx]; result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read)); } } lQuery.matches = result; } return lQuery.matches; } /** * A helper function that collects (already materialized) query results from a tree of views, * starting with a provided LView. */ function collectQueryResults(tView, lView, queryIndex, result) { const tQuery = tView.queries.getByIndex(queryIndex); const tQueryMatches = tQuery.matches; if (tQueryMatches !== null) { const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex); for (let i = 0; i < tQueryMatches.length; i += 2) { const tNodeIdx = tQueryMatches[i]; if (tNodeIdx > 0) { result.push(lViewResults[i / 2]); } else { const childQueryIndex = tQueryMatches[i + 1]; const declarationLContainer = lView[-tNodeIdx]; ngDevMode && assertLContainer(declarationLContainer); // collect matches for views inserted in this container for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) { const embeddedLView = declarationLContainer[i]; if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) { collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result); } } // collect matches for views created from this declaration container and inserted into // different containers if (declarationLContainer[MOVED_VIEWS] !== null) { const embeddedLViews = declarationLContainer[MOVED_VIEWS]; for (let i = 0; i < embeddedLViews.length; i++) { const embeddedLView = embeddedLViews[i]; collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result); } } } } } return result; } /** * Refreshes a query by combining matches from all active views and removing matches from deleted * views. * * @returns `true` if a query got dirty during change detection or if this is a static query * resolving in creation mode, `false` otherwise. * * @codeGenApi */ function ɵɵqueryRefresh(queryList) { const lView = getLView(); const tView = getTView(); const queryIndex = getCurrentQueryIndex(); setCurrentQueryIndex(queryIndex + 1); const tQuery = getTQuery(tView, queryIndex); if (queryList.dirty && (isCreationMode(lView) === ((tQuery.metadata.flags & 2 /* isStatic */) === 2 /* isStatic */))) { if (tQuery.matches === null) { queryList.reset([]); } else { const result = tQuery.crossesNgTemplate ? collectQueryResults(tView, lView, queryIndex, []) : materializeViewResults(tView, lView, tQuery, queryIndex); queryList.reset(result, unwrapElementRef); queryList.notifyOnChanges(); } return true; } return false; } /** * Creates new QueryList, stores the reference in LView and returns QueryList. * * @param predicate The type for which the query will search * @param flags Flags associated with the query * @param read What to save in the query * * @codeGenApi */ function ɵɵviewQuery(predicate, flags, read) { ngDevMode && assertNumber(flags, 'Expecting flags'); const tView = getTView(); if (tView.firstCreatePass) { createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1); if ((flags & 2 /* isStatic */) === 2 /* isStatic */) { tView.staticViewQueries = true; } } createLQuery(tView, getLView(), flags); } /** * Registers a QueryList, associated with a content query, for later refresh (part of a view * refresh). * * @param directiveIndex Current directive index * @param predicate The type for which the query will search * @param flags Flags associated with the query * @param read What to save in the query * @returns QueryList<T> * * @codeGenApi */ function ɵɵcontentQuery(directiveIndex, predicate, flags, read) { ngDevMode && assertNumber(flags, 'Expecting flags'); const tView = getTView(); if (tView.firstCreatePass) { const tNode = getCurrentTNode(); createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index); saveContentQueryAndDirectiveIndex(tView, directiveIndex); if ((flags & 2 /* isStatic */) === 2 /* isStatic */) { tView.staticContentQueries = true; } } createLQuery(tView, getLView(), flags); } /** * Loads a QueryList corresponding to the current view or content query. * * @codeGenApi */ function ɵɵloadQuery() { return loadQueryInternal(getLView(), getCurrentQueryIndex()); } function loadQueryInternal(lView, queryIndex) { ngDevMode && assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query'); ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex); return lView[QUERIES].queries[queryIndex].queryList; } function createLQuery(tView, lView, flags) { const queryList = new QueryList((flags & 4 /* emitDistinctChangesOnly */) === 4 /* emitDistinctChangesOnly */); storeCleanupWithContext(tView, lView, queryList, queryList.destroy); if (lView[QUERIES] === null) lView[QUERIES] = new LQueries_(); lView[QUERIES].queries.push(new LQuery_(queryList)); } function createTQuery(tView, metadata, nodeIndex) { if (tView.queries === null) tView.queries = new TQueries_(); tView.queries.track(new TQuery_(metadata, nodeIndex)); } function saveContentQueryAndDirectiveIndex(tView, directiveIndex) { const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []); const lastSavedDirectiveIndex = tViewContentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1; if (directiveIndex !== lastSavedDirectiveIndex) { tViewContentQueries.push(tView.queries.length - 1, directiveIndex); } } function getTQuery(tView, index) { ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery'); return tView.queries.getByIndex(index); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the * `<ng-template>` element. * * @codeGenApi */ function ɵɵtemplateRefExtractor(tNode, lView) { return createTemplateRef(tNode, lView); } /** * Returns the appropriate `ChangeDetectorRef` for a pipe. * * @codeGenApi */ function ɵɵinjectPipeChangeDetectorRef(flags = InjectFlags.Default) { const value = injectChangeDetectorRef(true); if (value == null && !(flags & InjectFlags.Optional)) { throwProviderNotFoundError('ChangeDetectorRef'); } else { return value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$c = () => ({ 'ɵɵattribute': ɵɵattribute, 'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1, 'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2, 'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3, 'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4, 'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5, 'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6, 'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7, 'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8, 'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV, 'ɵɵdefineComponent': ɵɵdefineComponent, 'ɵɵdefineDirective': ɵɵdefineDirective, 'ɵɵdefineInjectable': ɵɵdefineInjectable, 'ɵɵdefineInjector': ɵɵdefineInjector, 'ɵɵdefineNgModule': ɵɵdefineNgModule, 'ɵɵdefinePipe': ɵɵdefinePipe, 'ɵɵdirectiveInject': ɵɵdirectiveInject, 'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory, 'ɵɵinject': ɵɵinject, 'ɵɵinjectAttribute': ɵɵinjectAttribute, 'ɵɵinvalidFactory': ɵɵinvalidFactory, 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep, 'ɵɵinjectPipeChangeDetectorRef': ɵɵinjectPipeChangeDetectorRef, 'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor, 'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature, 'ɵɵProvidersFeature': ɵɵProvidersFeature, 'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature, 'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature, 'ɵɵnextContext': ɵɵnextContext, 'ɵɵnamespaceHTML': ɵɵnamespaceHTML, 'ɵɵnamespaceMathML': ɵɵnamespaceMathML, 'ɵɵnamespaceSVG': ɵɵnamespaceSVG, 'ɵɵenableBindings': ɵɵenableBindings, 'ɵɵdisableBindings': ɵɵdisableBindings, 'ɵɵelementStart': ɵɵelementStart, 'ɵɵelementEnd': ɵɵelementEnd, 'ɵɵelement': ɵɵelement, 'ɵɵelementContainerStart': ɵɵelementContainerStart, 'ɵɵelementContainerEnd': ɵɵelementContainerEnd, 'ɵɵelementContainer': ɵɵelementContainer, 'ɵɵpureFunction0': ɵɵpureFunction0, 'ɵɵpureFunction1': ɵɵpureFunction1, 'ɵɵpureFunction2': ɵɵpureFunction2, 'ɵɵpureFunction3': ɵɵpureFunction3, 'ɵɵpureFunction4': ɵɵpureFunction4, 'ɵɵpureFunction5': ɵɵpureFunction5, 'ɵɵpureFunction6': ɵɵpureFunction6, 'ɵɵpureFunction7': ɵɵpureFunction7, 'ɵɵpureFunction8': ɵɵpureFunction8, 'ɵɵpureFunctionV': ɵɵpureFunctionV, 'ɵɵgetCurrentView': ɵɵgetCurrentView, 'ɵɵrestoreView': ɵɵrestoreView, 'ɵɵlistener': ɵɵlistener, 'ɵɵprojection': ɵɵprojection, 'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty, 'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener, 'ɵɵpipeBind1': ɵɵpipeBind1, 'ɵɵpipeBind2': ɵɵpipeBind2, 'ɵɵpipeBind3': ɵɵpipeBind3, 'ɵɵpipeBind4': ɵɵpipeBind4, 'ɵɵpipeBindV': ɵɵpipeBindV, 'ɵɵprojectionDef': ɵɵprojectionDef, 'ɵɵhostProperty': ɵɵhostProperty, 'ɵɵproperty': ɵɵproperty, 'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate, 'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1, 'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2, 'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3, 'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4, 'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5, 'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6, 'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7, 'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8, 'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV, 'ɵɵpipe': ɵɵpipe, 'ɵɵqueryRefresh': ɵɵqueryRefresh, 'ɵɵviewQuery': ɵɵviewQuery, 'ɵɵloadQuery': ɵɵloadQuery, 'ɵɵcontentQuery': ɵɵcontentQuery, 'ɵɵreference': ɵɵreference, 'ɵɵclassMap': ɵɵclassMap, 'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1, 'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2, 'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3, 'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4, 'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5, 'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6, 'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7, 'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8, 'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV, 'ɵɵstyleMap': ɵɵstyleMap, 'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1, 'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2, 'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3, 'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4, 'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5, 'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6, 'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7, 'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8, 'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV, 'ɵɵstyleProp': ɵɵstyleProp, 'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1, 'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2, 'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3, 'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4, 'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5, 'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6, 'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7, 'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8, 'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV, 'ɵɵclassProp': ɵɵclassProp, 'ɵɵadvance': ɵɵadvance, 'ɵɵtemplate': ɵɵtemplate, 'ɵɵtext': ɵɵtext, 'ɵɵtextInterpolate': ɵɵtextInterpolate, 'ɵɵtextInterpolate1': ɵɵtextInterpolate1, 'ɵɵtextInterpolate2': ɵɵtextInterpolate2, 'ɵɵtextInterpolate3': ɵɵtextInterpolate3, 'ɵɵtextInterpolate4': ɵɵtextInterpolate4, 'ɵɵtextInterpolate5': ɵɵtextInterpolate5, 'ɵɵtextInterpolate6': ɵɵtextInterpolate6, 'ɵɵtextInterpolate7': ɵɵtextInterpolate7, 'ɵɵtextInterpolate8': ɵɵtextInterpolate8, 'ɵɵtextInterpolateV': ɵɵtextInterpolateV, 'ɵɵi18n': ɵɵi18n, 'ɵɵi18nAttributes': ɵɵi18nAttributes, 'ɵɵi18nExp': ɵɵi18nExp, 'ɵɵi18nStart': ɵɵi18nStart, 'ɵɵi18nEnd': ɵɵi18nEnd, 'ɵɵi18nApply': ɵɵi18nApply, 'ɵɵi18nPostprocess': ɵɵi18nPostprocess, 'ɵɵresolveWindow': ɵɵresolveWindow, 'ɵɵresolveDocument': ɵɵresolveDocument, 'ɵɵresolveBody': ɵɵresolveBody, 'ɵɵsetComponentScope': ɵɵsetComponentScope, 'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope, 'ɵɵsanitizeHtml': ɵɵsanitizeHtml, 'ɵɵsanitizeStyle': ɵɵsanitizeStyle, 'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl, 'ɵɵsanitizeScript': ɵɵsanitizeScript, 'ɵɵsanitizeUrl': ɵɵsanitizeUrl, 'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl, 'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml, 'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl, 'forwardRef': forwardRef, 'resolveForwardRef': resolveForwardRef, }); /** * A mapping of the @angular/core API surface used in generated expressions to the actual symbols. * * This should be kept up to date with the public exports of @angular/core. */ const angularCoreEnv = (ɵ0$c)(); let jitOptions = null; function setJitOptions(options) { if (jitOptions !== null) { if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) { ngDevMode && console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.'); return; } if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) { ngDevMode && console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.'); return; } } jitOptions = options; } function getJitOptions() { return jitOptions; } function resetJitOptions() { jitOptions = null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const EMPTY_ARRAY$5 = []; const moduleQueue = []; /** * Enqueues moduleDef to be checked later to see if scope can be set on its * component declarations. */ function enqueueModuleForDelayedScoping(moduleType, ngModule) { moduleQueue.push({ moduleType, ngModule }); } let flushingModuleQueue = false; /** * Loops over queued module definitions, if a given module definition has all of its * declarations resolved, it dequeues that module definition and sets the scope on * its declarations. */ function flushModuleScopingQueueAsMuchAsPossible() { if (!flushingModuleQueue) { flushingModuleQueue = true; try { for (let i = moduleQueue.length - 1; i >= 0; i--) { const { moduleType, ngModule } = moduleQueue[i]; if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) { // dequeue moduleQueue.splice(i, 1); setScopeOnDeclaredComponents(moduleType, ngModule); } } } finally { flushingModuleQueue = false; } } } /** * Returns truthy if a declaration has resolved. If the declaration happens to be * an array of declarations, it will recurse to check each declaration in that array * (which may also be arrays). */ function isResolvedDeclaration(declaration) { if (Array.isArray(declaration)) { return declaration.every(isResolvedDeclaration); } return !!resolveForwardRef(declaration); } /** * Compiles a module in JIT mode. * * This function automatically gets called when a class has a `@NgModule` decorator. */ function compileNgModule(moduleType, ngModule = {}) { compileNgModuleDefs(moduleType, ngModule); // Because we don't know if all declarations have resolved yet at the moment the // NgModule decorator is executing, we're enqueueing the setting of module scope // on its declarations to be run at a later time when all declarations for the module, // including forward refs, have resolved. enqueueModuleForDelayedScoping(moduleType, ngModule); } /** * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class. * * It's possible to compile a module via this API which will allow duplicate declarations in its * root. */ function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot = false) { ngDevMode && assertDefined(moduleType, 'Required value moduleType'); ngDevMode && assertDefined(ngModule, 'Required value ngModule'); const declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5); let ngModuleDef = null; Object.defineProperty(moduleType, NG_MOD_DEF, { configurable: true, get: () => { if (ngModuleDef === null) { if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) { // We need to assert this immediately, because allowing it to continue will cause it to // go into an infinite loop before we've reached the point where we throw all the errors. throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`); } ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, { type: moduleType, bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$5).map(resolveForwardRef), declarations: declarations.map(resolveForwardRef), imports: flatten(ngModule.imports || EMPTY_ARRAY$5) .map(resolveForwardRef) .map(expandModuleWithProviders), exports: flatten(ngModule.exports || EMPTY_ARRAY$5) .map(resolveForwardRef) .map(expandModuleWithProviders), schemas: ngModule.schemas ? flatten(ngModule.schemas) : null, id: ngModule.id || null, }); // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime // should verify that there are no unknown elements in a template. In AOT mode, that check // happens at compile time and `schemas` information is not present on Component and Module // defs after compilation (so the check doesn't happen the second time at runtime). if (!ngModuleDef.schemas) { ngModuleDef.schemas = []; } } return ngModuleDef; } }); let ngFactoryDef = null; Object.defineProperty(moduleType, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, { name: moduleType.name, type: moduleType, deps: reflectDependencies(moduleType), injectFn: 'inject', target: compiler.R3FactoryTarget.NgModule, typeArgumentCount: 0, }); } return ngFactoryDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); let ngInjectorDef = null; Object.defineProperty(moduleType, NG_INJ_DEF, { get: () => { if (ngInjectorDef === null) { ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot); const meta = { name: moduleType.name, type: moduleType, providers: ngModule.providers || EMPTY_ARRAY$5, imports: [ (ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef), (ngModule.exports || EMPTY_ARRAY$5).map(resolveForwardRef), ], }; ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta); } return ngInjectorDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) { if (verifiedNgModule.get(moduleType)) return; verifiedNgModule.set(moduleType, true); moduleType = resolveForwardRef(moduleType); let ngModuleDef; if (importingModule) { ngModuleDef = getNgModuleDef(moduleType); if (!ngModuleDef) { throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`); } } else { ngModuleDef = getNgModuleDef(moduleType, true); } const errors = []; const declarations = maybeUnwrapFn(ngModuleDef.declarations); const imports = maybeUnwrapFn(ngModuleDef.imports); flatten(imports).map(unwrapModuleWithProvidersImports).forEach(mod => { verifySemanticsOfNgModuleImport(mod, moduleType); verifySemanticsOfNgModuleDef(mod, false, moduleType); }); const exports = maybeUnwrapFn(ngModuleDef.exports); declarations.forEach(verifyDeclarationsHaveDefinitions); declarations.forEach(verifyDirectivesHaveSelector); const combinedDeclarations = [ ...declarations.map(resolveForwardRef), ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef), ]; exports.forEach(verifyExportsAreDeclaredOrReExported); declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot)); declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule); const ngModule = getAnnotation(moduleType, 'NgModule'); if (ngModule) { ngModule.imports && flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => { verifySemanticsOfNgModuleImport(mod, moduleType); verifySemanticsOfNgModuleDef(mod, false, moduleType); }); ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType); ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule); ngModule.entryComponents && deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule); } // Throw Error if any errors were detected. if (errors.length) { throw new Error(errors.join('\n')); } //////////////////////////////////////////////////////////////////////////////////////////////// function verifyDeclarationsHaveDefinitions(type) { type = resolveForwardRef(type); const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type); if (!def) { errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`); } } function verifyDirectivesHaveSelector(type) { type = resolveForwardRef(type); const def = getDirectiveDef(type); if (!getComponentDef(type) && def && def.selectors.length == 0) { errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`); } } function verifyExportsAreDeclaredOrReExported(type) { type = resolveForwardRef(type); const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' || getPipeDef(type) && 'pipe'; if (kind) { // only checked if we are declared as Component, Directive, or Pipe // Modules don't need to be declared or imported. if (combinedDeclarations.lastIndexOf(type) === -1) { // We are exporting something which we don't explicitly declare or import. errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`); } } } function verifyDeclarationIsUnique(type, suppressErrors) { type = resolveForwardRef(type); const existingModule = ownerNgModule.get(type); if (existingModule && existingModule !== moduleType) { if (!suppressErrors) { const modules = [existingModule, moduleType].map(stringifyForError).sort(); errors.push(`Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` + `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` + `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`); } } else { // Mark type as having owner. ownerNgModule.set(type, moduleType); } } function verifyComponentIsPartOfNgModule(type) { type = resolveForwardRef(type); const existingModule = ownerNgModule.get(type); if (!existingModule) { errors.push(`Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`); } } function verifyCorrectBootstrapType(type) { type = resolveForwardRef(type); if (!getComponentDef(type)) { errors.push(`${stringifyForError(type)} cannot be used as an entry component.`); } } function verifyComponentEntryComponentsIsPartOfNgModule(type) { type = resolveForwardRef(type); if (getComponentDef(type)) { // We know we are component const component = getAnnotation(type, 'Component'); if (component && component.entryComponents) { deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule); } } } function verifySemanticsOfNgModuleImport(type, importingModule) { type = resolveForwardRef(type); if (getComponentDef(type) || getDirectiveDef(type)) { throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`); } if (getPipeDef(type)) { throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`); } } } function unwrapModuleWithProvidersImports(typeOrWithProviders) { typeOrWithProviders = resolveForwardRef(typeOrWithProviders); return typeOrWithProviders.ngModule || typeOrWithProviders; } function getAnnotation(type, name) { let annotation = null; collect(type.__annotations__); collect(type.decorators); return annotation; function collect(annotations) { if (annotations) { annotations.forEach(readAnnotation); } } function readAnnotation(decorator) { if (!annotation) { const proto = Object.getPrototypeOf(decorator); if (proto.ngMetadataName == name) { annotation = decorator; } else if (decorator.type) { const proto = Object.getPrototypeOf(decorator.type); if (proto.ngMetadataName == name) { annotation = decorator.args[0]; } } } } } /** * Keep track of compiled components. This is needed because in tests we often want to compile the * same component with more than one NgModule. This would cause an error unless we reset which * NgModule the component belongs to. We keep the list of compiled components here so that the * TestBed can reset it later. */ let ownerNgModule = new Map(); let verifiedNgModule = new Map(); function resetCompiledComponents() { ownerNgModule = new Map(); verifiedNgModule = new Map(); moduleQueue.length = 0; } /** * Computes the combined declarations of explicit declarations, as well as declarations inherited by * traversing the exports of imported modules. * @param type */ function computeCombinedExports(type) { type = resolveForwardRef(type); const ngModuleDef = getNgModuleDef(type, true); return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => { const ngModuleDef = getNgModuleDef(type); if (ngModuleDef) { verifySemanticsOfNgModuleDef(type, false); return computeCombinedExports(type); } else { return type; } }))]; } /** * Some declared components may be compiled asynchronously, and thus may not have their * ɵcmp set yet. If this is the case, then a reference to the module is written into * the `ngSelectorScope` property of the declared type. */ function setScopeOnDeclaredComponents(moduleType, ngModule) { const declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5); const transitiveScopes = transitiveScopesFor(moduleType); declarations.forEach(declaration => { if (declaration.hasOwnProperty(NG_COMP_DEF)) { // A `ɵcmp` field exists - go ahead and patch the component directly. const component = declaration; const componentDef = getComponentDef(component); patchComponentDefWithScope(componentDef, transitiveScopes); } else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) { // Set `ngSelectorScope` for future reference when the component compilation finishes. declaration.ngSelectorScope = moduleType; } }); } /** * Patch the definition of a component with directives and pipes from the compilation scope of * a given module. */ function patchComponentDefWithScope(componentDef, transitiveScopes) { componentDef.directiveDefs = () => Array.from(transitiveScopes.compilation.directives) .map(dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir)) .filter(def => !!def); componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe)); componentDef.schemas = transitiveScopes.schemas; // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we // may face a problem where previously compiled defs available to a given Component/Directive // are cached in TView and may become stale (in case any of these defs gets recompiled). In // order to avoid this problem, we force fresh TView to be created. componentDef.tView = null; } /** * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module. * * This operation is memoized and the result is cached on the module's definition. This function can * be called on modules with components that have not fully compiled yet, but the result should not * be used until they have. * * @param moduleType module that transitive scope should be calculated for. */ function transitiveScopesFor(moduleType) { if (!isNgModule(moduleType)) { throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`); } const def = getNgModuleDef(moduleType); if (def.transitiveCompileScopes !== null) { return def.transitiveCompileScopes; } const scopes = { schemas: def.schemas || null, compilation: { directives: new Set(), pipes: new Set(), }, exported: { directives: new Set(), pipes: new Set(), }, }; maybeUnwrapFn(def.imports).forEach((imported) => { const importedType = imported; if (!isNgModule(importedType)) { throw new Error(`Importing ${importedType.name} which does not have a ɵmod property`); } // When this module imports another, the imported module's exported directives and pipes are // added to the compilation scope of this module. const importedScope = transitiveScopesFor(importedType); importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry)); importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry)); }); maybeUnwrapFn(def.declarations).forEach(declared => { const declaredWithDefs = declared; if (getPipeDef(declaredWithDefs)) { scopes.compilation.pipes.add(declared); } else { // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't // had its template compiled yet. In either case, it gets added to the compilation's // directives. scopes.compilation.directives.add(declared); } }); maybeUnwrapFn(def.exports).forEach((exported) => { const exportedType = exported; // Either the type is a module, a pipe, or a component/directive (which may not have a // ɵcmp as it might be compiled asynchronously). if (isNgModule(exportedType)) { // When this module exports another, the exported module's exported directives and pipes are // added to both the compilation and exported scopes of this module. const exportedScope = transitiveScopesFor(exportedType); exportedScope.exported.directives.forEach(entry => { scopes.compilation.directives.add(entry); scopes.exported.directives.add(entry); }); exportedScope.exported.pipes.forEach(entry => { scopes.compilation.pipes.add(entry); scopes.exported.pipes.add(entry); }); } else if (getPipeDef(exportedType)) { scopes.exported.pipes.add(exportedType); } else { scopes.exported.directives.add(exportedType); } }); def.transitiveCompileScopes = scopes; return scopes; } function expandModuleWithProviders(value) { if (isModuleWithProviders(value)) { return value.ngModule; } return value; } function isModuleWithProviders(value) { return value.ngModule !== undefined; } function isNgModule(value) { return !!getNgModuleDef(value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This * matters in the following scenario: * * Consider a component 'A' that extends component 'B', both declared in module 'M'. During * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain, * potentially triggering compilation of 'B'. If this nested compilation were to trigger * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure * all compilations have finished. */ let compilationDepth = 0; /** * Compile an Angular component according to its decorator metadata, and patch the resulting * component def (ɵcmp) onto the component type. * * Compilation may be asynchronous (due to the need to resolve URLs for the component template or * other resources, for example). In the event that compilation is not immediate, `compileComponent` * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp` * until the global queue has been resolved with a call to `resolveComponentResources`. */ function compileComponent(type, metadata) { // Initialize ngDevMode. This must be the first statement in compileComponent. // See the `initNgDevMode` docstring for more information. (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode(); let ngComponentDef = null; // Metadata may have resources which need to be resolved. maybeQueueResolutionOfComponentResources(type, metadata); // Note that we're using the same function as `Directive`, because that's only subset of metadata // that we need to create the ngFactoryDef. We're avoiding using the component metadata // because we'd have to resolve the asynchronous templates. addDirectiveFactoryDef(type, metadata); Object.defineProperty(type, NG_COMP_DEF, { get: () => { if (ngComponentDef === null) { const compiler = getCompilerFacade(); if (componentNeedsResolution(metadata)) { const error = [`Component '${type.name}' is not resolved:`]; if (metadata.templateUrl) { error.push(` - templateUrl: ${metadata.templateUrl}`); } if (metadata.styleUrls && metadata.styleUrls.length) { error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`); } error.push(`Did you run and wait for 'resolveComponentResources()'?`); throw new Error(error.join('\n')); } // This const was called `jitOptions` previously but had to be renamed to `options` because // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`. // This bug was investigated in https://github.com/angular/angular-cli/issues/17264. // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed. const options = getJitOptions(); let preserveWhitespaces = metadata.preserveWhitespaces; if (preserveWhitespaces === undefined) { if (options !== null && options.preserveWhitespaces !== undefined) { preserveWhitespaces = options.preserveWhitespaces; } else { preserveWhitespaces = false; } } let encapsulation = metadata.encapsulation; if (encapsulation === undefined) { if (options !== null && options.defaultEncapsulation !== undefined) { encapsulation = options.defaultEncapsulation; } else { encapsulation = ViewEncapsulation.Emulated; } } const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`; const meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY$1, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null }); compilationDepth++; try { if (meta.usesInheritance) { addDirectiveDefToUndecoratedParents(type); } ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta); } finally { // Ensure that the compilation depth is decremented even when the compilation failed. compilationDepth--; } if (compilationDepth === 0) { // When NgModule decorator executed, we enqueued the module definition such that // it would only dequeue and add itself as module scope to all of its declarations, // but only if if all of its declarations had resolved. This call runs the check // to see if any modules that are in the queue can be dequeued and add scope to // their declarations. flushModuleScopingQueueAsMuchAsPossible(); } // If component compilation is async, then the @NgModule annotation which declares the // component may execute and set an ngSelectorScope property on the component type. This // allows the component to patch itself with directiveDefs from the module after it // finishes compiling. if (hasSelectorScope(type)) { const scopes = transitiveScopesFor(type.ngSelectorScope); patchComponentDefWithScope(ngComponentDef, scopes); } } return ngComponentDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function hasSelectorScope(component) { return component.ngSelectorScope !== undefined; } /** * Compile an Angular directive according to its decorator metadata, and patch the resulting * directive def onto the component type. * * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which * will resolve when compilation completes and the directive becomes usable. */ function compileDirective(type, directive) { let ngDirectiveDef = null; addDirectiveFactoryDef(type, directive || {}); Object.defineProperty(type, NG_DIR_DEF, { get: () => { if (ngDirectiveDef === null) { // `directive` can be null in the case of abstract directives as a base class // that use `@Directive()` with no selector. In that case, pass empty object to the // `directiveMetadata` function instead of null. const meta = getDirectiveMetadata(type, directive || {}); ngDirectiveDef = getCompilerFacade().compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata); } return ngDirectiveDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function getDirectiveMetadata(type, metadata) { const name = type && type.name; const sourceMapUrl = `ng:///${name}/ɵdir.js`; const compiler = getCompilerFacade(); const facade = directiveMetadata(type, metadata); facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl); if (facade.usesInheritance) { addDirectiveDefToUndecoratedParents(type); } return { metadata: facade, sourceMapUrl }; } function addDirectiveFactoryDef(type, metadata) { let ngFactoryDef = null; Object.defineProperty(type, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const meta = getDirectiveMetadata(type, metadata); const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, Object.assign(Object.assign({}, meta.metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Directive })); } return ngFactoryDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function extendsDirectlyFromObject(type) { return Object.getPrototypeOf(type.prototype) === Object.prototype; } /** * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a * `Component`). */ function directiveMetadata(type, metadata) { // Reflect inputs and outputs. const reflect = getReflect(); const propMetadata = reflect.ownPropMetadata(type); return { name: type.name, type: type, typeArgumentCount: 0, selector: metadata.selector !== undefined ? metadata.selector : null, deps: reflectDependencies(type), host: metadata.host || EMPTY_OBJ, propMetadata: propMetadata, inputs: metadata.inputs || EMPTY_ARRAY$1, outputs: metadata.outputs || EMPTY_ARRAY$1, queries: extractQueriesMetadata(type, propMetadata, isContentQuery), lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges') }, typeSourceSpan: null, usesInheritance: !extendsDirectlyFromObject(type), exportAs: extractExportAs(metadata.exportAs), providers: metadata.providers || null, viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery) }; } /** * Adds a directive definition to all parent classes of a type that don't have an Angular decorator. */ function addDirectiveDefToUndecoratedParents(type) { const objPrototype = Object.prototype; let parent = Object.getPrototypeOf(type.prototype).constructor; // Go up the prototype until we hit `Object`. while (parent && parent !== objPrototype) { // Since inheritance works if the class was annotated already, we only need to add // the def if there are no annotations and the def hasn't been created already. if (!getDirectiveDef(parent) && !getComponentDef(parent) && shouldAddAbstractDirective(parent)) { compileDirective(parent, null); } parent = Object.getPrototypeOf(parent); } } function convertToR3QueryPredicate(selector) { return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector); } function convertToR3QueryMetadata(propertyName, ann) { return { propertyName: propertyName, predicate: convertToR3QueryPredicate(ann.selector), descendants: ann.descendants, first: ann.first, read: ann.read ? ann.read : null, static: !!ann.static, emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly, }; } function extractQueriesMetadata(type, propMetadata, isQueryAnn) { const queriesMeta = []; for (const field in propMetadata) { if (propMetadata.hasOwnProperty(field)) { const annotations = propMetadata[field]; annotations.forEach(ann => { if (isQueryAnn(ann)) { if (!ann.selector) { throw new Error(`Can't construct a query for the property "${field}" of ` + `"${stringifyForError(type)}" since the query selector wasn't defined.`); } if (annotations.some(isInputAnnotation)) { throw new Error(`Cannot combine @Input decorators with query decorators`); } queriesMeta.push(convertToR3QueryMetadata(field, ann)); } }); } } return queriesMeta; } function extractExportAs(exportAs) { return exportAs === undefined ? null : splitByComma(exportAs); } function isContentQuery(value) { const name = value.ngMetadataName; return name === 'ContentChild' || name === 'ContentChildren'; } function isViewQuery(value) { const name = value.ngMetadataName; return name === 'ViewChild' || name === 'ViewChildren'; } function isInputAnnotation(value) { return value.ngMetadataName === 'Input'; } function splitByComma(value) { return value.split(',').map(piece => piece.trim()); } const LIFECYCLE_HOOKS = [ 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked', 'ngAfterContentInit', 'ngAfterContentChecked' ]; function shouldAddAbstractDirective(type) { const reflect = getReflect(); if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) { return true; } const propMetadata = reflect.propMetadata(type); for (const field in propMetadata) { const annotations = propMetadata[field]; for (let i = 0; i < annotations.length; i++) { const current = annotations[i]; const metadataName = current.ngMetadataName; if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) || metadataName === 'Output' || metadataName === 'HostBinding' || metadataName === 'HostListener') { return true; } } } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function compilePipe(type, meta) { let ngPipeDef = null; let ngFactoryDef = null; Object.defineProperty(type, NG_FACTORY_DEF, { get: () => { if (ngFactoryDef === null) { const metadata = getPipeMetadata(type, meta); const compiler = getCompilerFacade(); ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, Object.assign(Object.assign({}, metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Pipe })); } return ngFactoryDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); Object.defineProperty(type, NG_PIPE_DEF, { get: () => { if (ngPipeDef === null) { const metadata = getPipeMetadata(type, meta); ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata); } return ngPipeDef; }, // Make the property configurable in dev mode to allow overriding in tests configurable: !!ngDevMode, }); } function getPipeMetadata(type, meta) { return { type: type, typeArgumentCount: 0, name: type.name, deps: reflectDependencies(type), pipeName: meta.name, pure: meta.pure !== undefined ? meta.pure : true }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$d = (dir = {}) => dir, ɵ1$2 = (type, meta) => SWITCH_COMPILE_DIRECTIVE(type, meta); /** * Type of the Directive metadata. * * @publicApi */ const Directive = makeDecorator('Directive', ɵ0$d, undefined, undefined, ɵ1$2); const ɵ2$1 = (c = {}) => (Object.assign({ changeDetection: ChangeDetectionStrategy.Default }, c)), ɵ3$1 = (type, meta) => SWITCH_COMPILE_COMPONENT(type, meta); /** * Component decorator and metadata. * * @Annotation * @publicApi */ const Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1); const ɵ4 = (p) => (Object.assign({ pure: true }, p)), ɵ5 = (type, meta) => SWITCH_COMPILE_PIPE(type, meta); /** * @Annotation * @publicApi */ const Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5); const ɵ6 = (bindingPropertyName) => ({ bindingPropertyName }); /** * @Annotation * @publicApi */ const Input = makePropDecorator('Input', ɵ6); const ɵ7 = (bindingPropertyName) => ({ bindingPropertyName }); /** * @Annotation * @publicApi */ const Output = makePropDecorator('Output', ɵ7); const ɵ8 = (hostPropertyName) => ({ hostPropertyName }); /** * @Annotation * @publicApi */ const HostBinding = makePropDecorator('HostBinding', ɵ8); const ɵ9 = (eventName, args) => ({ eventName, args }); /** * Decorator that binds a DOM event to a host listener and supplies configuration metadata. * Angular invokes the supplied handler method when the host element emits the specified event, * and updates the bound element with the result. * * If the handler method returns false, applies `preventDefault` on the bound element. * * @usageNotes * * The following example declares a directive * that attaches a click listener to a button and counts clicks. * * ```ts * @Directive({selector: 'button[counting]'}) * class CountClicks { * numberOfClicks = 0; * * @HostListener('click', ['$event.target']) * onClick(btn) { * console.log('button', btn, 'number of clicks:', this.numberOfClicks++); * } * } * * @Component({ * selector: 'app', * template: '<button counting>Increment</button>', * }) * class App {} * * ``` * * The following example registers another DOM event handler that listens for key-press events. * ``` ts * import { HostListener, Component } from "@angular/core"; * * @Component({ * selector: 'app', * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to * increment the counter. * <button (click)="resetCounter()">Reset Counter</button>` * }) * class AppComponent { * counter = 0; * @HostListener('window:keydown', ['$event']) * handleKeyDown(event: KeyboardEvent) { * this.counter++; * } * resetCounter() { * this.counter = 0; * } * } * ``` * * @Annotation * @publicApi */ const HostListener = makePropDecorator('HostListener', ɵ9); const SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent; const SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective; const SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe; const SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop; const SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop; const SWITCH_COMPILE_PIPE__PRE_R3__ = noop; const SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__POST_R3__; const SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__POST_R3__; const SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$e = (ngModule) => ngModule, ɵ1$3 = /** * Decorator that marks the following class as an NgModule, and supplies * configuration metadata for it. * * * The `declarations` and `entryComponents` options configure the compiler * with information about what belongs to the NgModule. * * The `providers` options configures the NgModule's injector to provide * dependencies the NgModule members. * * The `imports` and `exports` options bring in members from other modules, and make * this module's members available to others. */ (type, meta) => SWITCH_COMPILE_NGMODULE(type, meta); /** * @Annotation * @publicApi */ const NgModule = makeDecorator('NgModule', ɵ0$e, undefined, undefined, ɵ1$3); function preR3NgModuleCompile(moduleType, metadata) { let imports = (metadata && metadata.imports) || []; if (metadata && metadata.exports) { imports = [...imports, metadata.exports]; } const moduleInjectorType = moduleType; moduleInjectorType.ɵfac = convertInjectableProviderToFactory(moduleType, { useClass: moduleType }); moduleInjectorType.ɵinj = ɵɵdefineInjector({ providers: metadata && metadata.providers, imports: imports }); } const SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule; const SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile; const SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide * one or more initialization functions. * * The provided functions are injected at application startup and executed during * app initialization. If any of these functions returns a Promise, initialization * does not complete until the Promise is resolved. * * You can, for example, create a factory function that loads language data * or an external configuration, and provide that function to the `APP_INITIALIZER` token. * The function is executed during the application bootstrap process, * and the needed data is available on startup. * * @see `ApplicationInitStatus` * * @publicApi */ const APP_INITIALIZER = new InjectionToken('Application Initializer'); /** * A class that reflects the state of running {@link APP_INITIALIZER} functions. * * @publicApi */ class ApplicationInitStatus { constructor(appInits) { this.appInits = appInits; this.resolve = noop; this.reject = noop; this.initialized = false; this.done = false; this.donePromise = new Promise((res, rej) => { this.resolve = res; this.reject = rej; }); } /** @internal */ runInitializers() { if (this.initialized) { return; } const asyncInitPromises = []; const complete = () => { this.done = true; this.resolve(); }; if (this.appInits) { for (let i = 0; i < this.appInits.length; i++) { const initResult = this.appInits[i](); if (isPromise(initResult)) { asyncInitPromises.push(initResult); } } } Promise.all(asyncInitPromises) .then(() => { complete(); }) .catch(e => { this.reject(e); }); if (asyncInitPromises.length === 0) { complete(); } this.initialized = true; } } ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); }; ApplicationInitStatus.ɵprov = ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac }); ApplicationInitStatus.ctorParameters = () => [ { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{ type: Injectable }], function () { return [{ type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER] }, { type: Optional }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A [DI token](guide/glossary#di-token "DI token definition") representing a unique string ID, used * primarily for prefixing application attributes and CSS styles when * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used. * * BY default, the value is randomly generated and assigned to the application by Angular. * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure * the root {@link Injector} that uses this token. * * @publicApi */ const APP_ID = new InjectionToken('AppId'); function _appIdRandomProviderFactory() { return `${_randomChar()}${_randomChar()}${_randomChar()}`; } /** * Providers that generate a random `APP_ID_TOKEN`. * @publicApi */ const APP_ID_RANDOM_PROVIDER = { provide: APP_ID, useFactory: _appIdRandomProviderFactory, deps: [], }; function _randomChar() { return String.fromCharCode(97 + Math.floor(Math.random() * 25)); } /** * A function that is executed when a platform is initialized. * @publicApi */ const PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer'); /** * A token that indicates an opaque platform ID. * @publicApi */ const PLATFORM_ID = new InjectionToken('Platform ID'); /** * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to * be called for every component that is bootstrapped. * * Each callback must take a `ComponentRef` instance and return nothing. * * `(componentRef: ComponentRef) => void` * * @publicApi */ const APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener'); /** * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of * the application * @publicApi */ const PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Console { log(message) { // tslint:disable-next-line:no-console console.log(message); } // Note: for reporting errors use `DOM.logError()` as it is platform specific warn(message) { // tslint:disable-next-line:no-console console.warn(message); } } Console.ɵfac = function Console_Factory(t) { return new (t || Console)(); }; Console.ɵprov = ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Console, [{ type: Injectable }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provide this token to set the locale of your application. * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe, * DecimalPipe and PercentPipe) and by ICU expressions. * * See the [i18n guide](guide/i18n#setting-up-locale) for more information. * * @usageNotes * ### Example * * ```typescript * import { LOCALE_ID } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: LOCALE_ID, useValue: 'en-US' }] * }); * ``` * * @publicApi */ const LOCALE_ID$1 = new InjectionToken('LocaleId'); /** * Provide this token to set the default currency code your application uses for * CurrencyPipe when there is no currency code passed into it. This is only used by * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured. * * See the [i18n guide](guide/i18n#setting-up-locale) for more information. * * <div class="alert is-helpful"> * * **Deprecation notice:** * * The default currency code is currently always `USD` but this is deprecated from v9. * * **In v10 the default currency code will be taken from the current locale.** * * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in * your application `NgModule`: * * ```ts * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'} * ``` * * </div> * * @usageNotes * ### Example * * ```typescript * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }] * }); * ``` * * @publicApi */ const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode'); /** * Use this token at bootstrap to provide the content of your translation file (`xtb`, * `xlf` or `xlf2`) when you want to translate your application in another language. * * See the [i18n guide](guide/i18n#merge) for more information. * * @usageNotes * ### Example * * ```typescript * import { TRANSLATIONS } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * // content of your translation file * const translations = '....'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: TRANSLATIONS, useValue: translations }] * }); * ``` * * @publicApi */ const TRANSLATIONS = new InjectionToken('Translations'); /** * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`, * `xlf` or `xlf2`. * * See the [i18n guide](guide/i18n#merge) for more information. * * @usageNotes * ### Example * * ```typescript * import { TRANSLATIONS_FORMAT } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }] * }); * ``` * * @publicApi */ const TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat'); /** * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy * that the compiler should use in case of missing translations: * - Error: throw if you have missing translations. * - Warning (default): show a warning in the console and/or shell. * - Ignore: do nothing. * * See the [i18n guide](guide/i18n#missing-translation) for more information. * * @usageNotes * ### Example * ```typescript * import { MissingTranslationStrategy } from '@angular/core'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { AppModule } from './app/app.module'; * * platformBrowserDynamic().bootstrapModule(AppModule, { * missingTranslation: MissingTranslationStrategy.Error * }); * ``` * * @publicApi */ var MissingTranslationStrategy; (function (MissingTranslationStrategy) { MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error"; MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning"; MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore"; })(MissingTranslationStrategy || (MissingTranslationStrategy = {})); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SWITCH_IVY_ENABLED__POST_R3__ = true; const SWITCH_IVY_ENABLED__PRE_R3__ = false; const ivyEnabled = SWITCH_IVY_ENABLED__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Combination of NgModuleFactory and ComponentFactories. * * @publicApi */ class ModuleWithComponentFactories { constructor(ngModuleFactory, componentFactories) { this.ngModuleFactory = ngModuleFactory; this.componentFactories = componentFactories; } } function _throwError() { throw new Error(`Runtime compiler is not loaded`); } const Compiler_compileModuleSync__PRE_R3__ = _throwError; const Compiler_compileModuleSync__POST_R3__ = function (moduleType) { return new NgModuleFactory$1(moduleType); }; const Compiler_compileModuleSync = Compiler_compileModuleSync__POST_R3__; const Compiler_compileModuleAsync__PRE_R3__ = _throwError; const Compiler_compileModuleAsync__POST_R3__ = function (moduleType) { return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType)); }; const Compiler_compileModuleAsync = Compiler_compileModuleAsync__POST_R3__; const Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError; const Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function (moduleType) { const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType); const moduleDef = getNgModuleDef(moduleType); const componentFactories = maybeUnwrapFn(moduleDef.declarations) .reduce((factories, declaration) => { const componentDef = getComponentDef(declaration); componentDef && factories.push(new ComponentFactory$1(componentDef)); return factories; }, []); return new ModuleWithComponentFactories(ngModuleFactory, componentFactories); }; const Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__POST_R3__; const Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError; const Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function (moduleType) { return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType)); }; const Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__POST_R3__; /** * Low-level service for running the angular compiler during runtime * to create {@link ComponentFactory}s, which * can later be used to create and render a Component instance. * * Each `@NgModule` provides an own `Compiler` to its injector, * that will use the directives/pipes of the ng module for compilation * of components. * * @publicApi */ class Compiler { constructor() { /** * Compiles the given NgModule and all of its components. All templates of the components listed * in `entryComponents` have to be inlined. */ this.compileModuleSync = Compiler_compileModuleSync; /** * Compiles the given NgModule and all of its components */ this.compileModuleAsync = Compiler_compileModuleAsync; /** * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components. */ this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync; /** * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components. */ this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync; } /** * Clears all caches. */ clearCache() { } /** * Clears the cache for the given component/ngModule. */ clearCacheFor(type) { } /** * Returns the id for a given NgModule, if one is defined and known to the compiler. */ getModuleId(moduleType) { return undefined; } } Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); }; Compiler.ɵprov = ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{ type: Injectable }], function () { return []; }, null); })(); /** * Token to provide CompilerOptions in the platform injector. * * @publicApi */ const COMPILER_OPTIONS = new InjectionToken('compilerOptions'); /** * A factory for creating a Compiler * * @publicApi */ class CompilerFactory { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const promise = (() => Promise.resolve(0))(); function scheduleMicroTask(fn) { if (typeof Zone === 'undefined') { // use promise to schedule microTask instead of use Zone promise.then(() => { fn && fn.apply(null, null); }); } else { Zone.current.scheduleMicroTask('scheduleMicrotask', fn); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function getNativeRequestAnimationFrame() { let nativeRequestAnimationFrame = _global['requestAnimationFrame']; let nativeCancelAnimationFrame = _global['cancelAnimationFrame']; if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) { // use unpatched version of requestAnimationFrame(native delegate) if possible // to avoid another Change detection const unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')]; if (unpatchedRequestAnimationFrame) { nativeRequestAnimationFrame = unpatchedRequestAnimationFrame; } const unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')]; if (unpatchedCancelAnimationFrame) { nativeCancelAnimationFrame = unpatchedCancelAnimationFrame; } } return { nativeRequestAnimationFrame, nativeCancelAnimationFrame }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An injectable service for executing work inside or outside of the Angular zone. * * The most common use of this service is to optimize performance when starting a work consisting of * one or more asynchronous tasks that don't require UI updates or error handling to be handled by * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks * can reenter the Angular zone via {@link #run}. * * <!-- TODO: add/fix links to: * - docs explaining zones and the use of zones in Angular and change-detection * - link to runOutsideAngular/run (throughout this file!) * --> * * @usageNotes * ### Example * * ``` * import {Component, NgZone} from '@angular/core'; * import {NgIf} from '@angular/common'; * * @Component({ * selector: 'ng-zone-demo', * template: ` * <h2>Demo: NgZone</h2> * * <p>Progress: {{progress}}%</p> * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p> * * <button (click)="processWithinAngularZone()">Process within Angular zone</button> * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button> * `, * }) * export class NgZoneDemo { * progress: number = 0; * label: string; * * constructor(private _ngZone: NgZone) {} * * // Loop inside the Angular zone * // so the UI DOES refresh after each setTimeout cycle * processWithinAngularZone() { * this.label = 'inside'; * this.progress = 0; * this._increaseProgress(() => console.log('Inside Done!')); * } * * // Loop outside of the Angular zone * // so the UI DOES NOT refresh after each setTimeout cycle * processOutsideOfAngularZone() { * this.label = 'outside'; * this.progress = 0; * this._ngZone.runOutsideAngular(() => { * this._increaseProgress(() => { * // reenter the Angular zone and display done * this._ngZone.run(() => { console.log('Outside Done!'); }); * }); * }); * } * * _increaseProgress(doneCallback: () => void) { * this.progress += 1; * console.log(`Current progress: ${this.progress}%`); * * if (this.progress < 100) { * window.setTimeout(() => this._increaseProgress(doneCallback), 10); * } else { * doneCallback(); * } * } * } * ``` * * @publicApi */ class NgZone { constructor({ enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false }) { this.hasPendingMacrotasks = false; this.hasPendingMicrotasks = false; /** * Whether there are no outstanding microtasks or macrotasks. */ this.isStable = true; /** * Notifies when code enters Angular Zone. This gets fired first on VM Turn. */ this.onUnstable = new EventEmitter(false); /** * Notifies when there is no more microtasks enqueued in the current VM Turn. * This is a hint for Angular to do change detection, which may enqueue more microtasks. * For this reason this event can fire multiple times per VM Turn. */ this.onMicrotaskEmpty = new EventEmitter(false); /** * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which * implies we are about to relinquish VM turn. * This event gets called just once. */ this.onStable = new EventEmitter(false); /** * Notifies that an error has been delivered. */ this.onError = new EventEmitter(false); if (typeof Zone == 'undefined') { throw new Error(`In this configuration Angular requires Zone.js`); } Zone.assertZonePatched(); const self = this; self._nesting = 0; self._outer = self._inner = Zone.current; if (Zone['TaskTrackingZoneSpec']) { self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']); } if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) { self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']); } // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped. self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection; self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection; self.lastRequestAnimationFrameId = -1; self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame; forkInnerZoneWithAngularBehavior(self); } static isInAngularZone() { return Zone.current.get('isAngularZone') === true; } static assertInAngularZone() { if (!NgZone.isInAngularZone()) { throw new Error('Expected to be in Angular Zone, but it is not!'); } } static assertNotInAngularZone() { if (NgZone.isInAngularZone()) { throw new Error('Expected to not be in Angular Zone, but it is!'); } } /** * Executes the `fn` function synchronously within the Angular zone and returns value returned by * the function. * * Running functions via `run` allows you to reenter Angular zone from a task that was executed * outside of the Angular zone (typically started via {@link #runOutsideAngular}). * * Any future tasks or microtasks scheduled from within this function will continue executing from * within the Angular zone. * * If a synchronous error happens it will be rethrown and not reported via `onError`. */ run(fn, applyThis, applyArgs) { return this._inner.run(fn, applyThis, applyArgs); } /** * Executes the `fn` function synchronously within the Angular zone as a task and returns value * returned by the function. * * Running functions via `run` allows you to reenter Angular zone from a task that was executed * outside of the Angular zone (typically started via {@link #runOutsideAngular}). * * Any future tasks or microtasks scheduled from within this function will continue executing from * within the Angular zone. * * If a synchronous error happens it will be rethrown and not reported via `onError`. */ runTask(fn, applyThis, applyArgs, name) { const zone = this._inner; const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop); try { return zone.runTask(task, applyThis, applyArgs); } finally { zone.cancelTask(task); } } /** * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not * rethrown. */ runGuarded(fn, applyThis, applyArgs) { return this._inner.runGuarded(fn, applyThis, applyArgs); } /** * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by * the function. * * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do * work that * doesn't trigger Angular change-detection or is subject to Angular's error handling. * * Any future tasks or microtasks scheduled from within this function will continue executing from * outside of the Angular zone. * * Use {@link #run} to reenter the Angular zone and do work that updates the application model. */ runOutsideAngular(fn) { return this._outer.run(fn); } } const EMPTY_PAYLOAD = {}; function checkStable(zone) { if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) { try { zone._nesting++; zone.onMicrotaskEmpty.emit(null); } finally { zone._nesting--; if (!zone.hasPendingMicrotasks) { try { zone.runOutsideAngular(() => zone.onStable.emit(null)); } finally { zone.isStable = true; } } } } } function delayChangeDetectionForEvents(zone) { if (zone.lastRequestAnimationFrameId !== -1) { return; } zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, () => { // This is a work around for https://github.com/angular/angular/issues/36839. // The core issue is that when event coalescing is enabled it is possible for microtasks // to get flushed too early (As is the case with `Promise.then`) between the // coalescing eventTasks. // // To workaround this we schedule a "fake" eventTask before we process the // coalescing eventTasks. The benefit of this is that the "fake" container eventTask // will prevent the microtasks queue from getting drained in between the coalescing // eventTask execution. if (!zone.fakeTopEventTask) { zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => { zone.lastRequestAnimationFrameId = -1; updateMicroTaskStatus(zone); checkStable(zone); }, undefined, () => { }, () => { }); } zone.fakeTopEventTask.invoke(); }); updateMicroTaskStatus(zone); } function forkInnerZoneWithAngularBehavior(zone) { const delayChangeDetectionForEventsDelegate = () => { delayChangeDetectionForEvents(zone); }; zone._inner = zone._inner.fork({ name: 'angular', properties: { 'isAngularZone': true }, onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => { try { onEnter(zone); return delegate.invokeTask(target, task, applyThis, applyArgs); } finally { if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') || zone.shouldCoalesceRunChangeDetection) { delayChangeDetectionForEventsDelegate(); } onLeave(zone); } }, onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => { try { onEnter(zone); return delegate.invoke(target, callback, applyThis, applyArgs, source); } finally { if (zone.shouldCoalesceRunChangeDetection) { delayChangeDetectionForEventsDelegate(); } onLeave(zone); } }, onHasTask: (delegate, current, target, hasTaskState) => { delegate.hasTask(target, hasTaskState); if (current === target) { // We are only interested in hasTask events which originate from our zone // (A child hasTask event is not interesting to us) if (hasTaskState.change == 'microTask') { zone._hasPendingMicrotasks = hasTaskState.microTask; updateMicroTaskStatus(zone); checkStable(zone); } else if (hasTaskState.change == 'macroTask') { zone.hasPendingMacrotasks = hasTaskState.macroTask; } } }, onHandleError: (delegate, current, target, error) => { delegate.handleError(target, error); zone.runOutsideAngular(() => zone.onError.emit(error)); return false; } }); } function updateMicroTaskStatus(zone) { if (zone._hasPendingMicrotasks || ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) && zone.lastRequestAnimationFrameId !== -1)) { zone.hasPendingMicrotasks = true; } else { zone.hasPendingMicrotasks = false; } } function onEnter(zone) { zone._nesting++; if (zone.isStable) { zone.isStable = false; zone.onUnstable.emit(null); } } function onLeave(zone) { zone._nesting--; checkStable(zone); } /** * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls * to framework to perform rendering. */ class NoopNgZone { constructor() { this.hasPendingMicrotasks = false; this.hasPendingMacrotasks = false; this.isStable = true; this.onUnstable = new EventEmitter(); this.onMicrotaskEmpty = new EventEmitter(); this.onStable = new EventEmitter(); this.onError = new EventEmitter(); } run(fn, applyThis, applyArgs) { return fn.apply(applyThis, applyArgs); } runGuarded(fn, applyThis, applyArgs) { return fn.apply(applyThis, applyArgs); } runOutsideAngular(fn) { return fn(); } runTask(fn, applyThis, applyArgs, name) { return fn.apply(applyThis, applyArgs); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The Testability service provides testing hooks that can be accessed from * the browser and by services such as Protractor. Each bootstrapped Angular * application on the page will have an instance of Testability. * @publicApi */ class Testability { constructor(_ngZone) { this._ngZone = _ngZone; this._pendingCount = 0; this._isZoneStable = true; /** * Whether any work was done since the last 'whenStable' callback. This is * useful to detect if this could have potentially destabilized another * component while it is stabilizing. * @internal */ this._didWork = false; this._callbacks = []; this.taskTrackingZone = null; this._watchAngularEvents(); _ngZone.run(() => { this.taskTrackingZone = typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone'); }); } _watchAngularEvents() { this._ngZone.onUnstable.subscribe({ next: () => { this._didWork = true; this._isZoneStable = false; } }); this._ngZone.runOutsideAngular(() => { this._ngZone.onStable.subscribe({ next: () => { NgZone.assertNotInAngularZone(); scheduleMicroTask(() => { this._isZoneStable = true; this._runCallbacksIfReady(); }); } }); }); } /** * Increases the number of pending request * @deprecated pending requests are now tracked with zones. */ increasePendingRequestCount() { this._pendingCount += 1; this._didWork = true; return this._pendingCount; } /** * Decreases the number of pending request * @deprecated pending requests are now tracked with zones */ decreasePendingRequestCount() { this._pendingCount -= 1; if (this._pendingCount < 0) { throw new Error('pending async requests below zero'); } this._runCallbacksIfReady(); return this._pendingCount; } /** * Whether an associated application is stable */ isStable() { return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks; } _runCallbacksIfReady() { if (this.isStable()) { // Schedules the call backs in a new frame so that it is always async. scheduleMicroTask(() => { while (this._callbacks.length !== 0) { let cb = this._callbacks.pop(); clearTimeout(cb.timeoutId); cb.doneCb(this._didWork); } this._didWork = false; }); } else { // Still not stable, send updates. let pending = this.getPendingTasks(); this._callbacks = this._callbacks.filter((cb) => { if (cb.updateCb && cb.updateCb(pending)) { clearTimeout(cb.timeoutId); return false; } return true; }); this._didWork = true; } } getPendingTasks() { if (!this.taskTrackingZone) { return []; } // Copy the tasks data so that we don't leak tasks. return this.taskTrackingZone.macroTasks.map((t) => { return { source: t.source, // From TaskTrackingZone: // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40 creationLocation: t.creationLocation, data: t.data }; }); } addCallback(cb, timeout, updateCb) { let timeoutId = -1; if (timeout && timeout > 0) { timeoutId = setTimeout(() => { this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId); cb(this._didWork, this.getPendingTasks()); }, timeout); } this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb }); } /** * Wait for the application to be stable with a timeout. If the timeout is reached before that * happens, the callback receives a list of the macro tasks that were pending, otherwise null. * * @param doneCb The callback to invoke when Angular is stable or the timeout expires * whichever comes first. * @param timeout Optional. The maximum time to wait for Angular to become stable. If not * specified, whenStable() will wait forever. * @param updateCb Optional. If specified, this callback will be invoked whenever the set of * pending macrotasks changes. If this callback returns true doneCb will not be invoked * and no further updates will be issued. */ whenStable(doneCb, timeout, updateCb) { if (updateCb && !this.taskTrackingZone) { throw new Error('Task tracking zone is required when passing an update callback to ' + 'whenStable(). Is "zone.js/dist/task-tracking.js" loaded?'); } // These arguments are 'Function' above to keep the public API simple. this.addCallback(doneCb, timeout, updateCb); this._runCallbacksIfReady(); } /** * Get the number of pending requests * @deprecated pending requests are now tracked with zones */ getPendingRequestCount() { return this._pendingCount; } /** * Find providers by name * @param using The root element to search from * @param provider The name of binding variable * @param exactMatch Whether using exactMatch */ findProviders(using, provider, exactMatch) { // TODO(juliemr): implement. return []; } } Testability.ɵfac = function Testability_Factory(t) { return new (t || Testability)(ɵɵinject(NgZone)); }; Testability.ɵprov = ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac }); Testability.ctorParameters = () => [ { type: NgZone } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Testability, [{ type: Injectable }], function () { return [{ type: NgZone }]; }, null); })(); /** * A global registry of {@link Testability} instances for specific elements. * @publicApi */ class TestabilityRegistry { constructor() { /** @internal */ this._applications = new Map(); _testabilityGetter.addToWindow(this); } /** * Registers an application with a testability hook so that it can be tracked * @param token token of application, root element * @param testability Testability hook */ registerApplication(token, testability) { this._applications.set(token, testability); } /** * Unregisters an application. * @param token token of application, root element */ unregisterApplication(token) { this._applications.delete(token); } /** * Unregisters all applications */ unregisterAllApplications() { this._applications.clear(); } /** * Get a testability hook associated with the application * @param elem root element */ getTestability(elem) { return this._applications.get(elem) || null; } /** * Get all registered testabilities */ getAllTestabilities() { return Array.from(this._applications.values()); } /** * Get all registered applications(root elements) */ getAllRootElements() { return Array.from(this._applications.keys()); } /** * Find testability of a node in the Tree * @param elem node * @param findInAncestors whether finding testability in ancestors if testability was not found in * current node */ findTestabilityInTree(elem, findInAncestors = true) { return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors); } } TestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); }; TestabilityRegistry.ɵprov = ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac }); TestabilityRegistry.ctorParameters = () => []; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{ type: Injectable }], function () { return []; }, null); })(); class _NoopGetTestability { addToWindow(registry) { } findTestabilityInTree(registry, elem, findInAncestors) { return null; } } /** * Set the {@link GetTestability} implementation used by the Angular testing framework. * @publicApi */ function setTestabilityGetter(getter) { _testabilityGetter = getter; } let _testabilityGetter = new _NoopGetTestability(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`. * * For more information on how to run and debug tests with either Ivy or View Engine (legacy), * please see [BAZEL.md](./docs/BAZEL.md). */ let _devMode = true; let _runModeLocked = false; /** * Returns whether Angular is in development mode. After called once, * the value is locked and won't change any more. * * By default, this is true, unless a user calls `enableProdMode` before calling this. * * @publicApi */ function isDevMode() { _runModeLocked = true; return _devMode; } /** * Disable Angular's development mode, which turns off assertions and other * checks within the framework. * * One important assertion this disables verifies that a change detection pass * does not result in additional changes to any bindings (also known as * unidirectional data flow). * * @publicApi */ function enableProdMode() { if (_runModeLocked) { throw new Error('Cannot enable prod mode after platform setup.'); } // The below check is there so when ngDevMode is set via terser // `global['ngDevMode'] = false;` is also dropped. if (typeof ngDevMode === undefined || !!ngDevMode) { _global['ngDevMode'] = false; } _devMode = false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _platform; let compileNgModuleFactory = compileNgModuleFactory__POST_R3__; function compileNgModuleFactory__PRE_R3__(injector, options, moduleType) { const compilerFactory = injector.get(CompilerFactory); const compiler = compilerFactory.createCompiler([options]); return compiler.compileModuleAsync(moduleType); } function compileNgModuleFactory__POST_R3__(injector, options, moduleType) { ngDevMode && assertNgModuleType(moduleType); const moduleFactory = new NgModuleFactory$1(moduleType); // All of the logic below is irrelevant for AOT-compiled code. if (typeof ngJitMode !== 'undefined' && !ngJitMode) { return Promise.resolve(moduleFactory); } const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options); // Configure the compiler to use the provided options. This call may fail when multiple modules // are bootstrapped with incompatible options, as a component can only be compiled according to // a single set of options. setJitOptions({ defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)), preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)), }); if (isComponentResourceResolutionQueueEmpty()) { return Promise.resolve(moduleFactory); } const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers)); // In case there are no compiler providers, we just return the module factory as // there won't be any resource loader. This can happen with Ivy, because AOT compiled // modules can be still passed through "bootstrapModule". In that case we shouldn't // unnecessarily require the JIT compiler. if (compilerProviders.length === 0) { return Promise.resolve(moduleFactory); } const compiler = getCompilerFacade(); const compilerInjector = Injector.create({ providers: compilerProviders }); const resourceLoader = compilerInjector.get(compiler.ResourceLoader); // The resource loader can also return a string while the "resolveComponentResources" // always expects a promise. Therefore we need to wrap the returned value in a promise. return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))) .then(() => moduleFactory); } // the `window.ng` global utilities are only available in non-VE versions of // Angular. The function switch below will make sure that the code is not // included into Angular when PRE mode is active. function publishDefaultGlobalUtils__PRE_R3__() { } function publishDefaultGlobalUtils__POST_R3__() { ngDevMode && publishDefaultGlobalUtils(); } let publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__POST_R3__; let isBoundToModule = isBoundToModule__POST_R3__; function isBoundToModule__PRE_R3__(cf) { return cf instanceof ComponentFactoryBoundToModule; } function isBoundToModule__POST_R3__(cf) { return cf.isBoundToModule; } const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken'); /** * A token for third-party components that can register themselves with NgProbe. * * @publicApi */ class NgProbeToken { constructor(name, token) { this.name = name; this.token = token; } } /** * Creates a platform. * Platforms must be created on launch using this function. * * @publicApi */ function createPlatform(injector) { if (_platform && !_platform.destroyed && !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) { throw new Error('There can be only one platform. Destroy the previous one to create a new one.'); } publishDefaultGlobalUtils$1(); _platform = injector.get(PlatformRef); const inits = injector.get(PLATFORM_INITIALIZER, null); if (inits) inits.forEach((init) => init()); return _platform; } /** * Creates a factory for a platform. Can be used to provide or override `Providers` specific to * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`. * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories * to build up configurations that might be required by different libraries or parts of the * application. * @param name Identifies the new platform factory. * @param providers A set of dependency providers for platforms created with the new factory. * * @publicApi */ function createPlatformFactory(parentPlatformFactory, name, providers = []) { const desc = `Platform: ${name}`; const marker = new InjectionToken(desc); return (extraProviders = []) => { let platform = getPlatform(); if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) { if (parentPlatformFactory) { parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true })); } else { const injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true }, { provide: INJECTOR_SCOPE, useValue: 'platform' }); createPlatform(Injector.create({ providers: injectedProviders, name: desc })); } } return assertPlatform(marker); }; } /** * Checks that there is currently a platform that contains the given token as a provider. * * @publicApi */ function assertPlatform(requiredToken) { const platform = getPlatform(); if (!platform) { throw new Error('No platform exists!'); } if (!platform.injector.get(requiredToken, null)) { throw new Error('A platform with a different configuration has been created. Please destroy it first.'); } return platform; } /** * Destroys the current Angular platform and all Angular applications on the page. * Destroys all modules and listeners registered with the platform. * * @publicApi */ function destroyPlatform() { if (_platform && !_platform.destroyed) { _platform.destroy(); } } /** * Returns the current platform. * * @publicApi */ function getPlatform() { return _platform && !_platform.destroyed ? _platform : null; } /** * The Angular platform is the entry point for Angular on a web page. * Each page has exactly one platform. Services (such as reflection) which are common * to every Angular application running on the page are bound in its scope. * A page's platform is initialized implicitly when a platform is created using a platform * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function. * * @publicApi */ class PlatformRef { /** @internal */ constructor(_injector) { this._injector = _injector; this._modules = []; this._destroyListeners = []; this._destroyed = false; } /** * Creates an instance of an `@NgModule` for the given platform for offline compilation. * * @usageNotes * * The following example creates the NgModule for a browser platform. * * ```typescript * my_module.ts: * * @NgModule({ * imports: [BrowserModule] * }) * class MyModule {} * * main.ts: * import {MyModuleNgFactory} from './my_module.ngfactory'; * import {platformBrowser} from '@angular/platform-browser'; * * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory); * ``` */ bootstrapModuleFactory(moduleFactory, options) { // Note: We need to create the NgZone _before_ we instantiate the module, // as instantiating the module creates some providers eagerly. // So we create a mini parent injector that just contains the new NgZone and // pass that as parent to the NgModuleFactory. const ngZoneOption = options ? options.ngZone : undefined; const ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false; const ngZoneRunCoalescing = (options && options.ngZoneRunCoalescing) || false; const ngZone = getNgZone(ngZoneOption, { ngZoneEventCoalescing, ngZoneRunCoalescing }); const providers = [{ provide: NgZone, useValue: ngZone }]; // Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are // created within the Angular zone // Do not try to replace ngZone.run with ApplicationRef#run because ApplicationRef would then be // created outside of the Angular zone. return ngZone.run(() => { const ngZoneInjector = Injector.create({ providers: providers, parent: this.injector, name: moduleFactory.moduleType.name }); const moduleRef = moduleFactory.create(ngZoneInjector); const exceptionHandler = moduleRef.injector.get(ErrorHandler, null); if (!exceptionHandler) { throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?'); } ngZone.runOutsideAngular(() => { const subscription = ngZone.onError.subscribe({ next: (error) => { exceptionHandler.handleError(error); } }); moduleRef.onDestroy(() => { remove(this._modules, moduleRef); subscription.unsubscribe(); }); }); return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => { const initStatus = moduleRef.injector.get(ApplicationInitStatus); initStatus.runInitializers(); return initStatus.donePromise.then(() => { if (ivyEnabled) { // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy const localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID); setLocaleId(localeId || DEFAULT_LOCALE_ID); } this._moduleDoBootstrap(moduleRef); return moduleRef; }); }); }); } /** * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler. * * @usageNotes * ### Simple Example * * ```typescript * @NgModule({ * imports: [BrowserModule] * }) * class MyModule {} * * let moduleRef = platformBrowser().bootstrapModule(MyModule); * ``` * */ bootstrapModule(moduleType, compilerOptions = []) { const options = optionsReducer({}, compilerOptions); return compileNgModuleFactory(this.injector, options, moduleType) .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options)); } _moduleDoBootstrap(moduleRef) { const appRef = moduleRef.injector.get(ApplicationRef); if (moduleRef._bootstrapComponents.length > 0) { moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f)); } else if (moduleRef.instance.ngDoBootstrap) { moduleRef.instance.ngDoBootstrap(appRef); } else { throw new Error(`The module ${stringify(moduleRef.instance .constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ` + `Please define one of these.`); } this._modules.push(moduleRef); } /** * Registers a listener to be called when the platform is destroyed. */ onDestroy(callback) { this._destroyListeners.push(callback); } /** * Retrieves the platform {@link Injector}, which is the parent injector for * every Angular application on the page and provides singleton providers. */ get injector() { return this._injector; } /** * Destroys the current Angular platform and all Angular applications on the page. * Destroys all modules and listeners registered with the platform. */ destroy() { if (this._destroyed) { throw new Error('The platform has already been destroyed!'); } this._modules.slice().forEach(module => module.destroy()); this._destroyListeners.forEach(listener => listener()); this._destroyed = true; } get destroyed() { return this._destroyed; } } PlatformRef.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); }; PlatformRef.ɵprov = ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac }); PlatformRef.ctorParameters = () => [ { type: Injector } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{ type: Injectable }], function () { return [{ type: Injector }]; }, null); })(); function getNgZone(ngZoneOption, extra) { let ngZone; if (ngZoneOption === 'noop') { ngZone = new NoopNgZone(); } else { ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({ enableLongStackTrace: isDevMode(), shouldCoalesceEventChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneEventCoalescing), shouldCoalesceRunChangeDetection: !!(extra === null || extra === void 0 ? void 0 : extra.ngZoneRunCoalescing) }); } return ngZone; } function _callAndReportToErrorHandler(errorHandler, ngZone, callback) { try { const result = callback(); if (isPromise(result)) { return result.catch((e) => { ngZone.runOutsideAngular(() => errorHandler.handleError(e)); // rethrow as the exception handler might not do it throw e; }); } return result; } catch (e) { ngZone.runOutsideAngular(() => errorHandler.handleError(e)); // rethrow as the exception handler might not do it throw e; } } function optionsReducer(dst, objs) { if (Array.isArray(objs)) { dst = objs.reduce(optionsReducer, dst); } else { dst = Object.assign(Object.assign({}, dst), objs); } return dst; } /** * A reference to an Angular application running on a page. * * @usageNotes * * {@a is-stable-examples} * ### isStable examples and caveats * * Note two important points about `isStable`, demonstrated in the examples below: * - the application will never be stable if you start any kind * of recurrent asynchronous task when the application starts * (for example for a polling process, started with a `setInterval`, a `setTimeout` * or using RxJS operators like `interval`); * - the `isStable` Observable runs outside of the Angular zone. * * Let's imagine that you start a recurrent task * (here incrementing a counter, using RxJS `interval`), * and at the same time subscribe to `isStable`. * * ``` * constructor(appRef: ApplicationRef) { * appRef.isStable.pipe( * filter(stable => stable) * ).subscribe(() => console.log('App is stable now'); * interval(1000).subscribe(counter => console.log(counter)); * } * ``` * In this example, `isStable` will never emit `true`, * and the trace "App is stable now" will never get logged. * * If you want to execute something when the app is stable, * you have to wait for the application to be stable * before starting your polling process. * * ``` * constructor(appRef: ApplicationRef) { * appRef.isStable.pipe( * first(stable => stable), * tap(stable => console.log('App is stable now')), * switchMap(() => interval(1000)) * ).subscribe(counter => console.log(counter)); * } * ``` * In this example, the trace "App is stable now" will be logged * and then the counter starts incrementing every second. * * Note also that this Observable runs outside of the Angular zone, * which means that the code in the subscription * to this Observable will not trigger the change detection. * * Let's imagine that instead of logging the counter value, * you update a field of your component * and display it in its template. * * ``` * constructor(appRef: ApplicationRef) { * appRef.isStable.pipe( * first(stable => stable), * switchMap(() => interval(1000)) * ).subscribe(counter => this.value = counter); * } * ``` * As the `isStable` Observable runs outside the zone, * the `value` field will be updated properly, * but the template will not be refreshed! * * You'll have to manually trigger the change detection to update the template. * * ``` * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) { * appRef.isStable.pipe( * first(stable => stable), * switchMap(() => interval(1000)) * ).subscribe(counter => { * this.value = counter; * cd.detectChanges(); * }); * } * ``` * * Or make the subscription callback run inside the zone. * * ``` * constructor(appRef: ApplicationRef, zone: NgZone) { * appRef.isStable.pipe( * first(stable => stable), * switchMap(() => interval(1000)) * ).subscribe(counter => zone.run(() => this.value = counter)); * } * ``` * * @publicApi */ class ApplicationRef { /** @internal */ constructor(_zone, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) { this._zone = _zone; this._injector = _injector; this._exceptionHandler = _exceptionHandler; this._componentFactoryResolver = _componentFactoryResolver; this._initStatus = _initStatus; /** @internal */ this._bootstrapListeners = []; this._views = []; this._runningTick = false; this._stable = true; /** * Get a list of component types registered to this application. * This list is populated even before the component is created. */ this.componentTypes = []; /** * Get a list of components registered to this application. */ this.components = []; this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({ next: () => { this._zone.run(() => { this.tick(); }); } }); const isCurrentlyStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"]((observer) => { this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks && !this._zone.hasPendingMicrotasks; this._zone.runOutsideAngular(() => { observer.next(this._stable); observer.complete(); }); }); const isStable = new rxjs__WEBPACK_IMPORTED_MODULE_0__["Observable"]((observer) => { // Create the subscription to onStable outside the Angular Zone so that // the callback is run outside the Angular Zone. let stableSub; this._zone.runOutsideAngular(() => { stableSub = this._zone.onStable.subscribe(() => { NgZone.assertNotInAngularZone(); // Check whether there are no pending macro/micro tasks in the next tick // to allow for NgZone to update the state. scheduleMicroTask(() => { if (!this._stable && !this._zone.hasPendingMacrotasks && !this._zone.hasPendingMicrotasks) { this._stable = true; observer.next(true); } }); }); }); const unstableSub = this._zone.onUnstable.subscribe(() => { NgZone.assertInAngularZone(); if (this._stable) { this._stable = false; this._zone.runOutsideAngular(() => { observer.next(false); }); } }); return () => { stableSub.unsubscribe(); unstableSub.unsubscribe(); }; }); this.isStable = Object(rxjs__WEBPACK_IMPORTED_MODULE_0__["merge"])(isCurrentlyStable, isStable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_1__["share"])())); } /** * Bootstrap a new component at the root level of the application. * * @usageNotes * ### Bootstrap process * * When bootstrapping a new root component into an application, Angular mounts the * specified application component onto DOM elements identified by the componentType's * selector and kicks off automatic change detection to finish initializing the component. * * Optionally, a component can be mounted onto a DOM element that does not match the * componentType's selector. * * ### Example * {@example core/ts/platform/platform.ts region='longform'} */ bootstrap(componentOrFactory, rootSelectorOrNode) { if (!this._initStatus.done) { throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.'); } let componentFactory; if (componentOrFactory instanceof ComponentFactory) { componentFactory = componentOrFactory; } else { componentFactory = this._componentFactoryResolver.resolveComponentFactory(componentOrFactory); } this.componentTypes.push(componentFactory.componentType); // Create a factory associated with the current module if it's not bound to some other const ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef); const selectorOrNode = rootSelectorOrNode || componentFactory.selector; const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule); const nativeElement = compRef.location.nativeElement; const testability = compRef.injector.get(Testability, null); const testabilityRegistry = testability && compRef.injector.get(TestabilityRegistry); if (testability && testabilityRegistry) { testabilityRegistry.registerApplication(nativeElement, testability); } compRef.onDestroy(() => { this.detachView(compRef.hostView); remove(this.components, compRef); if (testabilityRegistry) { testabilityRegistry.unregisterApplication(nativeElement); } }); this._loadComponent(compRef); // Note that we have still left the `isDevMode()` condition in order to avoid // creating a breaking change for projects that still use the View Engine. if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) { const _console = this._injector.get(Console); _console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`); } return compRef; } /** * Invoke this method to explicitly process change detection and its side-effects. * * In development mode, `tick()` also performs a second change detection cycle to ensure that no * further changes are detected. If additional changes are picked up during this second cycle, * bindings in the app have side-effects that cannot be resolved in a single change detection * pass. * In this case, Angular throws an error, since an Angular application can only have one change * detection pass during which all change detection must complete. */ tick() { if (this._runningTick) { throw new Error('ApplicationRef.tick is called recursively'); } try { this._runningTick = true; for (let view of this._views) { view.detectChanges(); } // Note that we have still left the `isDevMode()` condition in order to avoid // creating a breaking change for projects that still use the View Engine. if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) { for (let view of this._views) { view.checkNoChanges(); } } } catch (e) { // Attention: Don't rethrow as it could cancel subscriptions to Observables! this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e)); } finally { this._runningTick = false; } } /** * Attaches a view so that it will be dirty checked. * The view will be automatically detached when it is destroyed. * This will throw if the view is already attached to a ViewContainer. */ attachView(viewRef) { const view = viewRef; this._views.push(view); view.attachToAppRef(this); } /** * Detaches a view from dirty checking again. */ detachView(viewRef) { const view = viewRef; remove(this._views, view); view.detachFromAppRef(); } _loadComponent(componentRef) { this.attachView(componentRef.hostView); this.tick(); this.components.push(componentRef); // Get the listeners lazily to prevent DI cycles. const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners); listeners.forEach((listener) => listener(componentRef)); } /** @internal */ ngOnDestroy() { this._views.slice().forEach((view) => view.destroy()); this._onMicrotaskEmptySubscription.unsubscribe(); } /** * Returns the number of attached views. */ get viewCount() { return this._views.length; } } ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationInitStatus)); }; ApplicationRef.ɵprov = ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac }); ApplicationRef.ctorParameters = () => [ { type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver }, { type: ApplicationInitStatus } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{ type: Injectable }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver }, { type: ApplicationInitStatus }]; }, null); })(); function remove(list, el) { const index = list.indexOf(el); if (index > -1) { list.splice(index, 1); } } function _lastDefined(args) { for (let i = args.length - 1; i >= 0; i--) { if (args[i] !== undefined) { return args[i]; } } return undefined; } function _mergeArrays(parts) { const result = []; parts.forEach((part) => part && result.push(...part)); return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Used to load ng module factories. * * @publicApi * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is * part of its implementation. See `LoadChildren` for more details. */ class NgModuleFactoryLoader { } function getModuleFactory__PRE_R3__(id) { const factory = getRegisteredNgModuleType(id); if (!factory) throw noModuleError(id); return factory; } function getModuleFactory__POST_R3__(id) { const type = getRegisteredNgModuleType(id); if (!type) throw noModuleError(id); return new NgModuleFactory$1(type); } /** * Returns the NgModuleFactory with the given id, if it exists and has been loaded. * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module * cannot be found. * @publicApi */ const getModuleFactory = getModuleFactory__POST_R3__; function noModuleError(id) { return new Error(`No module with ID ${id} loaded`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _SEPARATOR = '#'; const FACTORY_CLASS_SUFFIX = 'NgFactory'; /** * Configuration for SystemJsNgModuleLoader. * token. * * @publicApi * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig` * is part of its implementation. See `LoadChildren` for more details. */ class SystemJsNgModuleLoaderConfig { } const DEFAULT_CONFIG = { factoryPathPrefix: '', factoryPathSuffix: '.ngfactory', }; /** * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory * @publicApi * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is * part of its implementation. See `LoadChildren` for more details. */ class SystemJsNgModuleLoader { constructor(_compiler, config) { this._compiler = _compiler; this._config = config || DEFAULT_CONFIG; } load(path) { const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler; return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path); } loadAndCompile(path) { let [module, exportName] = path.split(_SEPARATOR); if (exportName === undefined) { exportName = 'default'; } return __webpack_require__("zn8P")(module) .then((module) => module[exportName]) .then((type) => checkNotEmpty(type, module, exportName)) .then((type) => this._compiler.compileModuleAsync(type)); } loadFactory(path) { let [module, exportName] = path.split(_SEPARATOR); let factoryClassSuffix = FACTORY_CLASS_SUFFIX; if (exportName === undefined) { exportName = 'default'; factoryClassSuffix = ''; } return __webpack_require__("zn8P")(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix) .then((module) => module[exportName + factoryClassSuffix]) .then((factory) => checkNotEmpty(factory, module, exportName)); } } SystemJsNgModuleLoader.ɵfac = function SystemJsNgModuleLoader_Factory(t) { return new (t || SystemJsNgModuleLoader)(ɵɵinject(Compiler), ɵɵinject(SystemJsNgModuleLoaderConfig, 8)); }; SystemJsNgModuleLoader.ɵprov = ɵɵdefineInjectable({ token: SystemJsNgModuleLoader, factory: SystemJsNgModuleLoader.ɵfac }); SystemJsNgModuleLoader.ctorParameters = () => [ { type: Compiler }, { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(SystemJsNgModuleLoader, [{ type: Injectable }], function () { return [{ type: Compiler }, { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] }]; }, null); })(); function checkNotEmpty(value, modulePath, exportName) { if (!value) { throw new Error(`Cannot find '${exportName}' in '${modulePath}'`); } return value; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents an Angular [view](guide/glossary#view "Definition"). * * @see {@link ChangeDetectorRef#usage-notes Change detection usage} * * @publicApi */ class ViewRef$1 extends ChangeDetectorRef { } /** * Represents an Angular [view](guide/glossary#view) in a view container. * An [embedded view](guide/glossary#view-tree) can be referenced from a component * other than the hosting component whose template defines it, or it can be defined * independently by a `TemplateRef`. * * Properties of elements in a view can change, but the structure (number and order) of elements in * a view cannot. Change the structure of elements by inserting, moving, or * removing nested views in a view container. * * @see `ViewContainerRef` * * @usageNotes * * The following template breaks down into two separate `TemplateRef` instances, * an outer one and an inner one. * * ``` * Count: {{items.length}} * <ul> * <li *ngFor="let item of items">{{item}}</li> * </ul> * ``` * * This is the outer `TemplateRef`: * * ``` * Count: {{items.length}} * <ul> * <ng-template ngFor let-item [ngForOf]="items"></ng-template> * </ul> * ``` * * This is the inner `TemplateRef`: * * ``` * <li>{{item}}</li> * ``` * * The outer and inner `TemplateRef` instances are assembled into views as follows: * * ``` * <!-- ViewRef: outer-0 --> * Count: 2 * <ul> * <ng-template view-container-ref></ng-template> * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 --> * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 --> * </ul> * <!-- /ViewRef: outer-0 --> * ``` * @publicApi */ class EmbeddedViewRef extends ViewRef$1 { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ class DebugEventListener { constructor(name, callback) { this.name = name; this.callback = callback; } } class DebugNode__PRE_R3__ { constructor(nativeNode, parent, _debugContext) { this.listeners = []; this.parent = null; this._debugContext = _debugContext; this.nativeNode = nativeNode; if (parent && parent instanceof DebugElement__PRE_R3__) { parent.addChild(this); } } get injector() { return this._debugContext.injector; } get componentInstance() { return this._debugContext.component; } get context() { return this._debugContext.context; } get references() { return this._debugContext.references; } get providerTokens() { return this._debugContext.providerTokens; } } class DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ { constructor(nativeNode, parent, _debugContext) { super(nativeNode, parent, _debugContext); this.properties = {}; this.attributes = {}; this.classes = {}; this.styles = {}; this.childNodes = []; this.nativeElement = nativeNode; } addChild(child) { if (child) { this.childNodes.push(child); child.parent = this; } } removeChild(child) { const childIndex = this.childNodes.indexOf(child); if (childIndex !== -1) { child.parent = null; this.childNodes.splice(childIndex, 1); } } insertChildrenAfter(child, newChildren) { const siblingIndex = this.childNodes.indexOf(child); if (siblingIndex !== -1) { this.childNodes.splice(siblingIndex + 1, 0, ...newChildren); newChildren.forEach(c => { if (c.parent) { c.parent.removeChild(c); } child.parent = this; }); } } insertBefore(refChild, newChild) { const refIndex = this.childNodes.indexOf(refChild); if (refIndex === -1) { this.addChild(newChild); } else { if (newChild.parent) { newChild.parent.removeChild(newChild); } newChild.parent = this; this.childNodes.splice(refIndex, 0, newChild); } } query(predicate) { const results = this.queryAll(predicate); return results[0] || null; } queryAll(predicate) { const matches = []; _queryElementChildren(this, predicate, matches); return matches; } queryAllNodes(predicate) { const matches = []; _queryNodeChildren(this, predicate, matches); return matches; } get children() { return this.childNodes // .filter((node) => node instanceof DebugElement__PRE_R3__); } triggerEventHandler(eventName, eventObj) { this.listeners.forEach((listener) => { if (listener.name == eventName) { listener.callback(eventObj); } }); } } /** * @publicApi */ function asNativeElements(debugEls) { return debugEls.map((el) => el.nativeElement); } function _queryElementChildren(element, predicate, matches) { element.childNodes.forEach(node => { if (node instanceof DebugElement__PRE_R3__) { if (predicate(node)) { matches.push(node); } _queryElementChildren(node, predicate, matches); } }); } function _queryNodeChildren(parentNode, predicate, matches) { if (parentNode instanceof DebugElement__PRE_R3__) { parentNode.childNodes.forEach(node => { if (predicate(node)) { matches.push(node); } if (node instanceof DebugElement__PRE_R3__) { _queryNodeChildren(node, predicate, matches); } }); } } class DebugNode__POST_R3__ { constructor(nativeNode) { this.nativeNode = nativeNode; } get parent() { const parent = this.nativeNode.parentNode; return parent ? new DebugElement__POST_R3__(parent) : null; } get injector() { return getInjector(this.nativeNode); } get componentInstance() { const nativeElement = this.nativeNode; return nativeElement && (getComponent(nativeElement) || getOwningComponent(nativeElement)); } get context() { return getComponent(this.nativeNode) || getContext(this.nativeNode); } get listeners() { return getListeners(this.nativeNode).filter(listener => listener.type === 'dom'); } get references() { return getLocalRefs(this.nativeNode); } get providerTokens() { return getInjectionTokens(this.nativeNode); } } class DebugElement__POST_R3__ extends DebugNode__POST_R3__ { constructor(nativeNode) { ngDevMode && assertDomNode(nativeNode); super(nativeNode); } get nativeElement() { return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null; } get name() { try { const context = loadLContext(this.nativeNode); const lView = context.lView; const tData = lView[TVIEW].data; const tNode = tData[context.nodeIndex]; return tNode.value; } catch (e) { return this.nativeNode.nodeName; } } /** * Gets a map of property names to property values for an element. * * This map includes: * - Regular property bindings (e.g. `[id]="id"`) * - Host property bindings (e.g. `host: { '[id]': "id" }`) * - Interpolated property bindings (e.g. `id="{{ value }}") * * It does not include: * - input property bindings (e.g. `[myCustomInput]="value"`) * - attribute bindings (e.g. `[attr.role]="menu"`) */ get properties() { const context = loadLContext(this.nativeNode, false); if (context == null) { return {}; } const lView = context.lView; const tData = lView[TVIEW].data; const tNode = tData[context.nodeIndex]; const properties = {}; // Collect properties from the DOM. copyDomProperties(this.nativeElement, properties); // Collect properties from the bindings. This is needed for animation renderer which has // synthetic properties which don't get reflected into the DOM. collectPropertyBindings(properties, tNode, lView, tData); return properties; } get attributes() { const attributes = {}; const element = this.nativeElement; if (!element) { return attributes; } const context = loadLContext(element, false); if (context == null) { return {}; } const lView = context.lView; const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs; const lowercaseTNodeAttrs = []; // For debug nodes we take the element's attribute directly from the DOM since it allows us // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones // that are set through `Renderer2`). The problem is that the browser will lowercase all names, // however since we have the attributes already on the TNode, we can preserve the case by going // through them once, adding them to the `attributes` map and putting their lower-cased name // into an array. Afterwards when we're going through the native DOM attributes, we can check // whether we haven't run into an attribute already through the TNode. if (tNodeAttrs) { let i = 0; while (i < tNodeAttrs.length) { const attrName = tNodeAttrs[i]; // Stop as soon as we hit a marker. We only care about the regular attributes. Everything // else will be handled below when we read the final attributes off the DOM. if (typeof attrName !== 'string') break; const attrValue = tNodeAttrs[i + 1]; attributes[attrName] = attrValue; lowercaseTNodeAttrs.push(attrName.toLowerCase()); i += 2; } } const eAttrs = element.attributes; for (let i = 0; i < eAttrs.length; i++) { const attr = eAttrs[i]; const lowercaseName = attr.name.toLowerCase(); // Make sure that we don't assign the same attribute both in its // case-sensitive form and the lower-cased one from the browser. if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) { // Save the lowercase name to align the behavior between browsers. // IE preserves the case, while all other browser convert it to lower case. attributes[lowercaseName] = attr.value; } } return attributes; } get styles() { if (this.nativeElement && this.nativeElement.style) { return this.nativeElement.style; } return {}; } get classes() { const result = {}; const element = this.nativeElement; // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`. const className = element.className; const classes = className && typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' '); classes.forEach((value) => result[value] = true); return result; } get childNodes() { const childNodes = this.nativeNode.childNodes; const children = []; for (let i = 0; i < childNodes.length; i++) { const element = childNodes[i]; children.push(getDebugNode__POST_R3__(element)); } return children; } get children() { const nativeElement = this.nativeElement; if (!nativeElement) return []; const childNodes = nativeElement.children; const children = []; for (let i = 0; i < childNodes.length; i++) { const element = childNodes[i]; children.push(getDebugNode__POST_R3__(element)); } return children; } query(predicate) { const results = this.queryAll(predicate); return results[0] || null; } queryAll(predicate) { const matches = []; _queryAllR3(this, predicate, matches, true); return matches; } queryAllNodes(predicate) { const matches = []; _queryAllR3(this, predicate, matches, false); return matches; } triggerEventHandler(eventName, eventObj) { const node = this.nativeNode; const invokedListeners = []; this.listeners.forEach(listener => { if (listener.name === eventName) { const callback = listener.callback; callback.call(node, eventObj); invokedListeners.push(callback); } }); // We need to check whether `eventListeners` exists, because it's something // that Zone.js only adds to `EventTarget` in browser environments. if (typeof node.eventListeners === 'function') { // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event // listener. node.eventListeners(eventName).forEach((listener) => { // In order to ensure that we can detect the special __ngUnwrap__ token described above, we // use `toString` on the listener and see if it contains the token. We use this approach to // ensure that it still worked with compiled code since it cannot remove or rename string // literals. We also considered using a special function name (i.e. if(listener.name === // special)) but that was more cumbersome and we were also concerned the compiled code could // strip the name, turning the condition in to ("" === "") and always returning true. if (listener.toString().indexOf('__ngUnwrap__') !== -1) { const unwrappedListener = listener('__ngUnwrap__'); return invokedListeners.indexOf(unwrappedListener) === -1 && unwrappedListener.call(node, eventObj); } }); } } } function copyDomProperties(element, properties) { if (element) { // Skip own properties (as those are patched) let obj = Object.getPrototypeOf(element); const NodePrototype = Node.prototype; while (obj !== null && obj !== NodePrototype) { const descriptors = Object.getOwnPropertyDescriptors(obj); for (let key in descriptors) { if (!key.startsWith('__') && !key.startsWith('on')) { // don't include properties starting with `__` and `on`. // `__` are patched values which should not be included. // `on` are listeners which also should not be included. const value = element[key]; if (isPrimitiveValue(value)) { properties[key] = value; } } } obj = Object.getPrototypeOf(obj); } } } function isPrimitiveValue(value) { return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' || value === null; } function _queryAllR3(parentElement, predicate, matches, elementsOnly) { const context = loadLContext(parentElement.nativeNode, false); if (context !== null) { const parentTNode = context.lView[TVIEW].data[context.nodeIndex]; _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode); } else { // If the context is null, then `parentElement` was either created with Renderer2 or native DOM // APIs. _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly); } } /** * Recursively match the current TNode against the predicate, and goes on with the next ones. * * @param tNode the current TNode * @param lView the LView of this TNode * @param predicate the predicate to match * @param matches the list of positive matches * @param elementsOnly whether only elements should be searched * @param rootNativeNode the root native node on which predicate should not be matched */ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) { ngDevMode && assertTNodeForLView(tNode, lView); const nativeNode = getNativeByTNodeOrNull(tNode, lView); // For each type of TNode, specific logic is executed. if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) { // Case 1: the TNode is an element // The native node has to be checked. _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode); if (isComponentHost(tNode)) { // If the element is the host of a component, then all nodes in its view have to be processed. // Note: the component's content (tNode.child) will be processed from the insertion points. const componentView = getComponentLViewByIndex(tNode.index, lView); if (componentView && componentView[TVIEW].firstChild) { _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode); } } else { if (tNode.child) { // Otherwise, its children have to be processed. _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode); } // We also have to query the DOM directly in order to catch elements inserted through // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple // times. ViewEngine could do it more efficiently, because all the insertions go through // Renderer2, however that's not the case in Ivy. This approach is being used because: // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine. // 2. We would have to make `Renderer3` "know" about debug nodes. // 3. It allows us to capture nodes that were inserted directly via the DOM. nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly); } // In all cases, if a dynamic container exists for this node, each view inside it has to be // processed. const nodeOrContainer = lView[tNode.index]; if (isLContainer(nodeOrContainer)) { _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode); } } else if (tNode.type & 4 /* Container */) { // Case 2: the TNode is a container // The native node has to be checked. const lContainer = lView[tNode.index]; _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode); // Each view inside the container has to be processed. _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode); } else if (tNode.type & 16 /* Projection */) { // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>). // The nodes projected at this location all need to be processed. const componentView = lView[DECLARATION_COMPONENT_VIEW]; const componentHost = componentView[T_HOST]; const head = componentHost.projection[tNode.projection]; if (Array.isArray(head)) { for (let nativeNode of head) { _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode); } } else if (head) { const nextLView = componentView[PARENT]; const nextTNode = nextLView[TVIEW].data[head.index]; _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode); } } else if (tNode.child) { // Case 4: the TNode is a view. _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode); } // We don't want to go to the next sibling of the root node. if (rootNativeNode !== nativeNode) { // To determine the next node to be processed, we need to use the next or the projectionNext // link, depending on whether the current node has been projected. const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next; if (nextTNode) { _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode); } } } /** * Process all TNodes in a given container. * * @param lContainer the container to be processed * @param predicate the predicate to match * @param matches the list of positive matches * @param elementsOnly whether only elements should be searched * @param rootNativeNode the root native node on which predicate should not be matched */ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) { for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { const childView = lContainer[i]; const firstChild = childView[TVIEW].firstChild; if (firstChild) { _queryNodeChildrenR3(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode); } } } /** * Match the current native node against the predicate. * * @param nativeNode the current native node * @param predicate the predicate to match * @param matches the list of positive matches * @param elementsOnly whether only elements should be searched * @param rootNativeNode the root native node on which predicate should not be matched */ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) { if (rootNativeNode !== nativeNode) { const debugNode = getDebugNode$1(nativeNode); if (!debugNode) { return; } // Type of the "predicate and "matches" array are set based on the value of // the "elementsOnly" parameter. TypeScript is not able to properly infer these // types with generics, so we manually cast the parameters accordingly. if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } } } /** * Match all the descendants of a DOM node against a predicate. * * @param nativeNode the current native node * @param predicate the predicate to match * @param matches the list where matches are stored * @param elementsOnly whether only elements should be searched */ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) { const nodes = parentNode.childNodes; const length = nodes.length; for (let i = 0; i < length; i++) { const node = nodes[i]; const debugNode = getDebugNode$1(node); if (debugNode) { if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } else if (!elementsOnly && predicate(debugNode) && matches.indexOf(debugNode) === -1) { matches.push(debugNode); } _queryNativeNodeDescendants(node, predicate, matches, elementsOnly); } } } /** * Iterates through the property bindings for a given node and generates * a map of property names to values. This map only contains property bindings * defined in templates, not in host bindings. */ function collectPropertyBindings(properties, tNode, lView, tData) { let bindingIndexes = tNode.propertyBindings; if (bindingIndexes !== null) { for (let i = 0; i < bindingIndexes.length; i++) { const bindingIndex = bindingIndexes[i]; const propMetadata = tData[bindingIndex]; const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER); const propertyName = metadataParts[0]; if (metadataParts.length > 1) { let value = metadataParts[1]; for (let j = 1; j < metadataParts.length - 1; j++) { value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1]; } properties[propertyName] = value; } else { properties[propertyName] = lView[bindingIndex]; } } } } // Need to keep the nodes in a global Map so that multiple angular apps are supported. const _nativeNodeToDebugNode = new Map(); function getDebugNode__PRE_R3__(nativeNode) { return _nativeNodeToDebugNode.get(nativeNode) || null; } const NG_DEBUG_PROPERTY = '__ng_debug__'; function getDebugNode__POST_R3__(nativeNode) { if (nativeNode instanceof Node) { if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) { nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ? new DebugElement__POST_R3__(nativeNode) : new DebugNode__POST_R3__(nativeNode); } return nativeNode[NG_DEBUG_PROPERTY]; } return null; } /** * @publicApi */ const getDebugNode$1 = getDebugNode__POST_R3__; function getDebugNodeR2__PRE_R3__(nativeNode) { return getDebugNode__PRE_R3__(nativeNode); } function getDebugNodeR2__POST_R3__(_nativeNode) { return null; } const getDebugNodeR2 = getDebugNodeR2__POST_R3__; function getAllDebugNodes() { return Array.from(_nativeNodeToDebugNode.values()); } function indexDebugNode(node) { _nativeNodeToDebugNode.set(node.nativeNode, node); } function removeDebugNodeFromIndex(node) { _nativeNodeToDebugNode.delete(node.nativeNode); } /** * @publicApi */ const DebugNode = DebugNode__POST_R3__; /** * @publicApi */ const DebugElement = DebugElement__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _CORE_PLATFORM_PROVIDERS = [ // Set a default platform name for platforms that don't set it explicitly. { provide: PLATFORM_ID, useValue: 'unknown' }, { provide: PlatformRef, deps: [Injector] }, { provide: TestabilityRegistry, deps: [] }, { provide: Console, deps: [] }, ]; /** * This platform has to be included in any other platform * * @publicApi */ const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function _iterableDiffersFactory() { return defaultIterableDiffers; } function _keyValueDiffersFactory() { return defaultKeyValueDiffers; } function _localeFactory(locale) { locale = locale || getGlobalLocale(); if (ivyEnabled) { setLocaleId(locale); } return locale; } /** * Work out the locale from the potential global properties. * * * Closure Compiler: use `goog.LOCALE`. * * Ivy enabled: use `$localize.locale` */ function getGlobalLocale() { if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode && typeof goog !== 'undefined' && goog.LOCALE !== 'en') { // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`. // * In order to preserve backwards compatibility, we use Angular default value over // Closure Compiler's one. return goog.LOCALE; } else { // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE // COMPILE-TIME INLINER. // // * During compile time inlining of translations the expression will be replaced // with a string literal that is the current locale. Other forms of this expression are not // guaranteed to be replaced. // // * During runtime translation evaluation, the developer is required to set `$localize.locale` // if required, or just to provide their own `LOCALE_ID` provider. return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID; } } const ɵ0$f = USD_CURRENCY_CODE; /** * A built-in [dependency injection token](guide/glossary#di-token) * that is used to configure the root injector for bootstrapping. */ const APPLICATION_MODULE_PROVIDERS = [ { provide: ApplicationRef, useClass: ApplicationRef, deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus] }, { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory }, { provide: ApplicationInitStatus, useClass: ApplicationInitStatus, deps: [[new Optional(), APP_INITIALIZER]] }, { provide: Compiler, useClass: Compiler, deps: [] }, APP_ID_RANDOM_PROVIDER, { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] }, { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] }, { provide: LOCALE_ID$1, useFactory: _localeFactory, deps: [[new Inject(LOCALE_ID$1), new Optional(), new SkipSelf()]] }, { provide: DEFAULT_CURRENCY_CODE, useValue: ɵ0$f }, ]; /** * Schedule work at next available slot. * * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism. * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`. * * @param ngZone NgZone to use for scheduling. */ function zoneSchedulerFactory(ngZone) { let queue = []; ngZone.onStable.subscribe(() => { while (queue.length) { queue.pop()(); } }); return function (fn) { queue.push(fn); }; } /** * Configures the root injector for an app with * providers of `@angular/core` dependencies that `ApplicationRef` needs * to bootstrap components. * * Re-exported by `BrowserModule`, which is included automatically in the root * `AppModule` when you create a new app with the CLI `new` command. * * @publicApi */ class ApplicationModule { // Inject ApplicationRef to make it eager... constructor(appRef) { } } ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); }; ApplicationModule.ɵmod = ɵɵdefineNgModule({ type: ApplicationModule }); ApplicationModule.ɵinj = ɵɵdefineInjector({ providers: APPLICATION_MODULE_PROVIDERS }); ApplicationModule.ctorParameters = () => [ { type: ApplicationRef } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{ type: NgModule, args: [{ providers: APPLICATION_MODULE_PROVIDERS }] }], function () { return [{ type: ApplicationRef }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) { flags |= 1 /* TypeElement */; const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl); const template = templateFactory ? resolveDefinition(templateFactory) : null; return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values flags, checkIndex: -1, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount, bindings: [], bindingFlags: 0, outputs: [], element: { ns: null, name: null, attrs: null, template, componentProvider: null, componentView: null, componentRendererType: null, publicProviders: null, allProviders: null, handleEvent: handleEvent || NOOP }, provider: null, text: null, query: null, ngContent: null }; } function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs = [], bindings, outputs, handleEvent, componentView, componentRendererType) { if (!handleEvent) { handleEvent = NOOP; } const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl); let ns = null; let name = null; if (namespaceAndName) { [ns, name] = splitNamespace(namespaceAndName); } bindings = bindings || []; const bindingDefs = []; for (let i = 0; i < bindings.length; i++) { const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i]; const [ns, name] = splitNamespace(namespaceAndName); let securityContext = undefined; let suffix = undefined; switch (bindingFlags & 15 /* Types */) { case 4 /* TypeElementStyle */: suffix = suffixOrSecurityContext; break; case 1 /* TypeElementAttribute */: case 8 /* TypeProperty */: securityContext = suffixOrSecurityContext; break; } bindingDefs[i] = { flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix }; } outputs = outputs || []; const outputDefs = []; for (let i = 0; i < outputs.length; i++) { const [target, eventName] = outputs[i]; outputDefs[i] = { type: 0 /* ElementOutput */, target: target, eventName, propName: null }; } fixedAttrs = fixedAttrs || []; const attrs = fixedAttrs.map(([namespaceAndName, value]) => { const [ns, name] = splitNamespace(namespaceAndName); return [ns, name, value]; }); componentRendererType = resolveRendererType2(componentRendererType); if (componentView) { flags |= 33554432 /* ComponentView */; } flags |= 1 /* TypeElement */; return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries, matchedQueryIds, references, ngContentIndex, childCount, bindings: bindingDefs, bindingFlags: calcBindingFlags(bindingDefs), outputs: outputDefs, element: { ns, name, attrs, template: null, // will bet set by the view definition componentProvider: null, componentView: componentView || null, componentRendererType: componentRendererType, publicProviders: null, allProviders: null, handleEvent: handleEvent || NOOP, }, provider: null, text: null, query: null, ngContent: null }; } function createElement(view, renderHost, def) { const elDef = def.element; const rootSelectorOrNode = view.root.selectorOrNode; const renderer = view.renderer; let el; if (view.parent || !rootSelectorOrNode) { if (elDef.name) { el = renderer.createElement(elDef.name, elDef.ns); } else { el = renderer.createComment(''); } const parentEl = getParentRenderElement(view, renderHost, def); if (parentEl) { renderer.appendChild(parentEl, el); } } else { // when using native Shadow DOM, do not clear the root element contents to allow slot projection const preserveContent = (!!elDef.componentRendererType && elDef.componentRendererType.encapsulation === ViewEncapsulation.ShadowDom); el = renderer.selectRootElement(rootSelectorOrNode, preserveContent); } if (elDef.attrs) { for (let i = 0; i < elDef.attrs.length; i++) { const [ns, name, value] = elDef.attrs[i]; renderer.setAttribute(el, name, value, ns); } } return el; } function listenToElementOutputs(view, compView, def, el) { for (let i = 0; i < def.outputs.length; i++) { const output = def.outputs[i]; const handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName)); let listenTarget = output.target; let listenerView = view; if (output.target === 'component') { listenTarget = null; listenerView = compView; } const disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure); view.disposables[def.outputIndex + i] = disposable; } } function renderEventHandlerClosure(view, index, eventName) { return (event) => dispatchEvent(view, index, eventName, event); } function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const bindLen = def.bindings.length; let changed = false; if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0)) changed = true; if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1)) changed = true; if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2)) changed = true; if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3)) changed = true; if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4)) changed = true; if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5)) changed = true; if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6)) changed = true; if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7)) changed = true; if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8)) changed = true; if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9)) changed = true; return changed; } function checkAndUpdateElementDynamic(view, def, values) { let changed = false; for (let i = 0; i < values.length; i++) { if (checkAndUpdateElementValue(view, def, i, values[i])) changed = true; } return changed; } function checkAndUpdateElementValue(view, def, bindingIdx, value) { if (!checkAndUpdateBinding(view, def, bindingIdx, value)) { return false; } const binding = def.bindings[bindingIdx]; const elData = asElementData(view, def.nodeIndex); const renderNode = elData.renderElement; const name = binding.name; switch (binding.flags & 15 /* Types */) { case 1 /* TypeElementAttribute */: setElementAttribute$1(view, binding, renderNode, binding.ns, name, value); break; case 2 /* TypeElementClass */: setElementClass(view, renderNode, name, value); break; case 4 /* TypeElementStyle */: setElementStyle(view, binding, renderNode, name, value); break; case 8 /* TypeProperty */: const bindView = (def.flags & 33554432 /* ComponentView */ && binding.flags & 32 /* SyntheticHostProperty */) ? elData.componentView : view; setElementProperty(bindView, binding, renderNode, name, value); break; } return true; } function setElementAttribute$1(view, binding, renderNode, ns, name, value) { const securityContext = binding.securityContext; let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value; renderValue = renderValue != null ? renderValue.toString() : null; const renderer = view.renderer; if (value != null) { renderer.setAttribute(renderNode, name, renderValue, ns); } else { renderer.removeAttribute(renderNode, name, ns); } } function setElementClass(view, renderNode, name, value) { const renderer = view.renderer; if (value) { renderer.addClass(renderNode, name); } else { renderer.removeClass(renderNode, name); } } function setElementStyle(view, binding, renderNode, name, value) { let renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value); if (renderValue != null) { renderValue = renderValue.toString(); const unit = binding.suffix; if (unit != null) { renderValue = renderValue + unit; } } else { renderValue = null; } const renderer = view.renderer; if (renderValue != null) { renderer.setStyle(renderNode, name, renderValue); } else { renderer.removeStyle(renderNode, name); } } function setElementProperty(view, binding, renderNode, name, value) { const securityContext = binding.securityContext; let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value; view.renderer.setProperty(renderNode, name, renderValue); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function queryDef(flags, id, bindings) { let bindingDefs = []; for (let propName in bindings) { const bindingType = bindings[propName]; bindingDefs.push({ propName, bindingType }); } return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values // TODO(vicb): check checkIndex: -1, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, ngContentIndex: -1, matchedQueries: {}, matchedQueryIds: 0, references: {}, childCount: 0, bindings: [], bindingFlags: 0, outputs: [], element: null, provider: null, text: null, query: { id, filterId: filterQueryId(id), bindings: bindingDefs }, ngContent: null }; } function createQuery(emitDistinctChangesOnly) { return new QueryList(emitDistinctChangesOnly); } function dirtyParentQueries(view) { const queryIds = view.def.nodeMatchedQueries; while (view.parent && isEmbeddedView(view)) { let tplDef = view.parentNodeDef; view = view.parent; // content queries const end = tplDef.nodeIndex + tplDef.childCount; for (let i = 0; i <= end; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & 67108864 /* TypeContentQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */) && (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) { asQueryList(view, i).setDirty(); } if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) || !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) || !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) { // skip elements that don't contain the template element or no query. i += nodeDef.childCount; } } } // view queries if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) { for (let i = 0; i < view.def.nodes.length; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) { asQueryList(view, i).setDirty(); } // only visit the root nodes i += nodeDef.childCount; } } } function checkAndUpdateQuery(view, nodeDef) { const queryList = asQueryList(view, nodeDef.nodeIndex); if (!queryList.dirty) { return; } let directiveInstance; let newValues = undefined; if (nodeDef.flags & 67108864 /* TypeContentQuery */) { const elementDef = nodeDef.parent.parent; newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []); directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance; } else if (nodeDef.flags & 134217728 /* TypeViewQuery */) { newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []); directiveInstance = view.component; } queryList.reset(newValues, unwrapElementRef); const bindings = nodeDef.query.bindings; let notify = false; for (let i = 0; i < bindings.length; i++) { const binding = bindings[i]; let boundValue; switch (binding.bindingType) { case 0 /* First */: boundValue = queryList.first; break; case 1 /* All */: boundValue = queryList; notify = true; break; } directiveInstance[binding.propName] = boundValue; } if (notify) { queryList.notifyOnChanges(); } } function calcQueryValues(view, startIndex, endIndex, queryDef, values) { for (let i = startIndex; i <= endIndex; i++) { const nodeDef = view.def.nodes[i]; const valueType = nodeDef.matchedQueries[queryDef.id]; if (valueType != null) { values.push(getQueryValue(view, nodeDef, valueType)); } if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template && (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) === queryDef.filterId) { const elementData = asElementData(view, i); // check embedded views that were attached at the place of their template, // but process child nodes first if some match the query (see issue #16568) if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) { calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values); i += nodeDef.childCount; } if (nodeDef.flags & 16777216 /* EmbeddedViews */) { const embeddedViews = elementData.viewContainer._embeddedViews; for (let k = 0; k < embeddedViews.length; k++) { const embeddedView = embeddedViews[k]; const dvc = declaredViewContainer(embeddedView); if (dvc && dvc === elementData) { calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values); } } } const projectedViews = elementData.template._projectedViews; if (projectedViews) { for (let k = 0; k < projectedViews.length; k++) { const projectedView = projectedViews[k]; calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values); } } } if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) { // if no child matches the query, skip the children. i += nodeDef.childCount; } } return values; } function getQueryValue(view, nodeDef, queryValueType) { if (queryValueType != null) { // a match switch (queryValueType) { case 1 /* RenderElement */: return asElementData(view, nodeDef.nodeIndex).renderElement; case 0 /* ElementRef */: return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement); case 2 /* TemplateRef */: return asElementData(view, nodeDef.nodeIndex).template; case 3 /* ViewContainerRef */: return asElementData(view, nodeDef.nodeIndex).viewContainer; case 4 /* Provider */: return asProviderData(view, nodeDef.nodeIndex).instance; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function ngContentDef(ngContentIndex, index) { return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex: -1, flags: 8 /* TypeNgContent */, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: {}, matchedQueryIds: 0, references: {}, ngContentIndex, childCount: 0, bindings: [], bindingFlags: 0, outputs: [], element: null, provider: null, text: null, query: null, ngContent: { index } }; } function appendNgContent(view, renderHost, def) { const parentEl = getParentRenderElement(view, renderHost, def); if (!parentEl) { // Nothing to do if there is no parent element. return; } const ngContentIndex = def.ngContent.index; visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function purePipeDef(checkIndex, argCount) { // argCount + 1 to include the pipe as first arg return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, newArray(argCount + 1)); } function pureArrayDef(checkIndex, argCount) { return _pureExpressionDef(32 /* TypePureArray */, checkIndex, newArray(argCount)); } function pureObjectDef(checkIndex, propToIndex) { const keys = Object.keys(propToIndex); const nbKeys = keys.length; const propertyNames = []; for (let i = 0; i < nbKeys; i++) { const key = keys[i]; const index = propToIndex[key]; propertyNames.push(key); } return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames); } function _pureExpressionDef(flags, checkIndex, propertyNames) { const bindings = []; for (let i = 0; i < propertyNames.length; i++) { const prop = propertyNames[i]; bindings.push({ flags: 8 /* TypeProperty */, name: prop, ns: null, nonMinifiedName: prop, securityContext: null, suffix: null }); } return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: {}, matchedQueryIds: 0, references: {}, ngContentIndex: -1, childCount: 0, bindings, bindingFlags: calcBindingFlags(bindings), outputs: [], element: null, provider: null, text: null, query: null, ngContent: null }; } function createPureExpression(view, def) { return { value: undefined }; } function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const bindings = def.bindings; let changed = false; const bindLen = bindings.length; if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true; if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true; if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true; if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true; if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true; if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true; if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true; if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true; if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true; if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true; if (changed) { const data = asPureExpressionData(view, def.nodeIndex); let value; switch (def.flags & 201347067 /* Types */) { case 32 /* TypePureArray */: value = []; if (bindLen > 0) value.push(v0); if (bindLen > 1) value.push(v1); if (bindLen > 2) value.push(v2); if (bindLen > 3) value.push(v3); if (bindLen > 4) value.push(v4); if (bindLen > 5) value.push(v5); if (bindLen > 6) value.push(v6); if (bindLen > 7) value.push(v7); if (bindLen > 8) value.push(v8); if (bindLen > 9) value.push(v9); break; case 64 /* TypePureObject */: value = {}; if (bindLen > 0) value[bindings[0].name] = v0; if (bindLen > 1) value[bindings[1].name] = v1; if (bindLen > 2) value[bindings[2].name] = v2; if (bindLen > 3) value[bindings[3].name] = v3; if (bindLen > 4) value[bindings[4].name] = v4; if (bindLen > 5) value[bindings[5].name] = v5; if (bindLen > 6) value[bindings[6].name] = v6; if (bindLen > 7) value[bindings[7].name] = v7; if (bindLen > 8) value[bindings[8].name] = v8; if (bindLen > 9) value[bindings[9].name] = v9; break; case 128 /* TypePurePipe */: const pipe = v0; switch (bindLen) { case 1: value = pipe.transform(v0); break; case 2: value = pipe.transform(v1); break; case 3: value = pipe.transform(v1, v2); break; case 4: value = pipe.transform(v1, v2, v3); break; case 5: value = pipe.transform(v1, v2, v3, v4); break; case 6: value = pipe.transform(v1, v2, v3, v4, v5); break; case 7: value = pipe.transform(v1, v2, v3, v4, v5, v6); break; case 8: value = pipe.transform(v1, v2, v3, v4, v5, v6, v7); break; case 9: value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8); break; case 10: value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9); break; } break; } data.value = value; } return changed; } function checkAndUpdatePureExpressionDynamic(view, def, values) { const bindings = def.bindings; let changed = false; for (let i = 0; i < values.length; i++) { // Note: We need to loop over all values, so that // the old values are updates as well! if (checkAndUpdateBinding(view, def, i, values[i])) { changed = true; } } if (changed) { const data = asPureExpressionData(view, def.nodeIndex); let value; switch (def.flags & 201347067 /* Types */) { case 32 /* TypePureArray */: value = values; break; case 64 /* TypePureObject */: value = {}; for (let i = 0; i < values.length; i++) { value[bindings[i].name] = values[i]; } break; case 128 /* TypePurePipe */: const pipe = values[0]; const params = values.slice(1); value = pipe.transform(...params); break; } data.value = value; } return changed; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function textDef(checkIndex, ngContentIndex, staticText) { const bindings = []; for (let i = 1; i < staticText.length; i++) { bindings[i - 1] = { flags: 8 /* TypeProperty */, name: null, ns: null, nonMinifiedName: null, securityContext: null, suffix: staticText[i], }; } return { // will bet set by the view definition nodeIndex: -1, parent: null, renderParent: null, bindingIndex: -1, outputIndex: -1, // regular values checkIndex, flags: 2 /* TypeText */, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: {}, matchedQueryIds: 0, references: {}, ngContentIndex, childCount: 0, bindings, bindingFlags: 8 /* TypeProperty */, outputs: [], element: null, provider: null, text: { prefix: staticText[0] }, query: null, ngContent: null, }; } function createText(view, renderHost, def) { let renderNode; const renderer = view.renderer; renderNode = renderer.createText(def.text.prefix); const parentEl = getParentRenderElement(view, renderHost, def); if (parentEl) { renderer.appendChild(parentEl, renderNode); } return { renderText: renderNode }; } function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { let changed = false; const bindings = def.bindings; const bindLen = bindings.length; if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0)) changed = true; if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1)) changed = true; if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2)) changed = true; if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3)) changed = true; if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4)) changed = true; if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5)) changed = true; if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6)) changed = true; if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7)) changed = true; if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8)) changed = true; if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9)) changed = true; if (changed) { let value = def.text.prefix; if (bindLen > 0) value += _addInterpolationPart(v0, bindings[0]); if (bindLen > 1) value += _addInterpolationPart(v1, bindings[1]); if (bindLen > 2) value += _addInterpolationPart(v2, bindings[2]); if (bindLen > 3) value += _addInterpolationPart(v3, bindings[3]); if (bindLen > 4) value += _addInterpolationPart(v4, bindings[4]); if (bindLen > 5) value += _addInterpolationPart(v5, bindings[5]); if (bindLen > 6) value += _addInterpolationPart(v6, bindings[6]); if (bindLen > 7) value += _addInterpolationPart(v7, bindings[7]); if (bindLen > 8) value += _addInterpolationPart(v8, bindings[8]); if (bindLen > 9) value += _addInterpolationPart(v9, bindings[9]); const renderNode = asTextData(view, def.nodeIndex).renderText; view.renderer.setValue(renderNode, value); } return changed; } function checkAndUpdateTextDynamic(view, def, values) { const bindings = def.bindings; let changed = false; for (let i = 0; i < values.length; i++) { // Note: We need to loop over all values, so that // the old values are updates as well! if (checkAndUpdateBinding(view, def, i, values[i])) { changed = true; } } if (changed) { let value = ''; for (let i = 0; i < values.length; i++) { value = value + _addInterpolationPart(values[i], bindings[i]); } value = def.text.prefix + value; const renderNode = asTextData(view, def.nodeIndex).renderText; view.renderer.setValue(renderNode, value); } return changed; } function _addInterpolationPart(value, binding) { const valueStr = value != null ? value.toString() : ''; return valueStr + binding.suffix; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function viewDef(flags, nodes, updateDirectives, updateRenderer) { // clone nodes and set auto calculated values let viewBindingCount = 0; let viewDisposableCount = 0; let viewNodeFlags = 0; let viewRootNodeFlags = 0; let viewMatchedQueries = 0; let currentParent = null; let currentRenderParent = null; let currentElementHasPublicProviders = false; let currentElementHasPrivateProviders = false; let lastRenderRootNode = null; for (let i = 0; i < nodes.length; i++) { const node = nodes[i]; node.nodeIndex = i; node.parent = currentParent; node.bindingIndex = viewBindingCount; node.outputIndex = viewDisposableCount; node.renderParent = currentRenderParent; viewNodeFlags |= node.flags; viewMatchedQueries |= node.matchedQueryIds; if (node.element) { const elDef = node.element; elDef.publicProviders = currentParent ? currentParent.element.publicProviders : Object.create(null); elDef.allProviders = elDef.publicProviders; // Note: We assume that all providers of an element are before any child element! currentElementHasPublicProviders = false; currentElementHasPrivateProviders = false; if (node.element.template) { viewMatchedQueries |= node.element.template.nodeMatchedQueries; } } validateNode(currentParent, node, nodes.length); viewBindingCount += node.bindings.length; viewDisposableCount += node.outputs.length; if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) { lastRenderRootNode = node; } if (node.flags & 20224 /* CatProvider */) { if (!currentElementHasPublicProviders) { currentElementHasPublicProviders = true; // Use prototypical inheritance to not get O(n^2) complexity... currentParent.element.publicProviders = Object.create(currentParent.element.publicProviders); currentParent.element.allProviders = currentParent.element.publicProviders; } const isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0; const isComponent = (node.flags & 32768 /* Component */) !== 0; if (!isPrivateService || isComponent) { currentParent.element.publicProviders[tokenKey(node.provider.token)] = node; } else { if (!currentElementHasPrivateProviders) { currentElementHasPrivateProviders = true; // Use prototypical inheritance to not get O(n^2) complexity... currentParent.element.allProviders = Object.create(currentParent.element.publicProviders); } currentParent.element.allProviders[tokenKey(node.provider.token)] = node; } if (isComponent) { currentParent.element.componentProvider = node; } } if (currentParent) { currentParent.childFlags |= node.flags; currentParent.directChildFlags |= node.flags; currentParent.childMatchedQueries |= node.matchedQueryIds; if (node.element && node.element.template) { currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries; } } else { viewRootNodeFlags |= node.flags; } if (node.childCount > 0) { currentParent = node; if (!isNgContainer(node)) { currentRenderParent = node; } } else { // When the current node has no children, check if it is the last children of its parent. // When it is, propagate the flags up. // The loop is required because an element could be the last transitive children of several // elements. We loop to either the root or the highest opened element (= with remaining // children) while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) { const newParent = currentParent.parent; if (newParent) { newParent.childFlags |= currentParent.childFlags; newParent.childMatchedQueries |= currentParent.childMatchedQueries; } currentParent = newParent; // We also need to update the render parent & account for ng-container if (currentParent && isNgContainer(currentParent)) { currentRenderParent = currentParent.renderParent; } else { currentRenderParent = currentParent; } } } } const handleEvent = (view, nodeIndex, eventName, event) => nodes[nodeIndex].element.handleEvent(view, eventName, event); return { // Will be filled later... factory: null, nodeFlags: viewNodeFlags, rootNodeFlags: viewRootNodeFlags, nodeMatchedQueries: viewMatchedQueries, flags, nodes: nodes, updateDirectives: updateDirectives || NOOP, updateRenderer: updateRenderer || NOOP, handleEvent, bindingCount: viewBindingCount, outputCount: viewDisposableCount, lastRenderRootNode }; } function isNgContainer(node) { return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null; } function validateNode(parent, node, nodeCount) { const template = node.element && node.element.template; if (template) { if (!template.lastRenderRootNode) { throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`); } if (template.lastRenderRootNode && template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) { throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${node.nodeIndex}!`); } } if (node.flags & 20224 /* CatProvider */) { const parentFlags = parent ? parent.flags : 0; if ((parentFlags & 1 /* TypeElement */) === 0) { throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${node.nodeIndex}!`); } } if (node.query) { if (node.flags & 67108864 /* TypeContentQuery */ && (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) { throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${node.nodeIndex}!`); } if (node.flags & 134217728 /* TypeViewQuery */ && parent) { throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${node.nodeIndex}!`); } } if (node.childCount) { const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1; if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) { throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`); } } } function createEmbeddedView(parent, anchorDef, viewDef, context) { // embedded views are seen as siblings to the anchor, so we need // to get the parent of the anchor and use it as parentIndex. const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef); initView(view, parent.component, context); createViewNodes(view); return view; } function createRootView(root, def, context) { const view = createView(root, root.renderer, null, null, def); initView(view, context, context); createViewNodes(view); return view; } function createComponentView(parentView, nodeDef, viewDef, hostElement) { const rendererType = nodeDef.element.componentRendererType; let compRenderer; if (!rendererType) { compRenderer = parentView.root.renderer; } else { compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType); } return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef); } function createView(root, renderer, parent, parentNodeDef, def) { const nodes = new Array(def.nodes.length); const disposables = def.outputCount ? new Array(def.outputCount) : null; const view = { def, parent, viewContainerParent: null, parentNodeDef, context: null, component: null, nodes, state: 13 /* CatInit */, root, renderer, oldValues: new Array(def.bindingCount), disposables, initIndex: -1 }; return view; } function initView(view, component, context) { view.component = component; view.context = context; } function createViewNodes(view) { let renderHost; if (isComponentView(view)) { const hostDef = view.parentNodeDef; renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement; } const def = view.def; const nodes = view.nodes; for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; Services.setCurrentNode(view, i); let nodeData; switch (nodeDef.flags & 201347067 /* Types */) { case 1 /* TypeElement */: const el = createElement(view, renderHost, nodeDef); let componentView = undefined; if (nodeDef.flags & 33554432 /* ComponentView */) { const compViewDef = resolveDefinition(nodeDef.element.componentView); componentView = Services.createComponentView(view, nodeDef, compViewDef, el); } listenToElementOutputs(view, componentView, nodeDef, el); nodeData = { renderElement: el, componentView, viewContainer: null, template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined }; if (nodeDef.flags & 16777216 /* EmbeddedViews */) { nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData); } break; case 2 /* TypeText */: nodeData = createText(view, renderHost, nodeDef); break; case 512 /* TypeClassProvider */: case 1024 /* TypeFactoryProvider */: case 2048 /* TypeUseExistingProvider */: case 256 /* TypeValueProvider */: { nodeData = nodes[i]; if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) { const instance = createProviderInstance(view, nodeDef); nodeData = { instance }; } break; } case 16 /* TypePipe */: { const instance = createPipeInstance(view, nodeDef); nodeData = { instance }; break; } case 16384 /* TypeDirective */: { nodeData = nodes[i]; if (!nodeData) { const instance = createDirectiveInstance(view, nodeDef); nodeData = { instance }; } if (nodeDef.flags & 32768 /* Component */) { const compView = asElementData(view, nodeDef.parent.nodeIndex).componentView; initView(compView, nodeData.instance, nodeData.instance); } break; } case 32 /* TypePureArray */: case 64 /* TypePureObject */: case 128 /* TypePurePipe */: nodeData = createPureExpression(view, nodeDef); break; case 67108864 /* TypeContentQuery */: case 134217728 /* TypeViewQuery */: nodeData = createQuery((nodeDef.flags & -2147483648 /* EmitDistinctChangesOnly */) === -2147483648 /* EmitDistinctChangesOnly */); break; case 8 /* TypeNgContent */: appendNgContent(view, renderHost, nodeDef); // no runtime data needed for NgContent... nodeData = undefined; break; } nodes[i] = nodeData; } // Create the ViewData.nodes of component views after we created everything else, // so that e.g. ng-content works execComponentViewsAction(view, ViewAction.CreateViewNodes); // fill static content and view queries execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */); } function checkNoChangesView(view) { markProjectedViewsForCheck(view); Services.updateDirectives(view, 1 /* CheckNoChanges */); execEmbeddedViewsAction(view, ViewAction.CheckNoChanges); Services.updateRenderer(view, 1 /* CheckNoChanges */); execComponentViewsAction(view, ViewAction.CheckNoChanges); // Note: We don't check queries for changes as we didn't do this in v2.x. // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message. view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */); } function checkAndUpdateView(view) { if (view.state & 1 /* BeforeFirstCheck */) { view.state &= ~1 /* BeforeFirstCheck */; view.state |= 2 /* FirstCheck */; } else { view.state &= ~2 /* FirstCheck */; } shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */); markProjectedViewsForCheck(view); Services.updateDirectives(view, 0 /* CheckAndUpdate */); execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate); execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */); let callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */); callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0)); Services.updateRenderer(view, 0 /* CheckAndUpdate */); execComponentViewsAction(view, ViewAction.CheckAndUpdate); execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */); callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */); callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0)); if (view.def.flags & 2 /* OnPush */) { view.state &= ~8 /* ChecksEnabled */; } view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */); shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */); } function checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { if (argStyle === 0 /* Inline */) { return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); } else { return checkAndUpdateNodeDynamic(view, nodeDef, v0); } } function markProjectedViewsForCheck(view) { const def = view.def; if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) { return; } for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 4 /* ProjectedTemplate */) { const projectedViews = asElementData(view, i).template._projectedViews; if (projectedViews) { for (let i = 0; i < projectedViews.length; i++) { const projectedView = projectedViews[i]; projectedView.state |= 32 /* CheckProjectedView */; markParentViewsForCheckProjectedViews(projectedView, view); } } } else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) { // a parent with leafs // no child is a component, // then skip the children i += nodeDef.childCount; } } } function checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { switch (nodeDef.flags & 201347067 /* Types */) { case 1 /* TypeElement */: return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); case 2 /* TypeText */: return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); case 16384 /* TypeDirective */: return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); case 32 /* TypePureArray */: case 64 /* TypePureObject */: case 128 /* TypePurePipe */: return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); default: throw 'unreachable'; } } function checkAndUpdateNodeDynamic(view, nodeDef, values) { switch (nodeDef.flags & 201347067 /* Types */) { case 1 /* TypeElement */: return checkAndUpdateElementDynamic(view, nodeDef, values); case 2 /* TypeText */: return checkAndUpdateTextDynamic(view, nodeDef, values); case 16384 /* TypeDirective */: return checkAndUpdateDirectiveDynamic(view, nodeDef, values); case 32 /* TypePureArray */: case 64 /* TypePureObject */: case 128 /* TypePurePipe */: return checkAndUpdatePureExpressionDynamic(view, nodeDef, values); default: throw 'unreachable'; } } function checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { if (argStyle === 0 /* Inline */) { checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); } else { checkNoChangesNodeDynamic(view, nodeDef, v0); } // Returning false is ok here as we would have thrown in case of a change. return false; } function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const bindLen = nodeDef.bindings.length; if (bindLen > 0) checkBindingNoChanges(view, nodeDef, 0, v0); if (bindLen > 1) checkBindingNoChanges(view, nodeDef, 1, v1); if (bindLen > 2) checkBindingNoChanges(view, nodeDef, 2, v2); if (bindLen > 3) checkBindingNoChanges(view, nodeDef, 3, v3); if (bindLen > 4) checkBindingNoChanges(view, nodeDef, 4, v4); if (bindLen > 5) checkBindingNoChanges(view, nodeDef, 5, v5); if (bindLen > 6) checkBindingNoChanges(view, nodeDef, 6, v6); if (bindLen > 7) checkBindingNoChanges(view, nodeDef, 7, v7); if (bindLen > 8) checkBindingNoChanges(view, nodeDef, 8, v8); if (bindLen > 9) checkBindingNoChanges(view, nodeDef, 9, v9); } function checkNoChangesNodeDynamic(view, nodeDef, values) { for (let i = 0; i < values.length; i++) { checkBindingNoChanges(view, nodeDef, i, values[i]); } } /** * Workaround https://github.com/angular/tsickle/issues/497 * @suppress {misplacedTypeAnnotation} */ function checkNoChangesQuery(view, nodeDef) { const queryList = asQueryList(view, nodeDef.nodeIndex); if (queryList.dirty) { throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), `Query ${nodeDef.query.id} not dirty`, `Query ${nodeDef.query.id} dirty`, (view.state & 1 /* BeforeFirstCheck */) !== 0); } } function destroyView(view) { if (view.state & 128 /* Destroyed */) { return; } execEmbeddedViewsAction(view, ViewAction.Destroy); execComponentViewsAction(view, ViewAction.Destroy); callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */); if (view.disposables) { for (let i = 0; i < view.disposables.length; i++) { view.disposables[i](); } } detachProjectedView(view); if (view.renderer.destroyNode) { destroyViewNodes(view); } if (isComponentView(view)) { view.renderer.destroy(); } view.state |= 128 /* Destroyed */; } function destroyViewNodes(view) { const len = view.def.nodes.length; for (let i = 0; i < len; i++) { const def = view.def.nodes[i]; if (def.flags & 1 /* TypeElement */) { view.renderer.destroyNode(asElementData(view, i).renderElement); } else if (def.flags & 2 /* TypeText */) { view.renderer.destroyNode(asTextData(view, i).renderText); } else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) { asQueryList(view, i).destroy(); } } } var ViewAction; (function (ViewAction) { ViewAction[ViewAction["CreateViewNodes"] = 0] = "CreateViewNodes"; ViewAction[ViewAction["CheckNoChanges"] = 1] = "CheckNoChanges"; ViewAction[ViewAction["CheckNoChangesProjectedViews"] = 2] = "CheckNoChangesProjectedViews"; ViewAction[ViewAction["CheckAndUpdate"] = 3] = "CheckAndUpdate"; ViewAction[ViewAction["CheckAndUpdateProjectedViews"] = 4] = "CheckAndUpdateProjectedViews"; ViewAction[ViewAction["Destroy"] = 5] = "Destroy"; })(ViewAction || (ViewAction = {})); function execComponentViewsAction(view, action) { const def = view.def; if (!(def.nodeFlags & 33554432 /* ComponentView */)) { return; } for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 33554432 /* ComponentView */) { // a leaf callViewAction(asElementData(view, i).componentView, action); } else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) { // a parent with leafs // no child is a component, // then skip the children i += nodeDef.childCount; } } } function execEmbeddedViewsAction(view, action) { const def = view.def; if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) { return; } for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 16777216 /* EmbeddedViews */) { // a leaf const embeddedViews = asElementData(view, i).viewContainer._embeddedViews; for (let k = 0; k < embeddedViews.length; k++) { callViewAction(embeddedViews[k], action); } } else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) { // a parent with leafs // no child is a component, // then skip the children i += nodeDef.childCount; } } } function callViewAction(view, action) { const viewState = view.state; switch (action) { case ViewAction.CheckNoChanges: if ((viewState & 128 /* Destroyed */) === 0) { if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) { checkNoChangesView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews); } } break; case ViewAction.CheckNoChangesProjectedViews: if ((viewState & 128 /* Destroyed */) === 0) { if (viewState & 32 /* CheckProjectedView */) { checkNoChangesView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, action); } } break; case ViewAction.CheckAndUpdate: if ((viewState & 128 /* Destroyed */) === 0) { if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) { checkAndUpdateView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews); } } break; case ViewAction.CheckAndUpdateProjectedViews: if ((viewState & 128 /* Destroyed */) === 0) { if (viewState & 32 /* CheckProjectedView */) { checkAndUpdateView(view); } else if (viewState & 64 /* CheckProjectedViews */) { execProjectedViewsAction(view, action); } } break; case ViewAction.Destroy: // Note: destroyView recurses over all views, // so we don't need to special case projected views here. destroyView(view); break; case ViewAction.CreateViewNodes: createViewNodes(view); break; } } function execProjectedViewsAction(view, action) { execEmbeddedViewsAction(view, action); execComponentViewsAction(view, action); } function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) { if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) { return; } const nodeCount = view.def.nodes.length; for (let i = 0; i < nodeCount; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) { Services.setCurrentNode(view, nodeDef.nodeIndex); switch (checkType) { case 0 /* CheckAndUpdate */: checkAndUpdateQuery(view, nodeDef); break; case 1 /* CheckNoChanges */: checkNoChangesQuery(view, nodeDef); break; } } if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) { // no child has a matching query // then skip the children i += nodeDef.childCount; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let initialized = false; function initServicesIfNeeded() { if (initialized) { return; } initialized = true; const services = isDevMode() ? createDebugServices() : createProdServices(); Services.setCurrentNode = services.setCurrentNode; Services.createRootView = services.createRootView; Services.createEmbeddedView = services.createEmbeddedView; Services.createComponentView = services.createComponentView; Services.createNgModuleRef = services.createNgModuleRef; Services.overrideProvider = services.overrideProvider; Services.overrideComponentView = services.overrideComponentView; Services.clearOverrides = services.clearOverrides; Services.checkAndUpdateView = services.checkAndUpdateView; Services.checkNoChangesView = services.checkNoChangesView; Services.destroyView = services.destroyView; Services.resolveDep = resolveDep; Services.createDebugContext = services.createDebugContext; Services.handleEvent = services.handleEvent; Services.updateDirectives = services.updateDirectives; Services.updateRenderer = services.updateRenderer; Services.dirtyParentQueries = dirtyParentQueries; } function createProdServices() { return { setCurrentNode: () => { }, createRootView: createProdRootView, createEmbeddedView: createEmbeddedView, createComponentView: createComponentView, createNgModuleRef: createNgModuleRef, overrideProvider: NOOP, overrideComponentView: NOOP, clearOverrides: NOOP, checkAndUpdateView: checkAndUpdateView, checkNoChangesView: checkNoChangesView, destroyView: destroyView, createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex), handleEvent: (view, nodeIndex, eventName, event) => view.def.handleEvent(view, nodeIndex, eventName, event), updateDirectives: (view, checkType) => view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view), updateRenderer: (view, checkType) => view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view), }; } function createDebugServices() { return { setCurrentNode: debugSetCurrentNode, createRootView: debugCreateRootView, createEmbeddedView: debugCreateEmbeddedView, createComponentView: debugCreateComponentView, createNgModuleRef: debugCreateNgModuleRef, overrideProvider: debugOverrideProvider, overrideComponentView: debugOverrideComponentView, clearOverrides: debugClearOverrides, checkAndUpdateView: debugCheckAndUpdateView, checkNoChangesView: debugCheckNoChangesView, destroyView: debugDestroyView, createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex), handleEvent: debugHandleEvent, updateDirectives: debugUpdateDirectives, updateRenderer: debugUpdateRenderer, }; } function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) { const rendererFactory = ngModule.injector.get(RendererFactory2); return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context); } function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) { const rendererFactory = ngModule.injector.get(RendererFactory2); const root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode); const defWithOverride = applyProviderOverridesToView(def); return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]); } function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) { const sanitizer = ngModule.injector.get(Sanitizer); const errorHandler = ngModule.injector.get(ErrorHandler); const renderer = rendererFactory.createRenderer(null, null); return { ngModule, injector: elInjector, projectableNodes, selectorOrNode: rootSelectorOrNode, sanitizer, rendererFactory, renderer, errorHandler }; } function debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) { const defWithOverride = applyProviderOverridesToView(viewDef); return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]); } function debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) { const overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token); if (overrideComponentView) { viewDef = overrideComponentView; } else { viewDef = applyProviderOverridesToView(viewDef); } return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]); } function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) { const defWithOverride = applyProviderOverridesToNgModule(def); return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride); } const providerOverrides = new Map(); const providerOverridesWithScope = new Map(); const viewDefOverrides = new Map(); function debugOverrideProvider(override) { providerOverrides.set(override.token, override); let injectableDef; if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) && typeof injectableDef.providedIn === 'function') { providerOverridesWithScope.set(override.token, override); } } function debugOverrideComponentView(comp, compFactory) { const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory)); const compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView); viewDefOverrides.set(comp, compViewDef); } function debugClearOverrides() { providerOverrides.clear(); providerOverridesWithScope.clear(); viewDefOverrides.clear(); } // Notes about the algorithm: // 1) Locate the providers of an element and check if one of them was overwritten // 2) Change the providers of that element // // We only create new datastructures if we need to, to keep perf impact // reasonable. function applyProviderOverridesToView(def) { if (providerOverrides.size === 0) { return def; } const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def); if (elementIndicesWithOverwrittenProviders.length === 0) { return def; } // clone the whole view definition, // as it maintains references between the nodes that are hard to update. def = def.factory(() => NOOP); for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) { applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]); } return def; function findElementIndicesWithOverwrittenProviders(def) { const elIndicesWithOverwrittenProviders = []; let lastElementDef = null; for (let i = 0; i < def.nodes.length; i++) { const nodeDef = def.nodes[i]; if (nodeDef.flags & 1 /* TypeElement */) { lastElementDef = nodeDef; } if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ && providerOverrides.has(nodeDef.provider.token)) { elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex); lastElementDef = null; } } return elIndicesWithOverwrittenProviders; } function applyProviderOverridesToElement(viewDef, elIndex) { for (let i = elIndex + 1; i < viewDef.nodes.length; i++) { const nodeDef = viewDef.nodes[i]; if (nodeDef.flags & 1 /* TypeElement */) { // stop at the next element return; } if (nodeDef.flags & 3840 /* CatProviderNoDirective */) { const provider = nodeDef.provider; const override = providerOverrides.get(provider.token); if (override) { nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags; provider.deps = splitDepsDsl(override.deps); provider.value = override.value; } } } } } // Notes about the algorithm: // We only create new datastructures if we need to, to keep perf impact // reasonable. function applyProviderOverridesToNgModule(def) { const { hasOverrides, hasDeprecatedOverrides } = calcHasOverrides(def); if (!hasOverrides) { return def; } // clone the whole view definition, // as it maintains references between the nodes that are hard to update. def = def.factory(() => NOOP); applyProviderOverrides(def); return def; function calcHasOverrides(def) { let hasOverrides = false; let hasDeprecatedOverrides = false; if (providerOverrides.size === 0) { return { hasOverrides, hasDeprecatedOverrides }; } def.providers.forEach(node => { const override = providerOverrides.get(node.token); if ((node.flags & 3840 /* CatProviderNoDirective */) && override) { hasOverrides = true; hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior; } }); def.modules.forEach(module => { providerOverridesWithScope.forEach((override, token) => { if (getInjectableDef(token).providedIn === module) { hasOverrides = true; hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior; } }); }); return { hasOverrides, hasDeprecatedOverrides }; } function applyProviderOverrides(def) { for (let i = 0; i < def.providers.length; i++) { const provider = def.providers[i]; if (hasDeprecatedOverrides) { // We had a bug where me made // all providers lazy. Keep this logic behind a flag // for migrating existing users. provider.flags |= 4096 /* LazyProvider */; } const override = providerOverrides.get(provider.token); if (override) { provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags; provider.deps = splitDepsDsl(override.deps); provider.value = override.value; } } if (providerOverridesWithScope.size > 0) { let moduleSet = new Set(def.modules); providerOverridesWithScope.forEach((override, token) => { if (moduleSet.has(getInjectableDef(token).providedIn)) { let provider = { token: token, flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */), deps: splitDepsDsl(override.deps), value: override.value, index: def.providers.length, }; def.providers.push(provider); def.providersByKey[tokenKey(token)] = provider; } }); } } } function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const nodeDef = view.def.nodes[checkIndex]; checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, checkIndex).value : undefined; } function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) { const nodeDef = view.def.nodes[checkIndex]; checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9); return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, checkIndex).value : undefined; } function debugCheckAndUpdateView(view) { return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]); } function debugCheckNoChangesView(view) { return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]); } function debugDestroyView(view) { return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]); } var DebugAction; (function (DebugAction) { DebugAction[DebugAction["create"] = 0] = "create"; DebugAction[DebugAction["detectChanges"] = 1] = "detectChanges"; DebugAction[DebugAction["checkNoChanges"] = 2] = "checkNoChanges"; DebugAction[DebugAction["destroy"] = 3] = "destroy"; DebugAction[DebugAction["handleEvent"] = 4] = "handleEvent"; })(DebugAction || (DebugAction = {})); let _currentAction; let _currentView; let _currentNodeIndex; function debugSetCurrentNode(view, nodeIndex) { _currentView = view; _currentNodeIndex = nodeIndex; } function debugHandleEvent(view, nodeIndex, eventName, event) { debugSetCurrentNode(view, nodeIndex); return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]); } function debugUpdateDirectives(view, checkType) { if (view.state & 128 /* Destroyed */) { throw viewDestroyedError(DebugAction[_currentAction]); } debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0)); return view.def.updateDirectives(debugCheckDirectivesFn, view); function debugCheckDirectivesFn(view, nodeIndex, argStyle, ...values) { const nodeDef = view.def.nodes[nodeIndex]; if (checkType === 0 /* CheckAndUpdate */) { debugCheckAndUpdateNode(view, nodeDef, argStyle, values); } else { debugCheckNoChangesNode(view, nodeDef, argStyle, values); } if (nodeDef.flags & 16384 /* TypeDirective */) { debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex)); } return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined; } } function debugUpdateRenderer(view, checkType) { if (view.state & 128 /* Destroyed */) { throw viewDestroyedError(DebugAction[_currentAction]); } debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0)); return view.def.updateRenderer(debugCheckRenderNodeFn, view); function debugCheckRenderNodeFn(view, nodeIndex, argStyle, ...values) { const nodeDef = view.def.nodes[nodeIndex]; if (checkType === 0 /* CheckAndUpdate */) { debugCheckAndUpdateNode(view, nodeDef, argStyle, values); } else { debugCheckNoChangesNode(view, nodeDef, argStyle, values); } if (nodeDef.flags & 3 /* CatRenderNode */) { debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex)); } return (nodeDef.flags & 224 /* CatPureExpression */) ? asPureExpressionData(view, nodeDef.nodeIndex).value : undefined; } } function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) { const changed = checkAndUpdateNode(view, nodeDef, argStyle, ...givenValues); if (changed) { const values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues; if (nodeDef.flags & 16384 /* TypeDirective */) { const bindingValues = {}; for (let i = 0; i < nodeDef.bindings.length; i++) { const binding = nodeDef.bindings[i]; const value = values[i]; if (binding.flags & 8 /* TypeProperty */) { bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] = normalizeDebugBindingValue(value); } } const elDef = nodeDef.parent; const el = asElementData(view, elDef.nodeIndex).renderElement; if (!elDef.element.name) { // a comment. view.renderer.setValue(el, escapeCommentText(`bindings=${JSON.stringify(bindingValues, null, 2)}`)); } else { // a regular element. for (let attr in bindingValues) { const value = bindingValues[attr]; if (value != null) { view.renderer.setAttribute(el, attr, value); } else { view.renderer.removeAttribute(el, attr); } } } } } } function debugCheckNoChangesNode(view, nodeDef, argStyle, values) { checkNoChangesNode(view, nodeDef, argStyle, ...values); } function nextDirectiveWithBinding(view, nodeIndex) { for (let i = nodeIndex; i < view.def.nodes.length; i++) { const nodeDef = view.def.nodes[i]; if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) { return i; } } return null; } function nextRenderNodeWithBinding(view, nodeIndex) { for (let i = nodeIndex; i < view.def.nodes.length; i++) { const nodeDef = view.def.nodes[i]; if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) { return i; } } return null; } class DebugContext_ { constructor(view, nodeIndex) { this.view = view; this.nodeIndex = nodeIndex; if (nodeIndex == null) { this.nodeIndex = nodeIndex = 0; } this.nodeDef = view.def.nodes[nodeIndex]; let elDef = this.nodeDef; let elView = view; while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) { elDef = elDef.parent; } if (!elDef) { while (!elDef && elView) { elDef = viewParentEl(elView); elView = elView.parent; } } this.elDef = elDef; this.elView = elView; } get elOrCompView() { // Has to be done lazily as we use the DebugContext also during creation of elements... return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view; } get injector() { return createInjector$1(this.elView, this.elDef); } get component() { return this.elOrCompView.component; } get context() { return this.elOrCompView.context; } get providerTokens() { const tokens = []; if (this.elDef) { for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) { const childDef = this.elView.def.nodes[i]; if (childDef.flags & 20224 /* CatProvider */) { tokens.push(childDef.provider.token); } i += childDef.childCount; } } return tokens; } get references() { const references = {}; if (this.elDef) { collectReferences(this.elView, this.elDef, references); for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) { const childDef = this.elView.def.nodes[i]; if (childDef.flags & 20224 /* CatProvider */) { collectReferences(this.elView, childDef, references); } i += childDef.childCount; } } return references; } get componentRenderElement() { const elData = findHostElement(this.elOrCompView); return elData ? elData.renderElement : undefined; } get renderNode() { return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) : renderNode(this.elView, this.elDef); } logError(console, ...values) { let logViewDef; let logNodeIndex; if (this.nodeDef.flags & 2 /* TypeText */) { logViewDef = this.view.def; logNodeIndex = this.nodeDef.nodeIndex; } else { logViewDef = this.elView.def; logNodeIndex = this.elDef.nodeIndex; } // Note: we only generate a log function for text and element nodes // to make the generated code as small as possible. const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex); let currRenderNodeIndex = -1; let nodeLogger = () => { currRenderNodeIndex++; if (currRenderNodeIndex === renderNodeIndex) { return console.error.bind(console, ...values); } else { return NOOP; } }; logViewDef.factory(nodeLogger); if (currRenderNodeIndex < renderNodeIndex) { console.error('Illegal state: the ViewDefinitionFactory did not call the logger!'); console.error(...values); } } } function getRenderNodeIndex(viewDef, nodeIndex) { let renderNodeIndex = -1; for (let i = 0; i <= nodeIndex; i++) { const nodeDef = viewDef.nodes[i]; if (nodeDef.flags & 3 /* CatRenderNode */) { renderNodeIndex++; } } return renderNodeIndex; } function findHostElement(view) { while (view && !isComponentView(view)) { view = view.parent; } if (view.parent) { return asElementData(view.parent, viewParentEl(view).nodeIndex); } return null; } function collectReferences(view, nodeDef, references) { for (let refName in nodeDef.references) { references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]); } } function callWithDebugContext(action, fn, self, args) { const oldAction = _currentAction; const oldView = _currentView; const oldNodeIndex = _currentNodeIndex; try { _currentAction = action; const result = fn.apply(self, args); _currentView = oldView; _currentNodeIndex = oldNodeIndex; _currentAction = oldAction; return result; } catch (e) { if (isViewDebugError(e) || !_currentView) { throw e; } throw viewWrappedDebugError(e, getCurrentDebugContext()); } } function getCurrentDebugContext() { return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null; } class DebugRendererFactory2 { constructor(delegate) { this.delegate = delegate; } createRenderer(element, renderData) { return new DebugRenderer2(this.delegate.createRenderer(element, renderData)); } begin() { if (this.delegate.begin) { this.delegate.begin(); } } end() { if (this.delegate.end) { this.delegate.end(); } } whenRenderingDone() { if (this.delegate.whenRenderingDone) { return this.delegate.whenRenderingDone(); } return Promise.resolve(null); } } class DebugRenderer2 { constructor(delegate) { this.delegate = delegate; /** * Factory function used to create a `DebugContext` when a node is created. * * The `DebugContext` allows to retrieve information about the nodes that are useful in tests. * * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine * or a Render context. */ this.debugContextFactory = getCurrentDebugContext; this.data = this.delegate.data; } createDebugContext(nativeElement) { return this.debugContextFactory(nativeElement); } destroyNode(node) { const debugNode = getDebugNode$1(node); removeDebugNodeFromIndex(debugNode); if (debugNode instanceof DebugNode__PRE_R3__) { debugNode.listeners.length = 0; } if (this.delegate.destroyNode) { this.delegate.destroyNode(node); } } destroy() { this.delegate.destroy(); } createElement(name, namespace) { const el = this.delegate.createElement(name, namespace); const debugCtx = this.createDebugContext(el); if (debugCtx) { const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx); debugEl.name = name; indexDebugNode(debugEl); } return el; } createComment(value) { const comment = this.delegate.createComment(escapeCommentText(value)); const debugCtx = this.createDebugContext(comment); if (debugCtx) { indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx)); } return comment; } createText(value) { const text = this.delegate.createText(value); const debugCtx = this.createDebugContext(text); if (debugCtx) { indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx)); } return text; } appendChild(parent, newChild) { const debugEl = getDebugNode$1(parent); const debugChildEl = getDebugNode$1(newChild); if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.addChild(debugChildEl); } this.delegate.appendChild(parent, newChild); } insertBefore(parent, newChild, refChild, isMove) { const debugEl = getDebugNode$1(parent); const debugChildEl = getDebugNode$1(newChild); const debugRefEl = getDebugNode$1(refChild); if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.insertBefore(debugRefEl, debugChildEl); } this.delegate.insertBefore(parent, newChild, refChild, isMove); } removeChild(parent, oldChild) { const debugEl = getDebugNode$1(parent); const debugChildEl = getDebugNode$1(oldChild); if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.removeChild(debugChildEl); } this.delegate.removeChild(parent, oldChild); } selectRootElement(selectorOrNode, preserveContent) { const el = this.delegate.selectRootElement(selectorOrNode, preserveContent); const debugCtx = getCurrentDebugContext(); if (debugCtx) { indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx)); } return el; } setAttribute(el, name, value, namespace) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { const fullName = namespace ? namespace + ':' + name : name; debugEl.attributes[fullName] = value; } this.delegate.setAttribute(el, name, value, namespace); } removeAttribute(el, name, namespace) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { const fullName = namespace ? namespace + ':' + name : name; debugEl.attributes[fullName] = null; } this.delegate.removeAttribute(el, name, namespace); } addClass(el, name) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.classes[name] = true; } this.delegate.addClass(el, name); } removeClass(el, name) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.classes[name] = false; } this.delegate.removeClass(el, name); } setStyle(el, style, value, flags) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.styles[style] = value; } this.delegate.setStyle(el, style, value, flags); } removeStyle(el, style, flags) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.styles[style] = null; } this.delegate.removeStyle(el, style, flags); } setProperty(el, name, value) { const debugEl = getDebugNode$1(el); if (debugEl && debugEl instanceof DebugElement__PRE_R3__) { debugEl.properties[name] = value; } this.delegate.setProperty(el, name, value); } listen(target, eventName, callback) { if (typeof target !== 'string') { const debugEl = getDebugNode$1(target); if (debugEl) { debugEl.listeners.push(new DebugEventListener(eventName, callback)); } } return this.delegate.listen(target, eventName, callback); } parentNode(node) { return this.delegate.parentNode(node); } nextSibling(node) { return this.delegate.nextSibling(node); } setValue(node, value) { return this.delegate.setValue(node, value); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function overrideProvider(override) { initServicesIfNeeded(); return Services.overrideProvider(override); } function overrideComponentView(comp, componentFactory) { initServicesIfNeeded(); return Services.overrideComponentView(comp, componentFactory); } function clearOverrides() { initServicesIfNeeded(); return Services.clearOverrides(); } // Attention: this function is called as top level function. // Putting any logic in here will destroy closure tree shaking! function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) { return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory); } function cloneNgModuleDefinition(def) { const providers = Array.from(def.providers); const modules = Array.from(def.modules); const providersByKey = {}; for (const key in def.providersByKey) { providersByKey[key] = def.providersByKey[key]; } return { factory: def.factory, scope: def.scope, providers, modules, providersByKey, }; } class NgModuleFactory_ extends NgModuleFactory { constructor(moduleType, _bootstrapComponents, _ngModuleDefFactory) { // Attention: this ctor is called as top level function. // Putting any logic in here will destroy closure tree shaking! super(); this.moduleType = moduleType; this._bootstrapComponents = _bootstrapComponents; this._ngModuleDefFactory = _ngModuleDefFactory; } create(parentInjector) { initServicesIfNeeded(); // Clone the NgModuleDefinition so that any tree shakeable provider definition // added to this instance of the NgModuleRef doesn't affect the cached copy. // See https://github.com/angular/angular/issues/25018. const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory)); return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Compiles a partial directive declaration object into a full directive definition object. * * @codeGenApi */ function ɵɵngDeclareDirective(decl) { const compiler = getCompilerFacade(); return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl); } /** * Compiles a partial component declaration object into a full component definition object. * * @codeGenApi */ function ɵɵngDeclareComponent(decl) { const compiler = getCompilerFacade(); return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl); } /** * Compiles a partial pipe declaration object into a full pipe definition object. * * @codeGenApi */ function ɵɵngDeclarePipe(decl) { const compiler = getCompilerFacade(); return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // clang-format on /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ if (typeof ngDevMode !== 'undefined' && ngDevMode) { // This helper is to give a reasonable error message to people upgrading to v9 that have not yet // installed `@angular/localize` in their app. // tslint:disable-next-line: no-toplevel-property-access _global.$localize = _global.$localize || function () { throw new Error('It looks like your application or one of its dependencies is using i18n.\n' + 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\n' + 'Please run `ng add @angular/localize` from the Angular CLI.\n' + '(For non-CLI projects, add `import \'@angular/localize/init\';` to your `polyfills.ts` file.\n' + 'For server-side rendering applications add the import to your `main.server.ts` file.)'); }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=core.js.map /***/ }), /***/ "fjNz": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/bounds.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "PSPu"); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian.js */ "YzSS"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream.js */ "tepu"); var lambda0, phi0, lambda1, phi1, // bounds lambda2, // previous lambda-coordinate lambda00, phi00, // first point p0, // previous 3D point deltaSum, ranges, range; var boundsStream = { point: boundsPoint, lineStart: boundsLineStart, lineEnd: boundsLineEnd, polygonStart: function() { boundsStream.point = boundsRingPoint; boundsStream.lineStart = boundsRingStart; boundsStream.lineEnd = boundsRingEnd; deltaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonStart(); }, polygonEnd: function() { _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonEnd(); boundsStream.point = boundsPoint; boundsStream.lineStart = boundsLineStart; boundsStream.lineEnd = boundsLineEnd; if (_area_js__WEBPACK_IMPORTED_MODULE_1__["areaRingSum"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); else if (deltaSum > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi1 = 90; else if (deltaSum < -_math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi0 = -90; range[0] = lambda0, range[1] = lambda1; }, sphere: function() { lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); } }; function boundsPoint(lambda, phi) { ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); if (phi < phi0) phi0 = phi; if (phi > phi1) phi1 = phi; } function linePoint(lambda, phi) { var p = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesian"])([lambda * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"], phi * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"]]); if (p0) { var normal = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(p0, p), equatorial = [normal[1], -normal[0], 0], inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(equatorial, normal); Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianNormalizeInPlace"])(inflection); inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["spherical"])(inflection); var delta = lambda - lambda2, sign = delta > 0 ? 1 : -1, lambdai = inflection[0] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"] * sign, phii, antimeridian = Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180; if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { phii = inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; if (phii > phi1) phi1 = phii; } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { phii = -inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"]; if (phii < phi0) phi0 = phii; } else { if (phi < phi0) phi0 = phi; if (phi > phi1) phi1 = phi; } if (antimeridian) { if (lambda < lambda2) { if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; } else { if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; } } else { if (lambda1 >= lambda0) { if (lambda < lambda0) lambda0 = lambda; if (lambda > lambda1) lambda1 = lambda; } else { if (lambda > lambda2) { if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; } else { if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; } } } } else { ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); } if (phi < phi0) phi0 = phi; if (phi > phi1) phi1 = phi; p0 = p, lambda2 = lambda; } function boundsLineStart() { boundsStream.point = linePoint; } function boundsLineEnd() { range[0] = lambda0, range[1] = lambda1; boundsStream.point = boundsPoint; p0 = null; } function boundsRingPoint(lambda, phi) { if (p0) { var delta = lambda - lambda2; deltaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta); } else { lambda00 = lambda, phi00 = phi; } _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].point(lambda, phi); linePoint(lambda, phi); } function boundsRingStart() { _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineStart(); } function boundsRingEnd() { boundsRingPoint(lambda00, phi00); _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineEnd(); if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(deltaSum) > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) lambda0 = -(lambda1 = 180); range[0] = lambda0, range[1] = lambda1; p0 = null; } // Finds the left-right distance between two longitudes. // This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want // the distance between ±180° to be 360°. function angle(lambda0, lambda1) { return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1; } function rangeCompare(a, b) { return a[0] - b[0]; } function rangeContains(range, x) { return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; } /* harmony default export */ __webpack_exports__["default"] = (function(feature) { var i, n, a, b, merged, deltaMax, delta; phi1 = lambda1 = -(lambda0 = phi0 = Infinity); ranges = []; Object(_stream_js__WEBPACK_IMPORTED_MODULE_4__["default"])(feature, boundsStream); // First, sort ranges by their minimum longitudes. if (n = ranges.length) { ranges.sort(rangeCompare); // Then, merge any ranges that overlap. for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) { b = ranges[i]; if (rangeContains(a, b[0]) || rangeContains(a, b[1])) { if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; } else { merged.push(a = b); } } // Finally, find the largest gap between the merged ranges. // The final bounding box will be the inverse of this gap. for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) { b = merged[i]; if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1]; } } ranges = range = null; return lambda0 === Infinity || phi0 === Infinity ? [[NaN, NaN], [NaN, NaN]] : [[lambda0, phi0], [lambda1, phi1]]; }); /***/ }), /***/ "fnXD": /*!***********************************************!*\ !*** ./node_modules/d3-geo/src/pointEqual.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[0] - b[0]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] && Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[1] - b[1]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; }); /***/ }), /***/ "gO8D": /*!***********************************************!*\ !*** ./node_modules/d3-quadtree/src/index.js ***! \***********************************************/ /*! exports provided: quadtree */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ "z6FA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /***/ }), /***/ "gRHU": /*!*********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Observer.js ***! \*********************************************************/ /*! exports provided: empty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./config */ "2fFW"); /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/hostReportError */ "NJ4a"); const empty = { closed: true, next(value) { }, error(err) { if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) { throw err; } else { Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err); } }, complete() { } }; //# sourceMappingURL=Observer.js.map /***/ }), /***/ "gbBL": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Set2.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3")); /***/ }), /***/ "gcYM": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/throttleTime.js ***! \***********************************************************************/ /*! exports provided: throttleTime */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./throttle */ "yuhW"); function throttleTime(duration, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"], config = _throttle__WEBPACK_IMPORTED_MODULE_2__["defaultThrottleConfig"]) { return (source) => source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); } class ThrottleTimeOperator { constructor(duration, scheduler, leading, trailing) { this.duration = duration; this.scheduler = scheduler; this.leading = leading; this.trailing = trailing; } call(subscriber, source) { return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing)); } } class ThrottleTimeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, duration, scheduler, leading, trailing) { super(destination); this.duration = duration; this.scheduler = scheduler; this.leading = leading; this.trailing = trailing; this._hasTrailingValue = false; this._trailingValue = null; } _next(value) { if (this.throttled) { if (this.trailing) { this._trailingValue = value; this._hasTrailingValue = true; } } else { this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this })); if (this.leading) { this.destination.next(value); } else if (this.trailing) { this._trailingValue = value; this._hasTrailingValue = true; } } } _complete() { if (this._hasTrailingValue) { this.destination.next(this._trailingValue); this.destination.complete(); } else { this.destination.complete(); } } clearThrottle() { const throttled = this.throttled; if (throttled) { if (this.trailing && this._hasTrailingValue) { this.destination.next(this._trailingValue); this._trailingValue = null; this._hasTrailingValue = false; } throttled.unsubscribe(); this.remove(throttled); this.throttled = null; } } } function dispatchNext(arg) { const { subscriber } = arg; subscriber.clearThrottle(); } //# sourceMappingURL=throttleTime.js.map /***/ }), /***/ "gj+k": /*!******************************************!*\ !*** ./node_modules/d3-array/src/max.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return max; }); function max(values, valueof) { let max; if (valueof === undefined) { for (const value of values) { if (value != null && (max < value || (max === undefined && value >= value))) { max = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (max < value || (max === undefined && value >= value))) { max = value; } } } return max; } /***/ }), /***/ "gqw6": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/array.js ***! \********************************************/ /*! exports provided: slice, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var slice = Array.prototype.slice; /* harmony default export */ __webpack_exports__["default"] = (function(x) { return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like : Array.from(x); // Map, Set, iterable, string, or anything else }); /***/ }), /***/ "gy+j": /*!*************************************************!*\ !*** ./node_modules/d3-contour/src/contours.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "mcvr"); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ascending.js */ "tOsU"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./area.js */ "xP+1"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ "DiG6"); /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contains.js */ "UnGF"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./noop.js */ "S2Xb"); var cases = [ [], [[[1.0, 1.5], [0.5, 1.0]]], [[[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [0.5, 1.0]]], [[[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 0.5], [1.0, 1.5]]], [[[1.0, 0.5], [0.5, 1.0]]], [[[0.5, 1.0], [1.0, 0.5]]], [[[1.0, 1.5], [1.0, 0.5]]], [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [1.0, 0.5]]], [[[0.5, 1.0], [1.5, 1.0]]], [[[1.0, 1.5], [1.5, 1.0]]], [[[0.5, 1.0], [1.0, 1.5]]], [] ]; /* harmony default export */ __webpack_exports__["default"] = (function() { var dx = 1, dy = 1, threshold = d3_array__WEBPACK_IMPORTED_MODULE_0__["thresholdSturges"], smooth = smoothLinear; function contours(values) { var tz = threshold(values); // Convert number of thresholds into uniform thresholds. if (!Array.isArray(tz)) { var domain = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["extent"])(values), start = domain[0], stop = domain[1]; tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, tz); tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz); } else { tz = tz.slice().sort(_ascending_js__WEBPACK_IMPORTED_MODULE_2__["default"]); } return tz.map(function(value) { return contour(values, value); }); } // Accumulate, smooth contour rings, assign holes to exterior rings. // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js function contour(values, value) { var polygons = [], holes = []; isorings(values, value, function(ring) { smooth(ring, values, value); if (Object(_area_js__WEBPACK_IMPORTED_MODULE_3__["default"])(ring) > 0) polygons.push([ring]); else holes.push(ring); }); holes.forEach(function(hole) { for (var i = 0, n = polygons.length, polygon; i < n; ++i) { if (Object(_contains_js__WEBPACK_IMPORTED_MODULE_5__["default"])((polygon = polygons[i])[0], hole) !== -1) { polygon.push(hole); return; } } }); return { type: "MultiPolygon", value: value, coordinates: polygons }; } // Marching squares with isolines stitched into rings. // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js function isorings(values, value, callback) { var fragmentByStart = new Array, fragmentByEnd = new Array, x, y, t0, t1, t2, t3; // Special case for the first row (y = -1, t2 = t3 = 0). x = y = -1; t1 = values[0] >= value; cases[t1 << 1].forEach(stitch); while (++x < dx - 1) { t0 = t1, t1 = values[x + 1] >= value; cases[t0 | t1 << 1].forEach(stitch); } cases[t1 << 0].forEach(stitch); // General case for the intermediate rows. while (++y < dy - 1) { x = -1; t1 = values[y * dx + dx] >= value; t2 = values[y * dx] >= value; cases[t1 << 1 | t2 << 2].forEach(stitch); while (++x < dx - 1) { t0 = t1, t1 = values[y * dx + dx + x + 1] >= value; t3 = t2, t2 = values[y * dx + x + 1] >= value; cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch); } cases[t1 | t2 << 3].forEach(stitch); } // Special case for the last row (y = dy - 1, t0 = t1 = 0). x = -1; t2 = values[y * dx] >= value; cases[t2 << 2].forEach(stitch); while (++x < dx - 1) { t3 = t2, t2 = values[y * dx + x + 1] >= value; cases[t2 << 2 | t3 << 3].forEach(stitch); } cases[t2 << 3].forEach(stitch); function stitch(line) { var start = [line[0][0] + x, line[0][1] + y], end = [line[1][0] + x, line[1][1] + y], startIndex = index(start), endIndex = index(end), f, g; if (f = fragmentByEnd[startIndex]) { if (g = fragmentByStart[endIndex]) { delete fragmentByEnd[f.end]; delete fragmentByStart[g.start]; if (f === g) { f.ring.push(end); callback(f.ring); } else { fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)}; } } else { delete fragmentByEnd[f.end]; f.ring.push(end); fragmentByEnd[f.end = endIndex] = f; } } else if (f = fragmentByStart[endIndex]) { if (g = fragmentByEnd[startIndex]) { delete fragmentByStart[f.start]; delete fragmentByEnd[g.end]; if (f === g) { f.ring.push(end); callback(f.ring); } else { fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)}; } } else { delete fragmentByStart[f.start]; f.ring.unshift(start); fragmentByStart[f.start = startIndex] = f; } } else { fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]}; } } } function index(point) { return point[0] * 2 + point[1] * (dx + 1) * 4; } function smoothLinear(ring, values, value) { ring.forEach(function(point) { var x = point[0], y = point[1], xt = x | 0, yt = y | 0, v0, v1 = values[yt * dx + xt]; if (x > 0 && x < dx && xt === x) { v0 = values[yt * dx + xt - 1]; point[0] = x + (value - v0) / (v1 - v0) - 0.5; } if (y > 0 && y < dy && yt === y) { v0 = values[(yt - 1) * dx + xt]; point[1] = y + (value - v0) / (v1 - v0) - 0.5; } }); } contours.contour = contour; contours.size = function(_) { if (!arguments.length) return [dx, dy]; var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]); if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); return dx = _0, dy = _1, contours; }; contours.thresholds = function(_) { return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), contours) : threshold; }; contours.smooth = function(_) { return arguments.length ? (smooth = _ ? smoothLinear : _noop_js__WEBPACK_IMPORTED_MODULE_6__["default"], contours) : smooth === smoothLinear; }; return contours; }); /***/ }), /***/ "h2xr": /*!*******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Accent.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666")); /***/ }), /***/ "h8nK": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/bisect.js ***! \*********************************************/ /*! exports provided: bisectRight, bisectLeft, bisectCenter, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return bisectRight; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return bisectLeft; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return bisectCenter; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ "Ki0a"); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ "CiDq"); const ascendingBisect = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]); const bisectRight = ascendingBisect.right; const bisectLeft = ascendingBisect.left; const bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_number_js__WEBPACK_IMPORTED_MODULE_2__["default"]).center; /* harmony default export */ __webpack_exports__["default"] = (bisectRight); /***/ }), /***/ "h9r8": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "deebf79ecae13182bd", "eff3ffbdd7e76baed62171b5", "eff3ffbdd7e76baed63182bd08519c", "eff3ffc6dbef9ecae16baed63182bd08519c", "eff3ffc6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "hKy8": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/pairs.js ***! \*****************************************************************/ /*! exports provided: pairs, dispatch */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function pairs(obj, scheduler) { if (!scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const keys = Object.keys(obj); for (let i = 0; i < keys.length && !subscriber.closed; i++) { const key = keys[i]; if (obj.hasOwnProperty(key)) { subscriber.next([key, obj[key]]); } } subscriber.complete(); }); } else { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const keys = Object.keys(obj); const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); subscription.add(scheduler.schedule(dispatch, 0, { keys, index: 0, subscriber, subscription, obj })); return subscription; }); } } function dispatch(state) { const { keys, index, subscriber, subscription, obj } = state; if (!subscriber.closed) { if (index < keys.length) { const key = keys[index]; subscriber.next([key, obj[key]]); subscription.add(this.schedule({ keys, index: index + 1, subscriber, subscription, obj })); } else { subscriber.complete(); } } } //# sourceMappingURL=pairs.js.map /***/ }), /***/ "hSnb": /*!*************************************************!*\ !*** ./node_modules/d3-random/src/irwinHall.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomIrwinHall(source) { function randomIrwinHall(n) { if ((n = +n) <= 0) return () => 0; return function() { for (var sum = 0, i = n; i > 1; --i) sum += source(); return sum + i * source(); }; } randomIrwinHall.source = sourceRandomIrwinHall; return randomIrwinHall; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "hTZz": /*!********************************************!*\ !*** ./node_modules/d3-brush/src/brush.js ***! \********************************************/ /*! exports provided: brushSelection, brushX, brushY, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return brushSelection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return brushX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return brushY; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "q+nN"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "sQjb"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "qKDy"); /* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "X7tT"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent.js */ "oZiN"); var MODE_DRAG = {name: "drag"}, MODE_SPACE = {name: "space"}, MODE_HANDLE = {name: "handle"}, MODE_CENTER = {name: "center"}; const {abs, max, min} = Math; function number1(e) { return [+e[0], +e[1]]; } function number2(e) { return [number1(e[0]), number1(e[1])]; } var X = { name: "x", handles: ["w", "e"].map(type), input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; }, output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } }; var Y = { name: "y", handles: ["n", "s"].map(type), input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; }, output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } }; var XY = { name: "xy", handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), input: function(xy) { return xy == null ? null : number2(xy); }, output: function(xy) { return xy; } }; var cursors = { overlay: "crosshair", selection: "move", n: "ns-resize", e: "ew-resize", s: "ns-resize", w: "ew-resize", nw: "nwse-resize", ne: "nesw-resize", se: "nwse-resize", sw: "nesw-resize" }; var flipX = { e: "w", w: "e", nw: "ne", ne: "nw", se: "sw", sw: "se" }; var flipY = { n: "s", s: "n", nw: "sw", ne: "se", se: "ne", sw: "nw" }; var signsX = { overlay: +1, selection: +1, n: null, e: +1, s: null, w: -1, nw: -1, ne: +1, se: +1, sw: -1 }; var signsY = { overlay: +1, selection: +1, n: -1, e: null, s: +1, w: null, nw: -1, ne: -1, se: +1, sw: +1 }; function type(t) { return {type: t}; } // Ignore right-click, since that should open the context menu. function defaultFilter(event) { return !event.ctrlKey && !event.button; } function defaultExtent() { var svg = this.ownerSVGElement || this; if (svg.hasAttribute("viewBox")) { svg = svg.viewBox.baseVal; return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; } return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; } function defaultTouchable() { return navigator.maxTouchPoints || ("ontouchstart" in this); } // Like d3.local, but with the name “__brush” rather than auto-generated. function local(node) { while (!node.__brush) if (!(node = node.parentNode)) return; return node.__brush; } function empty(extent) { return extent[0][0] === extent[1][0] || extent[0][1] === extent[1][1]; } function brushSelection(node) { var state = node.__brush; return state ? state.dim.output(state.selection) : null; } function brushX() { return brush(X); } function brushY() { return brush(Y); } /* harmony default export */ __webpack_exports__["default"] = (function() { return brush(XY); }); function brush(dim) { var extent = defaultExtent, filter = defaultFilter, touchable = defaultTouchable, keys = true, listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "brush", "end"), handleSize = 6, touchending; function brush(group) { var overlay = group .property("__brush", initialize) .selectAll(".overlay") .data([type("overlay")]); overlay.enter().append("rect") .attr("class", "overlay") .attr("pointer-events", "all") .attr("cursor", cursors.overlay) .merge(overlay) .each(function() { var extent = local(this).extent; Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this) .attr("x", extent[0][0]) .attr("y", extent[0][1]) .attr("width", extent[1][0] - extent[0][0]) .attr("height", extent[1][1] - extent[0][1]); }); group.selectAll(".selection") .data([type("selection")]) .enter().append("rect") .attr("class", "selection") .attr("cursor", cursors.selection) .attr("fill", "#777") .attr("fill-opacity", 0.3) .attr("stroke", "#fff") .attr("shape-rendering", "crispEdges"); var handle = group.selectAll(".handle") .data(dim.handles, function(d) { return d.type; }); handle.exit().remove(); handle.enter().append("rect") .attr("class", function(d) { return "handle handle--" + d.type; }) .attr("cursor", function(d) { return cursors[d.type]; }); group .each(redraw) .attr("fill", "none") .attr("pointer-events", "all") .on("mousedown.brush", started) .filter(touchable) .on("touchstart.brush", started) .on("touchmove.brush", touchmoved) .on("touchend.brush touchcancel.brush", touchended) .style("touch-action", "none") .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } brush.move = function(group, selection) { if (group.tween) { group .on("start.brush", function(event) { emitter(this, arguments).beforestart().start(event); }) .on("interrupt.brush end.brush", function(event) { emitter(this, arguments).end(event); }) .tween("brush", function() { var that = this, state = that.__brush, emit = emitter(that, arguments), selection0 = state.selection, selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolate"])(selection0, selection1); function tween(t) { state.selection = t === 1 && selection1 === null ? null : i(t); redraw.call(that); emit.brush(); } return selection0 !== null && selection1 !== null ? tween : tween(1); }); } else { group .each(function() { var that = this, args = arguments, state = that.__brush, selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), emit = emitter(that, args).beforestart(); Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); state.selection = selection1 === null ? null : selection1; redraw.call(that); emit.start().brush().end(); }); } }; brush.clear = function(group) { brush.move(group, null); }; function redraw() { var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this), selection = local(this).selection; if (selection) { group.selectAll(".selection") .style("display", null) .attr("x", selection[0][0]) .attr("y", selection[0][1]) .attr("width", selection[1][0] - selection[0][0]) .attr("height", selection[1][1] - selection[0][1]); group.selectAll(".handle") .style("display", null) .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); } else { group.selectAll(".selection,.handle") .style("display", "none") .attr("x", null) .attr("y", null) .attr("width", null) .attr("height", null); } } function emitter(that, args, clean) { var emit = that.__brush.emitter; return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean); } function Emitter(that, args, clean) { this.that = that; this.args = args; this.state = that.__brush; this.active = 0; this.clean = clean; } Emitter.prototype = { beforestart: function() { if (++this.active === 1) this.state.emitter = this, this.starting = true; return this; }, start: function(event, mode) { if (this.starting) this.starting = false, this.emit("start", event, mode); else this.emit("brush", event); return this; }, brush: function(event, mode) { this.emit("brush", event, mode); return this; }, end: function(event, mode) { if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode); return this; }, emit: function(type, event, mode) { var d = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this.that).datum(); listeners.call( type, this.that, new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](type, { sourceEvent: event, target: brush, selection: dim.output(this.state.selection), mode, dispatch: listeners }), d ); } }; function started(event) { if (touchending && !event.touches) return; if (!filter.apply(this, arguments)) return; var that = this, type = event.target.__data__.type, mode = (keys && event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE), signX = dim === Y ? null : signsX[type], signY = dim === X ? null : signsY[type], state = local(that), extent = state.extent, selection = state.selection, W = extent[0][0], w0, w1, N = extent[0][1], n0, n1, E = extent[1][0], e0, e1, S = extent[1][1], s0, s1, dx = 0, dy = 0, moving, shifting = signX && signY && keys && event.shiftKey, lockX, lockY, points = Array.from(event.touches || [event], t => { const i = t.identifier; t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, that); t.point0 = t.slice(); t.identifier = i; return t; }); if (type === "overlay") { if (selection) moving = true; const pts = [points[0], points[1] || points[0]]; state.selection = selection = [[ w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), n0 = dim === X ? N : min(pts[0][1], pts[1][1]) ], [ e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), s0 = dim === X ? S : max(pts[0][1], pts[1][1]) ]]; if (points.length > 1) move(); } else { w0 = selection[0][0]; n0 = selection[0][1]; e0 = selection[1][0]; s0 = selection[1][1]; } w1 = w0; n1 = n0; e1 = e0; s1 = s0; var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(that) .attr("pointer-events", "none"); var overlay = group.selectAll(".overlay") .attr("cursor", cursors[type]); Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that); var emit = emitter(that, arguments, true).beforestart(); if (event.touches) { emit.moved = moved; emit.ended = ended; } else { var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(event.view) .on("mousemove.brush", moved, true) .on("mouseup.brush", ended, true); if (keys) view .on("keydown.brush", keydowned, true) .on("keyup.brush", keyupped, true) Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(event.view); } redraw.call(that); emit.start(event, mode.name); function moved(event) { for (const p of event.changedTouches || [event]) { for (const d of points) if (d.identifier === p.identifier) d.cur = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(p, that); } if (shifting && !lockX && !lockY && points.length === 1) { const point = points[0]; if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) lockY = true; else lockX = true; } for (const point of points) if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1]; moving = true; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(event); move(event); } function move(event) { const point = points[0], point0 = point.point0; var t; dx = point[0] - point0[0]; dy = point[1] - point0[1]; switch (mode) { case MODE_SPACE: case MODE_DRAG: { if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; break; } case MODE_HANDLE: { if (points[1]) { if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1; if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1; } else { if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0; else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx; if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0; else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy; } break; } case MODE_CENTER: { if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX)); if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY)); break; } } if (e1 < w1) { signX *= -1; t = w0, w0 = e0, e0 = t; t = w1, w1 = e1, e1 = t; if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); } if (s1 < n1) { signY *= -1; t = n0, n0 = s0, s0 = t; t = n1, n1 = s1, s1 = t; if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); } if (state.selection) selection = state.selection; // May be set by brush.move! if (lockX) w1 = selection[0][0], e1 = selection[1][0]; if (lockY) n1 = selection[0][1], s1 = selection[1][1]; if (selection[0][0] !== w1 || selection[0][1] !== n1 || selection[1][0] !== e1 || selection[1][1] !== s1) { state.selection = [[w1, n1], [e1, s1]]; redraw.call(that); emit.brush(event, mode.name); } } function ended(event) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])(event); if (event.touches) { if (event.touches.length) return; if (touchending) clearTimeout(touchending); touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! } else { Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(event.view, moving); view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); } group.attr("pointer-events", "all"); overlay.attr("cursor", cursors.overlay); if (state.selection) selection = state.selection; // May be set by brush.move (on start)! if (empty(selection)) state.selection = null, redraw.call(that); emit.end(event, mode.name); } function keydowned(event) { switch (event.keyCode) { case 16: { // SHIFT shifting = signX && signY; break; } case 18: { // ALT if (mode === MODE_HANDLE) { if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; mode = MODE_CENTER; move(); } break; } case 32: { // SPACE; takes priority over ALT if (mode === MODE_HANDLE || mode === MODE_CENTER) { if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; mode = MODE_SPACE; overlay.attr("cursor", cursors.selection); move(); } break; } default: return; } Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(event); } function keyupped(event) { switch (event.keyCode) { case 16: { // SHIFT if (shifting) { lockX = lockY = shifting = false; move(); } break; } case 18: { // ALT if (mode === MODE_CENTER) { if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; mode = MODE_HANDLE; move(); } break; } case 32: { // SPACE if (mode === MODE_SPACE) { if (event.altKey) { if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; mode = MODE_CENTER; } else { if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; mode = MODE_HANDLE; } overlay.attr("cursor", cursors[type]); move(); } break; } default: return; } Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])(event); } } function touchmoved(event) { emitter(this, arguments).moved(event); } function touchended(event) { emitter(this, arguments).ended(event); } function initialize() { var state = this.__brush || {selection: null}; state.extent = number2(extent.apply(this, arguments)); state.dim = dim; return state; } brush.extent = function(_) { return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(number2(_)), brush) : extent; }; brush.filter = function(_) { return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : filter; }; brush.touchable = function(_) { return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : touchable; }; brush.handleSize = function(_) { return arguments.length ? (handleSize = +_, brush) : handleSize; }; brush.keyModifiers = function(_) { return arguments.length ? (keys = !!_, brush) : keys; }; brush.on = function() { var value = listeners.on.apply(listeners, arguments); return value === listeners ? brush : value; }; return brush; } /***/ }), /***/ "hiel": /*!********************************************!*\ !*** ./node_modules/d3-array/src/count.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return count; }); function count(values, valueof) { let count = 0; if (valueof === undefined) { for (let value of values) { if (value != null && (value = +value) >= value) { ++count; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { ++count; } } } return count; } /***/ }), /***/ "hjfa": /*!***********************************************!*\ !*** ./node_modules/d3-zoom/src/transform.js ***! \***********************************************/ /*! exports provided: Transform, identity, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transform", function() { return Transform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transform; }); function Transform(k, x, y) { this.k = k; this.x = x; this.y = y; } Transform.prototype = { constructor: Transform, scale: function(k) { return k === 1 ? this : new Transform(this.k * k, this.x, this.y); }, translate: function(x, y) { return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); }, apply: function(point) { return [point[0] * this.k + this.x, point[1] * this.k + this.y]; }, applyX: function(x) { return x * this.k + this.x; }, applyY: function(y) { return y * this.k + this.y; }, invert: function(location) { return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; }, invertX: function(x) { return (x - this.x) / this.k; }, invertY: function(y) { return (y - this.y) / this.k; }, rescaleX: function(x) { return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); }, rescaleY: function(y) { return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); }, toString: function() { return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; } }; var identity = new Transform(1, 0, 0); transform.prototype = Transform.prototype; function transform(node) { while (!node.__zoom) if (!(node = node.parentNode)) return identity; return node.__zoom; } /***/ }), /***/ "hkWm": /*!******************************************!*\ !*** ./node_modules/d3-zoom/src/zoom.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "q+nN"); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "sQjb"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "lExN"); /* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "lhfN"); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform.js */ "hjfa"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent.js */ "OSsQ"); // Ignore right-click, since that should open the context menu. // except for pinch-to-zoom, which is sent as a wheel+ctrlKey event function defaultFilter(event) { return (!event.ctrlKey || event.type === 'wheel') && !event.button; } function defaultExtent() { var e = this; if (e instanceof SVGElement) { e = e.ownerSVGElement || e; if (e.hasAttribute("viewBox")) { e = e.viewBox.baseVal; return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; } return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; } return [[0, 0], [e.clientWidth, e.clientHeight]]; } function defaultTransform() { return this.__zoom || _transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"]; } function defaultWheelDelta(event) { return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1); } function defaultTouchable() { return navigator.maxTouchPoints || ("ontouchstart" in this); } function defaultConstrain(transform, extent, translateExtent) { var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; return transform.translate( dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) ); } /* harmony default export */ __webpack_exports__["default"] = (function() { var filter = defaultFilter, extent = defaultExtent, constrain = defaultConstrain, wheelDelta = defaultWheelDelta, touchable = defaultTouchable, scaleExtent = [0, Infinity], translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], duration = 250, interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolateZoom"], listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "zoom", "end"), touchstarting, touchfirst, touchending, touchDelay = 500, wheelDelay = 150, clickDistance2 = 0, tapDistance = 10; function zoom(selection) { selection .property("__zoom", defaultTransform) .on("wheel.zoom", wheeled) .on("mousedown.zoom", mousedowned) .on("dblclick.zoom", dblclicked) .filter(touchable) .on("touchstart.zoom", touchstarted) .on("touchmove.zoom", touchmoved) .on("touchend.zoom touchcancel.zoom", touchended) .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); } zoom.transform = function(collection, transform, point, event) { var selection = collection.selection ? collection.selection() : collection; selection.property("__zoom", defaultTransform); if (collection !== selection) { schedule(collection, transform, point, event); } else { selection.interrupt().each(function() { gesture(this, arguments) .event(event) .start() .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) .end(); }); } }; zoom.scaleBy = function(selection, k, p, event) { zoom.scaleTo(selection, function() { var k0 = this.__zoom.k, k1 = typeof k === "function" ? k.apply(this, arguments) : k; return k0 * k1; }, p, event); }; zoom.scaleTo = function(selection, k, p, event) { zoom.transform(selection, function() { var e = extent.apply(this, arguments), t0 = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, p1 = t0.invert(p0), k1 = typeof k === "function" ? k.apply(this, arguments) : k; return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); }, p, event); }; zoom.translateBy = function(selection, x, y, event) { zoom.transform(selection, function() { return constrain(this.__zoom.translate( typeof x === "function" ? x.apply(this, arguments) : x, typeof y === "function" ? y.apply(this, arguments) : y ), extent.apply(this, arguments), translateExtent); }, null, event); }; zoom.translateTo = function(selection, x, y, p, event) { zoom.transform(selection, function() { var e = extent.apply(this, arguments), t = this.__zoom, p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; return constrain(_transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"].translate(p0[0], p0[1]).scale(t.k).translate( typeof x === "function" ? -x.apply(this, arguments) : -x, typeof y === "function" ? -y.apply(this, arguments) : -y ), e, translateExtent); }, p, event); }; function scale(transform, k) { k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); return k === transform.k ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, transform.x, transform.y); } function translate(transform, p0, p1) { var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; return x === transform.x && y === transform.y ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](transform.k, x, y); } function centroid(extent) { return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; } function schedule(transition, transform, point, event) { transition .on("start.zoom", function() { gesture(this, arguments).event(event).start(); }) .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).event(event).end(); }) .tween("zoom", function() { var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform === "function" ? transform.apply(that, args) : transform, i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); return function(t) { if (t === 1) t = b; // Avoid rounding error on end. else { var l = i(t), k = w / l[2]; t = new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, p[0] - l[0] * k, p[1] - l[1] * k); } g.zoom(null, t); }; }); } function gesture(that, args, clean) { return (!clean && that.__zooming) || new Gesture(that, args); } function Gesture(that, args) { this.that = that; this.args = args; this.active = 0; this.sourceEvent = null; this.extent = extent.apply(that, args); this.taps = 0; } Gesture.prototype = { event: function(event) { if (event) this.sourceEvent = event; return this; }, start: function() { if (++this.active === 1) { this.that.__zooming = this; this.emit("start"); } return this; }, zoom: function(key, transform) { if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); this.that.__zoom = transform; this.emit("zoom"); return this; }, end: function() { if (--this.active === 0) { delete this.that.__zooming; this.emit("end"); } return this; }, emit: function(type) { var d = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this.that).datum(); listeners.call( type, this.that, new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](type, { sourceEvent: this.sourceEvent, target: zoom, type, transform: this.that.__zoom, dispatch: listeners }), d ); } }; function wheeled(event, ...args) { if (!filter.apply(this, arguments)) return; var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event); // If the mouse is in the same location as before, reuse it. // If there were recent wheel events, reset the wheel idle timeout. if (g.wheel) { if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { g.mouse[1] = t.invert(g.mouse[0] = p); } clearTimeout(g.wheel); } // If this wheel event won’t trigger a transform change, ignore it. else if (t.k === k) return; // Otherwise, capture the mouse point and location at the start. else { g.mouse = [p, t.invert(p)]; Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); g.start(); } Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); g.wheel = setTimeout(wheelidled, wheelDelay); g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); function wheelidled() { g.wheel = null; g.end(); } } function mousedowned(event, ...args) { if (touchending || !filter.apply(this, arguments)) return; var g = gesture(this, args, true).event(event), v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event, currentTarget), currentTarget = event.currentTarget, x0 = event.clientX, y0 = event.clientY; Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(event.view); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(event); g.mouse = [p, this.__zoom.invert(p)]; Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); g.start(); function mousemoved(event) { Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); if (!g.moved) { var dx = event.clientX - x0, dy = event.clientY - y0; g.moved = dx * dx + dy * dy > clickDistance2; } g.event(event) .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event, currentTarget), g.mouse[1]), g.extent, translateExtent)); } function mouseupped(event) { v.on("mousemove.zoom mouseup.zoom", null); Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(event.view, g.moved); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); g.event(event).end(); } } function dblclicked(event, ...args) { if (!filter.apply(this, arguments)) return; var t0 = this.__zoom, p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent); Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).transition().duration(duration).call(schedule, t1, p0, event); else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).call(zoom.transform, t1, p0, event); } function touchstarted(event, ...args) { if (!filter.apply(this, arguments)) return; var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(event); for (i = 0; i < n; ++i) { t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, this); p = [p, this.__zoom.invert(p), t.identifier]; if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; } if (touchstarting) touchstarting = clearTimeout(touchstarting); if (started) { if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this); g.start(); } } function touchmoved(event, ...args) { if (!this.__zooming) return; var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])(event); for (i = 0; i < n; ++i) { t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, this); if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; } t = g.that.__zoom; if (g.touch1) { var p0 = g.touch0[0], l0 = g.touch0[1], p1 = g.touch1[0], l1 = g.touch1[1], dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; t = scale(t, Math.sqrt(dp / dl)); p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; } else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; else return; g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); } function touchended(event, ...args) { if (!this.__zooming) return; var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t; Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])(event); if (touchending) clearTimeout(touchending); touchending = setTimeout(function() { touchending = null; }, touchDelay); for (i = 0; i < n; ++i) { t = touches[i]; if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; } if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); else { g.end(); // If this was a dbltap, reroute to the (optional) dblclick.zoom handler. if (g.taps === 2) { t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["pointer"])(t, this); if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) { var p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).on("dblclick.zoom"); if (p) p.apply(this, arguments); } } } } zoom.wheelDelta = function(_) { return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(+_), zoom) : wheelDelta; }; zoom.filter = function(_) { return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : filter; }; zoom.touchable = function(_) { return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : touchable; }; zoom.extent = function(_) { return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; }; zoom.scaleExtent = function(_) { return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; }; zoom.translateExtent = function(_) { return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; }; zoom.constrain = function(_) { return arguments.length ? (constrain = _, zoom) : constrain; }; zoom.duration = function(_) { return arguments.length ? (duration = +_, zoom) : duration; }; zoom.interpolate = function(_) { return arguments.length ? (interpolate = _, zoom) : interpolate; }; zoom.on = function() { var value = listeners.on.apply(listeners, arguments); return value === listeners ? zoom : value; }; zoom.clickDistance = function(_) { return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); }; zoom.tapDistance = function(_) { return arguments.length ? (tapDistance = +_, zoom) : tapDistance; }; return zoom; }); /***/ }), /***/ "hl/D": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/delay.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); function delayFunction(id, value) { return function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = +value.apply(this, arguments); }; } function delayConstant(id, value) { return value = +value, function() { Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = value; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { var id = this._id; return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).delay; }); /***/ }), /***/ "i202": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/identity.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x; }); /***/ }), /***/ "i3vF": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/merge.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(selection) { if (!(selection instanceof _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"])) throw new Error("invalid merge"); for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group0[i] || group1[i]) { merge[i] = node; } } } for (; j < m0; ++j) { merges[j] = groups0[j]; } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](merges, this._parents); }); /***/ }), /***/ "iBRH": /*!******************************************!*\ !*** ./node_modules/d3-axis/src/axis.js ***! \******************************************/ /*! exports provided: axisTop, axisRight, axisBottom, axisLeft */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return axisTop; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return axisRight; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return axisBottom; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return axisLeft; }); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "+s1I"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "kF1t"); var top = 1, right = 2, bottom = 3, left = 4, epsilon = 1e-6; function translateX(x) { return "translate(" + x + ",0)"; } function translateY(y) { return "translate(0," + y + ")"; } function number(scale) { return d => +scale(d); } function center(scale, offset) { offset = Math.max(0, scale.bandwidth() - offset * 2) / 2; if (scale.round()) offset = Math.round(offset); return d => +scale(d) + offset; } function entering() { return !this.__axis; } function axis(orient, scale) { var tickArguments = [], tickValues = null, tickFormat = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient === top || orient === left ? -1 : 1, x = orient === left || orient === right ? "x" : "y", transform = orient === top || orient === bottom ? translateX : translateY; function axis(context) { var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : tickFormat, spacing = Math.max(tickSizeInner, 0) + tickPadding, range = scale.range(), range0 = +range[0] + offset, range1 = +range[range.length - 1] + offset, position = (scale.bandwidth ? center : number)(scale.copy(), offset), selection = context.selection ? context.selection() : context, path = selection.selectAll(".domain").data([null]), tick = selection.selectAll(".tick").data(values, scale).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line = tick.select("line"), text = tick.select("text"); path = path.merge(path.enter().insert("path", ".tick") .attr("class", "domain") .attr("stroke", "currentColor")); tick = tick.merge(tickEnter); line = line.merge(tickEnter.append("line") .attr("stroke", "currentColor") .attr(x + "2", k * tickSizeInner)); text = text.merge(tickEnter.append("text") .attr("fill", "currentColor") .attr(x, k * spacing) .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); if (context !== selection) { path = path.transition(context); tick = tick.transition(context); line = line.transition(context); text = text.transition(context); tickExit = tickExit.transition(context) .attr("opacity", epsilon) .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute("transform"); }); tickEnter .attr("opacity", epsilon) .attr("transform", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); }); } tickExit.remove(); path .attr("d", orient === left || orient === right ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1) : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1)); tick .attr("opacity", 1) .attr("transform", function(d) { return transform(position(d) + offset); }); line .attr(x + "2", k * tickSizeInner); text .attr(x, k * spacing) .text(format); selection.filter(entering) .attr("fill", "none") .attr("font-size", 10) .attr("font-family", "sans-serif") .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); selection .each(function() { this.__axis = position; }); } axis.scale = function(_) { return arguments.length ? (scale = _, axis) : scale; }; axis.ticks = function() { return tickArguments = _array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments), axis; }; axis.tickArguments = function(_) { return arguments.length ? (tickArguments = _ == null ? [] : _array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickArguments.slice(); }; axis.tickValues = function(_) { return arguments.length ? (tickValues = _ == null ? null : _array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickValues && tickValues.slice(); }; axis.tickFormat = function(_) { return arguments.length ? (tickFormat = _, axis) : tickFormat; }; axis.tickSize = function(_) { return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; }; axis.tickSizeInner = function(_) { return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; }; axis.tickSizeOuter = function(_) { return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; }; axis.tickPadding = function(_) { return arguments.length ? (tickPadding = +_, axis) : tickPadding; }; axis.offset = function(_) { return arguments.length ? (offset = +_, axis) : offset; }; return axis; } function axisTop(scale) { return axis(top, scale); } function axisRight(scale) { return axis(right, scale); } function axisBottom(scale) { return axis(bottom, scale); } function axisLeft(scale) { return axis(left, scale); } /***/ }), /***/ "iEdP": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/descending.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; }); /***/ }), /***/ "iKkX": /*!*******************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/VirtualTimeScheduler.js ***! \*******************************************************************************/ /*! exports provided: VirtualTimeScheduler, VirtualAction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; }); /* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ "3N8a"); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class VirtualTimeScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"] { constructor(SchedulerAction = VirtualAction, maxFrames = Number.POSITIVE_INFINITY) { super(SchedulerAction, () => this.frame); this.maxFrames = maxFrames; this.frame = 0; this.index = -1; } flush() { const { actions, maxFrames } = this; let error, action; while ((action = actions[0]) && action.delay <= maxFrames) { actions.shift(); this.frame = action.delay; if (error = action.execute(action.state, action.delay)) { break; } } if (error) { while (action = actions.shift()) { action.unsubscribe(); } throw error; } } } VirtualTimeScheduler.frameTimeFactor = 10; class VirtualAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"] { constructor(scheduler, work, index = scheduler.index += 1) { super(scheduler, work); this.scheduler = scheduler; this.work = work; this.index = index; this.active = true; this.index = scheduler.index = index; } schedule(state, delay = 0) { if (!this.id) { return super.schedule(state, delay); } this.active = false; const action = new VirtualAction(this.scheduler, this.work); this.add(action); return action.schedule(state, delay); } requestAsyncId(scheduler, id, delay = 0) { this.delay = scheduler.frame + delay; const { actions } = scheduler; actions.push(this); actions.sort(VirtualAction.sortActions); return true; } recycleAsyncId(scheduler, id, delay = 0) { return undefined; } _execute(state, delay) { if (this.active === true) { return super._execute(state, delay); } } static sortActions(a, b) { if (a.delay === b.delay) { if (a.index === b.index) { return 0; } else if (a.index > b.index) { return 1; } else { return -1; } } else if (a.delay > b.delay) { return 1; } else { return -1; } } } //# sourceMappingURL=VirtualTimeScheduler.js.map /***/ }), /***/ "iPFw": /*!******************************************!*\ !*** ./node_modules/d3-shape/src/pie.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./descending.js */ "iEdP"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity.js */ "GQZn"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./math.js */ "CYYh"); /* harmony default export */ __webpack_exports__["default"] = (function() { var value = _identity_js__WEBPACK_IMPORTED_MODULE_3__["default"], sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_2__["default"], sort = null, startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_math_js__WEBPACK_IMPORTED_MODULE_4__["tau"]), padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0); function pie(data) { var i, n = (data = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(data)).length, j, k, sum = 0, index = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_4__["tau"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_4__["tau"], endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), pa = p * (da < 0 ? -1 : 1), v; for (i = 0; i < n; ++i) { if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { sum += v; } } // Optionally sort the arcs by previously-computed values or by data. if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); // Compute the arcs! They are stored in the original data's order. for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { data: data[j], index: i, value: v, startAngle: a0, endAngle: a1, padAngle: p }; } return arcs; } pie.value = function(_) { return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : value; }; pie.sortValues = function(_) { return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; }; pie.sort = function(_) { return arguments.length ? (sort = _, sortValues = null, pie) : sort; }; pie.startAngle = function(_) { return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : startAngle; }; pie.endAngle = function(_) { return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : endAngle; }; pie.padAngle = function(_) { return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), pie) : padAngle; }; return pie; }); /***/ }), /***/ "iQ9W": /*!**********************************************!*\ !*** ./node_modules/d3-force/src/collide.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-quadtree */ "gO8D"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "nXVj"); /* harmony import */ var _jiggle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jiggle.js */ "QupR"); function x(d) { return d.x + d.vx; } function y(d) { return d.y + d.vy; } /* harmony default export */ __webpack_exports__["default"] = (function(radius) { var nodes, radii, random, strength = 1, iterations = 1; if (typeof radius !== "function") radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(radius == null ? 1 : +radius); function force() { var i, n = nodes.length, tree, node, xi, yi, ri, ri2; for (var k = 0; k < iterations; ++k) { tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_0__["quadtree"])(nodes, x, y).visitAfter(prepare); for (i = 0; i < n; ++i) { node = nodes[i]; ri = radii[node.index], ri2 = ri * ri; xi = node.x + node.vx; yi = node.y + node.vy; tree.visit(apply); } } function apply(quad, x0, y0, x1, y1) { var data = quad.data, rj = quad.r, r = ri + rj; if (data) { if (data.index > node.index) { var x = xi - data.x - data.vx, y = yi - data.y - data.vy, l = x * x + y * y; if (l < r * r) { if (x === 0) x = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += x * x; if (y === 0) y = Object(_jiggle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(random), l += y * y; l = (r - (l = Math.sqrt(l))) / l * strength; node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); node.vy += (y *= l) * r; data.vx -= x * (r = 1 - r); data.vy -= y * r; } } return; } return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; } } function prepare(quad) { if (quad.data) return quad.r = radii[quad.data.index]; for (var i = quad.r = 0; i < 4; ++i) { if (quad[i] && quad[i].r > quad.r) { quad.r = quad[i].r; } } } function initialize() { if (!nodes) return; var i, n = nodes.length, node; radii = new Array(n); for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); } force.initialize = function(_nodes, _random) { nodes = _nodes; random = _random; initialize(); }; force.iterations = function(_) { return arguments.length ? (iterations = +_, force) : iterations; }; force.strength = function(_) { return arguments.length ? (strength = +_, force) : strength; }; force.radius = function(_) { return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), initialize(), force) : radius; }; return force; }); /***/ }), /***/ "iQWy": /*!******************************************************!*\ !*** ./node_modules/d3-geo/src/projection/albers.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea.js */ "nVu6"); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__["default"])() .parallels([29.5, 45.5]) .scale(1070) .translate([480, 250]) .rotate([96, 0]) .center([-0.6, 38.7]); }); /***/ }), /***/ "iSFD": /*!*******************************************!*\ !*** ./node_modules/d3-ease/src/cubic.js ***! \*******************************************/ /*! exports provided: cubicIn, cubicOut, cubicInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicIn", function() { return cubicIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicOut", function() { return cubicOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicInOut", function() { return cubicInOut; }); function cubicIn(t) { return t * t * t; } function cubicOut(t) { return --t * t * t + 1; } function cubicInOut(t) { return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; } /***/ }), /***/ "iUY2": /*!******************************************!*\ !*** ./node_modules/d3-ease/src/back.js ***! \******************************************/ /*! exports provided: backIn, backOut, backInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backIn", function() { return backIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backOut", function() { return backOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backInOut", function() { return backInOut; }); var overshoot = 1.70158; var backIn = (function custom(s) { s = +s; function backIn(t) { return (t = +t) * t * (s * (t - 1) + t); } backIn.overshoot = custom; return backIn; })(overshoot); var backOut = (function custom(s) { s = +s; function backOut(t) { return --t * t * ((t + 1) * s + t) + 1; } backOut.overshoot = custom; return backOut; })(overshoot); var backInOut = (function custom(s) { s = +s; function backInOut(t) { return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; } backInOut.overshoot = custom; return backInOut; })(overshoot); /***/ }), /***/ "ikcO": /*!*************************************************!*\ !*** ./node_modules/d3-geo/src/path/context.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathContext; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "mPOO"); function PathContext(context) { this._context = context; } PathContext.prototype = { _radius: 4.5, pointRadius: function(_) { return this._radius = _, this; }, polygonStart: function() { this._line = 0; }, polygonEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line === 0) this._context.closePath(); this._point = NaN; }, point: function(x, y) { switch (this._point) { case 0: { this._context.moveTo(x, y); this._point = 1; break; } case 1: { this._context.lineTo(x, y); break; } default: { this._context.moveTo(x + this._radius, y); this._context.arc(x, y, this._radius, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); break; } } }, result: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"] }; /***/ }), /***/ "itXk": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/combineLatest.js ***! \*************************************************************************/ /*! exports provided: combineLatest, CombineLatestOperator, CombineLatestSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; }); /* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isScheduler */ "z+Ro"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); /* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fromArray */ "yCtX"); const NONE = {}; function combineLatest(...observables) { let resultSelector = undefined; let scheduler = undefined; if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(observables[observables.length - 1])) { scheduler = observables.pop(); } if (typeof observables[observables.length - 1] === 'function') { resultSelector = observables.pop(); } if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) { observables = observables[0]; } return Object(_fromArray__WEBPACK_IMPORTED_MODULE_4__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector)); } class CombineLatestOperator { constructor(resultSelector) { this.resultSelector = resultSelector; } call(subscriber, source) { return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector)); } } class CombineLatestSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, resultSelector) { super(destination); this.resultSelector = resultSelector; this.active = 0; this.values = []; this.observables = []; } _next(observable) { this.values.push(NONE); this.observables.push(observable); } _complete() { const observables = this.observables; const len = observables.length; if (len === 0) { this.destination.complete(); } else { this.active = len; this.toRespond = len; for (let i = 0; i < len; i++) { const observable = observables[i]; this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, observable, undefined, i)); } } } notifyComplete(unused) { if ((this.active -= 1) === 0) { this.destination.complete(); } } notifyNext(_outerValue, innerValue, outerIndex) { const values = this.values; const oldVal = values[outerIndex]; const toRespond = !this.toRespond ? 0 : oldVal === NONE ? --this.toRespond : this.toRespond; values[outerIndex] = innerValue; if (toRespond === 0) { if (this.resultSelector) { this._tryResultSelector(values); } else { this.destination.next(values.slice()); } } } _tryResultSelector(values) { let result; try { result = this.resultSelector.apply(this, values); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } //# sourceMappingURL=combineLatest.js.map /***/ }), /***/ "ivMv": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/binary.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) { var nodes = parent.children, i, n = nodes.length, sum, sums = new Array(n + 1); for (sums[0] = sum = i = 0; i < n; ++i) { sums[i + 1] = sum += nodes[i].value; } partition(0, n, parent.value, x0, y0, x1, y1); function partition(i, j, value, x0, y0, x1, y1) { if (i >= j - 1) { var node = nodes[i]; node.x0 = x0, node.y0 = y0; node.x1 = x1, node.y1 = y1; return; } var valueOffset = sums[i], valueTarget = (value / 2) + valueOffset, k = i + 1, hi = j - 1; while (k < hi) { var mid = k + hi >>> 1; if (sums[mid] < valueTarget) k = mid + 1; else hi = mid; } if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k; var valueLeft = sums[k] - valueOffset, valueRight = value - valueLeft; if ((x1 - x0) > (y1 - y0)) { var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1; partition(i, k, valueLeft, x0, y0, xk, y1); partition(k, j, valueRight, xk, y0, x1, y1); } else { var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1; partition(i, k, valueLeft, x0, y0, x1, yk); partition(k, j, valueRight, x0, yk, x1, y1); } } }); /***/ }), /***/ "j1BO": /*!************************************************!*\ !*** ./node_modules/d3-hierarchy/src/array.js ***! \************************************************/ /*! exports provided: default, shuffle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; }); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like : Array.from(x); // Map, Set, iterable, string, or anything else }); function shuffle(array) { var m = array.length, t, i; while (m) { i = Math.random() * m-- | 0; t = array[m]; array[m] = array[i]; array[i] = t; } return array; } /***/ }), /***/ "jICm": /*!**************************************************!*\ !*** ./node_modules/d3-shape/src/curve/basis.js ***! \**************************************************/ /*! exports provided: point, Basis, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Basis", function() { return Basis; }); function point(that, x, y) { that._context.bezierCurveTo( (2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6 ); } function Basis(context) { this._context = context; } Basis.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 3: point(this, this._x1, this._y1); // proceed case 2: this._context.lineTo(this._x1, this._y1); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed default: point(this, x, y); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Basis(context); }); /***/ }), /***/ "jIxI": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/subset.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subset; }); /* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superset.js */ "3O/B"); function subset(values, other) { return Object(_superset_js__WEBPACK_IMPORTED_MODULE_0__["default"])(other, values); } /***/ }), /***/ "jQWc": /*!*****************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/ramp.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony default export */ __webpack_exports__["default"] = (scheme => Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRgbBasis"])(scheme[scheme.length - 1])); /***/ }), /***/ "jTaA": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ffeda0feb24cf03b20", "ffffb2fecc5cfd8d3ce31a1c", "ffffb2fecc5cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cf03b20bd0026", "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "jZKg": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduled/scheduleArray.js ***! \************************************************************************/ /*! exports provided: scheduleArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function scheduleArray(input, scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { const sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); let i = 0; sub.add(scheduler.schedule(function () { if (i === input.length) { subscriber.complete(); return; } subscriber.next(input[i++]); if (!subscriber.closed) { sub.add(this.schedule()); } })); return sub; }); } //# sourceMappingURL=scheduleArray.js.map /***/ }), /***/ "jhN1": /*!******************************************************************************************!*\ !*** ./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js ***! \******************************************************************************************/ /*! exports provided: ɵgetDOM, BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, Title, TransferState, VERSION, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, ɵBROWSER_SANITIZATION_PROVIDERS, ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__, ɵBrowserDomAdapter, ɵBrowserGetTestability, ɵDomEventsPlugin, ɵDomRendererFactory2, ɵDomSanitizerImpl, ɵDomSharedStylesHost, ɵELEMENT_PROBE_PROVIDERS, ɵELEMENT_PROBE_PROVIDERS__POST_R3__, ɵHAMMER_PROVIDERS__POST_R3__, ɵHammerGesturesPlugin, ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, ɵKeyEventsPlugin, ɵNAMESPACE_URIS, ɵSharedStylesHost, ɵTRANSITION_ID, ɵangular_packages_platform_browser_platform_browser_a, ɵangular_packages_platform_browser_platform_browser_b, ɵangular_packages_platform_browser_platform_browser_c, ɵangular_packages_platform_browser_platform_browser_d, ɵangular_packages_platform_browser_platform_browser_e, ɵangular_packages_platform_browser_platform_browser_f, ɵangular_packages_platform_browser_platform_browser_g, ɵangular_packages_platform_browser_platform_browser_h, ɵangular_packages_platform_browser_platform_browser_i, ɵangular_packages_platform_browser_platform_browser_j, ɵangular_packages_platform_browser_platform_browser_k, ɵangular_packages_platform_browser_platform_browser_l, ɵangular_packages_platform_browser_platform_browser_m, ɵangular_packages_platform_browser_platform_browser_n, ɵangular_packages_platform_browser_platform_browser_o, ɵescapeHtml, ɵflattenStyles, ɵinitDomAdapter, ɵshimContentAttribute, ɵshimHostAttribute */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserModule", function() { return BrowserModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BrowserTransferStateModule", function() { return BrowserTransferStateModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "By", function() { return By; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomSanitizer", function() { return DomSanitizer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EVENT_MANAGER_PLUGINS", function() { return EVENT_MANAGER_PLUGINS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventManager", function() { return EventManager; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HAMMER_GESTURE_CONFIG", function() { return HAMMER_GESTURE_CONFIG; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HAMMER_LOADER", function() { return HAMMER_LOADER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HammerGestureConfig", function() { return HammerGestureConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HammerModule", function() { return HammerModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Meta", function() { return Meta; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Title", function() { return Title; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TransferState", function() { return TransferState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableDebugTools", function() { return disableDebugTools; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableDebugTools", function() { return enableDebugTools; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeStateKey", function() { return makeStateKey; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "platformBrowser", function() { return platformBrowser; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBROWSER_SANITIZATION_PROVIDERS", function() { return BROWSER_SANITIZATION_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__", function() { return BROWSER_SANITIZATION_PROVIDERS__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserDomAdapter", function() { return BrowserDomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserGetTestability", function() { return BrowserGetTestability; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomEventsPlugin", function() { return DomEventsPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomRendererFactory2", function() { return DomRendererFactory2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomSanitizerImpl", function() { return DomSanitizerImpl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomSharedStylesHost", function() { return DomSharedStylesHost; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵELEMENT_PROBE_PROVIDERS", function() { return ELEMENT_PROBE_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵELEMENT_PROBE_PROVIDERS__POST_R3__", function() { return ELEMENT_PROBE_PROVIDERS__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵHAMMER_PROVIDERS__POST_R3__", function() { return HAMMER_PROVIDERS__POST_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵHammerGesturesPlugin", function() { return HammerGesturesPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS", function() { return INTERNAL_BROWSER_PLATFORM_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵKeyEventsPlugin", function() { return KeyEventsPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNAMESPACE_URIS", function() { return NAMESPACE_URIS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵSharedStylesHost", function() { return SharedStylesHost; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵTRANSITION_ID", function() { return TRANSITION_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_a", function() { return errorHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_b", function() { return _document; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_c", function() { return BROWSER_MODULE_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_d", function() { return createMeta; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_e", function() { return createTitle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_f", function() { return initTransferState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_g", function() { return EventManagerPlugin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_h", function() { return HAMMER_PROVIDERS__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_i", function() { return HAMMER_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_j", function() { return domSanitizerImplFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_k", function() { return appInitializerFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_l", function() { return SERVER_TRANSITION_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_m", function() { return _createNgProbeR2; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_n", function() { return ELEMENT_PROBE_PROVIDERS__PRE_R3__; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_platform_browser_platform_browser_o", function() { return GenericBrowserDomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵescapeHtml", function() { return escapeHtml; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflattenStyles", function() { return flattenStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵinitDomAdapter", function() { return initDomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵshimContentAttribute", function() { return shimContentAttribute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵshimHostAttribute", function() { return shimHostAttribute; }); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ɵgetDOM", function() { return _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"]; }); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides DOM operations in any browser environment. * * @security Tread carefully! Interacting with the DOM directly is dangerous and * can introduce XSS risks. */ class GenericBrowserDomAdapter extends _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵDomAdapter"] { constructor() { super(); } supportsDOMEvents() { return true; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0 = () => { if (_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node']) { return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['Node'].prototype.contains || function (node) { return !!(this.compareDocumentPosition(node) & 16); }; } return undefined; }; const nodeContains = (ɵ0)(); /** * A `DomAdapter` powered by full browser DOM APIs. * * @security Tread carefully! Interacting with the DOM directly is dangerous and * can introduce XSS risks. */ /* tslint:disable:requireParameterType no-console */ class BrowserDomAdapter extends GenericBrowserDomAdapter { static makeCurrent() { Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵsetRootDomAdapter"])(new BrowserDomAdapter()); } getProperty(el, name) { return el[name]; } log(error) { if (window.console) { window.console.log && window.console.log(error); } } logGroup(error) { if (window.console) { window.console.group && window.console.group(error); } } logGroupEnd() { if (window.console) { window.console.groupEnd && window.console.groupEnd(); } } onAndCancel(el, evt, listener) { el.addEventListener(evt, listener, false); // Needed to follow Dart's subscription semantic, until fix of // https://code.google.com/p/dart/issues/detail?id=17406 return () => { el.removeEventListener(evt, listener, false); }; } dispatchEvent(el, evt) { el.dispatchEvent(evt); } remove(node) { if (node.parentNode) { node.parentNode.removeChild(node); } return node; } getValue(el) { return el.value; } createElement(tagName, doc) { doc = doc || this.getDefaultDocument(); return doc.createElement(tagName); } createHtmlDocument() { return document.implementation.createHTMLDocument('fakeTitle'); } getDefaultDocument() { return document; } isElementNode(node) { return node.nodeType === Node.ELEMENT_NODE; } isShadowRoot(node) { return node instanceof DocumentFragment; } getGlobalEventTarget(doc, target) { if (target === 'window') { return window; } if (target === 'document') { return doc; } if (target === 'body') { return doc.body; } return null; } getHistory() { return window.history; } getLocation() { return window.location; } getBaseHref(doc) { const href = getBaseElementHref(); return href == null ? null : relativePath(href); } resetBaseElement() { baseElement = null; } getUserAgent() { return window.navigator.userAgent; } performanceNow() { // performance.now() is not available in all browsers, see // https://caniuse.com/high-resolution-time return window.performance && window.performance.now ? window.performance.now() : new Date().getTime(); } supportsCookies() { return true; } getCookie(name) { return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵparseCookieValue"])(document.cookie, name); } } let baseElement = null; function getBaseElementHref() { if (!baseElement) { baseElement = document.querySelector('base'); if (!baseElement) { return null; } } return baseElement.getAttribute('href'); } // based on urlUtils.js in AngularJS 1 let urlParsingNode; function relativePath(url) { if (!urlParsingNode) { urlParsingNode = document.createElement('a'); } urlParsingNode.setAttribute('href', url); return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname : '/' + urlParsingNode.pathname; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An id that identifies a particular application being bootstrapped, that should * match across the client/server boundary. */ const TRANSITION_ID = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('TRANSITION_ID'); function appInitializerFactory(transitionId, document, injector) { return () => { // Wait for all application initializers to be completed before removing the styles set by // the server. injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationInitStatus"]).donePromise.then(() => { const dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])(); const styles = Array.prototype.slice.apply(document.querySelectorAll(`style[ng-transition]`)); styles.filter(el => el.getAttribute('ng-transition') === transitionId) .forEach(el => dom.remove(el)); }); }; } const SERVER_TRANSITION_PROVIDERS = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"], useFactory: appInitializerFactory, deps: [TRANSITION_ID, _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]], multi: true }, ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class BrowserGetTestability { static init() { Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["setTestabilityGetter"])(new BrowserGetTestability()); } addToWindow(registry) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAngularTestability'] = (elem, findInAncestors = true) => { const testability = registry.findTestabilityInTree(elem, findInAncestors); if (testability == null) { throw new Error('Could not find testability for element.'); } return testability; }; _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities'] = () => registry.getAllTestabilities(); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularRootElements'] = () => registry.getAllRootElements(); const whenAllStable = (callback /** TODO #9100 */) => { const testabilities = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['getAllAngularTestabilities'](); let count = testabilities.length; let didWork = false; const decrement = function (didWork_ /** TODO #9100 */) { didWork = didWork || didWork_; count--; if (count == 0) { callback(didWork); } }; testabilities.forEach(function (testability /** TODO #9100 */) { testability.whenStable(decrement); }); }; if (!_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers']) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'] = []; } _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['frameworkStabilizers'].push(whenAllStable); } findTestabilityInTree(registry, elem, findInAncestors) { if (elem == null) { return null; } const t = registry.getTestability(elem); if (t != null) { return t; } else if (!findInAncestors) { return null; } if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().isShadowRoot(elem)) { return this.findTestabilityInTree(registry, elem.host, true); } return this.findTestabilityInTree(registry, elem.parentElement, true); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const CAMEL_CASE_REGEXP = /([A-Z])/g; const DASH_CASE_REGEXP = /-([a-z])/g; function camelCaseToDashCase(input) { return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase()); } function dashCaseToCamelCase(input) { return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase()); } /** * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if * `name` is `'probe'`. * @param name Name under which it will be exported. Keep in mind this will be a property of the * global `ng` object. * @param value The value to export. */ function exportNgVar(name, value) { if (typeof COMPILED === 'undefined' || !COMPILED) { // Note: we can't export `ng` when using closure enhanced optimization as: // - closure declares globals itself for minified names, which sometimes clobber our `ng` global // - we can't declare a closure extern as the namespace `ng` is already used within Google // for typings for angularJS (via `goog.provide('ng....')`). const ng = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵglobal"]['ng'] || {}; ng[name] = value; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ɵ0$1 = () => ({ 'ApplicationRef': _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"], 'NgZone': _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], }); const CORE_TOKENS = (ɵ0$1)(); const INSPECT_GLOBAL_NAME = 'probe'; const CORE_TOKENS_GLOBAL_NAME = 'coreTokens'; /** * Returns a {@link DebugElement} for the given native DOM element, or * null if the given native element does not have an Angular view associated * with it. */ function inspectNativeElementR2(element) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵgetDebugNodeR2"])(element); } function _createNgProbeR2(coreTokens) { exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2); exportNgVar(CORE_TOKENS_GLOBAL_NAME, Object.assign(Object.assign({}, CORE_TOKENS), _ngProbeTokensToMap(coreTokens || []))); return () => inspectNativeElementR2; } function _ngProbeTokensToMap(tokens) { return tokens.reduce((prev, t) => (prev[t.name] = t.token, prev), {}); } /** * In Ivy, we don't support NgProbe because we have our own set of testing utilities * with more robust functionality. * * We shouldn't bring in NgProbe because it prevents DebugNode and friends from * tree-shaking properly. */ const ELEMENT_PROBE_PROVIDERS__POST_R3__ = []; /** * Providers which support debugging Angular applications (e.g. via `ng.probe`). */ const ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"], useFactory: _createNgProbeR2, deps: [ [_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], ], multi: true, }, ]; const ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__POST_R3__; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The injection token for the event-manager plug-in service. * * @publicApi */ const EVENT_MANAGER_PLUGINS = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('EventManagerPlugins'); /** * An injectable service that provides event management for Angular * through a browser plug-in. * * @publicApi */ class EventManager { /** * Initializes an instance of the event-manager service. */ constructor(plugins, _zone) { this._zone = _zone; this._eventNameToPlugin = new Map(); plugins.forEach(p => p.manager = this); this._plugins = plugins.slice().reverse(); } /** * Registers a handler for a specific element and event. * * @param element The HTML element to receive event notifications. * @param eventName The name of the event to listen for. * @param handler A function to call when the notification occurs. Receives the * event object as an argument. * @returns A callback function that can be used to remove the handler. */ addEventListener(element, eventName, handler) { const plugin = this._findPluginFor(eventName); return plugin.addEventListener(element, eventName, handler); } /** * Registers a global handler for an event in a target view. * * @param target A target for global event notifications. One of "window", "document", or "body". * @param eventName The name of the event to listen for. * @param handler A function to call when the notification occurs. Receives the * event object as an argument. * @returns A callback function that can be used to remove the handler. */ addGlobalEventListener(target, eventName, handler) { const plugin = this._findPluginFor(eventName); return plugin.addGlobalEventListener(target, eventName, handler); } /** * Retrieves the compilation zone in which event listeners are registered. */ getZone() { return this._zone; } /** @internal */ _findPluginFor(eventName) { const plugin = this._eventNameToPlugin.get(eventName); if (plugin) { return plugin; } const plugins = this._plugins; for (let i = 0; i < plugins.length; i++) { const plugin = plugins[i]; if (plugin.supports(eventName)) { this._eventNameToPlugin.set(eventName, plugin); return plugin; } } throw new Error(`No event manager plugin found for event ${eventName}`); } } EventManager.ɵfac = function EventManager_Factory(t) { return new (t || EventManager)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](EVENT_MANAGER_PLUGINS), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"])); }; EventManager.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: EventManager, factory: EventManager.ɵfac }); EventManager.ctorParameters = () => [ { type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [EVENT_MANAGER_PLUGINS,] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](EventManager, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: Array, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [EVENT_MANAGER_PLUGINS] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"] }]; }, null); })(); class EventManagerPlugin { constructor(_doc) { this._doc = _doc; } addGlobalEventListener(element, eventName, handler) { const target = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().getGlobalEventTarget(this._doc, element); if (!target) { throw new Error(`Unsupported event target ${target} for event ${eventName}`); } return this.addEventListener(target, eventName, handler); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SharedStylesHost { constructor() { /** @internal */ this._stylesSet = new Set(); } addStyles(styles) { const additions = new Set(); styles.forEach(style => { if (!this._stylesSet.has(style)) { this._stylesSet.add(style); additions.add(style); } }); this.onStylesAdded(additions); } onStylesAdded(additions) { } getAllStyles() { return Array.from(this._stylesSet); } } SharedStylesHost.ɵfac = function SharedStylesHost_Factory(t) { return new (t || SharedStylesHost)(); }; SharedStylesHost.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: SharedStylesHost, factory: SharedStylesHost.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](SharedStylesHost, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return []; }, null); })(); class DomSharedStylesHost extends SharedStylesHost { constructor(_doc) { super(); this._doc = _doc; this._hostNodes = new Set(); this._styleNodes = new Set(); this._hostNodes.add(_doc.head); } _addStylesToHost(styles, host) { styles.forEach((style) => { const styleEl = this._doc.createElement('style'); styleEl.textContent = style; this._styleNodes.add(host.appendChild(styleEl)); }); } addHost(hostNode) { this._addStylesToHost(this._stylesSet, hostNode); this._hostNodes.add(hostNode); } removeHost(hostNode) { this._hostNodes.delete(hostNode); } onStylesAdded(additions) { this._hostNodes.forEach(hostNode => this._addStylesToHost(additions, hostNode)); } ngOnDestroy() { this._styleNodes.forEach(styleNode => Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().remove(styleNode)); } } DomSharedStylesHost.ɵfac = function DomSharedStylesHost_Factory(t) { return new (t || DomSharedStylesHost)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; DomSharedStylesHost.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: DomSharedStylesHost, factory: DomSharedStylesHost.ɵfac }); DomSharedStylesHost.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSharedStylesHost, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NAMESPACE_URIS = { 'svg': 'http://www.w3.org/2000/svg', 'xhtml': 'http://www.w3.org/1999/xhtml', 'xlink': 'http://www.w3.org/1999/xlink', 'xml': 'http://www.w3.org/XML/1998/namespace', 'xmlns': 'http://www.w3.org/2000/xmlns/', }; const COMPONENT_REGEX = /%COMP%/g; const NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode; const COMPONENT_VARIABLE = '%COMP%'; const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`; const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`; function shimContentAttribute(componentShortId) { return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId); } function shimHostAttribute(componentShortId) { return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId); } function flattenStyles(compId, styles, target) { for (let i = 0; i < styles.length; i++) { let style = styles[i]; if (Array.isArray(style)) { flattenStyles(compId, style, target); } else { style = style.replace(COMPONENT_REGEX, compId); target.push(style); } } return target; } function decoratePreventDefault(eventHandler) { // `DebugNode.triggerEventHandler` needs to know if the listener was created with // decoratePreventDefault or is a listener added outside the Angular context so it can handle the // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap // the listener (see below). return (event) => { // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node // can inspect the listener toString contents for the existence of this special token. Because // the token is a string literal, it is ensured to not be modified by compiled code. if (event === '__ngUnwrap__') { return eventHandler; } const allowDefaultBehavior = eventHandler(event); if (allowDefaultBehavior === false) { // TODO(tbosch): move preventDefault into event plugins... event.preventDefault(); event.returnValue = false; } return undefined; }; } let hasLoggedNativeEncapsulationWarning = false; class DomRendererFactory2 { constructor(eventManager, sharedStylesHost, appId) { this.eventManager = eventManager; this.sharedStylesHost = sharedStylesHost; this.appId = appId; this.rendererByCompId = new Map(); this.defaultRenderer = new DefaultDomRenderer2(eventManager); } createRenderer(element, type) { if (!element || !type) { return this.defaultRenderer; } switch (type.encapsulation) { case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].Emulated: { let renderer = this.rendererByCompId.get(type.id); if (!renderer) { renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId); this.rendererByCompId.set(type.id, renderer); } renderer.applyToHost(element); return renderer; } case 1: case _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].ShadowDom: // TODO(FW-2290): remove the `case 1:` fallback logic and the warning in v12. if ((typeof ngDevMode === 'undefined' || ngDevMode) && !hasLoggedNativeEncapsulationWarning && type.encapsulation === 1) { hasLoggedNativeEncapsulationWarning = true; console.warn('ViewEncapsulation.Native is no longer supported. Falling back to ViewEncapsulation.ShadowDom. The fallback will be removed in v12.'); } return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type); default: { if (!this.rendererByCompId.has(type.id)) { const styles = flattenStyles(type.id, type.styles, []); this.sharedStylesHost.addStyles(styles); this.rendererByCompId.set(type.id, this.defaultRenderer); } return this.defaultRenderer; } } } begin() { } end() { } } DomRendererFactory2.ɵfac = function DomRendererFactory2_Factory(t) { return new (t || DomRendererFactory2)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](EventManager), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](DomSharedStylesHost), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"])); }; DomRendererFactory2.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: DomRendererFactory2, factory: DomRendererFactory2.ɵfac }); DomRendererFactory2.ctorParameters = () => [ { type: EventManager }, { type: DomSharedStylesHost }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomRendererFactory2, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }] }]; }, null); })(); class DefaultDomRenderer2 { constructor(eventManager) { this.eventManager = eventManager; this.data = Object.create(null); } destroy() { } createElement(name, namespace) { if (namespace) { // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key // will result in undefined, so we just return the namespace here. return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name); } return document.createElement(name); } createComment(value) { return document.createComment(value); } createText(value) { return document.createTextNode(value); } appendChild(parent, newChild) { parent.appendChild(newChild); } insertBefore(parent, newChild, refChild) { if (parent) { parent.insertBefore(newChild, refChild); } } removeChild(parent, oldChild) { if (parent) { parent.removeChild(oldChild); } } selectRootElement(selectorOrNode, preserveContent) { let el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) : selectorOrNode; if (!el) { throw new Error(`The selector "${selectorOrNode}" did not match any elements`); } if (!preserveContent) { el.textContent = ''; } return el; } parentNode(node) { return node.parentNode; } nextSibling(node) { return node.nextSibling; } setAttribute(el, name, value, namespace) { if (namespace) { name = namespace + ':' + name; // TODO(FW-811): Ivy may cause issues here because it's passing around // full URIs for namespaces, therefore this lookup will fail. const namespaceUri = NAMESPACE_URIS[namespace]; if (namespaceUri) { el.setAttributeNS(namespaceUri, name, value); } else { el.setAttribute(name, value); } } else { el.setAttribute(name, value); } } removeAttribute(el, name, namespace) { if (namespace) { // TODO(FW-811): Ivy may cause issues here because it's passing around // full URIs for namespaces, therefore this lookup will fail. const namespaceUri = NAMESPACE_URIS[namespace]; if (namespaceUri) { el.removeAttributeNS(namespaceUri, name); } else { // TODO(FW-811): Since ivy is passing around full URIs for namespaces // this could result in properties like `http://www.w3.org/2000/svg:cx="123"`, // which is wrong. el.removeAttribute(`${namespace}:${name}`); } } else { el.removeAttribute(name); } } addClass(el, name) { el.classList.add(name); } removeClass(el, name) { el.classList.remove(name); } setStyle(el, style, value, flags) { if (flags & (_angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase | _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important)) { el.style.setProperty(style, value, flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].Important ? 'important' : ''); } else { el.style[style] = value; } } removeStyle(el, style, flags) { if (flags & _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererStyleFlags2"].DashCase) { el.style.removeProperty(style); } else { // IE requires '' instead of null // see https://github.com/angular/angular/issues/7916 el.style[style] = ''; } } setProperty(el, name, value) { NG_DEV_MODE && checkNoSyntheticProp(name, 'property'); el[name] = value; } setValue(node, value) { node.nodeValue = value; } listen(target, event, callback) { NG_DEV_MODE && checkNoSyntheticProp(event, 'listener'); if (typeof target === 'string') { return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback)); } return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback)); } } const ɵ0$2 = () => '@'.charCodeAt(0); const AT_CHARCODE = (ɵ0$2)(); function checkNoSyntheticProp(name, nameKind) { if (name.charCodeAt(0) === AT_CHARCODE) { throw new Error(`Found the synthetic ${nameKind} ${name}. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.`); } } class EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 { constructor(eventManager, sharedStylesHost, component, appId) { super(eventManager); this.component = component; const styles = flattenStyles(appId + '-' + component.id, component.styles, []); sharedStylesHost.addStyles(styles); this.contentAttr = shimContentAttribute(appId + '-' + component.id); this.hostAttr = shimHostAttribute(appId + '-' + component.id); } applyToHost(element) { super.setAttribute(element, this.hostAttr, ''); } createElement(parent, name) { const el = super.createElement(parent, name); super.setAttribute(el, this.contentAttr, ''); return el; } } class ShadowDomRenderer extends DefaultDomRenderer2 { constructor(eventManager, sharedStylesHost, hostEl, component) { super(eventManager); this.sharedStylesHost = sharedStylesHost; this.hostEl = hostEl; this.shadowRoot = hostEl.attachShadow({ mode: 'open' }); this.sharedStylesHost.addHost(this.shadowRoot); const styles = flattenStyles(component.id, component.styles, []); for (let i = 0; i < styles.length; i++) { const styleEl = document.createElement('style'); styleEl.textContent = styles[i]; this.shadowRoot.appendChild(styleEl); } } nodeOrShadowRoot(node) { return node === this.hostEl ? this.shadowRoot : node; } destroy() { this.sharedStylesHost.removeHost(this.shadowRoot); } appendChild(parent, newChild) { return super.appendChild(this.nodeOrShadowRoot(parent), newChild); } insertBefore(parent, newChild, refChild) { return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild); } removeChild(parent, oldChild) { return super.removeChild(this.nodeOrShadowRoot(parent), oldChild); } parentNode(node) { return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node))); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class DomEventsPlugin extends EventManagerPlugin { constructor(doc) { super(doc); } // This plugin should come last in the list of plugins, because it accepts all // events. supports(eventName) { return true; } addEventListener(element, eventName, handler) { element.addEventListener(eventName, handler, false); return () => this.removeEventListener(element, eventName, handler); } removeEventListener(target, eventName, callback) { return target.removeEventListener(eventName, callback); } } DomEventsPlugin.ɵfac = function DomEventsPlugin_Factory(t) { return new (t || DomEventsPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; DomEventsPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: DomEventsPlugin, factory: DomEventsPlugin.ɵfac }); DomEventsPlugin.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomEventsPlugin, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Supported HammerJS recognizer event names. */ const EVENT_NAMES = { // pan 'pan': true, 'panstart': true, 'panmove': true, 'panend': true, 'pancancel': true, 'panleft': true, 'panright': true, 'panup': true, 'pandown': true, // pinch 'pinch': true, 'pinchstart': true, 'pinchmove': true, 'pinchend': true, 'pinchcancel': true, 'pinchin': true, 'pinchout': true, // press 'press': true, 'pressup': true, // rotate 'rotate': true, 'rotatestart': true, 'rotatemove': true, 'rotateend': true, 'rotatecancel': true, // swipe 'swipe': true, 'swipeleft': true, 'swiperight': true, 'swipeup': true, 'swipedown': true, // tap 'tap': true, 'doubletap': true }; /** * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular. * @see `HammerGestureConfig` * * @ngModule HammerModule * @publicApi */ const HAMMER_GESTURE_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerGestureConfig'); /** * Injection token used to provide a {@link HammerLoader} to Angular. * * @publicApi */ const HAMMER_LOADER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('HammerLoader'); /** * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) * for gesture recognition. Configures specific event recognition. * @publicApi */ class HammerGestureConfig { constructor() { /** * A set of supported event names for gestures to be used in Angular. * Angular supports all built-in recognizers, as listed in * [HammerJS documentation](https://hammerjs.github.io/). */ this.events = []; /** * Maps gesture event names to a set of configuration options * that specify overrides to the default values for specific properties. * * The key is a supported event name to be configured, * and the options object contains a set of properties, with override values * to be applied to the named recognizer event. * For example, to disable recognition of the rotate event, specify * `{"rotate": {"enable": false}}`. * * Properties that are not present take the HammerJS default values. * For information about which properties are supported for which events, * and their allowed and default values, see * [HammerJS documentation](https://hammerjs.github.io/). * */ this.overrides = {}; } /** * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) * and attaches it to a given HTML element. * @param element The element that will recognize gestures. * @returns A HammerJS event-manager object. */ buildHammer(element) { const mc = new Hammer(element, this.options); mc.get('pinch').set({ enable: true }); mc.get('rotate').set({ enable: true }); for (const eventName in this.overrides) { mc.get(eventName).set(this.overrides[eventName]); } return mc; } } HammerGestureConfig.ɵfac = function HammerGestureConfig_Factory(t) { return new (t || HammerGestureConfig)(); }; HammerGestureConfig.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: HammerGestureConfig, factory: HammerGestureConfig.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerGestureConfig, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return []; }, null); })(); /** * Event plugin that adds Hammer support to an application. * * @ngModule HammerModule */ class HammerGesturesPlugin extends EventManagerPlugin { constructor(doc, _config, console, loader) { super(doc); this._config = _config; this.console = console; this.loader = loader; this._loaderPromise = null; } supports(eventName) { if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) { return false; } if (!window.Hammer && !this.loader) { if (typeof ngDevMode === 'undefined' || ngDevMode) { this.console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not ` + `loaded and no custom loader has been specified.`); } return false; } return true; } addEventListener(element, eventName, handler) { const zone = this.manager.getZone(); eventName = eventName.toLowerCase(); // If Hammer is not present but a loader is specified, we defer adding the event listener // until Hammer is loaded. if (!window.Hammer && this.loader) { this._loaderPromise = this._loaderPromise || this.loader(); // This `addEventListener` method returns a function to remove the added listener. // Until Hammer is loaded, the returned function needs to *cancel* the registration rather // than remove anything. let cancelRegistration = false; let deregister = () => { cancelRegistration = true; }; this._loaderPromise .then(() => { // If Hammer isn't actually loaded when the custom loader resolves, give up. if (!window.Hammer) { if (typeof ngDevMode === 'undefined' || ngDevMode) { this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`); } deregister = () => { }; return; } if (!cancelRegistration) { // Now that Hammer is loaded and the listener is being loaded for real, // the deregistration function changes from canceling registration to removal. deregister = this.addEventListener(element, eventName, handler); } }) .catch(() => { if (typeof ngDevMode === 'undefined' || ngDevMode) { this.console.warn(`The "${eventName}" event cannot be bound because the custom ` + `Hammer.JS loader failed.`); } deregister = () => { }; }); // Return a function that *executes* `deregister` (and not `deregister` itself) so that we // can change the behavior of `deregister` once the listener is added. Using a closure in // this way allows us to avoid any additional data structures to track listener removal. return () => { deregister(); }; } return zone.runOutsideAngular(() => { // Creating the manager bind events, must be done outside of angular const mc = this._config.buildHammer(element); const callback = function (eventObj) { zone.runGuarded(function () { handler(eventObj); }); }; mc.on(eventName, callback); return () => { mc.off(eventName, callback); // destroy mc to prevent memory leak if (typeof mc.destroy === 'function') { mc.destroy(); } }; }); } isCustomEvent(eventName) { return this._config.events.indexOf(eventName) > -1; } } HammerGesturesPlugin.ɵfac = function HammerGesturesPlugin_Factory(t) { return new (t || HammerGesturesPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](HAMMER_GESTURE_CONFIG), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](HAMMER_LOADER, 8)); }; HammerGesturesPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: HammerGesturesPlugin, factory: HammerGesturesPlugin.ɵfac }); HammerGesturesPlugin.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] }, { type: HammerGestureConfig, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_GESTURE_CONFIG,] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"] }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_LOADER,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerGesturesPlugin, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }, { type: HammerGestureConfig, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_GESTURE_CONFIG] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"] }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [HAMMER_LOADER] }] }]; }, null); })(); /** * In Ivy, support for Hammer gestures is optional, so applications must * import the `HammerModule` at root to turn on support. This means that * Hammer-specific code can be tree-shaken away if not needed. */ const HAMMER_PROVIDERS__POST_R3__ = []; /** * In View Engine, support for Hammer gestures is built-in by default. */ const HAMMER_PROVIDERS__PRE_R3__ = [ { provide: EVENT_MANAGER_PLUGINS, useClass: HammerGesturesPlugin, multi: true, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], HAMMER_GESTURE_CONFIG, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), HAMMER_LOADER]] }, { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] }, ]; const HAMMER_PROVIDERS = HAMMER_PROVIDERS__POST_R3__; /** * Adds support for HammerJS. * * Import this module at the root of your application so that Angular can work with * HammerJS to detect gesture events. * * Note that applications still need to include the HammerJS script itself. This module * simply sets up the coordination layer between HammerJS and Angular's EventManager. * * @publicApi */ class HammerModule { } HammerModule.ɵfac = function HammerModule_Factory(t) { return new (t || HammerModule)(); }; HammerModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: HammerModule }); HammerModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ providers: HAMMER_PROVIDERS__PRE_R3__ }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](HammerModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ providers: HAMMER_PROVIDERS__PRE_R3__ }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines supported modifiers for key events. */ const MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift']; const DOM_KEY_LOCATION_NUMPAD = 3; // Map to convert some key or keyIdentifier values to what will be returned by getEventKey const _keyMap = { // The following values are here for cross-browser compatibility and to match the W3C standard // cf https://www.w3.org/TR/DOM-Level-3-Events-key/ '\b': 'Backspace', '\t': 'Tab', '\x7F': 'Delete', '\x1B': 'Escape', 'Del': 'Delete', 'Esc': 'Escape', 'Left': 'ArrowLeft', 'Right': 'ArrowRight', 'Up': 'ArrowUp', 'Down': 'ArrowDown', 'Menu': 'ContextMenu', 'Scroll': 'ScrollLock', 'Win': 'OS' }; // There is a bug in Chrome for numeric keypad keys: // https://code.google.com/p/chromium/issues/detail?id=155654 // 1, 2, 3 ... are reported as A, B, C ... const _chromeNumKeyPadMap = { 'A': '1', 'B': '2', 'C': '3', 'D': '4', 'E': '5', 'F': '6', 'G': '7', 'H': '8', 'I': '9', 'J': '*', 'K': '+', 'M': '-', 'N': '.', 'O': '/', '\x60': '0', '\x90': 'NumLock' }; const ɵ0$3 = (event) => event.altKey, ɵ1 = (event) => event.ctrlKey, ɵ2 = (event) => event.metaKey, ɵ3 = (event) => event.shiftKey; /** * Retrieves modifiers from key-event objects. */ const MODIFIER_KEY_GETTERS = { 'alt': ɵ0$3, 'control': ɵ1, 'meta': ɵ2, 'shift': ɵ3 }; /** * @publicApi * A browser plug-in that provides support for handling of key events in Angular. */ class KeyEventsPlugin extends EventManagerPlugin { /** * Initializes an instance of the browser plug-in. * @param doc The document in which key events will be detected. */ constructor(doc) { super(doc); } /** * Reports whether a named key event is supported. * @param eventName The event name to query. * @return True if the named key event is supported. */ supports(eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; } /** * Registers a handler for a specific element and key event. * @param element The HTML element to receive event notifications. * @param eventName The name of the key event to listen for. * @param handler A function to call when the notification occurs. Receives the * event object as an argument. * @returns The key event that was registered. */ addEventListener(element, eventName, handler) { const parsedEvent = KeyEventsPlugin.parseEventName(eventName); const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone()); return this.manager.getZone().runOutsideAngular(() => { return Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().onAndCancel(element, parsedEvent['domEventName'], outsideHandler); }); } static parseEventName(eventName) { const parts = eventName.toLowerCase().split('.'); const domEventName = parts.shift(); if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) { return null; } const key = KeyEventsPlugin._normalizeKey(parts.pop()); let fullKey = ''; MODIFIER_KEYS.forEach(modifierName => { const index = parts.indexOf(modifierName); if (index > -1) { parts.splice(index, 1); fullKey += modifierName + '.'; } }); fullKey += key; if (parts.length != 0 || key.length === 0) { // returning null instead of throwing to let another plugin process the event return null; } // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming. // The code must remain in the `result['domEventName']` form. // return {domEventName, fullKey}; const result = {}; result['domEventName'] = domEventName; result['fullKey'] = fullKey; return result; } static getEventFullKey(event) { let fullKey = ''; let key = getEventKey(event); key = key.toLowerCase(); if (key === ' ') { key = 'space'; // for readability } else if (key === '.') { key = 'dot'; // because '.' is used as a separator in event names } MODIFIER_KEYS.forEach(modifierName => { if (modifierName != key) { const modifierGetter = MODIFIER_KEY_GETTERS[modifierName]; if (modifierGetter(event)) { fullKey += modifierName + '.'; } } }); fullKey += key; return fullKey; } /** * Configures a handler callback for a key event. * @param fullKey The event name that combines all simultaneous keystrokes. * @param handler The function that responds to the key event. * @param zone The zone in which the event occurred. * @returns A callback function. */ static eventCallback(fullKey, handler, zone) { return (event /** TODO #9100 */) => { if (KeyEventsPlugin.getEventFullKey(event) === fullKey) { zone.runGuarded(() => handler(event)); } }; } /** @internal */ static _normalizeKey(keyName) { // TODO: switch to a Map if the mapping grows too much switch (keyName) { case 'esc': return 'escape'; default: return keyName; } } } KeyEventsPlugin.ɵfac = function KeyEventsPlugin_Factory(t) { return new (t || KeyEventsPlugin)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; KeyEventsPlugin.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: KeyEventsPlugin, factory: KeyEventsPlugin.ɵfac }); KeyEventsPlugin.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](KeyEventsPlugin, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); function getEventKey(event) { let key = event.key; if (key == null) { key = event.keyIdentifier; // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and // Safari cf // https://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces if (key == null) { return 'Unidentified'; } if (key.startsWith('U+')) { key = String.fromCharCode(parseInt(key.substring(2), 16)); if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) { // There is a bug in Chrome for numeric keypad keys: // https://code.google.com/p/chromium/issues/detail?id=155654 // 1, 2, 3 ... are reported as A, B, C ... key = _chromeNumKeyPadMap[key]; } } } return _keyMap[key] || key; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing * values to be safe to use in the different DOM contexts. * * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on * the website. * * In specific situations, it might be necessary to disable sanitization, for example if the * application genuinely needs to produce a `javascript:` style link with a dynamic value in it. * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...` * methods, and then binding to that value from the template. * * These situations should be very rare, and extraordinary care must be taken to avoid creating a * Cross Site Scripting (XSS) security bug! * * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as * close as possible to the source of the value, to make it easy to verify no security bug is * created by its use. * * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous * code. The sanitizer leaves safe values intact. * * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in * sanitization for the value passed in. Carefully check and audit all values and code paths going * into this call. Make sure any user data is appropriately escaped for this security context. * For more detail, see the [Security Guide](https://g.co/ng/security). * * @publicApi */ class DomSanitizer { } DomSanitizer.ɵfac = function DomSanitizer_Factory(t) { return new (t || DomSanitizer)(); }; DomSanitizer.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: function DomSanitizer_Factory() { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(DomSanitizerImpl); }, token: DomSanitizer, providedIn: "root" }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSanitizer, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useExisting: Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["forwardRef"])(() => DomSanitizerImpl) }] }], null, null); })(); function domSanitizerImplFactory(injector) { return new DomSanitizerImpl(injector.get(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); } class DomSanitizerImpl extends DomSanitizer { constructor(_doc) { super(); this._doc = _doc; } sanitize(ctx, value) { if (value == null) return null; switch (ctx) { case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].NONE: return value; case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].HTML: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "HTML" /* Html */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeHtml"])(this._doc, String(value)).toString(); case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].STYLE: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "Style" /* Style */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } return value; case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].SCRIPT: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "Script" /* Script */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } throw new Error('unsafe value used in a script context'); case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].URL: const type = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵgetSanitizationBypassType"])(value); if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "URL" /* Url */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵ_sanitizeUrl"])(String(value)); case _angular_core__WEBPACK_IMPORTED_MODULE_1__["SecurityContext"].RESOURCE_URL: if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵallowSanitizationBypassAndThrow"])(value, "ResourceURL" /* ResourceUrl */)) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵunwrapSafeValue"])(value); } throw new Error('unsafe value used in a resource URL context (see https://g.co/ng/security#xss)'); default: throw new Error(`Unexpected SecurityContext ${ctx} (see https://g.co/ng/security#xss)`); } } bypassSecurityTrustHtml(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustHtml"])(value); } bypassSecurityTrustStyle(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustStyle"])(value); } bypassSecurityTrustScript(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustScript"])(value); } bypassSecurityTrustUrl(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustUrl"])(value); } bypassSecurityTrustResourceUrl(value) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵbypassSanitizationTrustResourceUrl"])(value); } } DomSanitizerImpl.ɵfac = function DomSanitizerImpl_Factory(t) { return new (t || DomSanitizerImpl)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; DomSanitizerImpl.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: function DomSanitizerImpl_Factory() { return domSanitizerImplFactory(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["INJECTOR"])); }, token: DomSanitizerImpl, providedIn: "root" }); DomSanitizerImpl.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DomSanitizerImpl, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function initDomAdapter() { BrowserDomAdapter.makeCurrent(); BrowserGetTestability.init(); } function errorHandler() { return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"](); } function _document() { // Tell ivy about the global document Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetDocument"])(document); return document; } const ɵ0$4 = _angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵPLATFORM_BROWSER_ID"]; const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"], useValue: ɵ0$4 }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_INITIALIZER"], useValue: initDomAdapter, multi: true }, { provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], useFactory: _document, deps: [] }, ]; const BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Sanitizer"], useExisting: DomSanitizer }, { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }, ]; const BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = []; /** * @security Replacing built-in sanitization providers exposes the application to XSS risks. * Attacker-controlled data introduced by an unsanitized provider could expose your * application to XSS risks. For more detail, see the [Security Guide](https://g.co/ng/security). * @publicApi */ const BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__POST_R3__; /** * A factory function that returns a `PlatformRef` instance associated with browser service * providers. * * @publicApi */ const platformBrowser = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["createPlatformFactory"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["platformCore"], 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS); const BROWSER_MODULE_PROVIDERS = [ BROWSER_SANITIZATION_PROVIDERS, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵINJECTOR_SCOPE"], useValue: 'root' }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ErrorHandler"], useFactory: errorHandler, deps: [] }, { provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["PLATFORM_ID"]] }, { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }, HAMMER_PROVIDERS, { provide: DomRendererFactory2, useClass: DomRendererFactory2, deps: [EventManager, DomSharedStylesHost, _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["RendererFactory2"], useExisting: DomRendererFactory2 }, { provide: SharedStylesHost, useExisting: DomSharedStylesHost }, { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Testability"], useClass: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Testability"], deps: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]] }, { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]] }, ELEMENT_PROBE_PROVIDERS, ]; /** * Exports required infrastructure for all Angular apps. * Included by default in all Angular apps created with the CLI * `new` command. * Re-exports `CommonModule` and `ApplicationModule`, making their * exports and providers available to all apps. * * @publicApi */ class BrowserModule { constructor(parentModule) { if (parentModule) { throw new Error(`BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`); } } /** * Configures a browser-based app to transition from a server-rendered app, if * one is present on the page. * * @param params An object containing an identifier for the app to transition. * The ID must match between the client and server versions of the app. * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`. */ static withServerTransition(params) { return { ngModule: BrowserModule, providers: [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"], useValue: params.appId }, { provide: TRANSITION_ID, useExisting: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"] }, SERVER_TRANSITION_PROVIDERS, ], }; } } BrowserModule.ɵfac = function BrowserModule_Factory(t) { return new (t || BrowserModule)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](BrowserModule, 12)); }; BrowserModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: BrowserModule }); BrowserModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ providers: BROWSER_MODULE_PROVIDERS, imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]] }); BrowserModule.ctorParameters = () => [ { type: BrowserModule, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [BrowserModule,] }] } ]; (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](BrowserModule, { exports: function () { return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]]; } }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](BrowserModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ providers: BROWSER_MODULE_PROVIDERS, exports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationModule"]] }] }], function () { return [{ type: BrowserModule, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [BrowserModule] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Factory to create a `Meta` service instance for the current DOM document. */ function createMeta() { return new Meta(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); } /** * A service for managing HTML `<meta>` tags. * * Properties of the `MetaDefinition` object match the attributes of the * HTML `<meta>` tag. These tags define document metadata that is important for * things like configuring a Content Security Policy, defining browser compatibility * and security settings, setting HTTP Headers, defining rich content for social sharing, * and Search Engine Optimization (SEO). * * To identify specific `<meta>` tags in a document, use an attribute selection * string in the format `"tag_attribute='value string'"`. * For example, an `attrSelector` value of `"name='description'"` matches a tag * whose `name` attribute has the value `"description"`. * Selectors are used with the `querySelector()` Document method, * in the format `meta[{attrSelector}]`. * * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta) * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector) * * * @publicApi */ class Meta { constructor(_doc) { this._doc = _doc; this._dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])(); } /** * Retrieves or creates a specific `<meta>` tag element in the current HTML document. * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute * values in the provided tag definition, and verifies that all other attribute values are equal. * If an existing element is found, it is returned and is not modified in any way. * @param tag The definition of a `<meta>` element to match or create. * @param forceCreation True to create a new element without checking whether one already exists. * @returns The existing element with the same attributes and values if found, * the new element if no match is found, or `null` if the tag parameter is not defined. */ addTag(tag, forceCreation = false) { if (!tag) return null; return this._getOrCreateElement(tag, forceCreation); } /** * Retrieves or creates a set of `<meta>` tag elements in the current HTML document. * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute * values in the provided tag definition, and verifies that all other attribute values are equal. * @param tags An array of tag definitions to match or create. * @param forceCreation True to create new elements without checking whether they already exist. * @returns The matching elements if found, or the new elements. */ addTags(tags, forceCreation = false) { if (!tags) return []; return tags.reduce((result, tag) => { if (tag) { result.push(this._getOrCreateElement(tag, forceCreation)); } return result; }, []); } /** * Retrieves a `<meta>` tag element in the current HTML document. * @param attrSelector The tag attribute and value to match against, in the format * `"tag_attribute='value string'"`. * @returns The matching element, if any. */ getTag(attrSelector) { if (!attrSelector) return null; return this._doc.querySelector(`meta[${attrSelector}]`) || null; } /** * Retrieves a set of `<meta>` tag elements in the current HTML document. * @param attrSelector The tag attribute and value to match against, in the format * `"tag_attribute='value string'"`. * @returns The matching elements, if any. */ getTags(attrSelector) { if (!attrSelector) return []; const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`); return list ? [].slice.call(list) : []; } /** * Modifies an existing `<meta>` tag element in the current HTML document. * @param tag The tag description with which to replace the existing tag content. * @param selector A tag attribute and value to match against, to identify * an existing tag. A string in the format `"tag_attribute=`value string`"`. * If not supplied, matches a tag with the same `name` or `property` attribute value as the * replacement tag. * @return The modified element. */ updateTag(tag, selector) { if (!tag) return null; selector = selector || this._parseSelector(tag); const meta = this.getTag(selector); if (meta) { return this._setMetaElementAttributes(tag, meta); } return this._getOrCreateElement(tag, true); } /** * Removes an existing `<meta>` tag element from the current HTML document. * @param attrSelector A tag attribute and value to match against, to identify * an existing tag. A string in the format `"tag_attribute=`value string`"`. */ removeTag(attrSelector) { this.removeTagElement(this.getTag(attrSelector)); } /** * Removes an existing `<meta>` tag element from the current HTML document. * @param meta The tag definition to match against to identify an existing tag. */ removeTagElement(meta) { if (meta) { this._dom.remove(meta); } } _getOrCreateElement(meta, forceCreation = false) { if (!forceCreation) { const selector = this._parseSelector(meta); const elem = this.getTag(selector); // It's allowed to have multiple elements with the same name so it's not enough to // just check that element with the same name already present on the page. We also need to // check if element has tag attributes if (elem && this._containsAttributes(meta, elem)) return elem; } const element = this._dom.createElement('meta'); this._setMetaElementAttributes(meta, element); const head = this._doc.getElementsByTagName('head')[0]; head.appendChild(element); return element; } _setMetaElementAttributes(tag, el) { Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop])); return el; } _parseSelector(tag) { const attr = tag.name ? 'name' : 'property'; return `${attr}="${tag[attr]}"`; } _containsAttributes(tag, elem) { return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]); } _getMetaKeyMap(prop) { return META_KEYS_MAP[prop] || prop; } } Meta.ɵfac = function Meta_Factory(t) { return new (t || Meta)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; Meta.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: createMeta, token: Meta, providedIn: "root" }); Meta.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Meta, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * Mapping for MetaDefinition properties with their correct meta attribute names */ const META_KEYS_MAP = { httpEquiv: 'http-equiv' }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Factory to create Title service. */ function createTitle() { return new Title(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"])(_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); } /** * A service that can be used to get and set the title of a current HTML document. * * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag) * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements * (representing the `<title>` tag). Instead, this service can be used to set and get the current * title value. * * @publicApi */ class Title { constructor(_doc) { this._doc = _doc; } /** * Get the title of the current HTML document. */ getTitle() { return this._doc.title; } /** * Set the title of the current HTML document. * @param newTitle */ setTitle(newTitle) { this._doc.title = newTitle || ''; } } Title.ɵfac = function Title_Factory(t) { return new (t || Title)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"])); }; Title.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"])({ factory: createTitle, token: Title, providedIn: "root" }); Title.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Title, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"], args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const win = typeof window !== 'undefined' && window || {}; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class ChangeDetectionPerfRecord { constructor(msPerTick, numTicks) { this.msPerTick = msPerTick; this.numTicks = numTicks; } } /** * Entry point for all Angular profiling-related debug tools. This object * corresponds to the `ng.profiler` in the dev console. */ class AngularProfiler { constructor(ref) { this.appRef = ref.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]); } // tslint:disable:no-console /** * Exercises change detection in a loop and then prints the average amount of * time in milliseconds how long a single round of change detection takes for * the current state of the UI. It runs a minimum of 5 rounds for a minimum * of 500 milliseconds. * * Optionally, a user may pass a `config` parameter containing a map of * options. Supported options are: * * `record` (boolean) - causes the profiler to record a CPU profile while * it exercises the change detector. Example: * * ``` * ng.profiler.timeChangeDetection({record: true}) * ``` */ timeChangeDetection(config) { const record = config && config['record']; const profileName = 'Change Detection'; // Profiler is not available in Android browsers without dev tools opened const isProfilerAvailable = win.console.profile != null; if (record && isProfilerAvailable) { win.console.profile(profileName); } const start = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow(); let numTicks = 0; while (numTicks < 5 || (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow() - start) < 500) { this.appRef.tick(); numTicks++; } const end = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().performanceNow(); if (record && isProfilerAvailable) { win.console.profileEnd(profileName); } const msPerTick = (end - start) / numTicks; win.console.log(`ran ${numTicks} change detection cycles`); win.console.log(`${msPerTick.toFixed(2)} ms per check`); return new ChangeDetectionPerfRecord(msPerTick, numTicks); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const PROFILER_GLOBAL_NAME = 'profiler'; /** * Enabled Angular debug tools that are accessible via your browser's * developer console. * * Usage: * * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j) * 1. Type `ng.` (usually the console will show auto-complete suggestion) * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()` * then hit Enter. * * @publicApi */ function enableDebugTools(ref) { exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref)); return ref; } /** * Disables Angular tools. * * @publicApi */ function disableDebugTools() { exportNgVar(PROFILER_GLOBAL_NAME, null); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function escapeHtml(text) { const escapedText = { '&': '&a;', '"': '&q;', '\'': '&s;', '<': '&l;', '>': '&g;', }; return text.replace(/[&"'<>]/g, s => escapedText[s]); } function unescapeHtml(text) { const unescapedText = { '&a;': '&', '&q;': '"', '&s;': '\'', '&l;': '<', '&g;': '>', }; return text.replace(/&[^;]+;/g, s => unescapedText[s]); } /** * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`. * * Example: * * ``` * const COUNTER_KEY = makeStateKey<number>('counter'); * let value = 10; * * transferState.set(COUNTER_KEY, value); * ``` * * @publicApi */ function makeStateKey(key) { return key; } /** * A key value store that is transferred from the application on the server side to the application * on the client side. * * `TransferState` will be available as an injectable token. To use it import * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client. * * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only * boolean, number, string, null and non-class objects will be serialized and deserialized in a * non-lossy manner. * * @publicApi */ class TransferState { constructor() { this.store = {}; this.onSerializeCallbacks = {}; } /** @internal */ static init(initState) { const transferState = new TransferState(); transferState.store = initState; return transferState; } /** * Get the value corresponding to a key. Return `defaultValue` if key is not found. */ get(key, defaultValue) { return this.store[key] !== undefined ? this.store[key] : defaultValue; } /** * Set the value corresponding to a key. */ set(key, value) { this.store[key] = value; } /** * Remove a key from the store. */ remove(key) { delete this.store[key]; } /** * Test whether a key exists in the store. */ hasKey(key) { return this.store.hasOwnProperty(key); } /** * Register a callback to provide the value for a key when `toJson` is called. */ onSerialize(key, callback) { this.onSerializeCallbacks[key] = callback; } /** * Serialize the current state of the store to JSON. */ toJson() { // Call the onSerialize callbacks and put those values into the store. for (const key in this.onSerializeCallbacks) { if (this.onSerializeCallbacks.hasOwnProperty(key)) { try { this.store[key] = this.onSerializeCallbacks[key](); } catch (e) { console.warn('Exception in onSerialize callback: ', e); } } } return JSON.stringify(this.store); } } TransferState.ɵfac = function TransferState_Factory(t) { return new (t || TransferState)(); }; TransferState.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: TransferState, factory: TransferState.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](TransferState, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return []; }, null); })(); function initTransferState(doc, appId) { // Locate the script tag with the JSON data transferred from the server. // The id of the script tag is set to the Angular appId + 'state'. const script = doc.getElementById(appId + '-state'); let initialState = {}; if (script && script.textContent) { try { // Avoid using any here as it triggers lint errors in google3 (any is not allowed). initialState = JSON.parse(unescapeHtml(script.textContent)); } catch (e) { console.warn('Exception while restoring TransferState for app ' + appId, e); } } return TransferState.init(initialState); } /** * NgModule to install on the client side while using the `TransferState` to transfer state from * server to client. * * @publicApi */ class BrowserTransferStateModule { } BrowserTransferStateModule.ɵfac = function BrowserTransferStateModule_Factory(t) { return new (t || BrowserTransferStateModule)(); }; BrowserTransferStateModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: BrowserTransferStateModule }); BrowserTransferStateModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ providers: [{ provide: TransferState, useFactory: initTransferState, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](BrowserTransferStateModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ providers: [{ provide: TransferState, useFactory: initTransferState, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_ID"]] }] }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Predicates for use with {@link DebugElement}'s query functions. * * @publicApi */ class By { /** * Match all nodes. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'} */ static all() { return () => true; } /** * Match elements by the given CSS selector. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'} */ static css(selector) { return (debugElement) => { return debugElement.nativeElement != null ? elementMatches(debugElement.nativeElement, selector) : false; }; } /** * Match nodes that have the given directive present. * * @usageNotes * ### Example * * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'} */ static directive(type) { return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1; } } function elementMatches(n, selector) { if (Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])().isElementNode(n)) { return n.matches && n.matches(selector) || n.msMatchesSelector && n.msMatchesSelector(selector) || n.webkitMatchesSelector && n.webkitMatchesSelector(selector); } return false; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=platform-browser.js.map /***/ }), /***/ "jqAh": /*!******************************************!*\ !*** ./node_modules/delaunator/index.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Delaunator; }); const EPSILON = Math.pow(2, -52); const EDGE_STACK = new Uint32Array(512); class Delaunator { static from(points, getX = defaultGetX, getY = defaultGetY) { const n = points.length; const coords = new Float64Array(n * 2); for (let i = 0; i < n; i++) { const p = points[i]; coords[2 * i] = getX(p); coords[2 * i + 1] = getY(p); } return new Delaunator(coords); } constructor(coords) { const n = coords.length >> 1; if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.'); this.coords = coords; // arrays that will store the triangulation graph const maxTriangles = Math.max(2 * n - 5, 0); this._triangles = new Uint32Array(maxTriangles * 3); this._halfedges = new Int32Array(maxTriangles * 3); // temporary arrays for tracking the edges of the advancing convex hull this._hashSize = Math.ceil(Math.sqrt(n)); this._hullPrev = new Uint32Array(n); // edge to prev edge this._hullNext = new Uint32Array(n); // edge to next edge this._hullTri = new Uint32Array(n); // edge to adjacent triangle this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash // temporary arrays for sorting points this._ids = new Uint32Array(n); this._dists = new Float64Array(n); this.update(); } update() { const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this; const n = coords.length >> 1; // populate an array of point indices; calculate input data bbox let minX = Infinity; let minY = Infinity; let maxX = -Infinity; let maxY = -Infinity; for (let i = 0; i < n; i++) { const x = coords[2 * i]; const y = coords[2 * i + 1]; if (x < minX) minX = x; if (y < minY) minY = y; if (x > maxX) maxX = x; if (y > maxY) maxY = y; this._ids[i] = i; } const cx = (minX + maxX) / 2; const cy = (minY + maxY) / 2; let minDist = Infinity; let i0, i1, i2; // pick a seed point close to the center for (let i = 0; i < n; i++) { const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]); if (d < minDist) { i0 = i; minDist = d; } } const i0x = coords[2 * i0]; const i0y = coords[2 * i0 + 1]; minDist = Infinity; // find the point closest to the seed for (let i = 0; i < n; i++) { if (i === i0) continue; const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]); if (d < minDist && d > 0) { i1 = i; minDist = d; } } let i1x = coords[2 * i1]; let i1y = coords[2 * i1 + 1]; let minRadius = Infinity; // find the third point which forms the smallest circumcircle with the first two for (let i = 0; i < n; i++) { if (i === i0 || i === i1) continue; const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]); if (r < minRadius) { i2 = i; minRadius = r; } } let i2x = coords[2 * i2]; let i2y = coords[2 * i2 + 1]; if (minRadius === Infinity) { // order collinear points by dx (or dy if all x are identical) // and return the list as a hull for (let i = 0; i < n; i++) { this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]); } quicksort(this._ids, this._dists, 0, n - 1); const hull = new Uint32Array(n); let j = 0; for (let i = 0, d0 = -Infinity; i < n; i++) { const id = this._ids[i]; if (this._dists[id] > d0) { hull[j++] = id; d0 = this._dists[id]; } } this.hull = hull.subarray(0, j); this.triangles = new Uint32Array(0); this.halfedges = new Uint32Array(0); return; } // swap the order of the seed points for counter-clockwise orientation if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) { const i = i1; const x = i1x; const y = i1y; i1 = i2; i1x = i2x; i1y = i2y; i2 = i; i2x = x; i2y = y; } const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); this._cx = center.x; this._cy = center.y; for (let i = 0; i < n; i++) { this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y); } // sort the points by distance from the seed triangle circumcenter quicksort(this._ids, this._dists, 0, n - 1); // set up the seed triangle as the starting hull this._hullStart = i0; let hullSize = 3; hullNext[i0] = hullPrev[i2] = i1; hullNext[i1] = hullPrev[i0] = i2; hullNext[i2] = hullPrev[i1] = i0; hullTri[i0] = 0; hullTri[i1] = 1; hullTri[i2] = 2; hullHash.fill(-1); hullHash[this._hashKey(i0x, i0y)] = i0; hullHash[this._hashKey(i1x, i1y)] = i1; hullHash[this._hashKey(i2x, i2y)] = i2; this.trianglesLen = 0; this._addTriangle(i0, i1, i2, -1, -1, -1); for (let k = 0, xp, yp; k < this._ids.length; k++) { const i = this._ids[k]; const x = coords[2 * i]; const y = coords[2 * i + 1]; // skip near-duplicate points if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue; xp = x; yp = y; // skip seed triangle points if (i === i0 || i === i1 || i === i2) continue; // find a visible edge on the convex hull using edge hash let start = 0; for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) { start = hullHash[(key + j) % this._hashSize]; if (start !== -1 && start !== hullNext[start]) break; } start = hullPrev[start]; let e = start, q; while (q = hullNext[e], !orient(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) { e = q; if (e === start) { e = -1; break; } } if (e === -1) continue; // likely a near-duplicate point; skip it // add the first triangle from the point let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]); // recursively flip triangles from the point until they satisfy the Delaunay condition hullTri[i] = this._legalize(t + 2); hullTri[e] = t; // keep track of boundary triangles on the hull hullSize++; // walk forward through the hull, adding more triangles and flipping recursively let n = hullNext[e]; while (q = hullNext[n], orient(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1])) { t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]); hullTri[i] = this._legalize(t + 2); hullNext[n] = n; // mark as removed hullSize--; n = q; } // walk backward from the other side, adding more triangles and flipping if (e === start) { while (q = hullPrev[e], orient(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) { t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]); this._legalize(t + 2); hullTri[q] = t; hullNext[e] = e; // mark as removed hullSize--; e = q; } } // update the hull indices this._hullStart = hullPrev[i] = e; hullNext[e] = hullPrev[n] = i; hullNext[i] = n; // save the two new edges in the hash table hullHash[this._hashKey(x, y)] = i; hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; } this.hull = new Uint32Array(hullSize); for (let i = 0, e = this._hullStart; i < hullSize; i++) { this.hull[i] = e; e = hullNext[e]; } // trim typed triangle mesh arrays this.triangles = this._triangles.subarray(0, this.trianglesLen); this.halfedges = this._halfedges.subarray(0, this.trianglesLen); } _hashKey(x, y) { return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; } _legalize(a) { const {_triangles: triangles, _halfedges: halfedges, coords} = this; let i = 0; let ar = 0; // recursion eliminated with a fixed-size stack while (true) { const b = halfedges[a]; /* if the pair of triangles doesn't satisfy the Delaunay condition * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, * then do the same check/flip recursively for the new pair of triangles * * pl pl * /||\ / \ * al/ || \bl al/ \a * / || \ / \ * / a||b \ flip /___ar___\ * p0\ || /p1 => p0\---bl---/p1 * \ || / \ / * ar\ || /br b\ /br * \||/ \ / * pr pr */ const a0 = a - a % 3; ar = a0 + (a + 2) % 3; if (b === -1) { // convex hull edge if (i === 0) break; a = EDGE_STACK[--i]; continue; } const b0 = b - b % 3; const al = a0 + (a + 1) % 3; const bl = b0 + (b + 2) % 3; const p0 = triangles[ar]; const pr = triangles[a]; const pl = triangles[al]; const p1 = triangles[bl]; const illegal = inCircle( coords[2 * p0], coords[2 * p0 + 1], coords[2 * pr], coords[2 * pr + 1], coords[2 * pl], coords[2 * pl + 1], coords[2 * p1], coords[2 * p1 + 1]); if (illegal) { triangles[a] = p1; triangles[b] = p0; const hbl = halfedges[bl]; // edge swapped on the other side of the hull (rare); fix the halfedge reference if (hbl === -1) { let e = this._hullStart; do { if (this._hullTri[e] === bl) { this._hullTri[e] = a; break; } e = this._hullPrev[e]; } while (e !== this._hullStart); } this._link(a, hbl); this._link(b, halfedges[ar]); this._link(ar, bl); const br = b0 + (b + 1) % 3; // don't worry about hitting the cap: it can only happen on extremely degenerate input if (i < EDGE_STACK.length) { EDGE_STACK[i++] = br; } } else { if (i === 0) break; a = EDGE_STACK[--i]; } } return ar; } _link(a, b) { this._halfedges[a] = b; if (b !== -1) this._halfedges[b] = a; } // add a new triangle given vertex indices and adjacent half-edge ids _addTriangle(i0, i1, i2, a, b, c) { const t = this.trianglesLen; this._triangles[t] = i0; this._triangles[t + 1] = i1; this._triangles[t + 2] = i2; this._link(t, a); this._link(t + 1, b); this._link(t + 2, c); this.trianglesLen += 3; return t; } } // monotonically increases with real angle, but doesn't need expensive trigonometry function pseudoAngle(dx, dy) { const p = dx / (Math.abs(dx) + Math.abs(dy)); return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] } function dist(ax, ay, bx, by) { const dx = ax - bx; const dy = ay - by; return dx * dx + dy * dy; } // return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check function orientIfSure(px, py, rx, ry, qx, qy) { const l = (ry - py) * (qx - px); const r = (rx - px) * (qy - py); return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0; } // a more robust orientation test that's stable in a given triangle (to fix robustness issues) function orient(rx, ry, qx, qy, px, py) { const sign = orientIfSure(px, py, rx, ry, qx, qy) || orientIfSure(rx, ry, qx, qy, px, py) || orientIfSure(qx, qy, px, py, rx, ry); return sign < 0; } function inCircle(ax, ay, bx, by, cx, cy, px, py) { const dx = ax - px; const dy = ay - py; const ex = bx - px; const ey = by - py; const fx = cx - px; const fy = cy - py; const ap = dx * dx + dy * dy; const bp = ex * ex + ey * ey; const cp = fx * fx + fy * fy; return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0; } function circumradius(ax, ay, bx, by, cx, cy) { const dx = bx - ax; const dy = by - ay; const ex = cx - ax; const ey = cy - ay; const bl = dx * dx + dy * dy; const cl = ex * ex + ey * ey; const d = 0.5 / (dx * ey - dy * ex); const x = (ey * bl - dy * cl) * d; const y = (dx * cl - ex * bl) * d; return x * x + y * y; } function circumcenter(ax, ay, bx, by, cx, cy) { const dx = bx - ax; const dy = by - ay; const ex = cx - ax; const ey = cy - ay; const bl = dx * dx + dy * dy; const cl = ex * ex + ey * ey; const d = 0.5 / (dx * ey - dy * ex); const x = ax + (ey * bl - dy * cl) * d; const y = ay + (dx * cl - ex * bl) * d; return {x, y}; } function quicksort(ids, dists, left, right) { if (right - left <= 20) { for (let i = left + 1; i <= right; i++) { const temp = ids[i]; const tempDist = dists[temp]; let j = i - 1; while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--]; ids[j + 1] = temp; } } else { const median = (left + right) >> 1; let i = left + 1; let j = right; swap(ids, median, i); if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right); if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right); if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i); const temp = ids[i]; const tempDist = dists[temp]; while (true) { do i++; while (dists[ids[i]] < tempDist); do j--; while (dists[ids[j]] > tempDist); if (j < i) break; swap(ids, i, j); } ids[left + 1] = ids[j]; ids[j] = temp; if (right - i + 1 >= j - left) { quicksort(ids, dists, i, right); quicksort(ids, dists, left, j - 1); } else { quicksort(ids, dists, left, j - 1); quicksort(ids, dists, i, right); } } } function swap(arr, i, j) { const tmp = arr[i]; arr[i] = arr[j]; arr[j] = tmp; } function defaultGetX(p) { return p[0]; } function defaultGetY(p) { return p[1]; } /***/ }), /***/ "jtHE": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/ReplaySubject.js ***! \**************************************************************/ /*! exports provided: ReplaySubject */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "XNiG"); /* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scheduler/queue */ "qgXg"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Subscription */ "quSY"); /* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./operators/observeOn */ "pxpQ"); /* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ "9ppp"); /* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SubjectSubscription */ "Ylt2"); class ReplaySubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"] { constructor(bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, scheduler) { super(); this.scheduler = scheduler; this._events = []; this._infiniteTimeWindow = false; this._bufferSize = bufferSize < 1 ? 1 : bufferSize; this._windowTime = windowTime < 1 ? 1 : windowTime; if (windowTime === Number.POSITIVE_INFINITY) { this._infiniteTimeWindow = true; this.next = this.nextInfiniteTimeWindow; } else { this.next = this.nextTimeWindow; } } nextInfiniteTimeWindow(value) { if (!this.isStopped) { const _events = this._events; _events.push(value); if (_events.length > this._bufferSize) { _events.shift(); } } super.next(value); } nextTimeWindow(value) { if (!this.isStopped) { this._events.push(new ReplayEvent(this._getNow(), value)); this._trimBufferThenGetEvents(); } super.next(value); } _subscribe(subscriber) { const _infiniteTimeWindow = this._infiniteTimeWindow; const _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents(); const scheduler = this.scheduler; const len = _events.length; let subscription; if (this.closed) { throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"](); } else if (this.isStopped || this.hasError) { subscription = _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY; } else { this.observers.push(subscriber); subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber); } if (scheduler) { subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_3__["ObserveOnSubscriber"](subscriber, scheduler)); } if (_infiniteTimeWindow) { for (let i = 0; i < len && !subscriber.closed; i++) { subscriber.next(_events[i]); } } else { for (let i = 0; i < len && !subscriber.closed; i++) { subscriber.next(_events[i].value); } } if (this.hasError) { subscriber.error(this.thrownError); } else if (this.isStopped) { subscriber.complete(); } return subscription; } _getNow() { return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_1__["queue"]).now(); } _trimBufferThenGetEvents() { const now = this._getNow(); const _bufferSize = this._bufferSize; const _windowTime = this._windowTime; const _events = this._events; const eventsCount = _events.length; let spliceCount = 0; while (spliceCount < eventsCount) { if ((now - _events[spliceCount].time) < _windowTime) { break; } spliceCount++; } if (eventsCount > _bufferSize) { spliceCount = Math.max(spliceCount, eventsCount - _bufferSize); } if (spliceCount > 0) { _events.splice(0, spliceCount); } return _events; } } class ReplayEvent { constructor(time, value) { this.time = time; this.value = value; } } //# sourceMappingURL=ReplaySubject.js.map /***/ }), /***/ "kF1t": /*!**********************************************!*\ !*** ./node_modules/d3-axis/src/identity.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x; }); /***/ }), /***/ "kJWO": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/symbol/observable.js ***! \******************************************************************/ /*! exports provided: observable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; }); const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')(); //# sourceMappingURL=observable.js.map /***/ }), /***/ "kO9b": /*!***************************************************!*\ !*** ./node_modules/d3-interpolate/src/string.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ "4xfg"); var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, reB = new RegExp(reA.source, "g"); function zero(b) { return function() { return b; }; } function one(b) { return function(t) { return b(t) + ""; }; } /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b am, // current match in a bm, // current match in b bs, // string preceding current number in b, if any i = -1, // index in s s = [], // string constants and placeholders q = []; // number interpolators // Coerce inputs to strings. a = a + "", b = b + ""; // Interpolate pairs of numbers in a & b. while ((am = reA.exec(a)) && (bm = reB.exec(b))) { if ((bs = bm.index) > bi) { // a string precedes the next number in b bs = b.slice(bi, bs); if (s[i]) s[i] += bs; // coalesce with previous string else s[++i] = bs; } if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match if (s[i]) s[i] += bm; // coalesce with previous string else s[++i] = bm; } else { // interpolate non-matching numbers s[++i] = null; q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(am, bm)}); } bi = reB.lastIndex; } // Add remains of b. if (bi < b.length) { bs = b.slice(bi); if (s[i]) s[i] += bs; // coalesce with previous string else s[++i] = bs; } // Special optimization for only a single match. // Otherwise, interpolate each of the numbers and rejoin the string. return s.length < 2 ? (q[0] ? one(q[0].x) : zero(b)) : (b = q.length, function(t) { for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); return s.join(""); }); }); /***/ }), /***/ "kU1M": /*!*******************************************************!*\ !*** ./node_modules/rxjs/_esm2015/operators/index.js ***! \*******************************************************/ /*! exports provided: audit, auditTime, buffer, bufferCount, bufferTime, bufferToggle, bufferWhen, catchError, combineAll, combineLatest, concat, concatAll, concatMap, concatMapTo, count, debounce, debounceTime, defaultIfEmpty, delay, delayWhen, dematerialize, distinct, distinctUntilChanged, distinctUntilKeyChanged, elementAt, endWith, every, exhaust, exhaustMap, expand, filter, finalize, find, findIndex, first, groupBy, ignoreElements, isEmpty, last, map, mapTo, materialize, max, merge, mergeAll, mergeMap, flatMap, mergeMapTo, mergeScan, min, multicast, observeOn, onErrorResumeNext, pairwise, partition, pluck, publish, publishBehavior, publishLast, publishReplay, race, reduce, repeat, repeatWhen, retry, retryWhen, refCount, sample, sampleTime, scan, sequenceEqual, share, shareReplay, single, skip, skipLast, skipUntil, skipWhile, startWith, subscribeOn, switchAll, switchMap, switchMapTo, take, takeLast, takeUntil, takeWhile, tap, throttle, throttleTime, throwIfEmpty, timeInterval, timeout, timeoutWith, timestamp, toArray, window, windowCount, windowTime, windowToggle, windowWhen, withLatestFrom, zip, zipAll */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/operators/audit */ "tnsW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; }); /* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/operators/auditTime */ "3UWI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; }); /* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../internal/operators/buffer */ "p9/F"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; }); /* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/operators/bufferCount */ "9M8c"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; }); /* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/operators/bufferTime */ "OsX3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; }); /* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/operators/bufferToggle */ "FD9M"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; }); /* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/operators/bufferWhen */ "PfrF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; }); /* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../internal/operators/catchError */ "JIr8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; }); /* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../internal/operators/combineAll */ "7wxJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; }); /* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../internal/operators/combineLatest */ "fFD9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; }); /* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../internal/operators/concat */ "f29J"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; }); /* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../internal/operators/concatAll */ "0EUg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; }); /* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../internal/operators/concatMap */ "bOdf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; }); /* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../internal/operators/concatMapTo */ "q7zd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; }); /* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../internal/operators/count */ "HrJb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; }); /* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../internal/operators/debounce */ "6eBy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; }); /* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../internal/operators/debounceTime */ "Kj3r"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; }); /* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../internal/operators/defaultIfEmpty */ "xbPD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; }); /* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../internal/operators/delay */ "3E0/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; }); /* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../internal/operators/delayWhen */ "coGc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; }); /* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../internal/operators/dematerialize */ "kgNN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; }); /* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../internal/operators/distinct */ "02Lk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; }); /* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../internal/operators/distinctUntilChanged */ "/uUt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; }); /* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../internal/operators/distinctUntilKeyChanged */ "PZkE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; }); /* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../internal/operators/elementAt */ "9ihq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; }); /* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../internal/operators/endWith */ "0Pi8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; }); /* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../internal/operators/every */ "Gi4w"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; }); /* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../internal/operators/exhaust */ "zt7V"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; }); /* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../internal/operators/exhaustMap */ "XqQ8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; }); /* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../internal/operators/expand */ "FQpF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; }); /* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../internal/operators/filter */ "pLZG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; }); /* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../internal/operators/finalize */ "nYR2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; }); /* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../internal/operators/find */ "cBqT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; }); /* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../internal/operators/findIndex */ "K7De"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; }); /* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../internal/operators/first */ "SxV6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; }); /* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../internal/operators/groupBy */ "OQgR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; }); /* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../internal/operators/ignoreElements */ "4A3s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; }); /* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../internal/operators/isEmpty */ "m2j4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; }); /* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../internal/operators/last */ "NJ9Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; }); /* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../internal/operators/map */ "lJxs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; }); /* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../internal/operators/mapTo */ "CqXF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; }); /* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../internal/operators/materialize */ "dkDA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; }); /* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../internal/operators/max */ "yI9Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; }); /* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../internal/operators/merge */ "q92s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; }); /* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../internal/operators/mergeAll */ "bHdf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; }); /* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../internal/operators/mergeMap */ "5+tZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["flatMap"]; }); /* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../internal/operators/mergeMapTo */ "UXbc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; }); /* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../internal/operators/mergeScan */ "51Bx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; }); /* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../internal/operators/min */ "FZB8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; }); /* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../internal/operators/multicast */ "oB13"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; }); /* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../internal/operators/observeOn */ "pxpQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; }); /* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../internal/operators/onErrorResumeNext */ "uTdr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; }); /* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../internal/operators/pairwise */ "Zy1z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; }); /* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../internal/operators/partition */ "A3iJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; }); /* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../internal/operators/pluck */ "wO+i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; }); /* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../internal/operators/publish */ "NfdI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; }); /* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../internal/operators/publishBehavior */ "UGaM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; }); /* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../internal/operators/publishLast */ "qZ0a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; }); /* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../internal/operators/publishReplay */ "05l1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; }); /* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../internal/operators/race */ "4f8F"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; }); /* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../internal/operators/reduce */ "128B"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; }); /* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../internal/operators/repeat */ "/d8p"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; }); /* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../internal/operators/repeatWhen */ "Gqsl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; }); /* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../internal/operators/retry */ "un/a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; }); /* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../internal/operators/retryWhen */ "MtjB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; }); /* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../internal/operators/refCount */ "x+ZX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; }); /* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../internal/operators/sample */ "c6ID"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; }); /* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../internal/operators/sampleTime */ "1Ykd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; }); /* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../internal/operators/scan */ "Kqap"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; }); /* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../internal/operators/sequenceEqual */ "Zyez"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; }); /* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../internal/operators/share */ "w1tV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; }); /* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../internal/operators/shareReplay */ "UXun"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; }); /* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../internal/operators/single */ "cx9U"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; }); /* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../internal/operators/skip */ "zP0r"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; }); /* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../internal/operators/skipLast */ "kagm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; }); /* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../internal/operators/skipUntil */ "vqkR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; }); /* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../internal/operators/skipWhile */ "32Ea"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; }); /* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../internal/operators/startWith */ "JX91"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; }); /* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../internal/operators/subscribeOn */ "tf+s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; }); /* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../internal/operators/switchAll */ "Y6wi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; }); /* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../internal/operators/switchMap */ "eIep"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; }); /* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ../internal/operators/switchMapTo */ "aGrj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; }); /* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ../internal/operators/take */ "IzEk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; }); /* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ../internal/operators/takeLast */ "BFxc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; }); /* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ../internal/operators/takeUntil */ "1G5W"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; }); /* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ../internal/operators/takeWhile */ "GJmQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; }); /* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ../internal/operators/tap */ "vkgz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; }); /* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ../internal/operators/throttle */ "yuhW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; }); /* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ../internal/operators/throttleTime */ "gcYM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; }); /* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ../internal/operators/throwIfEmpty */ "XDbj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; }); /* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ../internal/operators/timeInterval */ "4hIw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; }); /* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ../internal/operators/timeout */ "tS1D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; }); /* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ../internal/operators/timeoutWith */ "syX2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; }); /* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ../internal/operators/timestamp */ "r0WS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; }); /* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ../internal/operators/toArray */ "IAdc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; }); /* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ../internal/operators/window */ "mk5/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; }); /* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ../internal/operators/windowCount */ "lpKW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; }); /* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ../internal/operators/windowTime */ "UHp3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; }); /* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ../internal/operators/windowToggle */ "sTY7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; }); /* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ../internal/operators/windowWhen */ "pXlZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; }); /* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ../internal/operators/withLatestFrom */ "zp1y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; }); /* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ../internal/operators/zip */ "GjHo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; }); /* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ../internal/operators/zipAll */ "JmF6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; }); //# sourceMappingURL=index.js.map /***/ }), /***/ "kVCJ": /*!*********************************************!*\ !*** ./node_modules/d3-shape/src/symbol.js ***! \*********************************************/ /*! exports provided: symbols, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return symbols; }); /* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "83xM"); /* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ "GvAG"); /* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ "oKyY"); /* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ "ms7Z"); /* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ "CAOx"); /* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ "1afE"); /* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ "rkAg"); /* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ "xJQu"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ "2K37"); var symbols = [ _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"], _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__["default"], _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__["default"], _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__["default"], _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__["default"], _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__["default"], _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__["default"] ]; /* harmony default export */ __webpack_exports__["default"] = (function(type, size) { var context = null; type = typeof type === "function" ? type : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(type || _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"]); size = typeof size === "function" ? size : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(size === undefined ? 64 : +size); function symbol() { var buffer; if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); type.apply(this, arguments).draw(context, +size.apply(this, arguments)); if (buffer) return context = null, buffer + "" || null; } symbol.type = function(_) { return arguments.length ? (type = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_), symbol) : type; }; symbol.size = function(_) { return arguments.length ? (size = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(+_), symbol) : size; }; symbol.context = function(_) { return arguments.length ? (context = _ == null ? null : _, symbol) : context; }; return symbol; }); /***/ }), /***/ "kagm": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skipLast.js ***! \*******************************************************************/ /*! exports provided: skipLast */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/ArgumentOutOfRangeError */ "4I5i"); function skipLast(count) { return (source) => source.lift(new SkipLastOperator(count)); } class SkipLastOperator { constructor(_skipCount) { this._skipCount = _skipCount; if (this._skipCount < 0) { throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_1__["ArgumentOutOfRangeError"]; } } call(subscriber, source) { if (this._skipCount === 0) { return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](subscriber)); } else { return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount)); } } } class SkipLastSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, _skipCount) { super(destination); this._skipCount = _skipCount; this._count = 0; this._ring = new Array(_skipCount); } _next(value) { const skipCount = this._skipCount; const count = this._count++; if (count < skipCount) { this._ring[count] = value; } else { const currentIndex = count % skipCount; const ring = this._ring; const oldValue = ring[currentIndex]; ring[currentIndex] = value; this.destination.next(oldValue); } } } //# sourceMappingURL=skipLast.js.map /***/ }), /***/ "kds9": /*!**************************************************!*\ !*** ./node_modules/d3-format/src/formatTrim.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. /* harmony default export */ __webpack_exports__["default"] = (function(s) { out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { switch (s[i]) { case ".": i0 = i1 = i; break; case "0": if (i0 === 0) i0 = i; i1 = i; break; default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break; } } return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; }); /***/ }), /***/ "kgNN": /*!************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/dematerialize.js ***! \************************************************************************/ /*! exports provided: dematerialize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function dematerialize() { return function dematerializeOperatorFunction(source) { return source.lift(new DeMaterializeOperator()); }; } class DeMaterializeOperator { call(subscriber, source) { return source.subscribe(new DeMaterializeSubscriber(subscriber)); } } class DeMaterializeSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); } _next(value) { value.observe(this.destination); } } //# sourceMappingURL=dematerialize.js.map /***/ }), /***/ "kgU0": /*!*******************************************!*\ !*** ./node_modules/d3-fetch/src/blob.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseBlob(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); return response.blob(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseBlob); }); /***/ }), /***/ "l5mm": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/interval.js ***! \********************************************************************/ /*! exports provided: interval */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isNumeric */ "Y7HM"); function interval(period = 0, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]) { if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) { period = 0; } if (!scheduler || typeof scheduler.schedule !== 'function') { scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"]; } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { subscriber.add(scheduler.schedule(dispatch, period, { subscriber, counter: 0, period })); return subscriber; }); } function dispatch(state) { const { subscriber, counter, period } = state; subscriber.next(counter); this.schedule({ subscriber, counter: counter + 1, period }, period); } //# sourceMappingURL=interval.js.map /***/ }), /***/ "l7GE": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/OuterSubscriber.js ***! \****************************************************************/ /*! exports provided: OuterSubscriber */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); class OuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) { this.destination.next(innerValue); } notifyError(error, innerSub) { this.destination.error(error); } notifyComplete(innerSub) { this.destination.complete(); } } //# sourceMappingURL=OuterSubscriber.js.map /***/ }), /***/ "lExN": /*!**********************************************!*\ !*** ./node_modules/d3-zoom/src/constant.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "lJxs": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/map.js ***! \**************************************************************/ /*! exports provided: map, MapOperator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function map(project, thisArg) { return function mapOperation(source) { if (typeof project !== 'function') { throw new TypeError('argument is not a function. Are you looking for `mapTo()`?'); } return source.lift(new MapOperator(project, thisArg)); }; } class MapOperator { constructor(project, thisArg) { this.project = project; this.thisArg = thisArg; } call(subscriber, source) { return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg)); } } class MapSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, project, thisArg) { super(destination); this.project = project; this.count = 0; this.thisArg = thisArg || this; } _next(value) { let result; try { result = this.project.call(this.thisArg, value, this.count++); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } //# sourceMappingURL=map.js.map /***/ }), /***/ "lgMH": /*!*******************************************!*\ !*** ./node_modules/d3-time/src/month.js ***! \*******************************************/ /*! exports provided: default, months */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "months", function() { return months; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setDate(1); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setMonth(date.getMonth() + step); }, function(start, end) { return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; }, function(date) { return date.getMonth(); }); /* harmony default export */ __webpack_exports__["default"] = (month); var months = month.range; /***/ }), /***/ "lhfN": /*!*******************************************!*\ !*** ./node_modules/d3-zoom/src/event.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ZoomEvent; }); function ZoomEvent(type, { sourceEvent, target, transform, dispatch }) { Object.defineProperties(this, { type: {value: type, enumerable: true, configurable: true}, sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, target: {value: target, enumerable: true, configurable: true}, transform: {value: transform, enumerable: true, configurable: true}, _: {value: dispatch} }); } /***/ }), /***/ "lpKW": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowCount.js ***! \**********************************************************************/ /*! exports provided: windowCount */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subject */ "XNiG"); function windowCount(windowSize, startWindowEvery = 0) { return function windowCountOperatorFunction(source) { return source.lift(new WindowCountOperator(windowSize, startWindowEvery)); }; } class WindowCountOperator { constructor(windowSize, startWindowEvery) { this.windowSize = windowSize; this.startWindowEvery = startWindowEvery; } call(subscriber, source) { return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery)); } } class WindowCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, windowSize, startWindowEvery) { super(destination); this.destination = destination; this.windowSize = windowSize; this.startWindowEvery = startWindowEvery; this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]()]; this.count = 0; destination.next(this.windows[0]); } _next(value) { const startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize; const destination = this.destination; const windowSize = this.windowSize; const windows = this.windows; const len = windows.length; for (let i = 0; i < len && !this.closed; i++) { windows[i].next(value); } const c = this.count - windowSize + 1; if (c >= 0 && c % startWindowEvery === 0 && !this.closed) { windows.shift().complete(); } if (++this.count % startWindowEvery === 0 && !this.closed) { const window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"](); windows.push(window); destination.next(window); } } _error(err) { const windows = this.windows; if (windows) { while (windows.length > 0 && !this.closed) { windows.shift().error(err); } } this.destination.error(err); } _complete() { const windows = this.windows; if (windows) { while (windows.length > 0 && !this.closed) { windows.shift().complete(); } } this.destination.complete(); } _unsubscribe() { this.count = 0; this.windows = null; } } //# sourceMappingURL=windowCount.js.map /***/ }), /***/ "luAU": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/node.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { var node = group[i]; if (node) return node; } } return null; }); /***/ }), /***/ "m+hS": /*!*******************************************!*\ !*** ./node_modules/d3-random/src/int.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomInt(source) { function randomInt(min, max) { if (arguments.length < 2) max = min, min = 0; min = Math.floor(min); max = Math.floor(max) - min; return function() { return Math.floor(source() * max + min); }; } randomInt.source = sourceRandomInt; return randomInt; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "m2j4": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/isEmpty.js ***! \******************************************************************/ /*! exports provided: isEmpty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function isEmpty() { return (source) => source.lift(new IsEmptyOperator()); } class IsEmptyOperator { call(observer, source) { return source.subscribe(new IsEmptySubscriber(observer)); } } class IsEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination) { super(destination); } notifyComplete(isEmpty) { const destination = this.destination; destination.next(isEmpty); destination.complete(); } _next(value) { this.notifyComplete(false); } _complete() { this.notifyComplete(true); } } //# sourceMappingURL=isEmpty.js.map /***/ }), /***/ "m7tx": /*!*******************************************!*\ !*** ./node_modules/d3-quadtree/src/x.js ***! \*******************************************/ /*! exports provided: defaultX, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultX", function() { return defaultX; }); function defaultX(d) { return d[0]; } /* harmony default export */ __webpack_exports__["default"] = (function(_) { return arguments.length ? (this._x = _, this) : this._x; }); /***/ }), /***/ "mCNh": /*!**********************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/pipe.js ***! \**********************************************************/ /*! exports provided: pipe, pipeFromArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; }); /* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity */ "SpAZ"); function pipe(...fns) { return pipeFromArray(fns); } function pipeFromArray(fns) { if (fns.length === 0) { return _identity__WEBPACK_IMPORTED_MODULE_0__["identity"]; } if (fns.length === 1) { return fns[0]; } return function piped(input) { return fns.reduce((prev, fn) => fn(prev), input); }; } //# sourceMappingURL=pipe.js.map /***/ }), /***/ "mHFb": /*!***************************************************!*\ !*** ./node_modules/d3-format/src/formatGroup.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(grouping, thousands) { return function(value, width) { var i = value.length, t = [], j = 0, g = grouping[0], length = 0; while (i > 0 && g > 0) { if (length + g + 1 > width) g = Math.max(1, width - length); t.push(value.substring(i -= g, i + g)); if ((length += g + 1) > width) break; g = grouping[j = (j + 1) % grouping.length]; } return t.reverse().join(thousands); }; }); /***/ }), /***/ "mJZf": /*!*******************************************!*\ !*** ./node_modules/d3-chord/src/math.js ***! \*******************************************/ /*! exports provided: abs, cos, sin, pi, halfPi, tau, max, epsilon */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); var abs = Math.abs; var cos = Math.cos; var sin = Math.sin; var pi = Math.PI; var halfPi = pi / 2; var tau = pi * 2; var max = Math.max; var epsilon = 1e-12; /***/ }), /***/ "mKzq": /*!**********************************************************!*\ !*** ./node_modules/d3-transition/src/transition/end.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function() { var on0, on1, that = this, id = that._id, size = that.size(); return new Promise(function(resolve, reject) { var cancel = {value: reject}, end = {value: function() { if (--size === 0) resolve(); }}; that.each(function() { var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), on = schedule.on; // If this node shared a dispatch with the previous node, // just assign the updated shared dispatch and we’re done! // Otherwise, copy-on-write. if (on !== on0) { on1 = (on0 = on).copy(); on1._.cancel.push(cancel); on1._.interrupt.push(cancel); on1._.end.push(end); } schedule.on = on1; }); // The selection was empty, resolve end immediately if (size === 0) resolve(); }); }); /***/ }), /***/ "mLZp": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e5f5f999d8c92ca25f", "edf8fbb2e2e266c2a4238b45", "edf8fbb2e2e266c2a42ca25f006d2c", "edf8fbccece699d8c966c2a42ca25f006d2c", "edf8fbccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "mLep": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/path/string.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathString; }); function PathString() { this._string = []; } PathString.prototype = { _radius: 4.5, _circle: circle(4.5), pointRadius: function(_) { if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; return this; }, polygonStart: function() { this._line = 0; }, polygonEnd: function() { this._line = NaN; }, lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._line === 0) this._string.push("Z"); this._point = NaN; }, point: function(x, y) { switch (this._point) { case 0: { this._string.push("M", x, ",", y); this._point = 1; break; } case 1: { this._string.push("L", x, ",", y); break; } default: { if (this._circle == null) this._circle = circle(this._radius); this._string.push("M", x, ",", y, this._circle); break; } } }, result: function() { if (this._string.length) { var result = this._string.join(""); this._string = []; return result; } else { return null; } } }; function circle(radius) { return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z"; } /***/ }), /***/ "mPOO": /*!*****************************************!*\ !*** ./node_modules/d3-geo/src/noop.js ***! \*****************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return noop; }); function noop() {} /***/ }), /***/ "mcvr": /*!**********************************************!*\ !*** ./node_modules/d3-contour/src/array.js ***! \**********************************************/ /*! exports provided: slice */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); var array = Array.prototype; var slice = array.slice; /***/ }), /***/ "mfBI": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/find.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { let index = -1; for (const node of this) { if (callback.call(that, node, ++index, this)) { return node; } } }); /***/ }), /***/ "mk5/": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/window.js ***! \*****************************************************************/ /*! exports provided: window */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function window(windowBoundaries) { return function windowOperatorFunction(source) { return source.lift(new WindowOperator(windowBoundaries)); }; } class WindowOperator { constructor(windowBoundaries) { this.windowBoundaries = windowBoundaries; } call(subscriber, source) { const windowSubscriber = new WindowSubscriber(subscriber); const sourceSubscription = source.subscribe(windowSubscriber); if (!sourceSubscription.closed) { windowSubscriber.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["innerSubscribe"])(this.windowBoundaries, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleInnerSubscriber"](windowSubscriber))); } return sourceSubscription; } } class WindowSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_1__["SimpleOuterSubscriber"] { constructor(destination) { super(destination); this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); destination.next(this.window); } notifyNext() { this.openWindow(); } notifyError(error) { this._error(error); } notifyComplete() { this._complete(); } _next(value) { this.window.next(value); } _error(err) { this.window.error(err); this.destination.error(err); } _complete() { this.window.complete(); this.destination.complete(); } _unsubscribe() { this.window = null; } openWindow() { const prevWindow = this.window; if (prevWindow) { prevWindow.complete(); } const destination = this.destination; const newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); destination.next(newWindow); } } //# sourceMappingURL=window.js.map /***/ }), /***/ "mlxB": /*!************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isDate.js ***! \************************************************************/ /*! exports provided: isDate */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; }); function isDate(value) { return value instanceof Date && !isNaN(+value); } //# sourceMappingURL=isDate.js.map /***/ }), /***/ "mrS5": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/size.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { let size = 0; for (const node of this) ++size; // eslint-disable-line no-unused-vars return size; }); /***/ }), /***/ "mrVq": /*!******************************************!*\ !*** ./node_modules/d3-array/src/min.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return min; }); function min(values, valueof) { let min; if (valueof === undefined) { for (const value of values) { if (value != null && (min > value || (min === undefined && value >= value))) { min = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (min > value || (min === undefined && value >= value))) { min = value; } } } return min; } /***/ }), /***/ "ms7Z": /*!*****************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/diamond.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var tan30 = Math.sqrt(1 / 3), tan30_2 = tan30 * 2; /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var y = Math.sqrt(size / tan30_2), x = y * tan30; context.moveTo(0, -y); context.lineTo(x, 0); context.lineTo(0, y); context.lineTo(-x, 0); context.closePath(); } }); /***/ }), /***/ "muaG": /*!********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/basisClosed.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "0K5P"); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "jICm"); function BasisClosed(context) { this._context = context; } BasisClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineStart: function() { this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 1: { this._context.moveTo(this._x2, this._y2); this._context.closePath(); break; } case 2: { this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); this._context.closePath(); break; } case 3: { this.point(this._x2, this._y2); this.point(this._x3, this._y3); this.point(this._x4, this._y4); break; } } }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; this._x2 = x, this._y2 = y; break; case 1: this._point = 2; this._x3 = x, this._y3 = y; break; case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new BasisClosed(context); }); /***/ }), /***/ "mwYI": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/nodes.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return Array.from(this); }); /***/ }), /***/ "n+Lp": /*!*********************************************!*\ !*** ./node_modules/d3-polygon/src/area.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon) { var i = -1, n = polygon.length, a, b = polygon[n - 1], area = 0; while (++i < n) { a = b; b = polygon[i]; area += a[1] * b[0] - a[0] * b[1]; } return area / 2; }); /***/ }), /***/ "n0hd": /*!******************************************!*\ !*** ./node_modules/d3-scale/src/log.js ***! \******************************************/ /*! exports provided: loggish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loggish", function() { return loggish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return log; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "rWgG"); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nice.js */ "bcaG"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function transformLog(x) { return Math.log(x); } function transformExp(x) { return Math.exp(x); } function transformLogn(x) { return -Math.log(-x); } function transformExpn(x) { return -Math.exp(-x); } function pow10(x) { return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; } function powp(base) { return base === 10 ? pow10 : base === Math.E ? Math.exp : function(x) { return Math.pow(base, x); }; } function logp(base) { return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function(x) { return Math.log(x) / base; }); } function reflect(f) { return function(x) { return -f(-x); }; } function loggish(transform) { var scale = transform(transformLog, transformExp), domain = scale.domain, base = 10, logs, pows; function rescale() { logs = logp(base), pows = powp(base); if (domain()[0] < 0) { logs = reflect(logs), pows = reflect(pows); transform(transformLogn, transformExpn); } else { transform(transformLog, transformExp); } return scale; } scale.base = function(_) { return arguments.length ? (base = +_, rescale()) : base; }; scale.domain = function(_) { return arguments.length ? (domain(_), rescale()) : domain(); }; scale.ticks = function(count) { var d = domain(), u = d[0], v = d[d.length - 1], r; if (r = v < u) i = u, u = v, v = i; var i = logs(u), j = logs(v), p, k, t, n = count == null ? 10 : +count, z = []; if (!(base % 1) && j - i < n) { i = Math.floor(i), j = Math.ceil(j); if (u > 0) for (; i <= j; ++i) { for (k = 1, p = pows(i); k < base; ++k) { t = p * k; if (t < u) continue; if (t > v) break; z.push(t); } } else for (; i <= j; ++i) { for (k = base - 1, p = pows(i); k >= 1; --k) { t = p * k; if (t < u) continue; if (t > v) break; z.push(t); } } if (z.length * 2 < n) z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(u, v, n); } else { z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(i, j, Math.min(j - i, n)).map(pows); } return r ? z.reverse() : z; }; scale.tickFormat = function(count, specifier) { if (specifier == null) specifier = base === 10 ? ".0e" : ","; if (typeof specifier !== "function") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); if (count === Infinity) return specifier; if (count == null) count = 10; var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? return function(d) { var i = d / pows(Math.round(logs(d))); if (i * base < base - 0.5) i *= base; return i <= k ? specifier(d) : ""; }; }; scale.nice = function() { return domain(Object(_nice_js__WEBPACK_IMPORTED_MODULE_2__["default"])(domain(), { floor: function(x) { return pows(Math.floor(logs(x))); }, ceil: function(x) { return pows(Math.ceil(logs(x))); } })); }; return scale; } function log() { var scale = loggish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["transformer"])()).domain([1, 10]); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_3__["copy"])(scale, log()).base(scale.base()); }; _init_js__WEBPACK_IMPORTED_MODULE_4__["initRange"].apply(scale, arguments); return scale; } /***/ }), /***/ "n6bG": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isFunction.js ***! \****************************************************************/ /*! exports provided: isFunction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; }); function isFunction(x) { return typeof x === 'function'; } //# sourceMappingURL=isFunction.js.map /***/ }), /***/ "n8A4": /*!******************************************!*\ !*** ./node_modules/d3-geo/src/index.js ***! \******************************************/ /*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "PSPu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds.js */ "fjNz"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return _bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./centroid.js */ "p5SD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle.js */ "vNJl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./clip/antimeridian.js */ "9ZWv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./clip/circle.js */ "PQSO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clip/extent.js */ "5/wc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clip/rectangle.js */ "F2eR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contains.js */ "Hd9g"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./distance.js */ "rgrl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return _distance_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _graticule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./graticule.js */ "rdqn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["graticule10"]; }); /* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interpolate.js */ "prbS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return _interpolate_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./length.js */ "zz/+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _path_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./path/index.js */ "vHEj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return _path_index_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./projection/albers.js */ "iQWy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./projection/albersUsa.js */ "aj5g"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./projection/azimuthalEqualArea.js */ "P6wR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["azimuthalEqualAreaRaw"]; }); /* harmony import */ var _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./projection/azimuthalEquidistant.js */ "Cuxv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["azimuthalEquidistantRaw"]; }); /* harmony import */ var _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./projection/conicConformal.js */ "4jfb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["conicConformalRaw"]; }); /* harmony import */ var _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./projection/conicEqualArea.js */ "nVu6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["conicEqualAreaRaw"]; }); /* harmony import */ var _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./projection/conicEquidistant.js */ "yWPb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["conicEquidistantRaw"]; }); /* harmony import */ var _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./projection/equalEarth.js */ "+WWN"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["equalEarthRaw"]; }); /* harmony import */ var _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./projection/equirectangular.js */ "VXJj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["equirectangularRaw"]; }); /* harmony import */ var _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./projection/gnomonic.js */ "wKaL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["gnomonicRaw"]; }); /* harmony import */ var _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./projection/identity.js */ "bUA0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _projection_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./projection/index.js */ "1ibS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["projectionMutator"]; }); /* harmony import */ var _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./projection/mercator.js */ "LZ5Q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["mercatorRaw"]; }); /* harmony import */ var _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./projection/naturalEarth1.js */ "8nOX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["naturalEarth1Raw"]; }); /* harmony import */ var _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./projection/orthographic.js */ "LP84"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["orthographicRaw"]; }); /* harmony import */ var _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./projection/stereographic.js */ "aR9J"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["stereographicRaw"]; }); /* harmony import */ var _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./projection/transverseMercator.js */ "Y4Tn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["transverseMercatorRaw"]; }); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./rotation.js */ "cwsO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return _rotation_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stream.js */ "tepu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return _stream_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./transform.js */ "t9E6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); // DEPRECATED! Use d3.geoIdentity().clipExtent(…). /***/ }), /***/ "nVu6": /*!**************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conicEqualArea.js ***! \**************************************************************/ /*! exports provided: conicEqualAreaRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEqualAreaRaw", function() { return conicEqualAreaRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "bN2o"); /* harmony import */ var _cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea.js */ "vAb3"); function conicEqualAreaRaw(y0, y1) { var sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), n = (sy0 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1)) / 2; // Are the parallels symmetrical around the Equator? if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return Object(_cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["cylindricalEqualAreaRaw"])(y0); var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c) / n; function project(x, y) { var r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c - 2 * n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)) / n; return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x *= n), r0 - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x)]; } project.invert = function(x, y) { var r0y = r0 - y, l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(r0y)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(r0y); if (r0y * n < 0) l -= _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(r0y); return [l / n, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))]; }; return project; } /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEqualAreaRaw) .scale(155.424) .center([0, 33.6442]); }); /***/ }), /***/ "nWpo": /*!*******************************************!*\ !*** ./node_modules/d3-fetch/src/json.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function responseJson(response) { if (!response.ok) throw new Error(response.status + " " + response.statusText); if (response.status === 204 || response.status === 205) return; return response.json(); } /* harmony default export */ __webpack_exports__["default"] = (function(input, init) { return fetch(input, init).then(responseJson); }); /***/ }), /***/ "nXVj": /*!***********************************************!*\ !*** ./node_modules/d3-force/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "nYR2": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/finalize.js ***! \*******************************************************************/ /*! exports provided: finalize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); function finalize(callback) { return (source) => source.lift(new FinallyOperator(callback)); } class FinallyOperator { constructor(callback) { this.callback = callback; } call(subscriber, source) { return source.subscribe(new FinallySubscriber(subscriber, this.callback)); } } class FinallySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, callback) { super(destination); this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](callback)); } } //# sourceMappingURL=finalize.js.map /***/ }), /***/ "ngJS": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToArray.js ***! \**********************************************************************/ /*! exports provided: subscribeToArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; }); const subscribeToArray = (array) => (subscriber) => { for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) { subscriber.next(array[i]); } subscriber.complete(); }; //# sourceMappingURL=subscribeToArray.js.map /***/ }), /***/ "njJa": /*!**************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback, that) { var node = this, nodes = [node], next = [], children, i, n, index = -1; while (node = nodes.pop()) { next.push(node); if (children = node.children) { for (i = 0, n = children.length; i < n; ++i) { nodes.push(children[i]); } } } while (node = next.pop()) { callback.call(that, node, ++index, this); } return this; }); /***/ }), /***/ "oAyw": /*!*************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/iterator.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function*() { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { if (node = group[i]) yield node; } } }); /***/ }), /***/ "oB13": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/multicast.js ***! \********************************************************************/ /*! exports provided: multicast, MulticastOperator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; }); /* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/ConnectableObservable */ "EQ5u"); function multicast(subjectOrSubjectFactory, selector) { return function multicastOperatorFunction(source) { let subjectFactory; if (typeof subjectOrSubjectFactory === 'function') { subjectFactory = subjectOrSubjectFactory; } else { subjectFactory = function subjectFactory() { return subjectOrSubjectFactory; }; } if (typeof selector === 'function') { return source.lift(new MulticastOperator(subjectFactory, selector)); } const connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]); connectable.source = source; connectable.subjectFactory = subjectFactory; return connectable; }; } class MulticastOperator { constructor(subjectFactory, selector) { this.subjectFactory = subjectFactory; this.selector = selector; } call(subscriber, source) { const { selector } = this; const subject = this.subjectFactory(); const subscription = selector(subject).subscribe(subscriber); subscription.add(source.subscribe(subject)); return subscription; } } //# sourceMappingURL=multicast.js.map /***/ }), /***/ "oKyY": /*!***************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/cross.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size / 5) / 2; context.moveTo(-3 * r, -r); context.lineTo(-r, -r); context.lineTo(-r, -3 * r); context.lineTo(r, -3 * r); context.lineTo(r, -r); context.lineTo(3 * r, -r); context.lineTo(3 * r, r); context.lineTo(r, r); context.lineTo(r, 3 * r); context.lineTo(-r, 3 * r); context.lineTo(-r, r); context.lineTo(-3 * r, r); context.closePath(); } }); /***/ }), /***/ "oMw+": /*!*****************************************************!*\ !*** ./node_modules/d3-time-format/src/isoParse.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ "v7Le"); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ "TCOF"); function parseIsoNative(string) { var date = new Date(string); return isNaN(date) ? null : date; } var parseIso = +new Date("2000-01-01T00:00:00.000Z") ? parseIsoNative : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__["utcParse"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__["isoSpecifier"]); /* harmony default export */ __webpack_exports__["default"] = (parseIso); /***/ }), /***/ "oUm1": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/order.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { if (node = group[i]) { if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); next = node; } } } return this; }); /***/ }), /***/ "oVo9": /*!******************************************!*\ !*** ./node_modules/d3-time/src/year.js ***! \******************************************/ /*! exports provided: default, years */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "years", function() { return years; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); var year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setMonth(0, 1); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setFullYear(date.getFullYear() + step); }, function(start, end) { return end.getFullYear() - start.getFullYear(); }, function(date) { return date.getFullYear(); }); // An optimized implementation for this simple case. year.every = function(k) { return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setFullYear(Math.floor(date.getFullYear() / k) * k); date.setMonth(0, 1); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setFullYear(date.getFullYear() + step * k); }); }; /* harmony default export */ __webpack_exports__["default"] = (year); var years = year.range; /***/ }), /***/ "oZiN": /*!**********************************************!*\ !*** ./node_modules/d3-brush/src/noevent.js ***! \**********************************************/ /*! exports provided: nopropagation, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; }); function nopropagation(event) { event.stopImmediatePropagation(); } /* harmony default export */ __webpack_exports__["default"] = (function(event) { event.preventDefault(); event.stopImmediatePropagation(); }); /***/ }), /***/ "oetV": /*!******************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/index.js ***! \******************************************************/ /*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ "qWhX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ "h2xr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ "JMsZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ "w5vR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ "qyUX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ "skVX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ "1jur"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ "gbBL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ "C33F"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ "xkTb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ "SxqP"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["scheme"]; }); /* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ "sn8G"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["scheme"]; }); /* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ "VMG8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["scheme"]; }); /* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ "AHz+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["scheme"]; }); /* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ "Yn3m"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["scheme"]; }); /* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ "LSUK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["scheme"]; }); /* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ "w6Z2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["scheme"]; }); /* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ "sore"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["scheme"]; }); /* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ "CKiT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["scheme"]; }); /* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ "mLZp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["scheme"]; }); /* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ "Y3EW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["scheme"]; }); /* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ "8F7Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["scheme"]; }); /* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ "yUst"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["scheme"]; }); /* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ "DHg+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["scheme"]; }); /* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ "uQ0a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["scheme"]; }); /* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ "eW2m"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["scheme"]; }); /* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ "Yij6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["scheme"]; }); /* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ "E//B"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["scheme"]; }); /* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ "2YwT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["scheme"]; }); /* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ "2kEi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["scheme"]; }); /* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ "jTaA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["scheme"]; }); /* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ "h9r8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["scheme"]; }); /* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ "vL4l"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["scheme"]; }); /* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ "qKhr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["scheme"]; }); /* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ "RBWq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["scheme"]; }); /* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ "50A1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["scheme"]; }); /* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ "rO+Z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["scheme"]; }); /* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ "XTjh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ "XfOf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ "X7xT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["warm"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["cool"]; }); /* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ "BvdE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ "wQ3i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ "Spa3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["magma"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["inferno"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["plasma"]; }); /***/ }), /***/ "ofXK": /*!**********************************************************************!*\ !*** ./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js ***! \**********************************************************************/ /*! exports provided: APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, registerLocaleData, ɵBrowserPlatformLocation, ɵDomAdapter, ɵNullViewportScroller, ɵPLATFORM_BROWSER_ID, ɵPLATFORM_SERVER_ID, ɵPLATFORM_WORKER_APP_ID, ɵPLATFORM_WORKER_UI_ID, ɵangular_packages_common_common_a, ɵangular_packages_common_common_b, ɵangular_packages_common_common_c, ɵangular_packages_common_common_d, ɵangular_packages_common_common_e, ɵangular_packages_common_common_f, ɵgetDOM, ɵparseCookieValue, ɵsetRootDomAdapter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_BASE_HREF", function() { return APP_BASE_HREF; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncPipe", function() { return AsyncPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CommonModule", function() { return CommonModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CurrencyPipe", function() { return CurrencyPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOCUMENT", function() { return DOCUMENT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DatePipe", function() { return DatePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DecimalPipe", function() { return DecimalPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormStyle", function() { return FormStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatWidth", function() { return FormatWidth; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HashLocationStrategy", function() { return HashLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I18nPluralPipe", function() { return I18nPluralPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I18nSelectPipe", function() { return I18nSelectPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonPipe", function() { return JsonPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KeyValuePipe", function() { return KeyValuePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOCATION_INITIALIZED", function() { return LOCATION_INITIALIZED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationStrategy", function() { return LocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LowerCasePipe", function() { return LowerCasePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgClass", function() { return NgClass; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgComponentOutlet", function() { return NgComponentOutlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgForOf", function() { return NgForOf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgForOfContext", function() { return NgForOfContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgIf", function() { return NgIf; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgIfContext", function() { return NgIfContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgLocaleLocalization", function() { return NgLocaleLocalization; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgLocalization", function() { return NgLocalization; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgPlural", function() { return NgPlural; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgPluralCase", function() { return NgPluralCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgStyle", function() { return NgStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitch", function() { return NgSwitch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitchCase", function() { return NgSwitchCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgSwitchDefault", function() { return NgSwitchDefault; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NgTemplateOutlet", function() { return NgTemplateOutlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberFormatStyle", function() { return NumberFormatStyle; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberSymbol", function() { return NumberSymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PathLocationStrategy", function() { return PathLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PercentPipe", function() { return PercentPipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlatformLocation", function() { return PlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Plural", function() { return Plural; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlicePipe", function() { return SlicePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TitleCasePipe", function() { return TitleCasePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TranslationWidth", function() { return TranslationWidth; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UpperCasePipe", function() { return UpperCasePipe; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewportScroller", function() { return ViewportScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WeekDay", function() { return WeekDay; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatCurrency", function() { return formatCurrency; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatNumber", function() { return formatNumber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPercent", function() { return formatPercent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrencySymbol", function() { return getCurrencySymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencyCode", function() { return getLocaleCurrencyCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencyName", function() { return getLocaleCurrencyName; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleCurrencySymbol", function() { return getLocaleCurrencySymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDateFormat", function() { return getLocaleDateFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDateTimeFormat", function() { return getLocaleDateTimeFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDayNames", function() { return getLocaleDayNames; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDayPeriods", function() { return getLocaleDayPeriods; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleDirection", function() { return getLocaleDirection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleEraNames", function() { return getLocaleEraNames; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriodRules", function() { return getLocaleExtraDayPeriodRules; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleExtraDayPeriods", function() { return getLocaleExtraDayPeriods; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleFirstDayOfWeek", function() { return getLocaleFirstDayOfWeek; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleId", function() { return getLocaleId; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleMonthNames", function() { return getLocaleMonthNames; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleNumberFormat", function() { return getLocaleNumberFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleNumberSymbol", function() { return getLocaleNumberSymbol; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocalePluralCase", function() { return getLocalePluralCase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleTimeFormat", function() { return getLocaleTimeFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocaleWeekEndRange", function() { return getLocaleWeekEndRange; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNumberOfCurrencyDigits", function() { return getNumberOfCurrencyDigits; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformBrowser", function() { return isPlatformBrowser; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformServer", function() { return isPlatformServer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformWorkerApp", function() { return isPlatformWorkerApp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPlatformWorkerUi", function() { return isPlatformWorkerUi; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerLocaleData", function() { return registerLocaleData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵBrowserPlatformLocation", function() { return BrowserPlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵDomAdapter", function() { return DomAdapter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵNullViewportScroller", function() { return NullViewportScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_BROWSER_ID", function() { return PLATFORM_BROWSER_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_SERVER_ID", function() { return PLATFORM_SERVER_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_APP_ID", function() { return PLATFORM_WORKER_APP_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵPLATFORM_WORKER_UI_ID", function() { return PLATFORM_WORKER_UI_ID; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_a", function() { return useBrowserPlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_b", function() { return createBrowserPlatformLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_c", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_d", function() { return provideLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_e", function() { return COMMON_DIRECTIVES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_common_f", function() { return COMMON_PIPES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵgetDOM", function() { return getDOM; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵparseCookieValue", function() { return parseCookieValue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵsetRootDomAdapter", function() { return setRootDomAdapter; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ let _DOM = null; function getDOM() { return _DOM; } function setDOM(adapter) { _DOM = adapter; } function setRootDomAdapter(adapter) { if (!_DOM) { _DOM = adapter; } } /* tslint:disable:requireParameterType */ /** * Provides DOM operations in an environment-agnostic way. * * @security Tread carefully! Interacting with the DOM directly is dangerous and * can introduce XSS risks. */ class DomAdapter { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A DI Token representing the main rendering context. In a browser this is the DOM Document. * * Note: Document might not be available in the Application Context when Application and Rendering * Contexts are not the same (e.g. when running the application in a Web Worker). * * @publicApi */ const DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('DocumentToken'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This class should not be used directly by an application developer. Instead, use * {@link Location}. * * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be * platform-agnostic. * This means that we can have different implementation of `PlatformLocation` for the different * platforms that Angular supports. For example, `@angular/platform-browser` provides an * implementation specific to the browser environment, while `@angular/platform-server` provides * one suitable for use with server-side rendering. * * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy} * when they need to interact with the DOM APIs like pushState, popState, etc. * * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly * by the {@link Router} in order to navigate between routes. Since all interactions between {@link * Router} / * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation` * class, they are all platform-agnostic. * * @publicApi */ class PlatformLocation { } PlatformLocation.ɵfac = function PlatformLocation_Factory(t) { return new (t || PlatformLocation)(); }; PlatformLocation.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: useBrowserPlatformLocation, token: PlatformLocation, providedIn: "platform" }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PlatformLocation, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'platform', // See #23917 useFactory: useBrowserPlatformLocation }] }], null, null); })(); function useBrowserPlatformLocation() { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(BrowserPlatformLocation); } /** * @description * Indicates when a location is initialized. * * @publicApi */ const LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('Location Initialized'); /** * `PlatformLocation` encapsulates all of the direct calls to platform APIs. * This class should not be used directly by an application developer. Instead, use * {@link Location}. */ class BrowserPlatformLocation extends PlatformLocation { constructor(_doc) { super(); this._doc = _doc; this._init(); } // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it /** @internal */ _init() { this.location = getDOM().getLocation(); this._history = getDOM().getHistory(); } getBaseHrefFromDOM() { return getDOM().getBaseHref(this._doc); } onPopState(fn) { getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false); } onHashChange(fn) { getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false); } get href() { return this.location.href; } get protocol() { return this.location.protocol; } get hostname() { return this.location.hostname; } get port() { return this.location.port; } get pathname() { return this.location.pathname; } get search() { return this.location.search; } get hash() { return this.location.hash; } set pathname(newPath) { this.location.pathname = newPath; } pushState(state, title, url) { if (supportsState()) { this._history.pushState(state, title, url); } else { this.location.hash = url; } } replaceState(state, title, url) { if (supportsState()) { this._history.replaceState(state, title, url); } else { this.location.hash = url; } } forward() { this._history.forward(); } back() { this._history.back(); } getState() { return this._history.state; } } BrowserPlatformLocation.ɵfac = function BrowserPlatformLocation_Factory(t) { return new (t || BrowserPlatformLocation)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](DOCUMENT)); }; BrowserPlatformLocation.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: createBrowserPlatformLocation, token: BrowserPlatformLocation, providedIn: "platform" }); BrowserPlatformLocation.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [DOCUMENT,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserPlatformLocation, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'platform', // See #23917 useFactory: createBrowserPlatformLocation }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [DOCUMENT] }] }]; }, null); })(); function supportsState() { return !!window.history.pushState; } function createBrowserPlatformLocation() { return new BrowserPlatformLocation(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Joins two parts of a URL with a slash if needed. * * @param start URL string * @param end URL string * * * @returns The joined URL string. */ function joinWithSlash(start, end) { if (start.length == 0) { return end; } if (end.length == 0) { return start; } let slashes = 0; if (start.endsWith('/')) { slashes++; } if (end.startsWith('/')) { slashes++; } if (slashes == 2) { return start + end.substring(1); } if (slashes == 1) { return start + end; } return start + '/' + end; } /** * Removes a trailing slash from a URL string if needed. * Looks for the first occurrence of either `#`, `?`, or the end of the * line as `/` characters and removes the trailing slash if one exists. * * @param url URL string. * * @returns The URL string, modified if needed. */ function stripTrailingSlash(url) { const match = url.match(/#|\?|$/); const pathEndIdx = match && match.index || url.length; const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0); return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx); } /** * Normalizes URL parameters by prepending with `?` if needed. * * @param params String of URL parameters. * * @returns The normalized URL parameters string. */ function normalizeQueryParams(params) { return params && params[0] !== '?' ? '?' + params : params; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Enables the `Location` service to read route state from the browser's URL. * Angular provides two strategies: * `HashLocationStrategy` and `PathLocationStrategy`. * * Applications should use the `Router` or `Location` services to * interact with application route state. * * For instance, `HashLocationStrategy` produces URLs like * <code class="no-auto-link">http://example.com#/foo</code>, * and `PathLocationStrategy` produces * <code class="no-auto-link">http://example.com/foo</code> as an equivalent URL. * * See these two classes for more. * * @publicApi */ class LocationStrategy { } LocationStrategy.ɵfac = function LocationStrategy_Factory(t) { return new (t || LocationStrategy)(); }; LocationStrategy.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: provideLocationStrategy, token: LocationStrategy, providedIn: "root" }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LocationStrategy, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root', useFactory: provideLocationStrategy }] }], null, null); })(); function provideLocationStrategy(platformLocation) { // See #23917 const location = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT).location; return new PathLocationStrategy(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(PlatformLocation), location && location.origin || ''); } /** * A predefined [DI token](guide/glossary#di-token) for the base href * to be used with the `PathLocationStrategy`. * The base href is the URL prefix that should be preserved when generating * and recognizing URLs. * * @usageNotes * * The following example shows how to use this token to configure the root app injector * with a base href value, so that the DI framework can supply the dependency anywhere in the app. * * ```typescript * import {Component, NgModule} from '@angular/core'; * import {APP_BASE_HREF} from '@angular/common'; * * @NgModule({ * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}] * }) * class AppModule {} * ``` * * @publicApi */ const APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('appBaseHref'); /** * @description * A {@link LocationStrategy} used to configure the {@link Location} service to * represent its state in the * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the * browser's URL. * * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF} * or add a `<base href>` element to the document. * * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call * `location.go('/foo')`, the browser's URL will become * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly, * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`. * * Similarly, if you add `<base href='/my/app/'/>` to the document and call * `location.go('/foo')`, the browser's URL will become * `example.com/my/app/foo`. * * Note that when using `PathLocationStrategy`, neither the query nor * the fragment in the `<base href>` will be preserved, as outlined * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2). * * @usageNotes * * ### Example * * {@example common/location/ts/path_location_component.ts region='LocationComponent'} * * @publicApi */ class PathLocationStrategy extends LocationStrategy { constructor(_platformLocation, href) { super(); this._platformLocation = _platformLocation; if (href == null) { href = this._platformLocation.getBaseHrefFromDOM(); } if (href == null) { throw new Error(`No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.`); } this._baseHref = href; } onPopState(fn) { this._platformLocation.onPopState(fn); this._platformLocation.onHashChange(fn); } getBaseHref() { return this._baseHref; } prepareExternalUrl(internal) { return joinWithSlash(this._baseHref, internal); } path(includeHash = false) { const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search); const hash = this._platformLocation.hash; return hash && includeHash ? `${pathname}${hash}` : pathname; } pushState(state, title, url, queryParams) { const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams)); this._platformLocation.pushState(state, title, externalUrl); } replaceState(state, title, url, queryParams) { const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams)); this._platformLocation.replaceState(state, title, externalUrl); } forward() { this._platformLocation.forward(); } back() { this._platformLocation.back(); } } PathLocationStrategy.ɵfac = function PathLocationStrategy_Factory(t) { return new (t || PathLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8)); }; PathLocationStrategy.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: PathLocationStrategy, factory: PathLocationStrategy.ɵfac }); PathLocationStrategy.ctorParameters = () => [ { type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PathLocationStrategy, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * A {@link LocationStrategy} used to configure the {@link Location} service to * represent its state in the * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) * of the browser's URL. * * For instance, if you call `location.go('/foo')`, the browser's URL will become * `example.com#/foo`. * * @usageNotes * * ### Example * * {@example common/location/ts/hash_location_component.ts region='LocationComponent'} * * @publicApi */ class HashLocationStrategy extends LocationStrategy { constructor(_platformLocation, _baseHref) { super(); this._platformLocation = _platformLocation; this._baseHref = ''; if (_baseHref != null) { this._baseHref = _baseHref; } } onPopState(fn) { this._platformLocation.onPopState(fn); this._platformLocation.onHashChange(fn); } getBaseHref() { return this._baseHref; } path(includeHash = false) { // the hash value is always prefixed with a `#` // and if it is empty then it will stay empty let path = this._platformLocation.hash; if (path == null) path = '#'; return path.length > 0 ? path.substring(1) : path; } prepareExternalUrl(internal) { const url = joinWithSlash(this._baseHref, internal); return url.length > 0 ? ('#' + url) : url; } pushState(state, title, path, queryParams) { let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)); if (url.length == 0) { url = this._platformLocation.pathname; } this._platformLocation.pushState(state, title, url); } replaceState(state, title, path, queryParams) { let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)); if (url.length == 0) { url = this._platformLocation.pathname; } this._platformLocation.replaceState(state, title, url); } forward() { this._platformLocation.forward(); } back() { this._platformLocation.back(); } } HashLocationStrategy.ɵfac = function HashLocationStrategy_Factory(t) { return new (t || HashLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8)); }; HashLocationStrategy.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HashLocationStrategy, factory: HashLocationStrategy.ɵfac }); HashLocationStrategy.ctorParameters = () => [ { type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HashLocationStrategy, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [APP_BASE_HREF] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * A service that applications can use to interact with a browser's URL. * * Depending on the `LocationStrategy` used, `Location` persists * to the URL's path or the URL's hash segment. * * @usageNotes * * It's better to use the `Router#navigate` service to trigger route changes. Use * `Location` only if you need to interact with or create normalized URLs outside of * routing. * * `Location` is responsible for normalizing the URL against the application's base href. * A normalized URL is absolute from the URL host, includes the application's base href, and has no * trailing slash: * - `/my/app/user/123` is normalized * - `my/app/user/123` **is not** normalized * - `/my/app/user/123/` **is not** normalized * * ### Example * * <code-example path='common/location/ts/path_location_component.ts' * region='LocationComponent'></code-example> * * @publicApi */ class Location { constructor(platformStrategy, platformLocation) { /** @internal */ this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"](); /** @internal */ this._urlChangeListeners = []; this._platformStrategy = platformStrategy; const browserBaseHref = this._platformStrategy.getBaseHref(); this._platformLocation = platformLocation; this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref)); this._platformStrategy.onPopState((ev) => { this._subject.emit({ 'url': this.path(true), 'pop': true, 'state': ev.state, 'type': ev.type, }); }); } /** * Normalizes the URL path for this location. * * @param includeHash True to include an anchor fragment in the path. * * @returns The normalized URL path. */ // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is // removed. path(includeHash = false) { return this.normalize(this._platformStrategy.path(includeHash)); } /** * Reports the current state of the location history. * @returns The current value of the `history.state` object. */ getState() { return this._platformLocation.getState(); } /** * Normalizes the given path and compares to the current normalized path. * * @param path The given URL path. * @param query Query parameters. * * @returns True if the given URL path is equal to the current normalized path, false * otherwise. */ isCurrentPathEqualTo(path, query = '') { return this.path() == this.normalize(path + normalizeQueryParams(query)); } /** * Normalizes a URL path by stripping any trailing slashes. * * @param url String representing a URL. * * @returns The normalized URL string. */ normalize(url) { return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url))); } /** * Normalizes an external URL path. * If the given URL doesn't begin with a leading slash (`'/'`), adds one * before normalizing. Adds a hash if `HashLocationStrategy` is * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use. * * @param url String representing a URL. * * @returns A normalized platform-specific URL. */ prepareExternalUrl(url) { if (url && url[0] !== '/') { url = '/' + url; } return this._platformStrategy.prepareExternalUrl(url); } // TODO: rename this method to pushState /** * Changes the browser's URL to a normalized version of a given URL, and pushes a * new item onto the platform's history. * * @param path URL path to normalize. * @param query Query parameters. * @param state Location history state. * */ go(path, query = '', state = null) { this._platformStrategy.pushState(state, '', path, query); this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state); } /** * Changes the browser's URL to a normalized version of the given URL, and replaces * the top item on the platform's history stack. * * @param path URL path to normalize. * @param query Query parameters. * @param state Location history state. */ replaceState(path, query = '', state = null) { this._platformStrategy.replaceState(state, '', path, query); this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state); } /** * Navigates forward in the platform's history. */ forward() { this._platformStrategy.forward(); } /** * Navigates back in the platform's history. */ back() { this._platformStrategy.back(); } /** * Registers a URL change listener. Use to catch updates performed by the Angular * framework that are not detectible through "popstate" or "hashchange" events. * * @param fn The change handler function, which take a URL and a location history state. */ onUrlChange(fn) { this._urlChangeListeners.push(fn); if (!this._urlChangeSubscription) { this._urlChangeSubscription = this.subscribe(v => { this._notifyUrlChangeListeners(v.url, v.state); }); } } /** @internal */ _notifyUrlChangeListeners(url = '', state) { this._urlChangeListeners.forEach(fn => fn(url, state)); } /** * Subscribes to the platform's `popState` events. * * @param value Event that is triggered when the state history changes. * @param exception The exception to throw. * * @returns Subscribed events. */ subscribe(onNext, onThrow, onReturn) { return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn }); } } Location.ɵfac = function Location_Factory(t) { return new (t || Location)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LocationStrategy), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation)); }; /** * Normalizes URL parameters by prepending with `?` if needed. * * @param params String of URL parameters. * * @returns The normalized URL parameters string. */ Location.normalizeQueryParams = normalizeQueryParams; /** * Joins two parts of a URL with a slash if needed. * * @param start URL string * @param end URL string * * * @returns The joined URL string. */ Location.joinWithSlash = joinWithSlash; /** * Removes a trailing slash from a URL string if needed. * Looks for the first occurrence of either `#`, `?`, or the end of the * line as `/` characters and removes the trailing slash if one exists. * * @param url URL string. * * @returns The URL string, modified if needed. */ Location.stripTrailingSlash = stripTrailingSlash; Location.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ factory: createLocation, token: Location, providedIn: "root" }); Location.ctorParameters = () => [ { type: LocationStrategy }, { type: PlatformLocation } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](Location, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"], args: [{ providedIn: 'root', // See #23917 useFactory: createLocation }] }], function () { return [{ type: LocationStrategy }, { type: PlatformLocation }]; }, null); })(); function createLocation() { return new Location(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(LocationStrategy), Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(PlatformLocation)); } function _stripBaseHref(baseHref, url) { return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url; } function _stripIndexHtml(url) { return url.replace(/\/index.html$/, ''); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** @internal */ const CURRENCIES_EN = { 'ADP': [undefined, undefined, 0], 'AFN': [undefined, undefined, 0], 'ALL': [undefined, undefined, 0], 'AMD': [undefined, undefined, 2], 'AOA': [undefined, 'Kz'], 'ARS': [undefined, '$'], 'AUD': ['A$', '$'], 'BAM': [undefined, 'KM'], 'BBD': [undefined, '$'], 'BDT': [undefined, '৳'], 'BHD': [undefined, undefined, 3], 'BIF': [undefined, undefined, 0], 'BMD': [undefined, '$'], 'BND': [undefined, '$'], 'BOB': [undefined, 'Bs'], 'BRL': ['R$'], 'BSD': [undefined, '$'], 'BWP': [undefined, 'P'], 'BYN': [undefined, 'р.', 2], 'BYR': [undefined, undefined, 0], 'BZD': [undefined, '$'], 'CAD': ['CA$', '$', 2], 'CHF': [undefined, undefined, 2], 'CLF': [undefined, undefined, 4], 'CLP': [undefined, '$', 0], 'CNY': ['CN¥', '¥'], 'COP': [undefined, '$', 2], 'CRC': [undefined, '₡', 2], 'CUC': [undefined, '$'], 'CUP': [undefined, '$'], 'CZK': [undefined, 'Kč', 2], 'DJF': [undefined, undefined, 0], 'DKK': [undefined, 'kr', 2], 'DOP': [undefined, '$'], 'EGP': [undefined, 'E£'], 'ESP': [undefined, '₧', 0], 'EUR': ['€'], 'FJD': [undefined, '$'], 'FKP': [undefined, '£'], 'GBP': ['£'], 'GEL': [undefined, '₾'], 'GIP': [undefined, '£'], 'GNF': [undefined, 'FG', 0], 'GTQ': [undefined, 'Q'], 'GYD': [undefined, '$', 2], 'HKD': ['HK$', '$'], 'HNL': [undefined, 'L'], 'HRK': [undefined, 'kn'], 'HUF': [undefined, 'Ft', 2], 'IDR': [undefined, 'Rp', 2], 'ILS': ['₪'], 'INR': ['₹'], 'IQD': [undefined, undefined, 0], 'IRR': [undefined, undefined, 0], 'ISK': [undefined, 'kr', 0], 'ITL': [undefined, undefined, 0], 'JMD': [undefined, '$'], 'JOD': [undefined, undefined, 3], 'JPY': ['¥', undefined, 0], 'KHR': [undefined, '៛'], 'KMF': [undefined, 'CF', 0], 'KPW': [undefined, '₩', 0], 'KRW': ['₩', undefined, 0], 'KWD': [undefined, undefined, 3], 'KYD': [undefined, '$'], 'KZT': [undefined, '₸'], 'LAK': [undefined, '₭', 0], 'LBP': [undefined, 'L£', 0], 'LKR': [undefined, 'Rs'], 'LRD': [undefined, '$'], 'LTL': [undefined, 'Lt'], 'LUF': [undefined, undefined, 0], 'LVL': [undefined, 'Ls'], 'LYD': [undefined, undefined, 3], 'MGA': [undefined, 'Ar', 0], 'MGF': [undefined, undefined, 0], 'MMK': [undefined, 'K', 0], 'MNT': [undefined, '₮', 2], 'MRO': [undefined, undefined, 0], 'MUR': [undefined, 'Rs', 2], 'MXN': ['MX$', '$'], 'MYR': [undefined, 'RM'], 'NAD': [undefined, '$'], 'NGN': [undefined, '₦'], 'NIO': [undefined, 'C$'], 'NOK': [undefined, 'kr', 2], 'NPR': [undefined, 'Rs'], 'NZD': ['NZ$', '$'], 'OMR': [undefined, undefined, 3], 'PHP': [undefined, '₱'], 'PKR': [undefined, 'Rs', 2], 'PLN': [undefined, 'zł'], 'PYG': [undefined, '₲', 0], 'RON': [undefined, 'lei'], 'RSD': [undefined, undefined, 0], 'RUB': [undefined, '₽'], 'RUR': [undefined, 'р.'], 'RWF': [undefined, 'RF', 0], 'SBD': [undefined, '$'], 'SEK': [undefined, 'kr', 2], 'SGD': [undefined, '$'], 'SHP': [undefined, '£'], 'SLL': [undefined, undefined, 0], 'SOS': [undefined, undefined, 0], 'SRD': [undefined, '$'], 'SSP': [undefined, '£'], 'STD': [undefined, undefined, 0], 'STN': [undefined, 'Db'], 'SYP': [undefined, '£', 0], 'THB': [undefined, '฿'], 'TMM': [undefined, undefined, 0], 'TND': [undefined, undefined, 3], 'TOP': [undefined, 'T$'], 'TRL': [undefined, undefined, 0], 'TRY': [undefined, '₺'], 'TTD': [undefined, '$'], 'TWD': ['NT$', '$', 2], 'TZS': [undefined, undefined, 2], 'UAH': [undefined, '₴'], 'UGX': [undefined, undefined, 0], 'USD': ['$'], 'UYI': [undefined, undefined, 0], 'UYU': [undefined, '$'], 'UYW': [undefined, undefined, 4], 'UZS': [undefined, undefined, 2], 'VEF': [undefined, 'Bs', 2], 'VND': ['₫', undefined, 0], 'VUV': [undefined, undefined, 0], 'XAF': ['FCFA', undefined, 0], 'XCD': ['EC$', '$'], 'XOF': ['CFA', undefined, 0], 'XPF': ['CFPF', undefined, 0], 'XXX': ['¤'], 'YER': [undefined, undefined, 0], 'ZAR': [undefined, 'R'], 'ZMK': [undefined, undefined, 0], 'ZMW': [undefined, 'ZK'], 'ZWD': [undefined, undefined, 0] }; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Format styles that can be used to represent numbers. * @see `getLocaleNumberFormat()`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var NumberFormatStyle; (function (NumberFormatStyle) { NumberFormatStyle[NumberFormatStyle["Decimal"] = 0] = "Decimal"; NumberFormatStyle[NumberFormatStyle["Percent"] = 1] = "Percent"; NumberFormatStyle[NumberFormatStyle["Currency"] = 2] = "Currency"; NumberFormatStyle[NumberFormatStyle["Scientific"] = 3] = "Scientific"; })(NumberFormatStyle || (NumberFormatStyle = {})); /** * Plurality cases used for translating plurals to different languages. * * @see `NgPlural` * @see `NgPluralCase` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var Plural; (function (Plural) { Plural[Plural["Zero"] = 0] = "Zero"; Plural[Plural["One"] = 1] = "One"; Plural[Plural["Two"] = 2] = "Two"; Plural[Plural["Few"] = 3] = "Few"; Plural[Plural["Many"] = 4] = "Many"; Plural[Plural["Other"] = 5] = "Other"; })(Plural || (Plural = {})); /** * Context-dependant translation forms for strings. * Typically the standalone version is for the nominative form of the word, * and the format version is used for the genitive case. * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles) * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var FormStyle; (function (FormStyle) { FormStyle[FormStyle["Format"] = 0] = "Format"; FormStyle[FormStyle["Standalone"] = 1] = "Standalone"; })(FormStyle || (FormStyle = {})); /** * String widths available for translations. * The specific character widths are locale-specific. * Examples are given for the word "Sunday" in English. * * @publicApi */ var TranslationWidth; (function (TranslationWidth) { /** 1 character for `en-US`. For example: 'S' */ TranslationWidth[TranslationWidth["Narrow"] = 0] = "Narrow"; /** 3 characters for `en-US`. For example: 'Sun' */ TranslationWidth[TranslationWidth["Abbreviated"] = 1] = "Abbreviated"; /** Full length for `en-US`. For example: "Sunday" */ TranslationWidth[TranslationWidth["Wide"] = 2] = "Wide"; /** 2 characters for `en-US`, For example: "Su" */ TranslationWidth[TranslationWidth["Short"] = 3] = "Short"; })(TranslationWidth || (TranslationWidth = {})); /** * String widths available for date-time formats. * The specific character widths are locale-specific. * Examples are given for `en-US`. * * @see `getLocaleDateFormat()` * @see `getLocaleTimeFormat()`` * @see `getLocaleDateTimeFormat()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * @publicApi */ var FormatWidth; (function (FormatWidth) { /** * For `en-US`, 'M/d/yy, h:mm a'` * (Example: `6/15/15, 9:03 AM`) */ FormatWidth[FormatWidth["Short"] = 0] = "Short"; /** * For `en-US`, `'MMM d, y, h:mm:ss a'` * (Example: `Jun 15, 2015, 9:03:01 AM`) */ FormatWidth[FormatWidth["Medium"] = 1] = "Medium"; /** * For `en-US`, `'MMMM d, y, h:mm:ss a z'` * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`) */ FormatWidth[FormatWidth["Long"] = 2] = "Long"; /** * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'` * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`) */ FormatWidth[FormatWidth["Full"] = 3] = "Full"; })(FormatWidth || (FormatWidth = {})); /** * Symbols that can be used to replace placeholders in number patterns. * Examples are based on `en-US` values. * * @see `getLocaleNumberSymbol()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ var NumberSymbol; (function (NumberSymbol) { /** * Decimal separator. * For `en-US`, the dot character. * Example: 2,345`.`67 */ NumberSymbol[NumberSymbol["Decimal"] = 0] = "Decimal"; /** * Grouping separator, typically for thousands. * For `en-US`, the comma character. * Example: 2`,`345.67 */ NumberSymbol[NumberSymbol["Group"] = 1] = "Group"; /** * List-item separator. * Example: "one, two, and three" */ NumberSymbol[NumberSymbol["List"] = 2] = "List"; /** * Sign for percentage (out of 100). * Example: 23.4% */ NumberSymbol[NumberSymbol["PercentSign"] = 3] = "PercentSign"; /** * Sign for positive numbers. * Example: +23 */ NumberSymbol[NumberSymbol["PlusSign"] = 4] = "PlusSign"; /** * Sign for negative numbers. * Example: -23 */ NumberSymbol[NumberSymbol["MinusSign"] = 5] = "MinusSign"; /** * Computer notation for exponential value (n times a power of 10). * Example: 1.2E3 */ NumberSymbol[NumberSymbol["Exponential"] = 6] = "Exponential"; /** * Human-readable format of exponential. * Example: 1.2x103 */ NumberSymbol[NumberSymbol["SuperscriptingExponent"] = 7] = "SuperscriptingExponent"; /** * Sign for permille (out of 1000). * Example: 23.4‰ */ NumberSymbol[NumberSymbol["PerMille"] = 8] = "PerMille"; /** * Infinity, can be used with plus and minus. * Example: ∞, +∞, -∞ */ NumberSymbol[NumberSymbol["Infinity"] = 9] = "Infinity"; /** * Not a number. * Example: NaN */ NumberSymbol[NumberSymbol["NaN"] = 10] = "NaN"; /** * Symbol used between time units. * Example: 10:52 */ NumberSymbol[NumberSymbol["TimeSeparator"] = 11] = "TimeSeparator"; /** * Decimal separator for currency values (fallback to `Decimal`). * Example: $2,345.67 */ NumberSymbol[NumberSymbol["CurrencyDecimal"] = 12] = "CurrencyDecimal"; /** * Group separator for currency values (fallback to `Group`). * Example: $2,345.67 */ NumberSymbol[NumberSymbol["CurrencyGroup"] = 13] = "CurrencyGroup"; })(NumberSymbol || (NumberSymbol = {})); /** * The value for each day of the week, based on the `en-US` locale * * @publicApi */ var WeekDay; (function (WeekDay) { WeekDay[WeekDay["Sunday"] = 0] = "Sunday"; WeekDay[WeekDay["Monday"] = 1] = "Monday"; WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday"; WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday"; WeekDay[WeekDay["Thursday"] = 4] = "Thursday"; WeekDay[WeekDay["Friday"] = 5] = "Friday"; WeekDay[WeekDay["Saturday"] = 6] = "Saturday"; })(WeekDay || (WeekDay = {})); /** * Retrieves the locale ID from the currently loaded locale. * The loaded locale could be, for example, a global one rather than a regional one. * @param locale A locale code, such as `fr-FR`. * @returns The locale code. For example, `fr`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleId(locale) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale)[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId]; } /** * Retrieves day period strings for the given locale. * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDayPeriods(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const amPmData = [ data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsStandalone] ]; const amPm = getLastDefinedValue(amPmData, formStyle); return getLastDefinedValue(amPm, width); } /** * Retrieves days of the week for the given locale, using the Gregorian calendar. * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns An array of localized name strings. * For example,`[Sunday, Monday, ... Saturday]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDayNames(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const daysData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysStandalone]]; const days = getLastDefinedValue(daysData, formStyle); return getLastDefinedValue(days, width); } /** * Retrieves months of the year for the given locale, using the Gregorian calendar. * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns An array of localized name strings. * For example, `[January, February, ...]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleMonthNames(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const monthsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsStandalone]]; const months = getLastDefinedValue(monthsData, formStyle); return getLastDefinedValue(months, width); } /** * Retrieves Gregorian-calendar eras for the given locale. * @param locale A locale code for the locale format rules to use. * @param width The required character width. * @returns An array of localized era strings. * For example, `[AD, BC]` for `en-US`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleEraNames(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const erasData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Eras]; return getLastDefinedValue(erasData, width); } /** * Retrieves the first day of the week for the given locale. * * @param locale A locale code for the locale format rules to use. * @returns A day index number, using the 0-based week-day index for `en-US` * (Sunday = 0, Monday = 1, ...). * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleFirstDayOfWeek(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].FirstDayOfWeek]; } /** * Range of week days that are considered the week-end for the given locale. * * @param locale A locale code for the locale format rules to use. * @returns The range of day values, `[startDay, endDay]`. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleWeekEndRange(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].WeekendRange]; } /** * Retrieves a localized date-value formating string. * * @param locale A locale code for the locale format rules to use. * @param width The format type. * @returns The localized formating string. * @see `FormatWidth` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDateFormat(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateFormat], width); } /** * Retrieves a localized time-value formatting string. * * @param locale A locale code for the locale format rules to use. * @param width The format type. * @returns The localized formatting string. * @see `FormatWidth` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * @publicApi */ function getLocaleTimeFormat(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].TimeFormat], width); } /** * Retrieves a localized date-time formatting string. * * @param locale A locale code for the locale format rules to use. * @param width The format type. * @returns The localized formatting string. * @see `FormatWidth` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleDateTimeFormat(locale, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const dateTimeFormatData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateTimeFormat]; return getLastDefinedValue(dateTimeFormatData, width); } /** * Retrieves a localized number symbol that can be used to replace placeholders in number formats. * @param locale The locale code. * @param symbol The symbol to localize. * @returns The character for the localized symbol. * @see `NumberSymbol` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleNumberSymbol(locale, symbol) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); const res = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][symbol]; if (typeof res === 'undefined') { if (symbol === NumberSymbol.CurrencyDecimal) { return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Decimal]; } else if (symbol === NumberSymbol.CurrencyGroup) { return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Group]; } } return res; } /** * Retrieves a number format for a given locale. * * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00` * when used to format the number 12345.678 could result in "12'345,678". That would happen if the * grouping separator for your language is an apostrophe, and the decimal separator is a comma. * * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders * that stand for the decimal separator, and so on, and are NOT real characters. * You must NOT "translate" the placeholders. For example, don't change `.` to `,` even though in * your language the decimal point is written with a comma. The symbols should be replaced by the * local equivalents, using the appropriate `NumberSymbol` for your language. * * Here are the special characters used in number patterns: * * | Symbol | Meaning | * |--------|---------| * | . | Replaced automatically by the character used for the decimal point. | * | , | Replaced by the "grouping" (thousands) separator. | * | 0 | Replaced by a digit (or zero if there aren't enough digits). | * | # | Replaced by a digit (or nothing if there aren't enough). | * | ¤ | Replaced by a currency symbol, such as $ or USD. | * | % | Marks a percent format. The % symbol may change position, but must be retained. | * | E | Marks a scientific format. The E symbol may change position, but must be retained. | * | ' | Special characters used as literal characters are quoted with ASCII single quotes. | * * @param locale A locale code for the locale format rules to use. * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.) * @returns The localized format string. * @see `NumberFormatStyle` * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns) * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleNumberFormat(locale, type) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberFormats][type]; } /** * Retrieves the symbol used to represent the currency for the main country * corresponding to a given locale. For example, '$' for `en-US`. * * @param locale A locale code for the locale format rules to use. * @returns The localized symbol character, * or `null` if the main country cannot be determined. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleCurrencySymbol(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencySymbol] || null; } /** * Retrieves the name of the currency for the main country corresponding * to a given locale. For example, 'US Dollar' for `en-US`. * @param locale A locale code for the locale format rules to use. * @returns The currency name, * or `null` if the main country cannot be determined. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleCurrencyName(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencyName] || null; } /** * Retrieves the default currency code for the given locale. * * The default is defined as the first currency which is still in use. * * @param locale The code of the locale whose currency code we want. * @returns The code of the default currency for the given locale. * * @publicApi */ function getLocaleCurrencyCode(locale) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocaleCurrencyCode"])(locale); } /** * Retrieves the currency values for a given locale. * @param locale A locale code for the locale format rules to use. * @returns The currency values. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function getLocaleCurrencies(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Currencies]; } /** * @alias core/ɵgetLocalePluralCase * @publicApi */ const getLocalePluralCase = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocalePluralCase"]; function checkFullData(data) { if (!data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData]) { throw new Error(`Missing extra locale data for the locale "${data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"] .LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`); } } /** * Retrieves locale-specific rules used to determine which day period to use * when more than one period is defined for a locale. * * There is a rule for each defined day period. The * first rule is applied to the first day period and so on. * Fall back to AM/PM when no rules are available. * * A rule can specify a period as time range, or as a single time value. * * This functionality is only available when you have loaded the full locale data. * See the ["I18n guide"](guide/i18n#i18n-pipes). * * @param locale A locale code for the locale format rules to use. * @returns The rules for the locale, a single time value or array of *from-time, to-time*, * or null if no periods are available. * * @see `getLocaleExtraDayPeriods()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleExtraDayPeriodRules(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); checkFullData(data); const rules = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][2 /* ExtraDayPeriodsRules */] || []; return rules.map((rule) => { if (typeof rule === 'string') { return extractTime(rule); } return [extractTime(rule[0]), extractTime(rule[1])]; }); } /** * Retrieves locale-specific day periods, which indicate roughly how a day is broken up * in different languages. * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight. * * This functionality is only available when you have loaded the full locale data. * See the ["I18n guide"](guide/i18n#i18n-pipes). * * @param locale A locale code for the locale format rules to use. * @param formStyle The required grammatical form. * @param width The required character width. * @returns The translated day-period strings. * @see `getLocaleExtraDayPeriodRules()` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLocaleExtraDayPeriods(locale, formStyle, width) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); checkFullData(data); const dayPeriodsData = [ data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][0 /* ExtraDayPeriodFormats */], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][1 /* ExtraDayPeriodStandalone */] ]; const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || []; return getLastDefinedValue(dayPeriods, width) || []; } /** * Retrieves the writing direction of a specified locale * @param locale A locale code for the locale format rules to use. * @publicApi * @returns 'rtl' or 'ltr' * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) */ function getLocaleDirection(locale) { const data = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Directionality]; } /** * Retrieves the first value that is defined in an array, going backwards from an index position. * * To avoid repeating the same data (as when the "format" and "standalone" forms are the same) * add the first value to the locale data arrays, and add other values only if they are different. * * @param data The data array to retrieve from. * @param index A 0-based index into the array to start from. * @returns The value immediately before the given index position. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getLastDefinedValue(data, index) { for (let i = index; i > -1; i--) { if (typeof data[i] !== 'undefined') { return data[i]; } } throw new Error('Locale data API: locale data undefined'); } /** * Extracts the hours and minutes from a string like "15:45" */ function extractTime(time) { const [h, m] = time.split(':'); return { hours: +h, minutes: +m }; } /** * Retrieves the currency symbol for a given currency code. * * For example, for the default `en-US` locale, the code `USD` can * be represented by the narrow symbol `$` or the wide symbol `US$`. * * @param code The currency code. * @param format The format, `wide` or `narrow`. * @param locale A locale code for the locale format rules to use. * * @returns The symbol, or the currency code if no symbol is available. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getCurrencySymbol(code, format, locale = 'en') { const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || []; const symbolNarrow = currency[1 /* SymbolNarrow */]; if (format === 'narrow' && typeof symbolNarrow === 'string') { return symbolNarrow; } return currency[0 /* Symbol */] || code; } // Most currencies have cents, that's why the default is 2 const DEFAULT_NB_OF_CURRENCY_DIGITS = 2; /** * Reports the number of decimal digits for a given currency. * The value depends upon the presence of cents in that particular currency. * * @param code The currency code. * @returns The number of decimal digits, typically 0 or 2. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function getNumberOfCurrencyDigits(code) { let digits; const currency = CURRENCIES_EN[code]; if (currency) { digits = currency[2 /* NbOfDigits */]; } return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const ISO8601_DATE_REGEX = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; // 1 2 3 4 5 6 7 8 9 10 11 const NAMED_FORMATS = {}; const DATE_FORMATS_SPLIT = /((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/; var ZoneWidth; (function (ZoneWidth) { ZoneWidth[ZoneWidth["Short"] = 0] = "Short"; ZoneWidth[ZoneWidth["ShortGMT"] = 1] = "ShortGMT"; ZoneWidth[ZoneWidth["Long"] = 2] = "Long"; ZoneWidth[ZoneWidth["Extended"] = 3] = "Extended"; })(ZoneWidth || (ZoneWidth = {})); var DateType; (function (DateType) { DateType[DateType["FullYear"] = 0] = "FullYear"; DateType[DateType["Month"] = 1] = "Month"; DateType[DateType["Date"] = 2] = "Date"; DateType[DateType["Hours"] = 3] = "Hours"; DateType[DateType["Minutes"] = 4] = "Minutes"; DateType[DateType["Seconds"] = 5] = "Seconds"; DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds"; DateType[DateType["Day"] = 7] = "Day"; })(DateType || (DateType = {})); var TranslationType; (function (TranslationType) { TranslationType[TranslationType["DayPeriods"] = 0] = "DayPeriods"; TranslationType[TranslationType["Days"] = 1] = "Days"; TranslationType[TranslationType["Months"] = 2] = "Months"; TranslationType[TranslationType["Eras"] = 3] = "Eras"; })(TranslationType || (TranslationType = {})); /** * @ngModule CommonModule * @description * * Formats a date according to locale rules. * * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch) * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime). * @param format The date-time components to include. See `DatePipe` for details. * @param locale A locale code for the locale format rules to use. * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`), * or a standard UTC/GMT or continental US time zone abbreviation. * If not specified, uses host system settings. * * @returns The formatted date string. * * @see `DatePipe` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function formatDate(value, format, locale, timezone) { let date = toDate(value); const namedFormat = getNamedFormat(locale, format); format = namedFormat || format; let parts = []; let match; while (format) { match = DATE_FORMATS_SPLIT.exec(format); if (match) { parts = parts.concat(match.slice(1)); const part = parts.pop(); if (!part) { break; } format = part; } else { parts.push(format); break; } } let dateTimezoneOffset = date.getTimezoneOffset(); if (timezone) { dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); date = convertTimezoneToLocal(date, timezone, true); } let text = ''; parts.forEach(value => { const dateFormatter = getDateFormatter(value); text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\''); }); return text; } /** * Create a new Date object with the given date value, and the time set to midnight. * * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999. * See: https://github.com/angular/angular/issues/40377 * * Note that this function returns a Date object whose time is midnight in the current locale's * timezone. In the future we might want to change this to be midnight in UTC, but this would be a * considerable breaking change. */ function createDate(year, month, date) { // The `newDate` is set to midnight (UTC) on January 1st 1970. // - In PST this will be December 31st 1969 at 4pm. // - In GMT this will be January 1st 1970 at 1am. // Note that they even have different years, dates and months! const newDate = new Date(0); // `setFullYear()` allows years like 0001 to be set correctly. This function does not // change the internal time of the date. // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019). // - In PST this will now be September 20, 2019 at 4pm // - In GMT this will now be September 20, 2019 at 1am newDate.setFullYear(year, month, date); // We want the final date to be at local midnight, so we reset the time. // - In PST this will now be September 20, 2019 at 12am // - In GMT this will now be September 20, 2019 at 12am newDate.setHours(0, 0, 0); return newDate; } function getNamedFormat(locale, format) { const localeId = getLocaleId(locale); NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {}; if (NAMED_FORMATS[localeId][format]) { return NAMED_FORMATS[localeId][format]; } let formatValue = ''; switch (format) { case 'shortDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Short); break; case 'mediumDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Medium); break; case 'longDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Long); break; case 'fullDate': formatValue = getLocaleDateFormat(locale, FormatWidth.Full); break; case 'shortTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Short); break; case 'mediumTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium); break; case 'longTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Long); break; case 'fullTime': formatValue = getLocaleTimeFormat(locale, FormatWidth.Full); break; case 'short': const shortTime = getNamedFormat(locale, 'shortTime'); const shortDate = getNamedFormat(locale, 'shortDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]); break; case 'medium': const mediumTime = getNamedFormat(locale, 'mediumTime'); const mediumDate = getNamedFormat(locale, 'mediumDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]); break; case 'long': const longTime = getNamedFormat(locale, 'longTime'); const longDate = getNamedFormat(locale, 'longDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]); break; case 'full': const fullTime = getNamedFormat(locale, 'fullTime'); const fullDate = getNamedFormat(locale, 'fullDate'); formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]); break; } if (formatValue) { NAMED_FORMATS[localeId][format] = formatValue; } return formatValue; } function formatDateTime(str, opt_values) { if (opt_values) { str = str.replace(/\{([^}]+)}/g, function (match, key) { return (opt_values != null && key in opt_values) ? opt_values[key] : match; }); } return str; } function padNumber(num, digits, minusSign = '-', trim, negWrap) { let neg = ''; if (num < 0 || (negWrap && num <= 0)) { if (negWrap) { num = -num + 1; } else { num = -num; neg = minusSign; } } let strNum = String(num); while (strNum.length < digits) { strNum = '0' + strNum; } if (trim) { strNum = strNum.substr(strNum.length - digits); } return neg + strNum; } function formatFractionalSeconds(milliseconds, digits) { const strMs = padNumber(milliseconds, 3); return strMs.substr(0, digits); } /** * Returns a date formatter that transforms a date into its locale digit representation */ function dateGetter(name, size, offset = 0, trim = false, negWrap = false) { return function (date, locale) { let part = getDatePart(name, date); if (offset > 0 || part > -offset) { part += offset; } if (name === DateType.Hours) { if (part === 0 && offset === -12) { part = 12; } } else if (name === DateType.FractionalSeconds) { return formatFractionalSeconds(part, size); } const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign); return padNumber(part, size, localeMinus, trim, negWrap); }; } function getDatePart(part, date) { switch (part) { case DateType.FullYear: return date.getFullYear(); case DateType.Month: return date.getMonth(); case DateType.Date: return date.getDate(); case DateType.Hours: return date.getHours(); case DateType.Minutes: return date.getMinutes(); case DateType.Seconds: return date.getSeconds(); case DateType.FractionalSeconds: return date.getMilliseconds(); case DateType.Day: return date.getDay(); default: throw new Error(`Unknown DateType value "${part}".`); } } /** * Returns a date formatter that transforms a date into its locale string representation */ function dateStrGetter(name, width, form = FormStyle.Format, extended = false) { return function (date, locale) { return getDateTranslation(date, locale, name, width, form, extended); }; } /** * Returns the locale translation of a date for a given form, type and width */ function getDateTranslation(date, locale, name, width, form, extended) { switch (name) { case TranslationType.Months: return getLocaleMonthNames(locale, form, width)[date.getMonth()]; case TranslationType.Days: return getLocaleDayNames(locale, form, width)[date.getDay()]; case TranslationType.DayPeriods: const currentHours = date.getHours(); const currentMinutes = date.getMinutes(); if (extended) { const rules = getLocaleExtraDayPeriodRules(locale); const dayPeriods = getLocaleExtraDayPeriods(locale, form, width); const index = rules.findIndex(rule => { if (Array.isArray(rule)) { // morning, afternoon, evening, night const [from, to] = rule; const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes; const beforeTo = (currentHours < to.hours || (currentHours === to.hours && currentMinutes < to.minutes)); // We must account for normal rules that span a period during the day (e.g. 6am-9am) // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g. // 10pm - 5am) where `from` is greater (later!) than `to`. // // In the first case the current time must be BOTH after `from` AND before `to` // (e.g. 8am is after 6am AND before 10am). // // In the second case the current time must be EITHER after `from` OR before `to` // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is // after 10pm). if (from.hours < to.hours) { if (afterFrom && beforeTo) { return true; } } else if (afterFrom || beforeTo) { return true; } } else { // noon or midnight if (rule.hours === currentHours && rule.minutes === currentMinutes) { return true; } } return false; }); if (index !== -1) { return dayPeriods[index]; } } // if no rules for the day periods, we use am/pm by default return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1]; case TranslationType.Eras: return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1]; default: // This default case is not needed by TypeScript compiler, as the switch is exhaustive. // However Closure Compiler does not understand that and reports an error in typed mode. // The `throw new Error` below works around the problem, and the unexpected: never variable // makes sure tsc still checks this code is unreachable. const unexpected = name; throw new Error(`unexpected translation type ${unexpected}`); } } /** * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30, * extended = +04:30) */ function timeZoneGetter(width) { return function (date, locale, offset) { const zone = -1 * offset; const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign); const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60); switch (width) { case ZoneWidth.Short: return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + padNumber(Math.abs(zone % 60), 2, minusSign); case ZoneWidth.ShortGMT: return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign); case ZoneWidth.Long: return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign); case ZoneWidth.Extended: if (offset === 0) { return 'Z'; } else { return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign); } default: throw new Error(`Unknown zone width "${width}"`); } }; } const JANUARY = 0; const THURSDAY = 4; function getFirstThursdayOfYear(year) { const firstDayOfYear = createDate(year, JANUARY, 1).getDay(); return createDate(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear); } function getThursdayThisWeek(datetime) { return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay())); } function weekGetter(size, monthBased = false) { return function (date, locale) { let result; if (monthBased) { const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1; const today = date.getDate(); result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7); } else { const thisThurs = getThursdayThisWeek(date); // Some days of a year are part of next year according to ISO 8601. // Compute the firstThurs from the year of this week's Thursday const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear()); const diff = thisThurs.getTime() - firstThurs.getTime(); result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week } return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); }; } /** * Returns a date formatter that provides the week-numbering year for the input date. */ function weekNumberingYearGetter(size, trim = false) { return function (date, locale) { const thisThurs = getThursdayThisWeek(date); const weekNumberingYear = thisThurs.getFullYear(); return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim); }; } const DATE_FORMATS = {}; // Based on CLDR formats: // See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table // See also explanations: http://cldr.unicode.org/translation/date-time // TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x function getDateFormatter(format) { if (DATE_FORMATS[format]) { return DATE_FORMATS[format]; } let formatter; switch (format) { // Era name (AD/BC) case 'G': case 'GG': case 'GGG': formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated); break; case 'GGGG': formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide); break; case 'GGGGG': formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow); break; // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199) case 'y': formatter = dateGetter(DateType.FullYear, 1, 0, false, true); break; // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10) case 'yy': formatter = dateGetter(DateType.FullYear, 2, 0, true, true); break; // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10) case 'yyy': formatter = dateGetter(DateType.FullYear, 3, 0, false, true); break; // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010) case 'yyyy': formatter = dateGetter(DateType.FullYear, 4, 0, false, true); break; // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199) case 'Y': formatter = weekNumberingYearGetter(1); break; // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD // 2010 => 10) case 'YY': formatter = weekNumberingYearGetter(2, true); break; // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD // 2010 => 2010) case 'YYY': formatter = weekNumberingYearGetter(3); break; // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010) case 'YYYY': formatter = weekNumberingYearGetter(4); break; // Month of the year (1-12), numeric case 'M': case 'L': formatter = dateGetter(DateType.Month, 1, 1); break; case 'MM': case 'LL': formatter = dateGetter(DateType.Month, 2, 1); break; // Month of the year (January, ...), string, format case 'MMM': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated); break; case 'MMMM': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide); break; case 'MMMMM': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow); break; // Month of the year (January, ...), string, standalone case 'LLL': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone); break; case 'LLLL': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone); break; case 'LLLLL': formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone); break; // Week of the year (1, ... 52) case 'w': formatter = weekGetter(1); break; case 'ww': formatter = weekGetter(2); break; // Week of the month (1, ...) case 'W': formatter = weekGetter(1, true); break; // Day of the month (1-31) case 'd': formatter = dateGetter(DateType.Date, 1); break; case 'dd': formatter = dateGetter(DateType.Date, 2); break; // Day of the Week case 'E': case 'EE': case 'EEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated); break; case 'EEEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide); break; case 'EEEEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow); break; case 'EEEEEE': formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short); break; // Generic period of the day (am-pm) case 'a': case 'aa': case 'aaa': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated); break; case 'aaaa': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide); break; case 'aaaaa': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow); break; // Extended period of the day (midnight, at night, ...), standalone case 'b': case 'bb': case 'bbb': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true); break; case 'bbbb': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true); break; case 'bbbbb': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true); break; // Extended period of the day (midnight, night, ...), standalone case 'B': case 'BB': case 'BBB': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true); break; case 'BBBB': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true); break; case 'BBBBB': formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true); break; // Hour in AM/PM, (1-12) case 'h': formatter = dateGetter(DateType.Hours, 1, -12); break; case 'hh': formatter = dateGetter(DateType.Hours, 2, -12); break; // Hour of the day (0-23) case 'H': formatter = dateGetter(DateType.Hours, 1); break; // Hour in day, padded (00-23) case 'HH': formatter = dateGetter(DateType.Hours, 2); break; // Minute of the hour (0-59) case 'm': formatter = dateGetter(DateType.Minutes, 1); break; case 'mm': formatter = dateGetter(DateType.Minutes, 2); break; // Second of the minute (0-59) case 's': formatter = dateGetter(DateType.Seconds, 1); break; case 'ss': formatter = dateGetter(DateType.Seconds, 2); break; // Fractional second case 'S': formatter = dateGetter(DateType.FractionalSeconds, 1); break; case 'SS': formatter = dateGetter(DateType.FractionalSeconds, 2); break; case 'SSS': formatter = dateGetter(DateType.FractionalSeconds, 3); break; // Timezone ISO8601 short format (-0430) case 'Z': case 'ZZ': case 'ZZZ': formatter = timeZoneGetter(ZoneWidth.Short); break; // Timezone ISO8601 extended format (-04:30) case 'ZZZZZ': formatter = timeZoneGetter(ZoneWidth.Extended); break; // Timezone GMT short format (GMT+4) case 'O': case 'OO': case 'OOO': // Should be location, but fallback to format O instead because we don't have the data yet case 'z': case 'zz': case 'zzz': formatter = timeZoneGetter(ZoneWidth.ShortGMT); break; // Timezone GMT long format (GMT+0430) case 'OOOO': case 'ZZZZ': // Should be location, but fallback to format O instead because we don't have the data yet case 'zzzz': formatter = timeZoneGetter(ZoneWidth.Long); break; default: return null; } DATE_FORMATS[format] = formatter; return formatter; } function timezoneToOffset(timezone, fallback) { // Support: IE 11 only, Edge 13-15+ // IE/Edge do not "understand" colon (`:`) in timezone timezone = timezone.replace(/:/g, ''); const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; } function addDateMinutes(date, minutes) { date = new Date(date.getTime()); date.setMinutes(date.getMinutes() + minutes); return date; } function convertTimezoneToLocal(date, timezone, reverse) { const reverseValue = reverse ? -1 : 1; const dateTimezoneOffset = date.getTimezoneOffset(); const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset)); } /** * Converts a value to date. * * Supported input formats: * - `Date` * - number: timestamp * - string: numeric (e.g. "1234"), ISO and date strings in a format supported by * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). * Note: ISO strings without time return a date without timeoffset. * * Throws if unable to convert to a date. */ function toDate(value) { if (isDate(value)) { return value; } if (typeof value === 'number' && !isNaN(value)) { return new Date(value); } if (typeof value === 'string') { value = value.trim(); if (/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(value)) { /* For ISO Strings without time the day, month and year must be extracted from the ISO String before Date creation to avoid time offset and errors in the new Date. If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new date, some browsers (e.g. IE 9) will throw an invalid Date error. If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the timeoffset is applied. Note: ISO months are 0 for January, 1 for February, ... */ const [y, m = 1, d = 1] = value.split('-').map((val) => +val); return createDate(y, m - 1, d); } const parsedNb = parseFloat(value); // any string that only contains numbers, like "1234" but not like "1234hello" if (!isNaN(value - parsedNb)) { return new Date(parsedNb); } let match; if (match = value.match(ISO8601_DATE_REGEX)) { return isoStringToDate(match); } } const date = new Date(value); if (!isDate(date)) { throw new Error(`Unable to convert "${value}" into a date`); } return date; } /** * Converts a date in ISO8601 to a Date. * Used instead of `Date.parse` because of browser discrepancies. */ function isoStringToDate(match) { const date = new Date(0); let tzHour = 0; let tzMin = 0; // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100" const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear; const timeSetter = match[8] ? date.setUTCHours : date.setHours; // if there is a timezone defined like "+01:00" or "+0100" if (match[9]) { tzHour = Number(match[9] + match[10]); tzMin = Number(match[9] + match[11]); } dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3])); const h = Number(match[4] || 0) - tzHour; const m = Number(match[5] || 0) - tzMin; const s = Number(match[6] || 0); // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11) // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms` // becomes `999ms`. const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000); timeSetter.call(date, h, m, s, ms); return date; } function isDate(value) { return value instanceof Date && !isNaN(value.valueOf()); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/; const MAX_DIGITS = 22; const DECIMAL_SEP = '.'; const ZERO_CHAR = '0'; const PATTERN_SEP = ';'; const GROUP_SEP = ','; const DIGIT_CHAR = '#'; const CURRENCY_CHAR = '¤'; const PERCENT_CHAR = '%'; /** * Transforms a number to a locale string based on a style and a format. */ function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) { let formattedText = ''; let isZero = false; if (!isFinite(value)) { formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity); } else { let parsedNumber = parseNumber(value); if (isPercent) { parsedNumber = toPercent(parsedNumber); } let minInt = pattern.minInt; let minFraction = pattern.minFrac; let maxFraction = pattern.maxFrac; if (digitsInfo) { const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP); if (parts === null) { throw new Error(`${digitsInfo} is not a valid digit info`); } const minIntPart = parts[1]; const minFractionPart = parts[3]; const maxFractionPart = parts[5]; if (minIntPart != null) { minInt = parseIntAutoRadix(minIntPart); } if (minFractionPart != null) { minFraction = parseIntAutoRadix(minFractionPart); } if (maxFractionPart != null) { maxFraction = parseIntAutoRadix(maxFractionPart); } else if (minFractionPart != null && minFraction > maxFraction) { maxFraction = minFraction; } } roundNumber(parsedNumber, minFraction, maxFraction); let digits = parsedNumber.digits; let integerLen = parsedNumber.integerLen; const exponent = parsedNumber.exponent; let decimals = []; isZero = digits.every(d => !d); // pad zeros for small numbers for (; integerLen < minInt; integerLen++) { digits.unshift(0); } // pad zeros for small numbers for (; integerLen < 0; integerLen++) { digits.unshift(0); } // extract decimals digits if (integerLen > 0) { decimals = digits.splice(integerLen, digits.length); } else { decimals = digits; digits = [0]; } // format the integer digits with grouping separators const groups = []; if (digits.length >= pattern.lgSize) { groups.unshift(digits.splice(-pattern.lgSize, digits.length).join('')); } while (digits.length > pattern.gSize) { groups.unshift(digits.splice(-pattern.gSize, digits.length).join('')); } if (digits.length) { groups.unshift(digits.join('')); } formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol)); // append the decimal digits if (decimals.length) { formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join(''); } if (exponent) { formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent; } } if (value < 0 && !isZero) { formattedText = pattern.negPre + formattedText + pattern.negSuf; } else { formattedText = pattern.posPre + formattedText + pattern.posSuf; } return formattedText; } /** * @ngModule CommonModule * @description * * Formats a number as currency using locale rules. * * @param value The number to format. * @param locale A locale code for the locale format rules to use. * @param currency A string containing the currency symbol or its name, * such as "$" or "Canadian Dollar". Used in output string, but does not affect the operation * of the function. * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) * currency code, such as `USD` for the US dollar and `EUR` for the euro. * Used to determine the number of digits in the decimal part. * @param digitsInfo Decimal representation options, specified by a string in the following format: * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. * * @returns The formatted currency value. * * @see `formatNumber()` * @see `DecimalPipe` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) { const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency); const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); pattern.minFrac = getNumberOfCurrencyDigits(currencyCode); pattern.maxFrac = pattern.minFrac; const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo); return res .replace(CURRENCY_CHAR, currency) // if we have 2 time the currency character, the second one is ignored .replace(CURRENCY_CHAR, '') // If there is a spacing between currency character and the value and // the currency character is supressed by passing an empty string, the // spacing character would remain as part of the string. Then we // should remove it. .trim(); } /** * @ngModule CommonModule * @description * * Formats a number as a percentage according to locale rules. * * @param value The number to format. * @param locale A locale code for the locale format rules to use. * @param digitsInfo Decimal representation options, specified by a string in the following format: * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. * * @returns The formatted percentage value. * * @see `formatNumber()` * @see `DecimalPipe` * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * @publicApi * */ function formatPercent(value, locale, digitsInfo) { const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent); const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true); return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign)); } /** * @ngModule CommonModule * @description * * Formats a number as text, with group sizing, separator, and other * parameters based on the locale. * * @param value The number to format. * @param locale A locale code for the locale format rules to use. * @param digitsInfo Decimal representation options, specified by a string in the following format: * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. * * @returns The formatted text string. * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n) * * @publicApi */ function formatNumber(value, locale, digitsInfo) { const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal); const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo); } function parseNumberFormat(format, minusSign = '-') { const p = { minInt: 1, minFrac: 0, maxFrac: 0, posPre: '', posSuf: '', negPre: '', negSuf: '', gSize: 0, lgSize: 0 }; const patternParts = format.split(PATTERN_SEP); const positive = patternParts[0]; const negative = patternParts[1]; const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ? positive.split(DECIMAL_SEP) : [ positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1), positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1) ], integer = positiveParts[0], fraction = positiveParts[1] || ''; p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR)); for (let i = 0; i < fraction.length; i++) { const ch = fraction.charAt(i); if (ch === ZERO_CHAR) { p.minFrac = p.maxFrac = i + 1; } else if (ch === DIGIT_CHAR) { p.maxFrac = i + 1; } else { p.posSuf += ch; } } const groups = integer.split(GROUP_SEP); p.gSize = groups[1] ? groups[1].length : 0; p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0; if (negative) { const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR); p.negPre = negative.substr(0, pos).replace(/'/g, ''); p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, ''); } else { p.negPre = minusSign + p.posPre; p.negSuf = p.posSuf; } return p; } // Transforms a parsed number into a percentage by multiplying it by 100 function toPercent(parsedNumber) { // if the number is 0, don't do anything if (parsedNumber.digits[0] === 0) { return parsedNumber; } // Getting the current number of decimals const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen; if (parsedNumber.exponent) { parsedNumber.exponent += 2; } else { if (fractionLen === 0) { parsedNumber.digits.push(0, 0); } else if (fractionLen === 1) { parsedNumber.digits.push(0); } parsedNumber.integerLen += 2; } return parsedNumber; } /** * Parses a number. * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/ */ function parseNumber(num) { let numStr = Math.abs(num) + ''; let exponent = 0, digits, integerLen; let i, j, zeros; // Decimal point? if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) { numStr = numStr.replace(DECIMAL_SEP, ''); } // Exponential form? if ((i = numStr.search(/e/i)) > 0) { // Work out the exponent. if (integerLen < 0) integerLen = i; integerLen += +numStr.slice(i + 1); numStr = numStr.substring(0, i); } else if (integerLen < 0) { // There was no decimal point or exponent so it is an integer. integerLen = numStr.length; } // Count the number of leading zeros. for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */ } if (i === (zeros = numStr.length)) { // The digits are all zero. digits = [0]; integerLen = 1; } else { // Count the number of trailing zeros zeros--; while (numStr.charAt(zeros) === ZERO_CHAR) zeros--; // Trailing zeros are insignificant so ignore them integerLen -= i; digits = []; // Convert string to array of digits without leading/trailing zeros. for (j = 0; i <= zeros; i++, j++) { digits[j] = Number(numStr.charAt(i)); } } // If the number overflows the maximum allowed digits then use an exponent. if (integerLen > MAX_DIGITS) { digits = digits.splice(0, MAX_DIGITS - 1); exponent = integerLen - 1; integerLen = 1; } return { digits, exponent, integerLen }; } /** * Round the parsed number to the specified number of decimal places * This function changes the parsedNumber in-place */ function roundNumber(parsedNumber, minFrac, maxFrac) { if (minFrac > maxFrac) { throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`); } let digits = parsedNumber.digits; let fractionLen = digits.length - parsedNumber.integerLen; const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac); // The index of the digit to where rounding is to occur let roundAt = fractionSize + parsedNumber.integerLen; let digit = digits[roundAt]; if (roundAt > 0) { // Drop fractional digits beyond `roundAt` digits.splice(Math.max(parsedNumber.integerLen, roundAt)); // Set non-fractional digits beyond `roundAt` to 0 for (let j = roundAt; j < digits.length; j++) { digits[j] = 0; } } else { // We rounded to zero so reset the parsedNumber fractionLen = Math.max(0, fractionLen); parsedNumber.integerLen = 1; digits.length = Math.max(1, roundAt = fractionSize + 1); digits[0] = 0; for (let i = 1; i < roundAt; i++) digits[i] = 0; } if (digit >= 5) { if (roundAt - 1 < 0) { for (let k = 0; k > roundAt; k--) { digits.unshift(0); parsedNumber.integerLen++; } digits.unshift(1); parsedNumber.integerLen++; } else { digits[roundAt - 1]++; } } // Pad out with zeros to get the required fraction length for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0); let dropTrailingZeros = fractionSize !== 0; // Minimal length = nb of decimals required + current nb of integers // Any number besides that is optional and can be removed if it's a trailing 0 const minLen = minFrac + parsedNumber.integerLen; // Do any carrying, e.g. a digit was rounded up to 10 const carry = digits.reduceRight(function (carry, d, i, digits) { d = d + carry; digits[i] = d < 10 ? d : d - 10; // d % 10 if (dropTrailingZeros) { // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52) if (digits[i] === 0 && i >= minLen) { digits.pop(); } else { dropTrailingZeros = false; } } return d >= 10 ? 1 : 0; // Math.floor(d / 10); }, 0); if (carry) { digits.unshift(carry); parsedNumber.integerLen++; } } function parseIntAutoRadix(text) { const result = parseInt(text); if (isNaN(result)) { throw new Error('Invalid integer literal when parsing ' + text); } return result; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ class NgLocalization { } /** * Returns the plural category for a given value. * - "=value" when the case exists, * - the plural category otherwise */ function getPluralCategory(value, cases, ngLocalization, locale) { let key = `=${value}`; if (cases.indexOf(key) > -1) { return key; } key = ngLocalization.getPluralCategory(value, locale); if (cases.indexOf(key) > -1) { return key; } if (cases.indexOf('other') > -1) { return 'other'; } throw new Error(`No plural message found for value "${value}"`); } /** * Returns the plural case based on the locale * * @publicApi */ class NgLocaleLocalization extends NgLocalization { constructor(locale) { super(); this.locale = locale; } getPluralCategory(value, locale) { const plural = getLocalePluralCase(locale || this.locale)(value); switch (plural) { case Plural.Zero: return 'zero'; case Plural.One: return 'one'; case Plural.Two: return 'two'; case Plural.Few: return 'few'; case Plural.Many: return 'many'; default: return 'other'; } } } NgLocaleLocalization.ɵfac = function NgLocaleLocalization_Factory(t) { return new (t || NgLocaleLocalization)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; NgLocaleLocalization.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: NgLocaleLocalization, factory: NgLocaleLocalization.ɵfac }); NgLocaleLocalization.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLocaleLocalization, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Register global data to be used internally by Angular. See the * ["I18n guide"](guide/i18n#i18n-pipes) to know how to import additional locale data. * * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1 * * @publicApi */ function registerLocaleData(data, localeId, extraData) { return Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵregisterLocaleData"])(data, localeId, extraData); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function parseCookieValue(cookieStr, name) { name = encodeURIComponent(name); for (const cookie of cookieStr.split(';')) { const eqIndex = cookie.indexOf('='); const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)]; if (cookieName.trim() === name) { return decodeURIComponent(cookieValue); } } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @usageNotes * ``` * <some-element [ngClass]="'first second'">...</some-element> * * <some-element [ngClass]="['first', 'second']">...</some-element> * * <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element> * * <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element> * * <some-element [ngClass]="{'class1 class2 class3' : true}">...</some-element> * ``` * * @description * * Adds and removes CSS classes on an HTML element. * * The CSS classes are updated as follows, depending on the type of the expression evaluation: * - `string` - the CSS classes listed in the string (space delimited) are added, * - `Array` - the CSS classes declared as Array elements are added, * - `Object` - keys are CSS classes that get added when the expression given in the value * evaluates to a truthy value, otherwise they are removed. * * @publicApi */ class NgClass { constructor(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) { this._iterableDiffers = _iterableDiffers; this._keyValueDiffers = _keyValueDiffers; this._ngEl = _ngEl; this._renderer = _renderer; this._iterableDiffer = null; this._keyValueDiffer = null; this._initialClasses = []; this._rawClass = null; } set klass(value) { this._removeClasses(this._initialClasses); this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : []; this._applyClasses(this._initialClasses); this._applyClasses(this._rawClass); } set ngClass(value) { this._removeClasses(this._rawClass); this._applyClasses(this._initialClasses); this._iterableDiffer = null; this._keyValueDiffer = null; this._rawClass = typeof value === 'string' ? value.split(/\s+/) : value; if (this._rawClass) { if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisListLikeIterable"])(this._rawClass)) { this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create(); } else { this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create(); } } } ngDoCheck() { if (this._iterableDiffer) { const iterableChanges = this._iterableDiffer.diff(this._rawClass); if (iterableChanges) { this._applyIterableChanges(iterableChanges); } } else if (this._keyValueDiffer) { const keyValueChanges = this._keyValueDiffer.diff(this._rawClass); if (keyValueChanges) { this._applyKeyValueChanges(keyValueChanges); } } } _applyKeyValueChanges(changes) { changes.forEachAddedItem((record) => this._toggleClass(record.key, record.currentValue)); changes.forEachChangedItem((record) => this._toggleClass(record.key, record.currentValue)); changes.forEachRemovedItem((record) => { if (record.previousValue) { this._toggleClass(record.key, false); } }); } _applyIterableChanges(changes) { changes.forEachAddedItem((record) => { if (typeof record.item === 'string') { this._toggleClass(record.item, true); } else { throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(record.item)}`); } }); changes.forEachRemovedItem((record) => this._toggleClass(record.item, false)); } /** * Applies a collection of CSS classes to the DOM element. * * For argument of type Set and Array CSS class names contained in those collections are always * added. * For argument of type Map CSS class name in the map's key is toggled based on the value (added * for truthy and removed for falsy). */ _applyClasses(rawClassVal) { if (rawClassVal) { if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) { rawClassVal.forEach((klass) => this._toggleClass(klass, true)); } else { Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass])); } } } /** * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup * purposes. */ _removeClasses(rawClassVal) { if (rawClassVal) { if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) { rawClassVal.forEach((klass) => this._toggleClass(klass, false)); } else { Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false)); } } } _toggleClass(klass, enabled) { klass = klass.trim(); if (klass) { klass.split(/\s+/g).forEach(klass => { if (enabled) { this._renderer.addClass(this._ngEl.nativeElement, klass); } else { this._renderer.removeClass(this._ngEl.nativeElement, klass); } }); } } } NgClass.ɵfac = function NgClass_Factory(t) { return new (t || NgClass)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"])); }; NgClass.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgClass, selectors: [["", "ngClass", ""]], inputs: { klass: ["class", "klass"], ngClass: "ngClass" } }); NgClass.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] } ]; NgClass.propDecorators = { klass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['class',] }], ngClass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngClass',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgClass, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngClass]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] }]; }, { klass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['class'] }], ngClass: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngClass'] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Instantiates a single {@link Component} type and inserts its Host View into current View. * `NgComponentOutlet` provides a declarative approach for dynamic component creation. * * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and * any existing component will get destroyed. * * @usageNotes * * ### Fine tune control * * You can control the component creation process by using the following optional attributes: * * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for * the Component. Defaults to the injector of the current view container. * * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content * section of the component, if exists. * * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other * module, then load a component from that module. * * ### Syntax * * Simple * ``` * <ng-container *ngComponentOutlet="componentTypeExpression"></ng-container> * ``` * * Customized injector/content * ``` * <ng-container *ngComponentOutlet="componentTypeExpression; * injector: injectorExpression; * content: contentNodesExpression;"> * </ng-container> * ``` * * Customized ngModuleFactory * ``` * <ng-container *ngComponentOutlet="componentTypeExpression; * ngModuleFactory: moduleFactory;"> * </ng-container> * ``` * * ### A simple example * * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'} * * A more complete example with additional options: * * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'} * * @publicApi * @ngModule CommonModule */ class NgComponentOutlet { constructor(_viewContainerRef) { this._viewContainerRef = _viewContainerRef; this._componentRef = null; this._moduleRef = null; } ngOnChanges(changes) { this._viewContainerRef.clear(); this._componentRef = null; if (this.ngComponentOutlet) { const elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector; if (changes['ngComponentOutletNgModuleFactory']) { if (this._moduleRef) this._moduleRef.destroy(); if (this.ngComponentOutletNgModuleFactory) { const parentModule = elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModuleRef"]); this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector); } else { this._moduleRef = null; } } const componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver : elInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ComponentFactoryResolver"]); const componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet); this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent); } } ngOnDestroy() { if (this._moduleRef) this._moduleRef.destroy(); } } NgComponentOutlet.ɵfac = function NgComponentOutlet_Factory(t) { return new (t || NgComponentOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"])); }; NgComponentOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgComponentOutlet, selectors: [["", "ngComponentOutlet", ""]], inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] }); NgComponentOutlet.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] } ]; NgComponentOutlet.propDecorators = { ngComponentOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletInjector: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletContent: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletNgModuleFactory: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgComponentOutlet, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngComponentOutlet]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }]; }, { ngComponentOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletInjector: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletContent: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngComponentOutletNgModuleFactory: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ class NgForOfContext { constructor($implicit, ngForOf, index, count) { this.$implicit = $implicit; this.ngForOf = ngForOf; this.index = index; this.count = count; } get first() { return this.index === 0; } get last() { return this.index === this.count - 1; } get even() { return this.index % 2 === 0; } get odd() { return !this.even; } } /** * A [structural directive](guide/structural-directives) that renders * a template for each item in a collection. * The directive is placed on an element, which becomes the parent * of the cloned templates. * * The `ngForOf` directive is generally used in the * [shorthand form](guide/structural-directives#asterisk) `*ngFor`. * In this form, the template to be rendered for each iteration is the content * of an anchor element containing the directive. * * The following example shows the shorthand syntax with some options, * contained in an `<li>` element. * * ``` * <li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li> * ``` * * The shorthand form expands into a long form that uses the `ngForOf` selector * on an `<ng-template>` element. * The content of the `<ng-template>` element is the `<li>` element that held the * short-form directive. * * Here is the expanded version of the short-form example. * * ``` * <ng-template ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn"> * <li>...</li> * </ng-template> * ``` * * Angular automatically expands the shorthand syntax as it compiles the template. * The context for each embedded view is logically merged to the current component * context according to its lexical position. * * When using the shorthand syntax, Angular allows only [one structural directive * on an element](guide/built-in-directives#one-per-element). * If you want to iterate conditionally, for example, * put the `*ngIf` on a container element that wraps the `*ngFor` element. * For futher discussion, see * [Structural Directives](guide/built-in-directives#one-per-element). * * @usageNotes * * ### Local variables * * `NgForOf` provides exported values that can be aliased to local variables. * For example: * * ``` * <li *ngFor="let user of users; index as i; first as isFirst"> * {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span> * </li> * ``` * * The following exported values can be aliased to local variables: * * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`). * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is * more complex then a property access, for example when using the async pipe (`userStreams | * async`). * - `index: number`: The index of the current item in the iterable. * - `count: number`: The length of the iterable. * - `first: boolean`: True when the item is the first item in the iterable. * - `last: boolean`: True when the item is the last item in the iterable. * - `even: boolean`: True when the item has an even index in the iterable. * - `odd: boolean`: True when the item has an odd index in the iterable. * * ### Change propagation * * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM: * * * When an item is added, a new instance of the template is added to the DOM. * * When an item is removed, its template instance is removed from the DOM. * * When items are reordered, their respective templates are reordered in the DOM. * * Angular uses object identity to track insertions and deletions within the iterator and reproduce * those changes in the DOM. This has important implications for animations and any stateful * controls that are present, such as `<input>` elements that accept user input. Inserted rows can * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state * such as user input. * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers). * * The identities of elements in the iterator can change while the data does not. * This can happen, for example, if the iterator is produced from an RPC to the server, and that * RPC is re-run. Even if the data hasn't changed, the second response produces objects with * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old * elements were deleted and all new elements inserted). * * To avoid this expensive operation, you can customize the default tracking algorithm. * by supplying the `trackBy` option to `NgForOf`. * `trackBy` takes a function that has two arguments: `index` and `item`. * If `trackBy` is given, Angular tracks changes by the return value of the function. * * @see [Structural Directives](guide/structural-directives) * @ngModule CommonModule * @publicApi */ class NgForOf { constructor(_viewContainer, _template, _differs) { this._viewContainer = _viewContainer; this._template = _template; this._differs = _differs; this._ngForOf = null; this._ngForOfDirty = true; this._differ = null; } /** * The value of the iterable expression, which can be used as a * [template input variable](guide/structural-directives#shorthand). */ set ngForOf(ngForOf) { this._ngForOf = ngForOf; this._ngForOfDirty = true; } /** * A function that defines how to track changes for items in the iterable. * * When items are added, moved, or removed in the iterable, * the directive must re-render the appropriate DOM nodes. * To minimize churn in the DOM, only nodes that have changed * are re-rendered. * * By default, the change detector assumes that * the object instance identifies the node in the iterable. * When this function is supplied, the directive uses * the result of calling this function to identify the item node, * rather than the identity of the object itself. * * The function receives two inputs, * the iteration index and the associated node data. */ set ngForTrackBy(fn) { if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') { // TODO(vicb): use a log service once there is a public one available if (console && console.warn) { console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` + `See https://angular.io/api/common/NgForOf#change-propagation for more information.`); } } this._trackByFn = fn; } get ngForTrackBy() { return this._trackByFn; } /** * A reference to the template that is stamped out for each item in the iterable. * @see [template reference variable](guide/template-reference-variables) */ set ngForTemplate(value) { // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1 // The current type is too restrictive; a template that just uses index, for example, // should be acceptable. if (value) { this._template = value; } } /** * Applies the changes when needed. */ ngDoCheck() { if (this._ngForOfDirty) { this._ngForOfDirty = false; // React on ngForOf changes only once all inputs have been initialized const value = this._ngForOf; if (!this._differ && value) { try { this._differ = this._differs.find(value).create(this.ngForTrackBy); } catch (_a) { throw new Error(`Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`); } } } if (this._differ) { const changes = this._differ.diff(this._ngForOf); if (changes) this._applyChanges(changes); } } _applyChanges(changes) { const insertTuples = []; changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => { if (item.previousIndex == null) { // NgForOf is never "null" or "undefined" here because the differ detected // that a new item needs to be inserted from the iterable. This implies that // there is an iterable value for "_ngForOf". const view = this._viewContainer.createEmbeddedView(this._template, new NgForOfContext(null, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex); const tuple = new RecordViewTuple(item, view); insertTuples.push(tuple); } else if (currentIndex == null) { this._viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex); } else if (adjustedPreviousIndex !== null) { const view = this._viewContainer.get(adjustedPreviousIndex); this._viewContainer.move(view, currentIndex); const tuple = new RecordViewTuple(item, view); insertTuples.push(tuple); } }); for (let i = 0; i < insertTuples.length; i++) { this._perViewChange(insertTuples[i].view, insertTuples[i].record); } for (let i = 0, ilen = this._viewContainer.length; i < ilen; i++) { const viewRef = this._viewContainer.get(i); viewRef.context.index = i; viewRef.context.count = ilen; viewRef.context.ngForOf = this._ngForOf; } changes.forEachIdentityChange((record) => { const viewRef = this._viewContainer.get(record.currentIndex); viewRef.context.$implicit = record.item; }); } _perViewChange(view, record) { view.context.$implicit = record.item; } /** * Asserts the correct type of the context for the template that `NgForOf` will render. * * The presence of this method is a signal to the Ivy template type-check compiler that the * `NgForOf` structural directive renders its template with a specific context type. */ static ngTemplateContextGuard(dir, ctx) { return true; } } NgForOf.ɵfac = function NgForOf_Factory(t) { return new (t || NgForOf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"])); }; NgForOf.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgForOf, selectors: [["", "ngFor", "", "ngForOf", ""]], inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" } }); NgForOf.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] } ]; NgForOf.propDecorators = { ngForOf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTrackBy: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTemplate: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgForOf, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngFor][ngForOf]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["IterableDiffers"] }]; }, { ngForOf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTrackBy: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngForTemplate: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); class RecordViewTuple { constructor(record, view) { this.record = record; this.view = view; } } function getTypeName(type) { return type['name'] || typeof type; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A structural directive that conditionally includes a template based on the value of * an expression coerced to Boolean. * When the expression evaluates to true, Angular renders the template * provided in a `then` clause, and when false or null, * Angular renders the template provided in an optional `else` clause. The default * template for the `else` clause is blank. * * A [shorthand form](guide/structural-directives#asterisk) of the directive, * `*ngIf="condition"`, is generally used, provided * as an attribute of the anchor element for the inserted template. * Angular expands this into a more explicit version, in which the anchor element * is contained in an `<ng-template>` element. * * Simple form with shorthand syntax: * * ``` * <div *ngIf="condition">Content to render when condition is true.</div> * ``` * * Simple form with expanded syntax: * * ``` * <ng-template [ngIf]="condition"><div>Content to render when condition is * true.</div></ng-template> * ``` * * Form with an "else" block: * * ``` * <div *ngIf="condition; else elseBlock">Content to render when condition is true.</div> * <ng-template #elseBlock>Content to render when condition is false.</ng-template> * ``` * * Shorthand form with "then" and "else" blocks: * * ``` * <div *ngIf="condition; then thenBlock else elseBlock"></div> * <ng-template #thenBlock>Content to render when condition is true.</ng-template> * <ng-template #elseBlock>Content to render when condition is false.</ng-template> * ``` * * Form with storing the value locally: * * ``` * <div *ngIf="condition as value; else elseBlock">{{value}}</div> * <ng-template #elseBlock>Content to render when value is null.</ng-template> * ``` * * @usageNotes * * The `*ngIf` directive is most commonly used to conditionally show an inline template, * as seen in the following example. * The default `else` template is blank. * * {@example common/ngIf/ts/module.ts region='NgIfSimple'} * * ### Showing an alternative template using `else` * * To display a template when `expression` evaluates to false, use an `else` template * binding as shown in the following example. * The `else` binding points to an `<ng-template>` element labeled `#elseBlock`. * The template can be defined anywhere in the component view, but is typically placed right after * `ngIf` for readability. * * {@example common/ngIf/ts/module.ts region='NgIfElse'} * * ### Using an external `then` template * * In the previous example, the then-clause template is specified inline, as the content of the * tag that contains the `ngIf` directive. You can also specify a template that is defined * externally, by referencing a labeled `<ng-template>` element. When you do this, you can * change which template to use at runtime, as shown in the following example. * * {@example common/ngIf/ts/module.ts region='NgIfThenElse'} * * ### Storing a conditional result in a variable * * You might want to show a set of properties from the same object. If you are waiting * for asynchronous data, the object can be undefined. * In this case, you can use `ngIf` and store the result of the condition in a local * variable as shown in the following example. * * {@example common/ngIf/ts/module.ts region='NgIfAs'} * * This code uses only one `AsyncPipe`, so only one subscription is created. * The conditional statement stores the result of `userStream|async` in the local variable `user`. * You can then bind the local `user` repeatedly. * * The conditional displays the data only if `userStream` returns a value, * so you don't need to use the * safe-navigation-operator (`?.`) * to guard against null values when accessing properties. * You can display an alternative template while waiting for the data. * * ### Shorthand syntax * * The shorthand syntax `*ngIf` expands into two separate template specifications * for the "then" and "else" clauses. For example, consider the following shorthand statement, * that is meant to show a loading page while waiting for data to be loaded. * * ``` * <div class="hero-list" *ngIf="heroes else loading"> * ... * </div> * * <ng-template #loading> * <div>Loading...</div> * </ng-template> * ``` * * You can see that the "else" clause references the `<ng-template>` * with the `#loading` label, and the template for the "then" clause * is provided as the content of the anchor element. * * However, when Angular expands the shorthand syntax, it creates * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives. * The anchor element containing the template for the "then" clause becomes * the content of this unlabeled `<ng-template>` tag. * * ``` * <ng-template [ngIf]="heroes" [ngIfElse]="loading"> * <div class="hero-list"> * ... * </div> * </ng-template> * * <ng-template #loading> * <div>Loading...</div> * </ng-template> * ``` * * The presence of the implicit template object has implications for the nesting of * structural directives. For more on this subject, see * [Structural Directives](https://angular.io/guide/built-in-directives#one-per-element). * * @ngModule CommonModule * @publicApi */ class NgIf { constructor(_viewContainer, templateRef) { this._viewContainer = _viewContainer; this._context = new NgIfContext(); this._thenTemplateRef = null; this._elseTemplateRef = null; this._thenViewRef = null; this._elseViewRef = null; this._thenTemplateRef = templateRef; } /** * The Boolean expression to evaluate as the condition for showing a template. */ set ngIf(condition) { this._context.$implicit = this._context.ngIf = condition; this._updateView(); } /** * A template to show if the condition expression evaluates to true. */ set ngIfThen(templateRef) { assertTemplate('ngIfThen', templateRef); this._thenTemplateRef = templateRef; this._thenViewRef = null; // clear previous view if any. this._updateView(); } /** * A template to show if the condition expression evaluates to false. */ set ngIfElse(templateRef) { assertTemplate('ngIfElse', templateRef); this._elseTemplateRef = templateRef; this._elseViewRef = null; // clear previous view if any. this._updateView(); } _updateView() { if (this._context.$implicit) { if (!this._thenViewRef) { this._viewContainer.clear(); this._elseViewRef = null; if (this._thenTemplateRef) { this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context); } } } else { if (!this._elseViewRef) { this._viewContainer.clear(); this._thenViewRef = null; if (this._elseTemplateRef) { this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context); } } } } /** * Asserts the correct type of the context for the template that `NgIf` will render. * * The presence of this method is a signal to the Ivy template type-check compiler that the * `NgIf` structural directive renders its template with a specific context type. */ static ngTemplateContextGuard(dir, ctx) { return true; } } NgIf.ɵfac = function NgIf_Factory(t) { return new (t || NgIf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"])); }; NgIf.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgIf, selectors: [["", "ngIf", ""]], inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" } }); NgIf.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] } ]; NgIf.propDecorators = { ngIf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfThen: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfElse: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgIf, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngIf]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }]; }, { ngIf: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfThen: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngIfElse: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @publicApi */ class NgIfContext { constructor() { this.$implicit = null; this.ngIf = null; } } function assertTemplate(property, templateRef) { const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView); if (!isTemplateRefOrNull) { throw new Error(`${property} must be a TemplateRef, but received '${Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(templateRef)}'.`); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SwitchView { constructor(_viewContainerRef, _templateRef) { this._viewContainerRef = _viewContainerRef; this._templateRef = _templateRef; this._created = false; } create() { this._created = true; this._viewContainerRef.createEmbeddedView(this._templateRef); } destroy() { this._created = false; this._viewContainerRef.clear(); } enforceState(created) { if (created && !this._created) { this.create(); } else if (!created && this._created) { this.destroy(); } } } /** * @ngModule CommonModule * * @description * The `[ngSwitch]` directive on a container specifies an expression to match against. * The expressions to match are provided by `ngSwitchCase` directives on views within the container. * - Every view that matches is rendered. * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered. * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase` * or `ngSwitchDefault` directive are preserved at the location. * * @usageNotes * Define a container element for the directive, and specify the switch expression * to match against as an attribute: * * ``` * <container-element [ngSwitch]="switch_expression"> * ``` * * Within the container, `*ngSwitchCase` statements specify the match expressions * as attributes. Include `*ngSwitchDefault` as the final case. * * ``` * <container-element [ngSwitch]="switch_expression"> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * ... * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * ### Usage Examples * * The following example shows how to use more than one case to display the same view: * * ``` * <container-element [ngSwitch]="switch_expression"> * <!-- the same view can be shown in more than one case --> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * <some-element *ngSwitchCase="match_expression_2">...</some-element> * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element> * <!--default case when there are no matches --> * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * The following example shows how cases can be nested: * ``` * <container-element [ngSwitch]="switch_expression"> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * <some-element *ngSwitchCase="match_expression_2">...</some-element> * <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element> * <ng-container *ngSwitchCase="match_expression_3"> * <!-- use a ng-container to group multiple root nodes --> * <inner-element></inner-element> * <inner-other-element></inner-other-element> * </ng-container> * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * @publicApi * @see `NgSwitchCase` * @see `NgSwitchDefault` * @see [Structural Directives](guide/structural-directives) * */ class NgSwitch { constructor() { this._defaultUsed = false; this._caseCount = 0; this._lastCaseCheckIndex = 0; this._lastCasesMatched = false; } set ngSwitch(newValue) { this._ngSwitch = newValue; if (this._caseCount === 0) { this._updateDefaultCases(true); } } /** @internal */ _addCase() { return this._caseCount++; } /** @internal */ _addDefault(view) { if (!this._defaultViews) { this._defaultViews = []; } this._defaultViews.push(view); } /** @internal */ _matchCase(value) { const matched = value == this._ngSwitch; this._lastCasesMatched = this._lastCasesMatched || matched; this._lastCaseCheckIndex++; if (this._lastCaseCheckIndex === this._caseCount) { this._updateDefaultCases(!this._lastCasesMatched); this._lastCaseCheckIndex = 0; this._lastCasesMatched = false; } return matched; } _updateDefaultCases(useDefault) { if (this._defaultViews && useDefault !== this._defaultUsed) { this._defaultUsed = useDefault; for (let i = 0; i < this._defaultViews.length; i++) { const defaultView = this._defaultViews[i]; defaultView.enforceState(useDefault); } } } } NgSwitch.ɵfac = function NgSwitch_Factory(t) { return new (t || NgSwitch)(); }; NgSwitch.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgSwitch, selectors: [["", "ngSwitch", ""]], inputs: { ngSwitch: "ngSwitch" } }); NgSwitch.propDecorators = { ngSwitch: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitch, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitch]' }] }], function () { return []; }, { ngSwitch: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @ngModule CommonModule * * @description * Provides a switch case expression to match against an enclosing `ngSwitch` expression. * When the expressions match, the given `NgSwitchCase` template is rendered. * If multiple match expressions match the switch expression value, all of them are displayed. * * @usageNotes * * Within a switch container, `*ngSwitchCase` statements specify the match expressions * as attributes. Include `*ngSwitchDefault` as the final case. * * ``` * <container-element [ngSwitch]="switch_expression"> * <some-element *ngSwitchCase="match_expression_1">...</some-element> * ... * <some-element *ngSwitchDefault>...</some-element> * </container-element> * ``` * * Each switch-case statement contains an in-line HTML template or template reference * that defines the subtree to be selected if the value of the match expression * matches the value of the switch expression. * * Unlike JavaScript, which uses strict equality, Angular uses loose equality. * This means that the empty string, `""` matches 0. * * @publicApi * @see `NgSwitch` * @see `NgSwitchDefault` * */ class NgSwitchCase { constructor(viewContainer, templateRef, ngSwitch) { this.ngSwitch = ngSwitch; ngSwitch._addCase(); this._view = new SwitchView(viewContainer, templateRef); } /** * Performs case matching. For internal use only. */ ngDoCheck() { this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase)); } } NgSwitchCase.ɵfac = function NgSwitchCase_Factory(t) { return new (t || NgSwitchCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 1)); }; NgSwitchCase.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgSwitchCase, selectors: [["", "ngSwitchCase", ""]], inputs: { ngSwitchCase: "ngSwitchCase" } }); NgSwitchCase.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] } ]; NgSwitchCase.propDecorators = { ngSwitchCase: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchCase, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitchCase]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] }]; }, { ngSwitchCase: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @ngModule CommonModule * * @description * * Creates a view that is rendered when no `NgSwitchCase` expressions * match the `NgSwitch` expression. * This statement should be the final case in an `NgSwitch`. * * @publicApi * @see `NgSwitch` * @see `NgSwitchCase` * */ class NgSwitchDefault { constructor(viewContainer, templateRef, ngSwitch) { ngSwitch._addDefault(new SwitchView(viewContainer, templateRef)); } } NgSwitchDefault.ɵfac = function NgSwitchDefault_Factory(t) { return new (t || NgSwitchDefault)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 1)); }; NgSwitchDefault.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgSwitchDefault, selectors: [["", "ngSwitchDefault", ""]] }); NgSwitchDefault.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchDefault, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngSwitchDefault]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: NgSwitch, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @usageNotes * ``` * <some-element [ngPlural]="value"> * <ng-template ngPluralCase="=0">there is nothing</ng-template> * <ng-template ngPluralCase="=1">there is one</ng-template> * <ng-template ngPluralCase="few">there are a few</ng-template> * </some-element> * ``` * * @description * * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization. * * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees * that match the switch expression's pluralization category. * * To use this directive you must provide a container element that sets the `[ngPlural]` attribute * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their * expression: * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value * matches the switch expression exactly, * - otherwise, the view will be treated as a "category match", and will only display if exact * value matches aren't found and the value maps to its category for the defined locale. * * See http://cldr.unicode.org/index/cldr-spec/plural-rules * * @publicApi */ class NgPlural { constructor(_localization) { this._localization = _localization; this._caseViews = {}; } set ngPlural(value) { this._switchValue = value; this._updateView(); } addCase(value, switchView) { this._caseViews[value] = switchView; } _updateView() { this._clearViews(); const cases = Object.keys(this._caseViews); const key = getPluralCategory(this._switchValue, cases, this._localization); this._activateView(this._caseViews[key]); } _clearViews() { if (this._activeView) this._activeView.destroy(); } _activateView(view) { if (view) { this._activeView = view; this._activeView.create(); } } } NgPlural.ɵfac = function NgPlural_Factory(t) { return new (t || NgPlural)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization)); }; NgPlural.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgPlural, selectors: [["", "ngPlural", ""]], inputs: { ngPlural: "ngPlural" } }); NgPlural.ctorParameters = () => [ { type: NgLocalization } ]; NgPlural.propDecorators = { ngPlural: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPlural, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngPlural]' }] }], function () { return [{ type: NgLocalization }]; }, { ngPlural: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @ngModule CommonModule * * @description * * Creates a view that will be added/removed from the parent {@link NgPlural} when the * given expression matches the plural expression according to CLDR rules. * * @usageNotes * ``` * <some-element [ngPlural]="value"> * <ng-template ngPluralCase="=0">...</ng-template> * <ng-template ngPluralCase="other">...</ng-template> * </some-element> *``` * * See {@link NgPlural} for more details and example. * * @publicApi */ class NgPluralCase { constructor(value, template, viewContainer, ngPlural) { this.value = value; const isANumber = !isNaN(Number(value)); ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template)); } } NgPluralCase.ɵfac = function NgPluralCase_Factory(t) { return new (t || NgPluralCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectAttribute"]('ngPluralCase'), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgPlural, 1)); }; NgPluralCase.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgPluralCase, selectors: [["", "ngPluralCase", ""]] }); NgPluralCase.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['ngPluralCase',] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: NgPlural, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPluralCase, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngPluralCase]' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Attribute"], args: ['ngPluralCase'] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["TemplateRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }, { type: NgPlural, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Host"] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @usageNotes * * Set the font of the containing element to the result of an expression. * * ``` * <some-element [ngStyle]="{'font-style': styleExp}">...</some-element> * ``` * * Set the width of the containing element to a pixel value returned by an expression. * * ``` * <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element> * ``` * * Set a collection of style values using an expression that returns key-value pairs. * * ``` * <some-element [ngStyle]="objExp">...</some-element> * ``` * * @description * * An attribute directive that updates styles for the containing HTML element. * Sets one or more style properties, specified as colon-separated key-value pairs. * The key is a style name, with an optional `.<unit>` suffix * (such as 'top.px', 'font-style.em'). * The value is an expression to be evaluated. * The resulting non-null value, expressed in the given unit, * is assigned to the given style property. * If the result of evaluation is null, the corresponding style is removed. * * @publicApi */ class NgStyle { constructor(_ngEl, _differs, _renderer) { this._ngEl = _ngEl; this._differs = _differs; this._renderer = _renderer; this._ngStyle = null; this._differ = null; } set ngStyle(values) { this._ngStyle = values; if (!this._differ && values) { this._differ = this._differs.find(values).create(); } } ngDoCheck() { if (this._differ) { const changes = this._differ.diff(this._ngStyle); if (changes) { this._applyChanges(changes); } } } _setStyle(nameAndUnit, value) { const [name, unit] = nameAndUnit.split('.'); value = value != null && unit ? `${value}${unit}` : value; if (value != null) { this._renderer.setStyle(this._ngEl.nativeElement, name, value); } else { this._renderer.removeStyle(this._ngEl.nativeElement, name); } } _applyChanges(changes) { changes.forEachRemovedItem((record) => this._setStyle(record.key, null)); changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue)); changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue)); } } NgStyle.ɵfac = function NgStyle_Factory(t) { return new (t || NgStyle)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"])); }; NgStyle.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgStyle, selectors: [["", "ngStyle", ""]], inputs: { ngStyle: "ngStyle" } }); NgStyle.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] } ]; NgStyle.propDecorators = { ngStyle: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngStyle',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgStyle, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngStyle]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Renderer2"] }]; }, { ngStyle: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['ngStyle'] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * * @description * * Inserts an embedded view from a prepared `TemplateRef`. * * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`. * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding * by the local template `let` declarations. * * @usageNotes * ``` * <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container> * ``` * * Using the key `$implicit` in the context object will set its value as default. * * ### Example * * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'} * * @publicApi */ class NgTemplateOutlet { constructor(_viewContainerRef) { this._viewContainerRef = _viewContainerRef; this._viewRef = null; /** * A context object to attach to the {@link EmbeddedViewRef}. This should be an * object, the object's keys will be available for binding by the local template `let` * declarations. * Using the key `$implicit` in the context object will set its value as default. */ this.ngTemplateOutletContext = null; /** * A string defining the template reference and optionally the context object for the template. */ this.ngTemplateOutlet = null; } ngOnChanges(changes) { const recreateView = this._shouldRecreateView(changes); if (recreateView) { const viewContainerRef = this._viewContainerRef; if (this._viewRef) { viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef)); } this._viewRef = this.ngTemplateOutlet ? viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext) : null; } else if (this._viewRef && this.ngTemplateOutletContext) { this._updateExistingContext(this.ngTemplateOutletContext); } } /** * We need to re-create existing embedded view if: * - templateRef has changed * - context has changes * * We mark context object as changed when the corresponding object * shape changes (new properties are added or existing properties are removed). * In other words we consider context with the same properties as "the same" even * if object reference changes (see https://github.com/angular/angular/issues/13407). */ _shouldRecreateView(changes) { const ctxChange = changes['ngTemplateOutletContext']; return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange)); } _hasContextShapeChanged(ctxChange) { const prevCtxKeys = Object.keys(ctxChange.previousValue || {}); const currCtxKeys = Object.keys(ctxChange.currentValue || {}); if (prevCtxKeys.length === currCtxKeys.length) { for (let propName of currCtxKeys) { if (prevCtxKeys.indexOf(propName) === -1) { return true; } } return false; } return true; } _updateExistingContext(ctx) { for (let propName of Object.keys(ctx)) { this._viewRef.context[propName] = this.ngTemplateOutletContext[propName]; } } } NgTemplateOutlet.ɵfac = function NgTemplateOutlet_Factory(t) { return new (t || NgTemplateOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"])); }; NgTemplateOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ type: NgTemplateOutlet, selectors: [["", "ngTemplateOutlet", ""]], inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] }); NgTemplateOutlet.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] } ]; NgTemplateOutlet.propDecorators = { ngTemplateOutletContext: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngTemplateOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgTemplateOutlet, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: '[ngTemplateOutlet]' }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewContainerRef"] }]; }, { ngTemplateOutletContext: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }], ngTemplateOutlet: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A collection of Angular directives that are likely to be used in each and every Angular * application. */ const COMMON_DIRECTIVES = [ NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function invalidPipeArgumentError(type, value) { return Error(`InvalidPipeArgument: '${value}' for pipe '${Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type)}'`); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class SubscribableStrategy { createSubscription(async, updateLatestValue) { return async.subscribe({ next: updateLatestValue, error: (e) => { throw e; } }); } dispose(subscription) { subscription.unsubscribe(); } onDestroy(subscription) { subscription.unsubscribe(); } } class PromiseStrategy { createSubscription(async, updateLatestValue) { return async.then(updateLatestValue, e => { throw e; }); } dispose(subscription) { } onDestroy(subscription) { } } const _promiseStrategy = new PromiseStrategy(); const _subscribableStrategy = new SubscribableStrategy(); /** * @ngModule CommonModule * @description * * Unwraps a value from an asynchronous primitive. * * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid * potential memory leaks. * * @usageNotes * * ### Examples * * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the * promise. * * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'} * * It's also possible to use `async` with Observables. The example below binds the `time` Observable * to the view. The Observable continuously updates the view with the current time. * * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'} * * @publicApi */ class AsyncPipe { constructor(_ref) { this._ref = _ref; this._latestValue = null; this._subscription = null; this._obj = null; this._strategy = null; } ngOnDestroy() { if (this._subscription) { this._dispose(); } } transform(obj) { if (!this._obj) { if (obj) { this._subscribe(obj); } return this._latestValue; } if (obj !== this._obj) { this._dispose(); return this.transform(obj); } return this._latestValue; } _subscribe(obj) { this._obj = obj; this._strategy = this._selectStrategy(obj); this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value)); } _selectStrategy(obj) { if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(obj)) { return _promiseStrategy; } if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisSubscribable"])(obj)) { return _subscribableStrategy; } throw invalidPipeArgumentError(AsyncPipe, obj); } _dispose() { this._strategy.dispose(this._subscription); this._latestValue = null; this._subscription = null; this._obj = null; } _updateLatestValue(async, value) { if (async === this._obj) { this._latestValue = value; this._ref.markForCheck(); } } } AsyncPipe.ɵfac = function AsyncPipe_Factory(t) { return new (t || AsyncPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectPipeChangeDetectorRef"]()); }; AsyncPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "async", type: AsyncPipe, pure: false }); AsyncPipe.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AsyncPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'async', pure: false }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ChangeDetectorRef"] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Transforms text to all lower case. * * @see `UpperCasePipe` * @see `TitleCasePipe` * @usageNotes * * The following example defines a view that allows the user to enter * text, and then uses the pipe to convert the input text to all lower case. * * <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example> * * @ngModule CommonModule * @publicApi */ class LowerCasePipe { transform(value) { if (value == null) return null; if (typeof value !== 'string') { throw invalidPipeArgumentError(LowerCasePipe, value); } return value.toLowerCase(); } } LowerCasePipe.ɵfac = function LowerCasePipe_Factory(t) { return new (t || LowerCasePipe)(); }; LowerCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "lowercase", type: LowerCasePipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LowerCasePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'lowercase' }] }], null, null); })(); // // Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result // can be achieved by using /\p{L}\S*/gu and also known as Unicode Property Escapes // (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no // transpilation of this functionality down to ES5 without external tool, the only solution is // to use already transpiled form. Example can be found here - // https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1 // const unicodeWordMatch = /(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g; /** * Transforms text to title case. * Capitalizes the first letter of each word and transforms the * rest of the word to lower case. * Words are delimited by any whitespace character, such as a space, tab, or line-feed character. * * @see `LowerCasePipe` * @see `UpperCasePipe` * * @usageNotes * The following example shows the result of transforming various strings into title case. * * <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example> * * @ngModule CommonModule * @publicApi */ class TitleCasePipe { transform(value) { if (value == null) return null; if (typeof value !== 'string') { throw invalidPipeArgumentError(TitleCasePipe, value); } return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.substr(1).toLowerCase())); } } TitleCasePipe.ɵfac = function TitleCasePipe_Factory(t) { return new (t || TitleCasePipe)(); }; TitleCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "titlecase", type: TitleCasePipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TitleCasePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'titlecase' }] }], null, null); })(); /** * Transforms text to all upper case. * @see `LowerCasePipe` * @see `TitleCasePipe` * * @ngModule CommonModule * @publicApi */ class UpperCasePipe { transform(value) { if (value == null) return null; if (typeof value !== 'string') { throw invalidPipeArgumentError(UpperCasePipe, value); } return value.toUpperCase(); } } UpperCasePipe.ɵfac = function UpperCasePipe_Factory(t) { return new (t || UpperCasePipe)(); }; UpperCasePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "uppercase", type: UpperCasePipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](UpperCasePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'uppercase' }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // clang-format off /** * @ngModule CommonModule * @description * * Formats a date value according to locale rules. * * Only the `en-US` locale data comes with Angular. To localize dates * in another language, you must import the corresponding locale data. * See the [I18n guide](guide/i18n#i18n-pipes) for more information. * * @see `formatDate()` * * * @usageNotes * * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to * reformat the date on every change-detection cycle, treat the date as an immutable object * and change the reference when the pipe needs to run again. * * ### Pre-defined format options * * | Option | Equivalent to | Examples (given in `en-US` locale) | * |---------------|-------------------------------------|-------------------------------------------------| * | `'short'` | `'M/d/yy, h:mm a'` | `6/15/15, 9:03 AM` | * | `'medium'` | `'MMM d, y, h:mm:ss a'` | `Jun 15, 2015, 9:03:01 AM` | * | `'long'` | `'MMMM d, y, h:mm:ss a z'` | `June 15, 2015 at 9:03:01 AM GMT+1` | * | `'full'` | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` | * | `'shortDate'` | `'M/d/yy'` | `6/15/15` | * | `'mediumDate'`| `'MMM d, y'` | `Jun 15, 2015` | * | `'longDate'` | `'MMMM d, y'` | `June 15, 2015` | * | `'fullDate'` | `'EEEE, MMMM d, y'` | `Monday, June 15, 2015` | * | `'shortTime'` | `'h:mm a'` | `9:03 AM` | * | `'mediumTime'`| `'h:mm:ss a'` | `9:03:01 AM` | * | `'longTime'` | `'h:mm:ss a z'` | `9:03:01 AM GMT+1` | * | `'fullTime'` | `'h:mm:ss a zzzz'` | `9:03:01 AM GMT+01:00` | * * ### Custom format options * * You can construct a format string using symbols to specify the components * of a date-time value, as described in the following table. * Format details depend on the locale. * Fields marked with (*) are only available in the extra data set for the given locale. * * | Field type | Format | Description | Example Value | * |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------| * | Era | G, GG & GGG | Abbreviated | AD | * | | GGGG | Wide | Anno Domini | * | | GGGGG | Narrow | A | * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 | * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 | * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 | * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 | * | Week-numbering year| Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 | * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 | * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 | * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 | * | Month | M | Numeric: 1 digit | 9, 12 | * | | MM | Numeric: 2 digits + zero padded | 09, 12 | * | | MMM | Abbreviated | Sep | * | | MMMM | Wide | September | * | | MMMMM | Narrow | S | * | Month standalone | L | Numeric: 1 digit | 9, 12 | * | | LL | Numeric: 2 digits + zero padded | 09, 12 | * | | LLL | Abbreviated | Sep | * | | LLLL | Wide | September | * | | LLLLL | Narrow | S | * | Week of year | w | Numeric: minimum digits | 1... 53 | * | | ww | Numeric: 2 digits + zero padded | 01... 53 | * | Week of month | W | Numeric: 1 digit | 1... 5 | * | Day of month | d | Numeric: minimum digits | 1 | * | | dd | Numeric: 2 digits + zero padded | 01 | * | Week day | E, EE & EEE | Abbreviated | Tue | * | | EEEE | Wide | Tuesday | * | | EEEEE | Narrow | T | * | | EEEEEE | Short | Tu | * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM | * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem | * | | aaaaa | Narrow | a/p | * | Period* | B, BB & BBB | Abbreviated | mid. | * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night | * | | BBBBB | Narrow | md | * | Period standalone* | b, bb & bbb | Abbreviated | mid. | * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night | * | | bbbbb | Narrow | md | * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 | * | | hh | Numeric: 2 digits + zero padded | 01, 12 | * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 | * | | HH | Numeric: 2 digits + zero padded | 00, 23 | * | Minute | m | Numeric: minimum digits | 8, 59 | * | | mm | Numeric: 2 digits + zero padded | 08, 59 | * | Second | s | Numeric: minimum digits | 0... 59 | * | | ss | Numeric: 2 digits + zero padded | 00... 59 | * | Fractional seconds | S | Numeric: 1 digit | 0... 9 | * | | SS | Numeric: 2 digits + zero padded | 00... 99 | * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 | * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 | * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 | * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 | * | | ZZZZ | Long localized GMT format | GMT-8:00 | * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 | * | | O, OO & OOO | Short localized GMT format | GMT-8 | * | | OOOO | Long localized GMT format | GMT-08:00 | * * * ### Format examples * * These examples transform a date into various formats, * assuming that `dateObj` is a JavaScript `Date` object for * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11, * given in the local time for the `en-US` locale. * * ``` * {{ dateObj | date }} // output is 'Jun 15, 2015' * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM' * {{ dateObj | date:'shortTime' }} // output is '9:43 PM' * {{ dateObj | date:'mm:ss' }} // output is '43:11' * ``` * * ### Usage example * * The following component uses a date pipe to display the current date in different formats. * * ``` * @Component({ * selector: 'date-pipe', * template: `<div> * <p>Today is {{today | date}}</p> * <p>Or if you prefer, {{today | date:'fullDate'}}</p> * <p>The time is {{today | date:'h:mm a z'}}</p> * </div>` * }) * // Get the current date and time as a date-time value. * export class DatePipeComponent { * today: number = Date.now(); * } * ``` * * @publicApi */ // clang-format on class DatePipe { constructor(locale) { this.locale = locale; } transform(value, format = 'mediumDate', timezone, locale) { if (value == null || value === '' || value !== value) return null; try { return formatDate(value, format, locale || this.locale, timezone); } catch (error) { throw invalidPipeArgumentError(DatePipe, error.message); } } } DatePipe.ɵfac = function DatePipe_Factory(t) { return new (t || DatePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; DatePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "date", type: DatePipe, pure: true }); DatePipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DatePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'date', pure: true }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const _INTERPOLATION_REGEXP = /#/g; /** * @ngModule CommonModule * @description * * Maps a value to a string that pluralizes the value according to locale rules. * * @usageNotes * * ### Example * * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'} * * @publicApi */ class I18nPluralPipe { constructor(_localization) { this._localization = _localization; } /** * @param value the number to be formatted * @param pluralMap an object that mimics the ICU format, see * http://userguide.icu-project.org/formatparse/messages. * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by * default). */ transform(value, pluralMap, locale) { if (value == null) return ''; if (typeof pluralMap !== 'object' || pluralMap === null) { throw invalidPipeArgumentError(I18nPluralPipe, pluralMap); } const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale); return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString()); } } I18nPluralPipe.ɵfac = function I18nPluralPipe_Factory(t) { return new (t || I18nPluralPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization)); }; I18nPluralPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "i18nPlural", type: I18nPluralPipe, pure: true }); I18nPluralPipe.ctorParameters = () => [ { type: NgLocalization } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nPluralPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'i18nPlural', pure: true }] }], function () { return [{ type: NgLocalization }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Generic selector that displays the string that matches the current value. * * If none of the keys of the `mapping` match the `value`, then the content * of the `other` key is returned when present, otherwise an empty string is returned. * * @usageNotes * * ### Example * * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'} * * @publicApi */ class I18nSelectPipe { /** * @param value a string to be internationalized. * @param mapping an object that indicates the text that should be displayed * for different values of the provided `value`. */ transform(value, mapping) { if (value == null) return ''; if (typeof mapping !== 'object' || typeof value !== 'string') { throw invalidPipeArgumentError(I18nSelectPipe, mapping); } if (mapping.hasOwnProperty(value)) { return mapping[value]; } if (mapping.hasOwnProperty('other')) { return mapping['other']; } return ''; } } I18nSelectPipe.ɵfac = function I18nSelectPipe_Factory(t) { return new (t || I18nSelectPipe)(); }; I18nSelectPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "i18nSelect", type: I18nSelectPipe, pure: true }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nSelectPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'i18nSelect', pure: true }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Converts a value into its JSON-format representation. Useful for debugging. * * @usageNotes * * The following component uses a JSON pipe to convert an object * to JSON format, and displays the string in both formats for comparison. * * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'} * * @publicApi */ class JsonPipe { /** * @param value A value of any type to convert into a JSON-format string. */ transform(value) { return JSON.stringify(value, null, 2); } } JsonPipe.ɵfac = function JsonPipe_Factory(t) { return new (t || JsonPipe)(); }; JsonPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "json", type: JsonPipe, pure: false }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'json', pure: false }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function makeKeyValuePair(key, value) { return { key: key, value: value }; } /** * @ngModule CommonModule * @description * * Transforms Object or Map into an array of key value pairs. * * The output array will be ordered by keys. * By default the comparator will be by Unicode point value. * You can optionally pass a compareFn if your keys are complex types. * * @usageNotes * ### Examples * * This examples show how an Object or a Map can be iterated by ngFor with the use of this * keyvalue pipe. * * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'} * * @publicApi */ class KeyValuePipe { constructor(differs) { this.differs = differs; this.keyValues = []; } transform(input, compareFn = defaultComparator) { if (!input || (!(input instanceof Map) && typeof input !== 'object')) { return null; } if (!this.differ) { // make a differ for whatever type we've been passed in this.differ = this.differs.find(input).create(); } const differChanges = this.differ.diff(input); if (differChanges) { this.keyValues = []; differChanges.forEachItem((r) => { this.keyValues.push(makeKeyValuePair(r.key, r.currentValue)); }); this.keyValues.sort(compareFn); } return this.keyValues; } } KeyValuePipe.ɵfac = function KeyValuePipe_Factory(t) { return new (t || KeyValuePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"])); }; KeyValuePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "keyvalue", type: KeyValuePipe, pure: false }); KeyValuePipe.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](KeyValuePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'keyvalue', pure: false }] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["KeyValueDiffers"] }]; }, null); })(); function defaultComparator(keyValueA, keyValueB) { const a = keyValueA.key; const b = keyValueB.key; // if same exit with 0; if (a === b) return 0; // make sure that undefined are at the end of the sort. if (a === undefined) return 1; if (b === undefined) return -1; // make sure that nulls are at the end of the sort. if (a === null) return 1; if (b === null) return -1; if (typeof a == 'string' && typeof b == 'string') { return a < b ? -1 : 1; } if (typeof a == 'number' && typeof b == 'number') { return a - b; } if (typeof a == 'boolean' && typeof b == 'boolean') { return a < b ? -1 : 1; } // `a` and `b` are of different types. Compare their string values. const aString = String(a); const bString = String(b); return aString == bString ? 0 : aString < bString ? -1 : 1; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Formats a value according to digit options and locale rules. * Locale determines group sizing and separator, * decimal point character, and other locale-specific configurations. * * @see `formatNumber()` * * @usageNotes * * ### digitsInfo * * The value's decimal representation is specified by the `digitsInfo` * parameter, written in the following format:<br> * * ``` * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits} * ``` * * - `minIntegerDigits`: * The minimum number of integer digits before the decimal point. * Default is 1. * * - `minFractionDigits`: * The minimum number of digits after the decimal point. * Default is 0. * * - `maxFractionDigits`: * The maximum number of digits after the decimal point. * Default is 3. * * If the formatted value is truncated it will be rounded using the "to-nearest" method: * * ``` * {{3.6 | number: '1.0-0'}} * <!--will output '4'--> * * {{-3.6 | number:'1.0-0'}} * <!--will output '-4'--> * ``` * * ### locale * * `locale` will format a value according to locale rules. * Locale determines group sizing and separator, * decimal point character, and other locale-specific configurations. * * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default. * * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app). * * ### Example * * The following code shows how the pipe transforms values * according to various format specifications, * where the caller's default locale is `en-US`. * * <code-example path="common/pipes/ts/number_pipe.ts" region='NumberPipe'></code-example> * * @publicApi */ class DecimalPipe { constructor(_locale) { this._locale = _locale; } /** * @param value The value to be formatted. * @param digitsInfo Sets digit and decimal representation. * [See more](#digitsinfo). * @param locale Specifies what locale format rules to use. * [See more](#locale). */ transform(value, digitsInfo, locale) { if (!isValue(value)) return null; locale = locale || this._locale; try { const num = strToNumber(value); return formatNumber(num, locale, digitsInfo); } catch (error) { throw invalidPipeArgumentError(DecimalPipe, error.message); } } } DecimalPipe.ɵfac = function DecimalPipe_Factory(t) { return new (t || DecimalPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; DecimalPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "number", type: DecimalPipe, pure: true }); DecimalPipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DecimalPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'number' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @ngModule CommonModule * @description * * Transforms a number to a percentage * string, formatted according to locale rules that determine group sizing and * separator, decimal-point character, and other locale-specific * configurations. * * @see `formatPercent()` * * @usageNotes * The following code shows how the pipe transforms numbers * into text strings, according to various format specifications, * where the caller's default locale is `en-US`. * * <code-example path="common/pipes/ts/percent_pipe.ts" region='PercentPipe'></code-example> * * @publicApi */ class PercentPipe { constructor(_locale) { this._locale = _locale; } transform(value, digitsInfo, locale) { if (!isValue(value)) return null; locale = locale || this._locale; try { const num = strToNumber(value); return formatPercent(num, locale, digitsInfo); } catch (error) { throw invalidPipeArgumentError(PercentPipe, error.message); } } } PercentPipe.ɵfac = function PercentPipe_Factory(t) { return new (t || PercentPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"])); }; PercentPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "percent", type: PercentPipe, pure: true }); PercentPipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PercentPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'percent' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }]; }, null); })(); /** * @ngModule CommonModule * @description * * Transforms a number to a currency string, formatted according to locale rules * that determine group sizing and separator, decimal-point character, * and other locale-specific configurations. * * {@a currency-code-deprecation} * <div class="alert is-helpful"> * * **Deprecation notice:** * * The default currency code is currently always `USD` but this is deprecated from v9. * * **In v11 the default currency code will be taken from the current locale identified by * the `LOCALE_ID` token. See the [i18n guide](guide/i18n#setting-up-the-locale-of-your-app) for * more information.** * * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in * your application `NgModule`: * * ```ts * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'} * ``` * * </div> * * @see `getCurrencySymbol()` * @see `formatCurrency()` * * @usageNotes * The following code shows how the pipe transforms numbers * into text strings, according to various format specifications, * where the caller's default locale is `en-US`. * * <code-example path="common/pipes/ts/currency_pipe.ts" region='CurrencyPipe'></code-example> * * @publicApi */ class CurrencyPipe { constructor(_locale, _defaultCurrencyCode = 'USD') { this._locale = _locale; this._defaultCurrencyCode = _defaultCurrencyCode; } transform(value, currencyCode, display = 'symbol', digitsInfo, locale) { if (!isValue(value)) return null; locale = locale || this._locale; if (typeof display === 'boolean') { if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) { console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`); } display = display ? 'symbol' : 'code'; } let currency = currencyCode || this._defaultCurrencyCode; if (display !== 'code') { if (display === 'symbol' || display === 'symbol-narrow') { currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale); } else { currency = display; } } try { const num = strToNumber(value); return formatCurrency(num, locale, currency, currencyCode, digitsInfo); } catch (error) { throw invalidPipeArgumentError(CurrencyPipe, error.message); } } } CurrencyPipe.ɵfac = function CurrencyPipe_Factory(t) { return new (t || CurrencyPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"])); }; CurrencyPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "currency", type: CurrencyPipe, pure: true }); CurrencyPipe.ctorParameters = () => [ { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"],] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CurrencyPipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'currency' }] }], function () { return [{ type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["LOCALE_ID"]] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_CURRENCY_CODE"]] }] }]; }, null); })(); function isValue(value) { return !(value == null || value === '' || value !== value); } /** * Transforms a string into a number (if needed). */ function strToNumber(value) { // Convert strings to numbers if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) { return Number(value); } if (typeof value !== 'number') { throw new Error(`${value} is not a number`); } return value; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @ngModule CommonModule * @description * * Creates a new `Array` or `String` containing a subset (slice) of the elements. * * @usageNotes * * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()` * and `String.prototype.slice()`. * * When operating on an `Array`, the returned `Array` is always a copy even when all * the elements are being returned. * * When operating on a blank value, the pipe returns the blank value. * * ### List Example * * This `ngFor` example: * * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'} * * produces the following: * * ```html * <li>b</li> * <li>c</li> * ``` * * ### String Examples * * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'} * * @publicApi */ class SlicePipe { transform(value, start, end) { if (value == null) return null; if (!this.supports(value)) { throw invalidPipeArgumentError(SlicePipe, value); } return value.slice(start, end); } supports(obj) { return typeof obj === 'string' || Array.isArray(obj); } } SlicePipe.ɵfac = function SlicePipe_Factory(t) { return new (t || SlicePipe)(); }; SlicePipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ name: "slice", type: SlicePipe, pure: false }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SlicePipe, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"], args: [{ name: 'slice', pure: false }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * A collection of Angular pipes that are likely to be used in each and every application. */ const COMMON_PIPES = [ AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe, ]; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Note: This does not contain the location providers, // as they need some platform specific implementations to work. /** * Exports all the basic Angular directives and pipes, * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on. * Re-exported by `BrowserModule`, which is included automatically in the root * `AppModule` when you create a new app with the CLI `new` command. * * * The `providers` options configure the NgModule's injector to provide * localization dependencies to members. * * The `exports` options make the declared directives and pipes available for import * by other NgModules. * * @publicApi */ class CommonModule { } CommonModule.ɵfac = function CommonModule_Factory(t) { return new (t || CommonModule)(); }; CommonModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: CommonModule }); CommonModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ { provide: NgLocalization, useClass: NgLocaleLocalization }, ] }); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](CommonModule, { declarations: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CommonModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ declarations: [COMMON_DIRECTIVES, COMMON_PIPES], exports: [COMMON_DIRECTIVES, COMMON_PIPES], providers: [ { provide: NgLocalization, useClass: NgLocaleLocalization }, ] }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const PLATFORM_BROWSER_ID = 'browser'; const PLATFORM_SERVER_ID = 'server'; const PLATFORM_WORKER_APP_ID = 'browserWorkerApp'; const PLATFORM_WORKER_UI_ID = 'browserWorkerUi'; /** * Returns whether a platform id represents a browser platform. * @publicApi */ function isPlatformBrowser(platformId) { return platformId === PLATFORM_BROWSER_ID; } /** * Returns whether a platform id represents a server platform. * @publicApi */ function isPlatformServer(platformId) { return platformId === PLATFORM_SERVER_ID; } /** * Returns whether a platform id represents a web worker app platform. * @publicApi */ function isPlatformWorkerApp(platformId) { return platformId === PLATFORM_WORKER_APP_ID; } /** * Returns whether a platform id represents a web worker UI platform. * @publicApi */ function isPlatformWorkerUi(platformId) { return platformId === PLATFORM_WORKER_UI_ID; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["Version"]('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Defines a scroll position manager. Implemented by `BrowserViewportScroller`. * * @publicApi */ class ViewportScroller { } // De-sugared tree-shakable injection // See #23917 /** @nocollapse */ ViewportScroller.ɵprov = Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ token: ViewportScroller, providedIn: 'root', factory: () => new BrowserViewportScroller(Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(DOCUMENT), window) }); /** * Manages the scroll position for a browser window. */ class BrowserViewportScroller { constructor(document, window) { this.document = document; this.window = window; this.offset = () => [0, 0]; } /** * Configures the top offset used when scrolling to an anchor. * @param offset A position in screen coordinates (a tuple with x and y values) * or a function that returns the top offset position. * */ setOffset(offset) { if (Array.isArray(offset)) { this.offset = () => offset; } else { this.offset = offset; } } /** * Retrieves the current scroll position. * @returns The position in screen coordinates. */ getScrollPosition() { if (this.supportsScrolling()) { return [this.window.pageXOffset, this.window.pageYOffset]; } else { return [0, 0]; } } /** * Sets the scroll position. * @param position The new position in screen coordinates. */ scrollToPosition(position) { if (this.supportsScrolling()) { this.window.scrollTo(position[0], position[1]); } } /** * Scrolls to an element and attempts to focus the element. * * Note that the function name here is misleading in that the target string may be an ID for a * non-anchor element. * * @param target The ID of an element or name of the anchor. * * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document * @see https://html.spec.whatwg.org/#scroll-to-fragid */ scrollToAnchor(target) { var _a; if (!this.supportsScrolling()) { return; } // TODO(atscott): The correct behavior for `getElementsByName` would be to also verify that the // element is an anchor. However, this could be considered a breaking change and should be // done in a major version. const elSelected = (_a = this.document.getElementById(target)) !== null && _a !== void 0 ? _a : this.document.getElementsByName(target)[0]; if (elSelected === undefined) { return; } this.scrollToElement(elSelected); // After scrolling to the element, the spec dictates that we follow the focus steps for the // target. Rather than following the robust steps, simply attempt focus. this.attemptFocus(elSelected); } /** * Disables automatic scroll restoration provided by the browser. */ setHistoryScrollRestoration(scrollRestoration) { if (this.supportScrollRestoration()) { const history = this.window.history; if (history && history.scrollRestoration) { history.scrollRestoration = scrollRestoration; } } } /** * Scrolls to an element using the native offset and the specified offset set on this scroller. * * The offset can be used when we know that there is a floating header and scrolling naively to an * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header. */ scrollToElement(el) { const rect = el.getBoundingClientRect(); const left = rect.left + this.window.pageXOffset; const top = rect.top + this.window.pageYOffset; const offset = this.offset(); this.window.scrollTo(left - offset[0], top - offset[1]); } /** * Calls `focus` on the `focusTarget` and returns `true` if the element was focused successfully. * * If `false`, further steps may be necessary to determine a valid substitute to be focused * instead. * * @see https://html.spec.whatwg.org/#get-the-focusable-area * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus * @see https://html.spec.whatwg.org/#focusable-area */ attemptFocus(focusTarget) { focusTarget.focus(); return this.document.activeElement === focusTarget; } /** * We only support scroll restoration when we can get a hold of window. * This means that we do not support this behavior when running in a web worker. * * Lifting this restriction right now would require more changes in the dom adapter. * Since webworkers aren't widely used, we will lift it once RouterScroller is * battle-tested. */ supportScrollRestoration() { try { if (!this.supportsScrolling()) { return false; } // The `scrollRestoration` property could be on the `history` instance or its prototype. const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) || getScrollRestorationProperty(Object.getPrototypeOf(this.window.history)); // We can write to the `scrollRestoration` property if it is a writable data field or it has a // setter function. return !!scrollRestorationDescriptor && !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set); } catch (_a) { return false; } } supportsScrolling() { try { return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window; } catch (_a) { return false; } } } function getScrollRestorationProperty(obj) { return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration'); } /** * Provides an empty implementation of the viewport scroller. */ class NullViewportScroller { /** * Empty implementation */ setOffset(offset) { } /** * Empty implementation */ getScrollPosition() { return [0, 0]; } /** * Empty implementation */ scrollToPosition(position) { } /** * Empty implementation */ scrollToAnchor(anchor) { } /** * Empty implementation */ setHistoryScrollRestoration(scrollRestoration) { } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=common.js.map /***/ }), /***/ "ofxX": /*!*******************************************!*\ !*** ./node_modules/d3-random/src/lcg.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lcg; }); // https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use const mul = 0x19660D; const inc = 0x3C6EF35F; const eps = 1 / 0x100000000; function lcg(seed = Math.random()) { let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0; return () => (state = mul * state + inc | 0, eps * (state >>> 0)); } /***/ }), /***/ "oxeV": /*!*************************************************!*\ !*** ./node_modules/d3-selection/src/window.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(node) { return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node || (node.document && node) // node is a Window || node.defaultView; // node is a Document }); /***/ }), /***/ "p/1U": /*!************************************************!*\ !*** ./node_modules/d3-format/src/exponent.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(Math.abs(x)), x ? x[1] : NaN; }); /***/ }), /***/ "p/7N": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/quad.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(node, x0, y0, x1, y1) { this.node = node; this.x0 = x0; this.y0 = y0; this.x1 = x1; this.y1 = y1; }); /***/ }), /***/ "p5SD": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/centroid.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "mPOO"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "tepu"); var W0, W1, X0, Y0, Z0, X1, Y1, Z1, X2, Y2, Z2, lambda00, phi00, // first point x0, y0, z0; // previous point var centroidStream = { sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], point: centroidPoint, lineStart: centroidLineStart, lineEnd: centroidLineEnd, polygonStart: function() { centroidStream.lineStart = centroidRingStart; centroidStream.lineEnd = centroidRingEnd; }, polygonEnd: function() { centroidStream.lineStart = centroidLineStart; centroidStream.lineEnd = centroidLineEnd; } }; // Arithmetic mean of Cartesian vectors. function centroidPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); centroidPointCartesian(cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi)); } function centroidPointCartesian(x, y, z) { ++W0; X0 += (x - X0) / W0; Y0 += (y - Y0) / W0; Z0 += (z - Z0) / W0; } function centroidLineStart() { centroidStream.point = centroidLinePointFirst; } function centroidLinePointFirst(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda); y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda); z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); centroidStream.point = centroidLinePoint; centroidPointCartesian(x0, y0, z0); } function centroidLinePoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda), y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda), z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), w = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); W1 += w; X1 += w * (x0 + (x0 = x)); Y1 += w * (y0 + (y0 = y)); Z1 += w * (z0 + (z0 = z)); centroidPointCartesian(x0, y0, z0); } function centroidLineEnd() { centroidStream.point = centroidPoint; } // See J. E. Brock, The Inertia Tensor for a Spherical Triangle, // J. Applied Mechanics 42, 239 (1975). function centroidRingStart() { centroidStream.point = centroidRingPointFirst; } function centroidRingEnd() { centroidRingPoint(lambda00, phi00); centroidStream.point = centroidPoint; } function centroidRingPointFirst(lambda, phi) { lambda00 = lambda, phi00 = phi; lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; centroidStream.point = centroidRingPoint; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda); y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda); z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi); centroidPointCartesian(x0, y0, z0); } function centroidRingPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda), y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda), z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["hypot"])(cx, cy, cz), w = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(m), // line weight = angle v = m && -w / m; // area weight multiplier X2.add(v * cx); Y2.add(v * cy); Z2.add(v * cz); W1 += w; X1 += w * (x0 + (x0 = x)); Y1 += w * (y0 + (y0 = y)); Z1 += w * (z0 + (z0 = z)); centroidPointCartesian(x0, y0, z0); } /* harmony default export */ __webpack_exports__["default"] = (function(object) { W0 = W1 = X0 = Y0 = Z0 = X1 = Y1 = Z1 = 0; X2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Y2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Z2 = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, centroidStream); var x = +X2, y = +Y2, z = +Z2, m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["hypot"])(x, y, z); // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid. if (m < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) { x = X1, y = Y1, z = Z1; // If the feature has zero length, fall back to arithmetic mean of point vectors. if (W1 < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) x = X0, y = Y0, z = Z0; m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["hypot"])(x, y, z); // If the feature still has an undefined ccentroid, then return. if (m < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) return [NaN, NaN]; } return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(z / m) * _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"]]; }); /***/ }), /***/ "p9/F": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/buffer.js ***! \*****************************************************************/ /*! exports provided: buffer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function buffer(closingNotifier) { return function bufferOperatorFunction(source) { return source.lift(new BufferOperator(closingNotifier)); }; } class BufferOperator { constructor(closingNotifier) { this.closingNotifier = closingNotifier; } call(subscriber, source) { return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier)); } } class BufferSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, closingNotifier) { super(destination); this.buffer = []; this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(closingNotifier, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } _next(value) { this.buffer.push(value); } notifyNext() { const buffer = this.buffer; this.buffer = []; this.destination.next(buffer); } } //# sourceMappingURL=buffer.js.map /***/ }), /***/ "pD2Y": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/index.js ***! \**************************************************/ /*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "ZzDG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ "yEp2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ "S83q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ "G21l"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ "UGGt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ "U6M7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ "4xfg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "Ud7J"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ "cb2h"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ "WFeF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ "kO9b"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ "S3lI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformCss"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformSvg"]; }); /* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ "znUM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ "42CK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasis"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasisClosed"]; }); /* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ "cNgm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["hslLong"]; }); /* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ "El5h"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ "Ws9M"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["hclLong"]; }); /* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ "OHKE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["cubehelixLong"]; }); /* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ "rAw/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ "Gvn4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /***/ }), /***/ "pL0w": /*!*****************************************************!*\ !*** ./node_modules/d3-shape/src/curve/monotone.js ***! \*****************************************************/ /*! exports provided: monotoneX, monotoneY */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneX", function() { return monotoneX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneY", function() { return monotoneY; }); function sign(x) { return x < 0 ? -1 : 1; } // Calculate the slopes of the tangents (Hermite-type interpolation) based on // the following paper: Steffen, M. 1990. A Simple Method for Monotonic // Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. // NOV(II), P. 443, 1990. function slope3(that, x2, y2) { var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1); return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; } // Calculate a one-sided slope. function slope2(that, t) { var h = that._x1 - that._x0; return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; } // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations // "you can express cubic Hermite interpolation in terms of cubic Bézier curves // with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". function point(that, t0, t1) { var x0 = that._x0, y0 = that._y0, x1 = that._x1, y1 = that._y1, dx = (x1 - x0) / 3; that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); } function MonotoneX(context) { this._context = context; } MonotoneX.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN; this._point = 0; }, lineEnd: function() { switch (this._point) { case 2: this._context.lineTo(this._x1, this._y1); break; case 3: point(this, this._t0, slope2(this, this._t0)); break; } if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { var t1 = NaN; x = +x, y = +y; if (x === this._x1 && y === this._y1) return; // Ignore coincident points. switch (this._point) { case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; case 1: this._point = 2; break; case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break; default: point(this, this._t0, t1 = slope3(this, x, y)); break; } this._x0 = this._x1, this._x1 = x; this._y0 = this._y1, this._y1 = y; this._t0 = t1; } } function MonotoneY(context) { this._context = new ReflectContext(context); } (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { MonotoneX.prototype.point.call(this, y, x); }; function ReflectContext(context) { this._context = context; } ReflectContext.prototype = { moveTo: function(x, y) { this._context.moveTo(y, x); }, closePath: function() { this._context.closePath(); }, lineTo: function(x, y) { this._context.lineTo(y, x); }, bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } }; function monotoneX(context) { return new MonotoneX(context); } function monotoneY(context) { return new MonotoneY(context); } /***/ }), /***/ "pLZG": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/filter.js ***! \*****************************************************************/ /*! exports provided: filter */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function filter(predicate, thisArg) { return function filterOperatorFunction(source) { return source.lift(new FilterOperator(predicate, thisArg)); }; } class FilterOperator { constructor(predicate, thisArg) { this.predicate = predicate; this.thisArg = thisArg; } call(subscriber, source) { return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg)); } } class FilterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, predicate, thisArg) { super(destination); this.predicate = predicate; this.thisArg = thisArg; this.count = 0; } _next(value) { let result; try { result = this.predicate.call(this.thisArg, value, this.count++); } catch (err) { this.destination.error(err); return; } if (result) { this.destination.next(value); } } } //# sourceMappingURL=filter.js.map /***/ }), /***/ "pLzU": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/subscribeToIterable.js ***! \*************************************************************************/ /*! exports provided: subscribeToIterable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; }); /* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../symbol/iterator */ "Lhse"); const subscribeToIterable = (iterable) => (subscriber) => { const iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]](); do { let item; try { item = iterator.next(); } catch (err) { subscriber.error(err); return subscriber; } if (item.done) { subscriber.complete(); break; } subscriber.next(item.value); if (subscriber.closed) { break; } } while (true); if (typeof iterator.return === 'function') { subscriber.add(() => { if (iterator.return) { iterator.return(); } }); } return subscriber; }; //# sourceMappingURL=subscribeToIterable.js.map /***/ }), /***/ "pXlZ": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowWhen.js ***! \*********************************************************************/ /*! exports provided: windowWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function windowWhen(closingSelector) { return function windowWhenOperatorFunction(source) { return source.lift(new WindowOperator(closingSelector)); }; } class WindowOperator { constructor(closingSelector) { this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector)); } } class WindowSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"] { constructor(destination, closingSelector) { super(destination); this.destination = destination; this.closingSelector = closingSelector; this.openWindow(); } notifyNext(_outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) { this.openWindow(innerSub); } notifyError(error) { this._error(error); } notifyComplete(innerSub) { this.openWindow(innerSub); } _next(value) { this.window.next(value); } _error(err) { this.window.error(err); this.destination.error(err); this.unsubscribeClosingNotification(); } _complete() { this.window.complete(); this.destination.complete(); this.unsubscribeClosingNotification(); } unsubscribeClosingNotification() { if (this.closingNotification) { this.closingNotification.unsubscribe(); } } openWindow(innerSub = null) { if (innerSub) { this.remove(innerSub); innerSub.unsubscribe(); } const prevWindow = this.window; if (prevWindow) { prevWindow.complete(); } const window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); this.destination.next(window); let closingNotifier; try { const { closingSelector } = this; closingNotifier = closingSelector(); } catch (e) { this.destination.error(e); this.window.error(e); return; } this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier)); } } //# sourceMappingURL=windowWhen.js.map /***/ }), /***/ "pZEX": /*!***************************************************!*\ !*** ./node_modules/d3-time-format/src/locale.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatLocale; }); /* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ "tgfz"); function localDate(d) { if (0 <= d.y && d.y < 100) { var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); date.setFullYear(d.y); return date; } return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); } function utcDate(d) { if (0 <= d.y && d.y < 100) { var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); date.setUTCFullYear(d.y); return date; } return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); } function newDate(y, m, d) { return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; } function formatLocale(locale) { var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_weekdays = locale.days, locale_shortWeekdays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths; var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths); var formats = { "a": formatShortWeekday, "A": formatWeekday, "b": formatShortMonth, "B": formatMonth, "c": null, "d": formatDayOfMonth, "e": formatDayOfMonth, "f": formatMicroseconds, "g": formatYearISO, "G": formatFullYearISO, "H": formatHour24, "I": formatHour12, "j": formatDayOfYear, "L": formatMilliseconds, "m": formatMonthNumber, "M": formatMinutes, "p": formatPeriod, "q": formatQuarter, "Q": formatUnixTimestamp, "s": formatUnixTimestampSeconds, "S": formatSeconds, "u": formatWeekdayNumberMonday, "U": formatWeekNumberSunday, "V": formatWeekNumberISO, "w": formatWeekdayNumberSunday, "W": formatWeekNumberMonday, "x": null, "X": null, "y": formatYear, "Y": formatFullYear, "Z": formatZone, "%": formatLiteralPercent }; var utcFormats = { "a": formatUTCShortWeekday, "A": formatUTCWeekday, "b": formatUTCShortMonth, "B": formatUTCMonth, "c": null, "d": formatUTCDayOfMonth, "e": formatUTCDayOfMonth, "f": formatUTCMicroseconds, "g": formatUTCYearISO, "G": formatUTCFullYearISO, "H": formatUTCHour24, "I": formatUTCHour12, "j": formatUTCDayOfYear, "L": formatUTCMilliseconds, "m": formatUTCMonthNumber, "M": formatUTCMinutes, "p": formatUTCPeriod, "q": formatUTCQuarter, "Q": formatUnixTimestamp, "s": formatUnixTimestampSeconds, "S": formatUTCSeconds, "u": formatUTCWeekdayNumberMonday, "U": formatUTCWeekNumberSunday, "V": formatUTCWeekNumberISO, "w": formatUTCWeekdayNumberSunday, "W": formatUTCWeekNumberMonday, "x": null, "X": null, "y": formatUTCYear, "Y": formatUTCFullYear, "Z": formatUTCZone, "%": formatLiteralPercent }; var parses = { "a": parseShortWeekday, "A": parseWeekday, "b": parseShortMonth, "B": parseMonth, "c": parseLocaleDateTime, "d": parseDayOfMonth, "e": parseDayOfMonth, "f": parseMicroseconds, "g": parseYear, "G": parseFullYear, "H": parseHour24, "I": parseHour24, "j": parseDayOfYear, "L": parseMilliseconds, "m": parseMonthNumber, "M": parseMinutes, "p": parsePeriod, "q": parseQuarter, "Q": parseUnixTimestamp, "s": parseUnixTimestampSeconds, "S": parseSeconds, "u": parseWeekdayNumberMonday, "U": parseWeekNumberSunday, "V": parseWeekNumberISO, "w": parseWeekdayNumberSunday, "W": parseWeekNumberMonday, "x": parseLocaleDate, "X": parseLocaleTime, "y": parseYear, "Y": parseFullYear, "Z": parseZone, "%": parseLiteralPercent }; // These recursive directive definitions must be deferred. formats.x = newFormat(locale_date, formats); formats.X = newFormat(locale_time, formats); formats.c = newFormat(locale_dateTime, formats); utcFormats.x = newFormat(locale_date, utcFormats); utcFormats.X = newFormat(locale_time, utcFormats); utcFormats.c = newFormat(locale_dateTime, utcFormats); function newFormat(specifier, formats) { return function(date) { var string = [], i = -1, j = 0, n = specifier.length, c, pad, format; if (!(date instanceof Date)) date = new Date(+date); while (++i < n) { if (specifier.charCodeAt(i) === 37) { string.push(specifier.slice(j, i)); if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); else pad = c === "e" ? " " : "0"; if (format = formats[c]) c = format(date, pad); string.push(c); j = i + 1; } } string.push(specifier.slice(j, i)); return string.join(""); }; } function newParse(specifier, Z) { return function(string) { var d = newDate(1900, undefined, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day; if (i != string.length) return null; // If a UNIX timestamp is specified, return it. if ("Q" in d) return new Date(d.Q); if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); // If this is utcParse, never use the local timezone. if (Z && !("Z" in d)) d.Z = 0; // The am-pm flag is 0 for AM, and 1 for PM. if ("p" in d) d.H = d.H % 12 + d.p * 12; // If the month was not specified, inherit from the quarter. if (d.m === undefined) d.m = "q" in d ? d.q : 0; // Convert day-of-week and week-of-year to day-of-year. if ("V" in d) { if (d.V < 1 || d.V > 53) return null; if (!("w" in d)) d.w = 1; if ("Z" in d) { week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"])(week); week = d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].offset(week, (d.V - 1) * 7); d.y = week.getUTCFullYear(); d.m = week.getUTCMonth(); d.d = week.getUTCDate() + (d.w + 6) % 7; } else { week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"])(week); week = d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].offset(week, (d.V - 1) * 7); d.y = week.getFullYear(); d.m = week.getMonth(); d.d = week.getDate() + (d.w + 6) % 7; } } else if ("W" in d || "U" in d) { if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); d.m = 0; d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; } // If a time zone is specified, all fields are interpreted as UTC and then // offset according to the specified time zone. if ("Z" in d) { d.H += d.Z / 100 | 0; d.M += d.Z % 100; return utcDate(d); } // Otherwise, all fields are in local time. return localDate(d); }; } function parseSpecifier(d, specifier, string, j) { var i = 0, n = specifier.length, m = string.length, c, parse; while (i < n) { if (j >= m) return -1; c = specifier.charCodeAt(i++); if (c === 37) { c = specifier.charAt(i++); parse = parses[c in pads ? specifier.charAt(i++) : c]; if (!parse || ((j = parse(d, string, j)) < 0)) return -1; } else if (c != string.charCodeAt(j++)) { return -1; } } return j; } function parsePeriod(d, string, i) { var n = periodRe.exec(string.slice(i)); return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseShortWeekday(d, string, i) { var n = shortWeekdayRe.exec(string.slice(i)); return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseWeekday(d, string, i) { var n = weekdayRe.exec(string.slice(i)); return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseShortMonth(d, string, i) { var n = shortMonthRe.exec(string.slice(i)); return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseMonth(d, string, i) { var n = monthRe.exec(string.slice(i)); return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; } function parseLocaleDateTime(d, string, i) { return parseSpecifier(d, locale_dateTime, string, i); } function parseLocaleDate(d, string, i) { return parseSpecifier(d, locale_date, string, i); } function parseLocaleTime(d, string, i) { return parseSpecifier(d, locale_time, string, i); } function formatShortWeekday(d) { return locale_shortWeekdays[d.getDay()]; } function formatWeekday(d) { return locale_weekdays[d.getDay()]; } function formatShortMonth(d) { return locale_shortMonths[d.getMonth()]; } function formatMonth(d) { return locale_months[d.getMonth()]; } function formatPeriod(d) { return locale_periods[+(d.getHours() >= 12)]; } function formatQuarter(d) { return 1 + ~~(d.getMonth() / 3); } function formatUTCShortWeekday(d) { return locale_shortWeekdays[d.getUTCDay()]; } function formatUTCWeekday(d) { return locale_weekdays[d.getUTCDay()]; } function formatUTCShortMonth(d) { return locale_shortMonths[d.getUTCMonth()]; } function formatUTCMonth(d) { return locale_months[d.getUTCMonth()]; } function formatUTCPeriod(d) { return locale_periods[+(d.getUTCHours() >= 12)]; } function formatUTCQuarter(d) { return 1 + ~~(d.getUTCMonth() / 3); } return { format: function(specifier) { var f = newFormat(specifier += "", formats); f.toString = function() { return specifier; }; return f; }, parse: function(specifier) { var p = newParse(specifier += "", false); p.toString = function() { return specifier; }; return p; }, utcFormat: function(specifier) { var f = newFormat(specifier += "", utcFormats); f.toString = function() { return specifier; }; return f; }, utcParse: function(specifier) { var p = newParse(specifier += "", true); p.toString = function() { return specifier; }; return p; } }; } var pads = {"-": "", "_": " ", "0": "0"}, numberRe = /^\s*\d+/, // note: ignores next directive percentRe = /^%/, requoteRe = /[\\^$*+?|[\]().{}]/g; function pad(value, fill, width) { var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length; return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); } function requote(s) { return s.replace(requoteRe, "\\$&"); } function formatRe(names) { return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); } function formatLookup(names) { return new Map(names.map((name, i) => [name.toLowerCase(), i])); } function parseWeekdayNumberSunday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.w = +n[0], i + n[0].length) : -1; } function parseWeekdayNumberMonday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.u = +n[0], i + n[0].length) : -1; } function parseWeekNumberSunday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.U = +n[0], i + n[0].length) : -1; } function parseWeekNumberISO(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.V = +n[0], i + n[0].length) : -1; } function parseWeekNumberMonday(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.W = +n[0], i + n[0].length) : -1; } function parseFullYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 4)); return n ? (d.y = +n[0], i + n[0].length) : -1; } function parseYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; } function parseZone(d, string, i) { var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; } function parseQuarter(d, string, i) { var n = numberRe.exec(string.slice(i, i + 1)); return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; } function parseMonthNumber(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.m = n[0] - 1, i + n[0].length) : -1; } function parseDayOfMonth(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.d = +n[0], i + n[0].length) : -1; } function parseDayOfYear(d, string, i) { var n = numberRe.exec(string.slice(i, i + 3)); return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; } function parseHour24(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.H = +n[0], i + n[0].length) : -1; } function parseMinutes(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.M = +n[0], i + n[0].length) : -1; } function parseSeconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 2)); return n ? (d.S = +n[0], i + n[0].length) : -1; } function parseMilliseconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 3)); return n ? (d.L = +n[0], i + n[0].length) : -1; } function parseMicroseconds(d, string, i) { var n = numberRe.exec(string.slice(i, i + 6)); return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; } function parseLiteralPercent(d, string, i) { var n = percentRe.exec(string.slice(i, i + 1)); return n ? i + n[0].length : -1; } function parseUnixTimestamp(d, string, i) { var n = numberRe.exec(string.slice(i)); return n ? (d.Q = +n[0], i + n[0].length) : -1; } function parseUnixTimestampSeconds(d, string, i) { var n = numberRe.exec(string.slice(i)); return n ? (d.s = +n[0], i + n[0].length) : -1; } function formatDayOfMonth(d, p) { return pad(d.getDate(), p, 2); } function formatHour24(d, p) { return pad(d.getHours(), p, 2); } function formatHour12(d, p) { return pad(d.getHours() % 12 || 12, p, 2); } function formatDayOfYear(d, p) { return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d), p, 3); } function formatMilliseconds(d, p) { return pad(d.getMilliseconds(), p, 3); } function formatMicroseconds(d, p) { return formatMilliseconds(d, p) + "000"; } function formatMonthNumber(d, p) { return pad(d.getMonth() + 1, p, 2); } function formatMinutes(d, p) { return pad(d.getMinutes(), p, 2); } function formatSeconds(d, p) { return pad(d.getSeconds(), p, 2); } function formatWeekdayNumberMonday(d) { var day = d.getDay(); return day === 0 ? 7 : day; } function formatWeekNumberSunday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); } function dISO(d) { var day = d.getDay(); return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].ceil(d); } function formatWeekNumberISO(d, p) { d = dISO(d); return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d).getDay() === 4), p, 2); } function formatWeekdayNumberSunday(d) { return d.getDay(); } function formatWeekNumberMonday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2); } function formatYear(d, p) { return pad(d.getFullYear() % 100, p, 2); } function formatYearISO(d, p) { d = dISO(d); return pad(d.getFullYear() % 100, p, 2); } function formatFullYear(d, p) { return pad(d.getFullYear() % 10000, p, 4); } function formatFullYearISO(d, p) { var day = d.getDay(); d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].ceil(d); return pad(d.getFullYear() % 10000, p, 4); } function formatZone(d) { var z = d.getTimezoneOffset(); return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2); } function formatUTCDayOfMonth(d, p) { return pad(d.getUTCDate(), p, 2); } function formatUTCHour24(d, p) { return pad(d.getUTCHours(), p, 2); } function formatUTCHour12(d, p) { return pad(d.getUTCHours() % 12 || 12, p, 2); } function formatUTCDayOfYear(d, p) { return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d), p, 3); } function formatUTCMilliseconds(d, p) { return pad(d.getUTCMilliseconds(), p, 3); } function formatUTCMicroseconds(d, p) { return formatUTCMilliseconds(d, p) + "000"; } function formatUTCMonthNumber(d, p) { return pad(d.getUTCMonth() + 1, p, 2); } function formatUTCMinutes(d, p) { return pad(d.getUTCMinutes(), p, 2); } function formatUTCSeconds(d, p) { return pad(d.getUTCSeconds(), p, 2); } function formatUTCWeekdayNumberMonday(d) { var dow = d.getUTCDay(); return dow === 0 ? 7 : dow; } function formatUTCWeekNumberSunday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); } function UTCdISO(d) { var day = d.getUTCDay(); return (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].ceil(d); } function formatUTCWeekNumberISO(d, p) { d = UTCdISO(d); return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d).getUTCDay() === 4), p, 2); } function formatUTCWeekdayNumberSunday(d) { return d.getUTCDay(); } function formatUTCWeekNumberMonday(d, p) { return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2); } function formatUTCYear(d, p) { return pad(d.getUTCFullYear() % 100, p, 2); } function formatUTCYearISO(d, p) { d = UTCdISO(d); return pad(d.getUTCFullYear() % 100, p, 2); } function formatUTCFullYear(d, p) { return pad(d.getUTCFullYear() % 10000, p, 4); } function formatUTCFullYearISO(d, p) { var day = d.getUTCDay(); d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].ceil(d); return pad(d.getUTCFullYear() % 10000, p, 4); } function formatUTCZone() { return "+0000"; } function formatLiteralPercent() { return "%"; } function formatUnixTimestamp(d) { return +d; } function formatUnixTimestampSeconds(d) { return Math.floor(+d / 1000); } /***/ }), /***/ "pb3N": /*!***********************************************!*\ !*** ./node_modules/d3-geo/src/clip/index.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ "ODVu"); /* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin.js */ "5xK/"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains.js */ "7FHc"); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony default export */ __webpack_exports__["default"] = (function(pointVisible, clipLine, interpolate, start) { return function(sink) { var line = clipLine(sink), ringBuffer = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(), ringSink = clipLine(ringBuffer), polygonStarted = false, polygon, segments, ring; var clip = { point: point, lineStart: lineStart, lineEnd: lineEnd, polygonStart: function() { clip.point = pointRing; clip.lineStart = ringStart; clip.lineEnd = ringEnd; segments = []; polygon = []; }, polygonEnd: function() { clip.point = point; clip.lineStart = lineStart; clip.lineEnd = lineEnd; segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments); var startInside = Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_3__["default"])(polygon, start); if (segments.length) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_1__["default"])(segments, compareIntersection, startInside, interpolate, sink); } else if (startInside) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; sink.lineStart(); interpolate(null, null, 1, sink); sink.lineEnd(); } if (polygonStarted) sink.polygonEnd(), polygonStarted = false; segments = polygon = null; }, sphere: function() { sink.polygonStart(); sink.lineStart(); interpolate(null, null, 1, sink); sink.lineEnd(); sink.polygonEnd(); } }; function point(lambda, phi) { if (pointVisible(lambda, phi)) sink.point(lambda, phi); } function pointLine(lambda, phi) { line.point(lambda, phi); } function lineStart() { clip.point = pointLine; line.lineStart(); } function lineEnd() { clip.point = point; line.lineEnd(); } function pointRing(lambda, phi) { ring.push([lambda, phi]); ringSink.point(lambda, phi); } function ringStart() { ringSink.lineStart(); ring = []; } function ringEnd() { pointRing(ring[0][0], ring[0][1]); ringSink.lineEnd(); var clean = ringSink.clean(), ringSegments = ringBuffer.result(), i, n = ringSegments.length, m, segment, point; ring.pop(); polygon.push(ring); ring = null; if (!n) return; // No intersections. if (clean & 1) { segment = ringSegments[0]; if ((m = segment.length - 1) > 0) { if (!polygonStarted) sink.polygonStart(), polygonStarted = true; sink.lineStart(); for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); sink.lineEnd(); } return; } // Rejoin connected segments. // TODO reuse ringBuffer.rejoin()? if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); segments.push(ringSegments.filter(validSegment)); } return clip; }; }); function validSegment(segment) { return segment.length > 1; } // Intersections are sorted along the clip edge. For both antimeridian cutting // and circle clipping, the same comparison is used. function compareIntersection(a, b) { return ((a = a.x)[0] < 0 ? a[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - a[1]) - ((b = b.x)[0] < 0 ? b[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - b[1]); } /***/ }), /***/ "pbho": /*!********************************************!*\ !*** ./node_modules/d3-geo/src/compose.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { function compose(x, y) { return x = a(x, y), b(x[0], x[1]); } if (a.invert && b.invert) compose.invert = function(x, y) { return x = b.invert(x, y), x && a.invert(x[0], x[1]); }; return compose; }); /***/ }), /***/ "pjAE": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/UnsubscriptionError.js ***! \*************************************************************************/ /*! exports provided: UnsubscriptionError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; }); const UnsubscriptionErrorImpl = (() => { function UnsubscriptionErrorImpl(errors) { Error.call(this); this.message = errors ? `${errors.length} errors occurred during unsubscription: ${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}` : ''; this.name = 'UnsubscriptionError'; this.errors = errors; return this; } UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype); return UnsubscriptionErrorImpl; })(); const UnsubscriptionError = UnsubscriptionErrorImpl; //# sourceMappingURL=UnsubscriptionError.js.map /***/ }), /***/ "prbS": /*!************************************************!*\ !*** ./node_modules/d3-geo/src/interpolate.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { var x0 = a[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], y0 = a[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], x1 = b[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], y1 = b[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), cy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1), sy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1), kx0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x0), ky0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x0), kx1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x1), ky1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x1), d = 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(y1 - y0) + cy0 * cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(x1 - x0))), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d); var interpolate = d ? function(t) { var B = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(t *= d) / k, A = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d - t) / k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1; return [ Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(z, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"] ]; } : function() { return [x0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], y0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]]; }; interpolate.distance = d; return interpolate; }); /***/ }), /***/ "ptze": /*!**********************************************!*\ !*** ./node_modules/d3-random/src/normal.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomNormal(source) { function randomNormal(mu, sigma) { var x, r; mu = mu == null ? 0 : +mu; sigma = sigma == null ? 1 : +sigma; return function() { var y; // If available, use the second previously-generated uniform random. if (x != null) y = x, x = null; // Otherwise, generate a new x and y. else do { x = source() * 2 - 1; y = source() * 2 - 1; r = x * x + y * y; } while (!r || r > 1); return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r); }; } randomNormal.source = sourceRandomNormal; return randomNormal; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "pxpQ": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/observeOn.js ***! \********************************************************************/ /*! exports provided: observeOn, ObserveOnOperator, ObserveOnSubscriber, ObserveOnMessage */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Notification */ "WMd4"); function observeOn(scheduler, delay = 0) { return function observeOnOperatorFunction(source) { return source.lift(new ObserveOnOperator(scheduler, delay)); }; } class ObserveOnOperator { constructor(scheduler, delay = 0) { this.scheduler = scheduler; this.delay = delay; } call(subscriber, source) { return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay)); } } class ObserveOnSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, scheduler, delay = 0) { super(destination); this.scheduler = scheduler; this.delay = delay; } static dispatch(arg) { const { notification, destination } = arg; notification.observe(destination); this.unsubscribe(); } scheduleMessage(notification) { const destination = this.destination; destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination))); } _next(value) { this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createNext(value)); } _error(err) { this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createError(err)); this.unsubscribe(); } _complete() { this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_1__["Notification"].createComplete()); this.unsubscribe(); } } class ObserveOnMessage { constructor(notification, destination) { this.notification = notification; this.destination = destination; } } //# sourceMappingURL=observeOn.js.map /***/ }), /***/ "q+nN": /*!*******************************************!*\ !*** ./node_modules/d3-drag/src/index.js ***! \*******************************************/ /*! exports provided: drag, dragDisable, dragEnable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ "AJ/N"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ "tU+D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["yesdrag"]; }); /***/ }), /***/ "q7zd": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/concatMapTo.js ***! \**********************************************************************/ /*! exports provided: concatMapTo */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; }); /* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./concatMap */ "bOdf"); function concatMapTo(innerObservable, resultSelector) { return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(() => innerObservable, resultSelector); } //# sourceMappingURL=concatMapTo.js.map /***/ }), /***/ "q92s": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/merge.js ***! \****************************************************************/ /*! exports provided: merge */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); /* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/merge */ "VRyK"); function merge(...observables) { return (source) => source.lift.call(Object(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"])(source, ...observables)); } //# sourceMappingURL=merge.js.map /***/ }), /***/ "qCKp": /*!*********************************************!*\ !*** ./node_modules/rxjs/_esm2015/index.js ***! \*********************************************/ /*! exports provided: Observable, ConnectableObservable, GroupedObservable, observable, Subject, BehaviorSubject, ReplaySubject, AsyncSubject, asap, asapScheduler, async, asyncScheduler, queue, queueScheduler, animationFrame, animationFrameScheduler, VirtualTimeScheduler, VirtualAction, Scheduler, Subscription, Subscriber, Notification, NotificationKind, pipe, noop, identity, isObservable, ArgumentOutOfRangeError, EmptyError, ObjectUnsubscribedError, UnsubscriptionError, TimeoutError, bindCallback, bindNodeCallback, combineLatest, concat, defer, empty, forkJoin, from, fromEvent, fromEventPattern, generate, iif, interval, merge, never, of, onErrorResumeNext, pairs, partition, race, range, throwError, timer, using, zip, scheduled, EMPTY, NEVER, config */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/Observable */ "HDdC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; }); /* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/observable/ConnectableObservable */ "EQ5u"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; }); /* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/operators/groupBy */ "OQgR"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; }); /* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/symbol/observable */ "kJWO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; }); /* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/Subject */ "XNiG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; }); /* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/BehaviorSubject */ "2Vo4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; }); /* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./internal/ReplaySubject */ "jtHE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; }); /* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./internal/AsyncSubject */ "NHP+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; }); /* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internal/scheduler/asap */ "7Hc7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asapScheduler"]; }); /* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./internal/scheduler/async */ "D0XW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "async", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["asyncScheduler"]; }); /* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./internal/scheduler/queue */ "qgXg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queueScheduler"]; }); /* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internal/scheduler/animationFrame */ "eNwd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrameScheduler"]; }); /* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./internal/scheduler/VirtualTimeScheduler */ "iKkX"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; }); /* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./internal/Scheduler */ "Y/cZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; }); /* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./internal/Subscription */ "quSY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; }); /* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./internal/Subscriber */ "7o/Q"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; }); /* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./internal/Notification */ "WMd4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; }); /* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./internal/util/pipe */ "mCNh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; }); /* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./internal/util/noop */ "KqfI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; }); /* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internal/util/identity */ "SpAZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; }); /* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./internal/util/isObservable */ "7+OI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; }); /* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./internal/util/ArgumentOutOfRangeError */ "4I5i"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; }); /* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./internal/util/EmptyError */ "sVev"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; }); /* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./internal/util/ObjectUnsubscribedError */ "9ppp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; }); /* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./internal/util/UnsubscriptionError */ "pjAE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; }); /* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./internal/util/TimeoutError */ "Y6u4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; }); /* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./internal/observable/bindCallback */ "QqCr"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; }); /* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./internal/observable/bindNodeCallback */ "4O5X"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; }); /* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./internal/observable/combineLatest */ "itXk"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; }); /* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./internal/observable/concat */ "GyhO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; }); /* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./internal/observable/defer */ "NXyV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; }); /* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./internal/observable/empty */ "EY2u"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; }); /* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./internal/observable/forkJoin */ "cp0P"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; }); /* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./internal/observable/from */ "Cfvw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; }); /* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./internal/observable/fromEvent */ "xgIS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; }); /* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./internal/observable/fromEventPattern */ "04ZW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; }); /* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./internal/observable/generate */ "WPMC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; }); /* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./internal/observable/iif */ "r0o6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; }); /* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./internal/observable/interval */ "l5mm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; }); /* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./internal/observable/merge */ "VRyK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; }); /* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./internal/observable/never */ "5yfJ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; }); /* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./internal/observable/of */ "LRne"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; }); /* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./internal/observable/onErrorResumeNext */ "Hkhx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; }); /* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./internal/observable/pairs */ "hKy8"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; }); /* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./internal/observable/partition */ "2QGa"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; }); /* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./internal/observable/race */ "Nv8m"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; }); /* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./internal/observable/range */ "NNCq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; }); /* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./internal/observable/throwError */ "z6cu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; }); /* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./internal/observable/timer */ "PqYM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; }); /* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./internal/observable/using */ "Qn8I"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; }); /* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./internal/observable/zip */ "1uah"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; }); /* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./internal/scheduled/scheduled */ "7HRe"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; }); /* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./internal/config */ "2fFW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; }); //# sourceMappingURL=index.js.map /***/ }), /***/ "qE0H": /*!****************************************************!*\ !*** ./node_modules/d3-shape/src/curve/natural.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function Natural(context) { this._context = context; } Natural.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x = []; this._y = []; }, lineEnd: function() { var x = this._x, y = this._y, n = x.length; if (n) { this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); if (n === 2) { this._context.lineTo(x[1], y[1]); } else { var px = controlPoints(x), py = controlPoints(y); for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); } } } if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); this._line = 1 - this._line; this._x = this._y = null; }, point: function(x, y) { this._x.push(+x); this._y.push(+y); } }; // See https://www.particleincell.com/2012/bezier-splines/ for derivation. function controlPoints(x) { var i, n = x.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n); a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; a[n - 1] = r[n - 1] / b[n - 1]; for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; b[n - 1] = (x[n] + a[n - 1]) / 2; for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; return [a, b]; } /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new Natural(context); }); /***/ }), /***/ "qKDy": /*!***********************************************!*\ !*** ./node_modules/d3-brush/src/constant.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "qKhr": /*!************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***! \************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "f0f0f0bdbdbd636363", "f7f7f7cccccc969696525252", "f7f7f7cccccc969696636363252525", "f7f7f7d9d9d9bdbdbd969696636363252525", "f7f7f7d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "qLhn": /*!*************************************************!*\ !*** ./node_modules/d3-selection/src/create.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _creator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator.js */ "V/Wt"); /* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select.js */ "AKWm"); /* harmony default export */ __webpack_exports__["default"] = (function(name) { return Object(_select_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_creator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(name).call(document.documentElement)); }); /***/ }), /***/ "qR3b": /*!************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/merge.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony default export */ __webpack_exports__["default"] = (function(transition) { if (transition._id !== this._id) throw new Error; for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group0[i] || group1[i]) { merge[i] = node; } } } for (; j < m0; ++j) { merges[j] = groups0[j]; } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](merges, this._parents, this._name, this._id); }); /***/ }), /***/ "qWhX": /*!***********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")); /***/ }), /***/ "qZ0a": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/publishLast.js ***! \**********************************************************************/ /*! exports provided: publishLast */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; }); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AsyncSubject */ "NHP+"); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./multicast */ "oB13"); function publishLast() { return (source) => Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); } //# sourceMappingURL=publishLast.js.map /***/ }), /***/ "qgXg": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/queue.js ***! \****************************************************************/ /*! exports provided: queueScheduler, queue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return queueScheduler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; }); /* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./QueueAction */ "YuR2"); /* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QueueScheduler */ "Hh5Z"); const queueScheduler = new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]); const queue = queueScheduler; //# sourceMappingURL=queue.js.map /***/ }), /***/ "qnQu": /*!*****************************************************!*\ !*** ./node_modules/d3-format/src/formatDecimal.js ***! \*****************************************************/ /*! exports provided: default, formatDecimalParts */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDecimalParts", function() { return formatDecimalParts; }); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10); }); // Computes the decimal coefficient and exponent of the specified number x with // significant digits p, where x is positive and p is in [1, 21] or undefined. // For example, formatDecimalParts(1.23) returns ["123", 0]. function formatDecimalParts(x, p) { if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity var i, coefficient = x.slice(0, i); // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). return [ coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1) ]; } /***/ }), /***/ "qqpY": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/order/none.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(series) { var n = series.length, o = new Array(n); while (--n >= 0) o[n] = n; return o; }); /***/ }), /***/ "quSY": /*!*************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/Subscription.js ***! \*************************************************************/ /*! exports provided: Subscription */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; }); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isArray */ "DH7j"); /* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/isObject */ "XoHu"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/isFunction */ "n6bG"); /* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/UnsubscriptionError */ "pjAE"); class Subscription { constructor(unsubscribe) { this.closed = false; this._parentOrParents = null; this._subscriptions = null; if (unsubscribe) { this._ctorUnsubscribe = true; this._unsubscribe = unsubscribe; } } unsubscribe() { let errors; if (this.closed) { return; } let { _parentOrParents, _ctorUnsubscribe, _unsubscribe, _subscriptions } = this; this.closed = true; this._parentOrParents = null; this._subscriptions = null; if (_parentOrParents instanceof Subscription) { _parentOrParents.remove(this); } else if (_parentOrParents !== null) { for (let index = 0; index < _parentOrParents.length; ++index) { const parent = _parentOrParents[index]; parent.remove(this); } } if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) { if (_ctorUnsubscribe) { this._unsubscribe = undefined; } try { _unsubscribe.call(this); } catch (e) { errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e]; } } if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) { let index = -1; let len = _subscriptions.length; while (++index < len) { const sub = _subscriptions[index]; if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) { try { sub.unsubscribe(); } catch (e) { errors = errors || []; if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) { errors = errors.concat(flattenUnsubscriptionErrors(e.errors)); } else { errors.push(e); } } } } } if (errors) { throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors); } } add(teardown) { let subscription = teardown; if (!teardown) { return Subscription.EMPTY; } switch (typeof teardown) { case 'function': subscription = new Subscription(teardown); case 'object': if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') { return subscription; } else if (this.closed) { subscription.unsubscribe(); return subscription; } else if (!(subscription instanceof Subscription)) { const tmp = subscription; subscription = new Subscription(); subscription._subscriptions = [tmp]; } break; default: { throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); } } let { _parentOrParents } = subscription; if (_parentOrParents === null) { subscription._parentOrParents = this; } else if (_parentOrParents instanceof Subscription) { if (_parentOrParents === this) { return subscription; } subscription._parentOrParents = [_parentOrParents, this]; } else if (_parentOrParents.indexOf(this) === -1) { _parentOrParents.push(this); } else { return subscription; } const subscriptions = this._subscriptions; if (subscriptions === null) { this._subscriptions = [subscription]; } else { subscriptions.push(subscription); } return subscription; } remove(subscription) { const subscriptions = this._subscriptions; if (subscriptions) { const subscriptionIndex = subscriptions.indexOf(subscription); if (subscriptionIndex !== -1) { subscriptions.splice(subscriptionIndex, 1); } } } } Subscription.EMPTY = (function (empty) { empty.closed = true; return empty; }(new Subscription())); function flattenUnsubscriptionErrors(errors) { return errors.reduce((errs, err) => errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) ? err.errors : err), []); } //# sourceMappingURL=Subscription.js.map /***/ }), /***/ "qyUX": /*!********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2")); /***/ }), /***/ "r0WS": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timestamp.js ***! \********************************************************************/ /*! exports provided: timestamp, Timestamp */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ "lJxs"); function timestamp(scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])((value) => new Timestamp(value, scheduler.now())); } class Timestamp { constructor(value, timestamp) { this.value = value; this.timestamp = timestamp; } } //# sourceMappingURL=timestamp.js.map /***/ }), /***/ "r0o6": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/iif.js ***! \***************************************************************/ /*! exports provided: iif */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; }); /* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defer */ "NXyV"); /* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty */ "EY2u"); function iif(condition, trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"], falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"]) { return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(() => condition() ? trueResult : falseResult); } //# sourceMappingURL=iif.js.map /***/ }), /***/ "r5Py": /*!*************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/select.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "rtYu"); /* harmony default export */ __webpack_exports__["default"] = (function(select) { var name = this._name, id = this._id; if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selector"])(select); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { if ("__data__" in node) subnode.__data__ = node.__data__; subgroup[i] = subnode; Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id)); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, name, id); }); /***/ }), /***/ "rAw/": /*!******************************************************!*\ !*** ./node_modules/d3-interpolate/src/piecewise.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return piecewise; }); /* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "6h3Y"); function piecewise(interpolate, values) { if (values === undefined) values = interpolate, interpolate = _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); while (i < n) I[i] = interpolate(v, v = values[++i]); return function(t) { var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); return I[i](t - i); }; } /***/ }), /***/ "rBOd": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/path/area.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "mPOO"); var areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](), x00, y00, x0, y0; var areaStream = { point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonStart: function() { areaStream.lineStart = areaRingStart; areaStream.lineEnd = areaRingEnd; }, polygonEnd: function() { areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; areaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(areaRingSum)); areaRingSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); }, result: function() { var area = areaSum / 2; areaSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); return area; } }; function areaRingStart() { areaStream.point = areaPointFirst; } function areaPointFirst(x, y) { areaStream.point = areaPoint; x00 = x0 = x, y00 = y0 = y; } function areaPoint(x, y) { areaRingSum.add(y0 * x - x0 * y); x0 = x, y0 = y; } function areaRingEnd() { areaPoint(x00, y00); } /* harmony default export */ __webpack_exports__["default"] = (areaStream); /***/ }), /***/ "rO+Z": /*!**************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***! \**************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fee6cefdae6be6550d", "feeddefdbe85fd8d3cd94701", "feeddefdbe85fd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3ce6550da63603", "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "rWgG": /*!*********************************************!*\ !*** ./node_modules/d3-format/src/index.js ***! \*********************************************/ /*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "EjHT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["format"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["formatPrefix"]; }); /* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "sXBl"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ "CbjS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["FormatSpecifier"]; }); /* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ "2tFh"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ "2TPD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ "2Ynt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /***/ }), /***/ "rdqn": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/graticule.js ***! \**********************************************/ /*! exports provided: default, graticule10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return graticule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "graticule10", function() { return graticule10; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); function graticuleX(y0, y1, dy) { var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(y0, y1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dy).concat(y1); return function(x) { return y.map(function(y) { return [x, y]; }); }; } function graticuleY(x0, x1, dx) { var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(x0, x1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dx).concat(x1); return function(y) { return x.map(function(x) { return [x, y]; }); }; } function graticule() { var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5; function graticule() { return {type: "MultiLineString", coordinates: lines()}; } function lines() { return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(X0 / DX) * DX, X1, DX).map(X) .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(Y0 / DY) * DY, Y1, DY).map(Y)) .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(x % DX) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(x)) .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(y % DY) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(y)); } graticule.lines = function() { return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; }); }; graticule.outline = function() { return { type: "Polygon", coordinates: [ X(X0).concat( Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ] }; }; graticule.extent = function(_) { if (!arguments.length) return graticule.extentMinor(); return graticule.extentMajor(_).extentMinor(_); }; graticule.extentMajor = function(_) { if (!arguments.length) return [[X0, Y0], [X1, Y1]]; X0 = +_[0][0], X1 = +_[1][0]; Y0 = +_[0][1], Y1 = +_[1][1]; if (X0 > X1) _ = X0, X0 = X1, X1 = _; if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; return graticule.precision(precision); }; graticule.extentMinor = function(_) { if (!arguments.length) return [[x0, y0], [x1, y1]]; x0 = +_[0][0], x1 = +_[1][0]; y0 = +_[0][1], y1 = +_[1][1]; if (x0 > x1) _ = x0, x0 = x1, x1 = _; if (y0 > y1) _ = y0, y0 = y1, y1 = _; return graticule.precision(precision); }; graticule.step = function(_) { if (!arguments.length) return graticule.stepMinor(); return graticule.stepMajor(_).stepMinor(_); }; graticule.stepMajor = function(_) { if (!arguments.length) return [DX, DY]; DX = +_[0], DY = +_[1]; return graticule; }; graticule.stepMinor = function(_) { if (!arguments.length) return [dx, dy]; dx = +_[0], dy = +_[1]; return graticule; }; graticule.precision = function(_) { if (!arguments.length) return precision; precision = +_; x = graticuleX(y0, y1, 90); y = graticuleY(x0, x1, precision); X = graticuleX(Y0, Y1, 90); Y = graticuleY(X0, X1, precision); return graticule; }; return graticule .extentMajor([[-180, -90 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 90 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]) .extentMinor([[-180, -80 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 80 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]); } function graticule10() { return graticule()(); } /***/ }), /***/ "rgrl": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/distance.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length.js */ "zz/+"); var coordinates = [null, null], object = {type: "LineString", coordinates: coordinates}; /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { coordinates[0] = a; coordinates[1] = b; return Object(_length_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object); }); /***/ }), /***/ "rkAg": /*!******************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/triangle.js ***! \******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var sqrt3 = Math.sqrt(3); /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var y = -Math.sqrt(size / (sqrt3 * 3)); context.moveTo(0, y * 2); context.lineTo(-sqrt3 * y, -y); context.lineTo(sqrt3 * y, -y); context.closePath(); } }); /***/ }), /***/ "rtYu": /*!***************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/schedule.js ***! \***************************************************************/ /*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CREATED", function() { return CREATED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCHEDULED", function() { return SCHEDULED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTING", function() { return STARTING; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTED", function() { return STARTED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RUNNING", function() { return RUNNING; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDING", function() { return ENDING; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDED", function() { return ENDED; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); /* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "30U6"); /* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "ta7q"); var emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "end", "cancel", "interrupt"); var emptyTween = []; var CREATED = 0; var SCHEDULED = 1; var STARTING = 2; var STARTED = 3; var RUNNING = 4; var ENDING = 5; var ENDED = 6; /* harmony default export */ __webpack_exports__["default"] = (function(node, name, id, index, group, timing) { var schedules = node.__transition; if (!schedules) node.__transition = {}; else if (id in schedules) return; create(node, id, { name: name, index: index, // For context during callback. group: group, // For context during callback. on: emptyOn, tween: emptyTween, time: timing.time, delay: timing.delay, duration: timing.duration, ease: timing.ease, timer: null, state: CREATED }); }); function init(node, id) { var schedule = get(node, id); if (schedule.state > CREATED) throw new Error("too late; already scheduled"); return schedule; } function set(node, id) { var schedule = get(node, id); if (schedule.state > STARTED) throw new Error("too late; already running"); return schedule; } function get(node, id) { var schedule = node.__transition; if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); return schedule; } function create(node, id, self) { var schedules = node.__transition, tween; // Initialize the self timer when the transition is created. // Note the actual delay is not known until the first callback! schedules[id] = self; self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(schedule, 0, self.time); function schedule(elapsed) { self.state = SCHEDULED; self.timer.restart(start, self.delay, self.time); // If the elapsed delay is less than our first sleep, start immediately. if (self.delay <= elapsed) start(elapsed - self.delay); } function start(elapsed) { var i, j, n, o; // If the state is not SCHEDULED, then we previously errored on start. if (self.state !== SCHEDULED) return stop(); for (i in schedules) { o = schedules[i]; if (o.name !== self.name) continue; // While this element already has a starting transition during this frame, // defer starting an interrupting transition until that transition has a // chance to tick (and possibly end); see d3/d3-transition#54! if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(start); // Interrupt the active transition, if any. if (o.state === RUNNING) { o.state = ENDED; o.timer.stop(); o.on.call("interrupt", node, node.__data__, o.index, o.group); delete schedules[i]; } // Cancel any pre-empted transitions. else if (+i < id) { o.state = ENDED; o.timer.stop(); o.on.call("cancel", node, node.__data__, o.index, o.group); delete schedules[i]; } } // Defer the first tick to end of the current frame; see d3/d3#1576. // Note the transition may be canceled after start and before the first tick! // Note this must be scheduled before the start event; see d3/d3-transition#16! // Assuming this is successful, subsequent callbacks go straight to tick. Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(function() { if (self.state === STARTED) { self.state = RUNNING; self.timer.restart(tick, self.delay, self.time); tick(elapsed); } }); // Dispatch the start event. // Note this must be done before the tween are initialized. self.state = STARTING; self.on.call("start", node, node.__data__, self.index, self.group); if (self.state !== STARTING) return; // interrupted self.state = STARTED; // Initialize the tween, deleting null tween. tween = new Array(n = self.tween.length); for (i = 0, j = -1; i < n; ++i) { if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { tween[++j] = o; } } tween.length = j + 1; } function tick(elapsed) { var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n = tween.length; while (++i < n) { tween[i].call(node, t); } // Dispatch the end event. if (self.state === ENDING) { self.on.call("end", node, node.__data__, self.index, self.group); stop(); } } function stop() { self.state = ENDED; self.timer.stop(); delete schedules[id]; for (var i in schedules) return; // eslint-disable-line no-unused-vars delete node.__transition; } } /***/ }), /***/ "s8O9": /*!******************************************!*\ !*** ./node_modules/d3-time/src/hour.js ***! \******************************************/ /*! exports provided: default, hours */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hours", function() { return hours; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); var hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]); }, function(date, step) { date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]); }, function(start, end) { return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]; }, function(date) { return date.getHours(); }); /* harmony default export */ __webpack_exports__["default"] = (hour); var hours = hour.range; /***/ }), /***/ "sCaM": /*!*******************************************!*\ !*** ./node_modules/d3-scale/src/band.js ***! \*******************************************/ /*! exports provided: default, point */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return band; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _ordinal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ordinal.js */ "3xmg"); function band() { var scale = Object(_ordinal_js__WEBPACK_IMPORTED_MODULE_2__["default"])().unknown(undefined), domain = scale.domain, ordinalRange = scale.range, r0 = 0, r1 = 1, step, bandwidth, round = false, paddingInner = 0, paddingOuter = 0, align = 0.5; delete scale.unknown; function rescale() { var n = domain().length, reverse = r1 < r0, start = reverse ? r1 : r0, stop = reverse ? r0 : r1; step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); if (round) step = Math.floor(step); start += (stop - start - step * (n - paddingInner)) * align; bandwidth = step * (1 - paddingInner); if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n).map(function(i) { return start + step * i; }); return ordinalRange(reverse ? values.reverse() : values); } scale.domain = function(_) { return arguments.length ? (domain(_), rescale()) : domain(); }; scale.range = function(_) { return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1]; }; scale.rangeRound = function(_) { return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale(); }; scale.bandwidth = function() { return bandwidth; }; scale.step = function() { return step; }; scale.round = function(_) { return arguments.length ? (round = !!_, rescale()) : round; }; scale.padding = function(_) { return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; }; scale.paddingInner = function(_) { return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; }; scale.paddingOuter = function(_) { return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; }; scale.align = function(_) { return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; }; scale.copy = function() { return band(domain(), [r0, r1]) .round(round) .paddingInner(paddingInner) .paddingOuter(paddingOuter) .align(align); }; return _init_js__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(rescale(), arguments); } function pointish(scale) { var copy = scale.copy; scale.padding = scale.paddingOuter; delete scale.paddingInner; delete scale.paddingOuter; scale.copy = function() { return pointish(copy()); }; return scale; } function point() { return pointish(band.apply(null, arguments).paddingInner(1)); } /***/ }), /***/ "sFV2": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/color.js ***! \**************************************************/ /*! exports provided: hue, gamma, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hue", function() { return hue; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gamma", function() { return gamma; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nogamma; }); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "xpj1"); function linear(a, d) { return function(t) { return a + t * d; }; } function exponential(a, b, y) { return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { return Math.pow(a + t * b, y); }; } function hue(a, b) { var d = b - a; return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); } function gamma(y) { return (y = +y) === 1 ? nogamma : function(a, b) { return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); }; } function nogamma(a, b) { var d = b - a; return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); } /***/ }), /***/ "sK06": /*!*********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/cardinalOpen.js ***! \*********************************************************/ /*! exports provided: CardinalOpen, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalOpen", function() { return CardinalOpen; }); /* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ "d5JU"); function CardinalOpen(context, tension) { this._context = context; this._k = (1 - tension) / 6; } CardinalOpen.prototype = { areaStart: function() { this._line = 0; }, areaEnd: function() { this._line = NaN; }, lineStart: function() { this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN; this._point = 0; }, lineEnd: function() { if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); this._line = 1 - this._line; }, point: function(x, y) { x = +x, y = +y; switch (this._point) { case 0: this._point = 1; break; case 1: this._point = 2; break; case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; case 3: this._point = 4; // proceed default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; } this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; } }; /* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { function cardinal(context) { return new CardinalOpen(context, tension); } cardinal.tension = function(tension) { return custom(+tension); }; return cardinal; })(0)); /***/ }), /***/ "sQjb": /*!*************************************************!*\ !*** ./node_modules/d3-transition/src/index.js ***! \*************************************************/ /*! exports provided: transition, active, interrupt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ "YrTO"); /* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ "0W9s"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ "6nXi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ "dW/k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /***/ }), /***/ "sTY7": /*!***********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/windowToggle.js ***! \***********************************************************************/ /*! exports provided: windowToggle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ "XNiG"); /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ "quSY"); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function windowToggle(openings, closingSelector) { return (source) => source.lift(new WindowToggleOperator(openings, closingSelector)); } class WindowToggleOperator { constructor(openings, closingSelector) { this.openings = openings; this.closingSelector = closingSelector; } call(subscriber, source) { return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector)); } } class WindowToggleSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"] { constructor(destination, openings, closingSelector) { super(destination); this.openings = openings; this.closingSelector = closingSelector; this.contexts = []; this.add(this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, openings, openings)); } _next(value) { const { contexts } = this; if (contexts) { const len = contexts.length; for (let i = 0; i < len; i++) { contexts[i].window.next(value); } } } _error(err) { const { contexts } = this; this.contexts = null; if (contexts) { const len = contexts.length; let index = -1; while (++index < len) { const context = contexts[index]; context.window.error(err); context.subscription.unsubscribe(); } } super._error(err); } _complete() { const { contexts } = this; this.contexts = null; if (contexts) { const len = contexts.length; let index = -1; while (++index < len) { const context = contexts[index]; context.window.complete(); context.subscription.unsubscribe(); } } super._complete(); } _unsubscribe() { const { contexts } = this; this.contexts = null; if (contexts) { const len = contexts.length; let index = -1; while (++index < len) { const context = contexts[index]; context.window.unsubscribe(); context.subscription.unsubscribe(); } } } notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) { if (outerValue === this.openings) { let closingNotifier; try { const { closingSelector } = this; closingNotifier = closingSelector(innerValue); } catch (e) { return this.error(e); } const window = new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); const subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"](); const context = { window, subscription }; this.contexts.push(context); const innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier, context); if (innerSubscription.closed) { this.closeWindow(this.contexts.length - 1); } else { innerSubscription.context = context; subscription.add(innerSubscription); } this.destination.next(window); } else { this.closeWindow(this.contexts.indexOf(outerValue)); } } notifyError(err) { this.error(err); } notifyComplete(inner) { if (inner !== this.openSubscription) { this.closeWindow(this.contexts.indexOf(inner.context)); } } closeWindow(index) { if (index === -1) { return; } const { contexts } = this; const context = contexts[index]; const { window, subscription } = context; contexts.splice(index, 1); window.complete(); subscription.unsubscribe(); } } //# sourceMappingURL=windowToggle.js.map /***/ }), /***/ "sUwa": /*!******************************************!*\ !*** ./node_modules/d3-time/src/week.js ***! \******************************************/ /*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sunday", function() { return sunday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monday", function() { return monday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesday", function() { return tuesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesday", function() { return wednesday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursday", function() { return thursday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "friday", function() { return friday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturday", function() { return saturday; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sundays", function() { return sundays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mondays", function() { return mondays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesdays", function() { return tuesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesdays", function() { return wednesdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursdays", function() { return thursdays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fridays", function() { return fridays; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturdays", function() { return saturdays; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "Fzhe"); function weekday(i) { return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) { date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); date.setHours(0, 0, 0, 0); }, function(date, step) { date.setDate(date.getDate() + step * 7); }, function(start, end) { return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"]; }); } var sunday = weekday(0); var monday = weekday(1); var tuesday = weekday(2); var wednesday = weekday(3); var thursday = weekday(4); var friday = weekday(5); var saturday = weekday(6); var sundays = sunday.range; var mondays = monday.range; var tuesdays = tuesday.range; var wednesdays = wednesday.range; var thursdays = thursday.range; var fridays = friday.range; var saturdays = saturday.range; /***/ }), /***/ "sVev": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/EmptyError.js ***! \****************************************************************/ /*! exports provided: EmptyError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; }); const EmptyErrorImpl = (() => { function EmptyErrorImpl() { Error.call(this); this.message = 'no elements in sequence'; this.name = 'EmptyError'; return this; } EmptyErrorImpl.prototype = Object.create(Error.prototype); return EmptyErrorImpl; })(); const EmptyError = EmptyErrorImpl; //# sourceMappingURL=EmptyError.js.map /***/ }), /***/ "sXBl": /*!**********************************************!*\ !*** ./node_modules/d3-format/src/locale.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "p/1U"); /* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ "mHFb"); /* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ "AUoe"); /* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ "CbjS"); /* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ "kds9"); /* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ "tO8Z"); /* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "ze3m"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ "EUnC"); var map = Array.prototype.map, prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; /* harmony default export */ __webpack_exports__["default"] = (function(locale) { var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__["default"])(map.call(locale.grouping, Number), locale.thousands + ""), currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", decimal = locale.decimal === undefined ? "." : locale.decimal + "", numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(map.call(locale.numerals, String)), percent = locale.percent === undefined ? "%" : locale.percent + "", minus = locale.minus === undefined ? "−" : locale.minus + "", nan = locale.nan === undefined ? "NaN" : locale.nan + ""; function newFormat(specifier) { specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier); var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type; // The "n" type is an alias for ",g". if (type === "n") comma = true, type = "g"; // The "" type, and any invalid type, is an alias for ".12~g". else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type]) precision === undefined && (precision = 12), trim = true, type = "g"; // If zero fill is specified, padding goes after sign and before digits. if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; // Compute the prefix and suffix. // For SI-prefix, the suffix is lazily computed. var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; // What format function should we use? // Is this an integer type? // Can this type generate exponential notation? var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type], maybeSuffix = /[defgprs%]/.test(type); // Set the default precision if not specified, // or clamp the specified precision to the supported range. // For significant precision, it must be in [1, 21]. // For fixed precision, it must be in [0, 20]. precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision)); function format(value) { var valuePrefix = prefix, valueSuffix = suffix, i, n, c; if (type === "c") { valueSuffix = formatType(value) + valueSuffix; value = ""; } else { value = +value; // Determine the sign. -0 is not less than 0, but 1 / -0 is! var valueNegative = value < 0 || 1 / value < 0; // Perform the initial formatting. value = isNaN(value) ? nan : formatType(Math.abs(value), precision); // Trim insignificant zeros. if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value); // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; // Compute the prefix and suffix. valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__["prefixExponent"] / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); // Break the formatted value into the integer “value” part that can be // grouped, and fractional or exponential “suffix” part that is not. if (maybeSuffix) { i = -1, n = value.length; while (++i < n) { if (c = value.charCodeAt(i), 48 > c || c > 57) { valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; value = value.slice(0, i); break; } } } } // If the fill character is not "0", grouping is applied before padding. if (comma && !zero) value = group(value, Infinity); // Compute the padding. var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : ""; // If the fill character is "0", grouping is applied after padding. if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; // Reconstruct the final output based on the desired alignment. switch (align) { case "<": value = valuePrefix + value + valueSuffix + padding; break; case "=": value = valuePrefix + padding + value + valueSuffix; break; case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; default: value = padding + valuePrefix + value + valueSuffix; break; } return numerals(value); } format.toString = function() { return specifier + ""; }; return format; } function formatPrefix(specifier, value) { var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3]; return function(value) { return f(k * value) + prefix; }; } return { format: newFormat, formatPrefix: formatPrefix }; }); /***/ }), /***/ "sb9E": /*!****************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/selectChild.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _matcher_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../matcher.js */ "Cnj1"); var find = Array.prototype.find; function childFind(match) { return function() { return find.call(this.children, match); }; } function childFirst() { return this.firstElementChild; } /* harmony default export */ __webpack_exports__["default"] = (function(match) { return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : Object(_matcher_js__WEBPACK_IMPORTED_MODULE_0__["childMatcher"])(match))); }); /***/ }), /***/ "skEf": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/html.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function htmlRemove() { this.innerHTML = ""; } function htmlConstant(value) { return function() { this.innerHTML = value; }; } function htmlFunction(value) { return function() { var v = value.apply(this, arguments); this.innerHTML = v == null ? "" : v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(value) { return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML; }); /***/ }), /***/ "skVX": /*!********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc")); /***/ }), /***/ "sn8G": /*!***************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***! \***************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "af8dc3f7f7f77fbf7b", "7b3294c2a5cfa6dba0008837", "7b3294c2a5cff7f7f7a6dba0008837", "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "sore": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***! \*****************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fc8d59ffffbf91cf60", "d7191cfdae61a6d96a1a9641", "d7191cfdae61ffffbfa6d96a1a9641", "d73027fc8d59fee08bd9ef8b91cf601a9850", "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "ssni": /*!*************************************************!*\ !*** ./node_modules/d3-scale/src/tickFormat.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return tickFormat; }); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "rWgG"); function tickFormat(start, stop, count, specifier) { var step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, count), precision; specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatSpecifier"])(specifier == null ? ",f" : specifier); switch (specifier.type) { case "s": { var value = Math.max(Math.abs(start), Math.abs(stop)); if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionPrefix"])(step, value))) specifier.precision = precision; return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatPrefix"])(specifier, value); } case "": case "e": case "g": case "p": case "r": { if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionRound"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); break; } case "f": case "%": { if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionFixed"])(step))) specifier.precision = precision - (specifier.type === "%") * 2; break; } } return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier); } /***/ }), /***/ "sukG": /*!********************************************!*\ !*** ./node_modules/d3-fetch/src/index.js ***! \********************************************/ /*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _blob_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob.js */ "kgU0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return _blob_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ "XO33"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _buffer_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv.js */ "8cru"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__["csv"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_2__["tsv"]; }); /* harmony import */ var _image_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image.js */ "HN8k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return _image_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _json_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json.js */ "nWpo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return _json_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text.js */ "7NYn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return _text_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _xml_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml.js */ "8moF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__["html"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return _xml_js__WEBPACK_IMPORTED_MODULE_6__["svg"]; }); /***/ }), /***/ "syX2": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timeoutWith.js ***! \**********************************************************************/ /*! exports provided: timeoutWith */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isDate */ "mlxB"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function timeoutWith(due, withObservable, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return (source) => { let absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_1__["isDate"])(due); let waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due); return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler)); }; } class TimeoutWithOperator { constructor(waitFor, absoluteTimeout, withObservable, scheduler) { this.waitFor = waitFor; this.absoluteTimeout = absoluteTimeout; this.withObservable = withObservable; this.scheduler = scheduler; } call(subscriber, source) { return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler)); } } class TimeoutWithSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, absoluteTimeout, waitFor, withObservable, scheduler) { super(destination); this.absoluteTimeout = absoluteTimeout; this.waitFor = waitFor; this.withObservable = withObservable; this.scheduler = scheduler; this.scheduleTimeout(); } static dispatchTimeout(subscriber) { const { withObservable } = subscriber; subscriber._unsubscribeAndRecycle(); subscriber.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(withObservable, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](subscriber))); } scheduleTimeout() { const { action } = this; if (action) { this.action = action.schedule(this, this.waitFor); } else { this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this)); } } _next(value) { if (!this.absoluteTimeout) { this.scheduleTimeout(); } super._next(value); } _unsubscribe() { this.action = undefined; this.scheduler = null; this.withObservable = null; } } //# sourceMappingURL=timeoutWith.js.map /***/ }), /***/ "t9E6": /*!**********************************************!*\ !*** ./node_modules/d3-geo/src/transform.js ***! \**********************************************/ /*! exports provided: default, transformer */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; }); /* harmony default export */ __webpack_exports__["default"] = (function(methods) { return { stream: transformer(methods) }; }); function transformer(methods) { return function(stream) { var s = new TransformStream; for (var key in methods) s[key] = methods[key]; s.stream = stream; return s; }; } function TransformStream() {} TransformStream.prototype = { constructor: TransformStream, point: function(x, y) { this.stream.point(x, y); }, sphere: function() { this.stream.sphere(); }, lineStart: function() { this.stream.lineStart(); }, lineEnd: function() { this.stream.lineEnd(); }, polygonStart: function() { this.stream.polygonStart(); }, polygonEnd: function() { this.stream.polygonEnd(); } }; /***/ }), /***/ "tAAF": /*!********************************************!*\ !*** ./node_modules/d3-array/src/least.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return least; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); function least(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { let min; let defined = false; if (compare.length === 1) { let minValue; for (const element of values) { const value = compare(element); if (defined ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, minValue) < 0 : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, value) === 0) { min = element; minValue = value; defined = true; } } } else { for (const value of values) { if (defined ? compare(value, min) < 0 : compare(value, value) === 0) { min = value; defined = true; } } } return min; } /***/ }), /***/ "tIkd": /*!********************************************!*\ !*** ./node_modules/d3-ease/src/circle.js ***! \********************************************/ /*! exports provided: circleIn, circleOut, circleInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleIn", function() { return circleIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleOut", function() { return circleOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleInOut", function() { return circleInOut; }); function circleIn(t) { return 1 - Math.sqrt(1 - t * t); } function circleOut(t) { return Math.sqrt(1 - --t * t); } function circleInOut(t) { return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; } /***/ }), /***/ "tO8Z": /*!***************************************************!*\ !*** ./node_modules/d3-format/src/formatTypes.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); /* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "ze3m"); /* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatRounded.js */ "P3jZ"); /* harmony default export */ __webpack_exports__["default"] = ({ "%": (x, p) => (x * 100).toFixed(p), "b": (x) => Math.round(x).toString(2), "c": (x) => x + "", "d": _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"], "e": (x, p) => x.toExponential(p), "f": (x, p) => x.toFixed(p), "g": (x, p) => x.toPrecision(p), "o": (x) => Math.round(x).toString(8), "p": (x, p) => Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x * 100, p), "r": _formatRounded_js__WEBPACK_IMPORTED_MODULE_2__["default"], "s": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_1__["default"], "X": (x) => Math.round(x).toString(16).toUpperCase(), "x": (x) => Math.round(x).toString(16) }); /***/ }), /***/ "tOsU": /*!**************************************************!*\ !*** ./node_modules/d3-contour/src/ascending.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(a, b) { return a - b; }); /***/ }), /***/ "tS1D": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/timeout.js ***! \******************************************************************/ /*! exports provided: timeout */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ "D0XW"); /* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/TimeoutError */ "Y6u4"); /* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./timeoutWith */ "syX2"); /* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/throwError */ "z6cu"); function timeout(due, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"]) { return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler); } //# sourceMappingURL=timeout.js.map /***/ }), /***/ "tSfe": /*!****************************************************!*\ !*** ./node_modules/d3-quadtree/src/visitAfter.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "p/7N"); /* harmony default export */ __webpack_exports__["default"] = (function(callback) { var quads = [], next = [], q; if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](this._root, this._x0, this._y0, this._x1, this._y1)); while (q = quads.pop()) { var node = q.node; if (node.length) { var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym)); if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym)); if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1)); if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1)); } next.push(q); } while (q = next.pop()) { callback(q.node, q.x0, q.y0, q.x1, q.y1); } return this; }); /***/ }), /***/ "tU+D": /*!********************************************!*\ !*** ./node_modules/d3-drag/src/nodrag.js ***! \********************************************/ /*! exports provided: default, yesdrag */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yesdrag", function() { return yesdrag; }); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ "cdIC"); /* harmony default export */ __webpack_exports__["default"] = (function(view) { var root = view.document.documentElement, selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); if ("onselectstart" in root) { selection.on("selectstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); } else { root.__noselect = root.style.MozUserSelect; root.style.MozUserSelect = "none"; } }); function yesdrag(view, noclick) { var root = view.document.documentElement, selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", null); if (noclick) { selection.on("click.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true); setTimeout(function() { selection.on("click.drag", null); }, 0); } if ("onselectstart" in root) { selection.on("selectstart.drag", null); } else { root.style.MozUserSelect = root.__noselect; delete root.__noselect; } } /***/ }), /***/ "tUiF": /*!**********************************************!*\ !*** ./node_modules/d3-polygon/src/index.js ***! \**********************************************/ /*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "n+Lp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./centroid.js */ "H39o"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _hull_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hull.js */ "ezys"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return _hull_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contains.js */ "uV4M"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./length.js */ "INn1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /***/ }), /***/ "ta7q": /*!********************************************!*\ !*** ./node_modules/d3-timer/src/index.js ***! \********************************************/ /*! exports provided: now, timer, timerFlush, timeout, interval */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "dPRQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["now"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timer"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timerFlush"]; }); /* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ "Pgey"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ "1byx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /***/ }), /***/ "tepu": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/stream.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function streamGeometry(geometry, stream) { if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { streamGeometryType[geometry.type](geometry, stream); } } var streamObjectType = { Feature: function(object, stream) { streamGeometry(object.geometry, stream); }, FeatureCollection: function(object, stream) { var features = object.features, i = -1, n = features.length; while (++i < n) streamGeometry(features[i].geometry, stream); } }; var streamGeometryType = { Sphere: function(object, stream) { stream.sphere(); }, Point: function(object, stream) { object = object.coordinates; stream.point(object[0], object[1], object[2]); }, MultiPoint: function(object, stream) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); }, LineString: function(object, stream) { streamLine(object.coordinates, stream, 0); }, MultiLineString: function(object, stream) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) streamLine(coordinates[i], stream, 0); }, Polygon: function(object, stream) { streamPolygon(object.coordinates, stream); }, MultiPolygon: function(object, stream) { var coordinates = object.coordinates, i = -1, n = coordinates.length; while (++i < n) streamPolygon(coordinates[i], stream); }, GeometryCollection: function(object, stream) { var geometries = object.geometries, i = -1, n = geometries.length; while (++i < n) streamGeometry(geometries[i], stream); } }; function streamLine(coordinates, stream, closed) { var i = -1, n = coordinates.length - closed, coordinate; stream.lineStart(); while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); stream.lineEnd(); } function streamPolygon(coordinates, stream) { var i = -1, n = coordinates.length; stream.polygonStart(); while (++i < n) streamLine(coordinates[i], stream, 1); stream.polygonEnd(); } /* harmony default export */ __webpack_exports__["default"] = (function(object, stream) { if (object && streamObjectType.hasOwnProperty(object.type)) { streamObjectType[object.type](object, stream); } else { streamGeometry(object, stream); } }); /***/ }), /***/ "tf+s": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/subscribeOn.js ***! \**********************************************************************/ /*! exports provided: subscribeOn */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; }); /* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/SubscribeOnObservable */ "O4y0"); function subscribeOn(scheduler, delay = 0) { return function subscribeOnOperatorFunction(source) { return source.lift(new SubscribeOnOperator(scheduler, delay)); }; } class SubscribeOnOperator { constructor(scheduler, delay) { this.scheduler = scheduler; this.delay = delay; } call(subscriber, source) { return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber); } } //# sourceMappingURL=subscribeOn.js.map /***/ }), /***/ "tgfz": /*!*******************************************!*\ !*** ./node_modules/d3-time/src/index.js ***! \*******************************************/ /*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "GOKn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ "GAlb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; }); /* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ "Xt/6"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; }); /* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ "LDjW"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["minutes"]; }); /* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ "s8O9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["hours"]; }); /* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ "dCyY"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["days"]; }); /* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ "sUwa"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["monday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["mondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["friday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["fridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturdays"]; }); /* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ "lgMH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["months"]; }); /* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ "oVo9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["years"]; }); /* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ "+O7D"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["utcMinutes"]; }); /* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ "9iN3"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["utcHours"]; }); /* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ "brLB"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["utcDays"]; }); /* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ "Jzny"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMonday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMondays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursdays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFriday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFridays"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturday"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturdays"]; }); /* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ "Vfhj"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["utcMonths"]; }); /* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ "d65L"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["utcYears"]; }); /***/ }), /***/ "tk/3": /*!********************************************************************!*\ !*** ./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js ***! \********************************************************************/ /*! exports provided: HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpErrorResponse, HttpEventType, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, ɵHttpInterceptingHandler, ɵangular_packages_common_http_http_a, ɵangular_packages_common_http_http_b, ɵangular_packages_common_http_http_c, ɵangular_packages_common_http_http_d, ɵangular_packages_common_http_http_e, ɵangular_packages_common_http_http_f, ɵangular_packages_common_http_http_g, ɵangular_packages_common_http_http_h */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HTTP_INTERCEPTORS", function() { return HTTP_INTERCEPTORS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpBackend", function() { return HttpBackend; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClient", function() { return HttpClient; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientJsonpModule", function() { return HttpClientJsonpModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientModule", function() { return HttpClientModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpClientXsrfModule", function() { return HttpClientXsrfModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpErrorResponse", function() { return HttpErrorResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpEventType", function() { return HttpEventType; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHandler", function() { return HttpHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHeaderResponse", function() { return HttpHeaderResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpHeaders", function() { return HttpHeaders; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpParams", function() { return HttpParams; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpRequest", function() { return HttpRequest; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpResponse", function() { return HttpResponse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpResponseBase", function() { return HttpResponseBase; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpUrlEncodingCodec", function() { return HttpUrlEncodingCodec; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpXhrBackend", function() { return HttpXhrBackend; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpXsrfTokenExtractor", function() { return HttpXsrfTokenExtractor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonpClientBackend", function() { return JsonpClientBackend; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonpInterceptor", function() { return JsonpInterceptor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "XhrFactory", function() { return XhrFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵHttpInterceptingHandler", function() { return HttpInterceptingHandler; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_a", function() { return NoopInterceptor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_b", function() { return JsonpCallbackContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_c", function() { return jsonpCallbackContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_d", function() { return BrowserXhr; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_e", function() { return XSRF_COOKIE_NAME; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_f", function() { return XSRF_HEADER_NAME; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_g", function() { return HttpXsrfCookieExtractor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_common_http_http_h", function() { return HttpXsrfInterceptor; }); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "kU1M"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ "ofXK"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a * `HttpResponse`. * * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the * `HttpBackend`. * * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain. * * @publicApi */ class HttpHandler { } /** * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend. * * Interceptors sit between the `HttpClient` interface and the `HttpBackend`. * * When injected, `HttpBackend` dispatches requests directly to the backend, without going * through the interceptor chain. * * @publicApi */ class HttpBackend { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents the header configuration options for an HTTP request. * Instances are immutable. Modifying methods return a cloned * instance with the change. The original object is never changed. * * @publicApi */ class HttpHeaders { /** Constructs a new HTTP header object with the given values.*/ constructor(headers) { /** * Internal map of lowercased header names to the normalized * form of the name (the form seen first). */ this.normalizedNames = new Map(); /** * Queued updates to be materialized the next initialization. */ this.lazyUpdate = null; if (!headers) { this.headers = new Map(); } else if (typeof headers === 'string') { this.lazyInit = () => { this.headers = new Map(); headers.split('\n').forEach(line => { const index = line.indexOf(':'); if (index > 0) { const name = line.slice(0, index); const key = name.toLowerCase(); const value = line.slice(index + 1).trim(); this.maybeSetNormalizedName(name, key); if (this.headers.has(key)) { this.headers.get(key).push(value); } else { this.headers.set(key, [value]); } } }); }; } else { this.lazyInit = () => { this.headers = new Map(); Object.keys(headers).forEach(name => { let values = headers[name]; const key = name.toLowerCase(); if (typeof values === 'string') { values = [values]; } if (values.length > 0) { this.headers.set(key, values); this.maybeSetNormalizedName(name, key); } }); }; } } /** * Checks for existence of a given header. * * @param name The header name to check for existence. * * @returns True if the header exists, false otherwise. */ has(name) { this.init(); return this.headers.has(name.toLowerCase()); } /** * Retrieves the first value of a given header. * * @param name The header name. * * @returns The value string if the header exists, null otherwise */ get(name) { this.init(); const values = this.headers.get(name.toLowerCase()); return values && values.length > 0 ? values[0] : null; } /** * Retrieves the names of the headers. * * @returns A list of header names. */ keys() { this.init(); return Array.from(this.normalizedNames.values()); } /** * Retrieves a list of values for a given header. * * @param name The header name from which to retrieve values. * * @returns A string of values if the header exists, null otherwise. */ getAll(name) { this.init(); return this.headers.get(name.toLowerCase()) || null; } /** * Appends a new value to the existing set of values for a header * and returns them in a clone of the original instance. * * @param name The header name for which to append the values. * @param value The value to append. * * @returns A clone of the HTTP headers object with the value appended to the given header. */ append(name, value) { return this.clone({ name, value, op: 'a' }); } /** * Sets or modifies a value for a given header in a clone of the original instance. * If the header already exists, its value is replaced with the given value * in the returned object. * * @param name The header name. * @param value The value or values to set or overide for the given header. * * @returns A clone of the HTTP headers object with the newly set header value. */ set(name, value) { return this.clone({ name, value, op: 's' }); } /** * Deletes values for a given header in a clone of the original instance. * * @param name The header name. * @param value The value or values to delete for the given header. * * @returns A clone of the HTTP headers object with the given value deleted. */ delete(name, value) { return this.clone({ name, value, op: 'd' }); } maybeSetNormalizedName(name, lcName) { if (!this.normalizedNames.has(lcName)) { this.normalizedNames.set(lcName, name); } } init() { if (!!this.lazyInit) { if (this.lazyInit instanceof HttpHeaders) { this.copyFrom(this.lazyInit); } else { this.lazyInit(); } this.lazyInit = null; if (!!this.lazyUpdate) { this.lazyUpdate.forEach(update => this.applyUpdate(update)); this.lazyUpdate = null; } } } copyFrom(other) { other.init(); Array.from(other.headers.keys()).forEach(key => { this.headers.set(key, other.headers.get(key)); this.normalizedNames.set(key, other.normalizedNames.get(key)); }); } clone(update) { const clone = new HttpHeaders(); clone.lazyInit = (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this; clone.lazyUpdate = (this.lazyUpdate || []).concat([update]); return clone; } applyUpdate(update) { const key = update.name.toLowerCase(); switch (update.op) { case 'a': case 's': let value = update.value; if (typeof value === 'string') { value = [value]; } if (value.length === 0) { return; } this.maybeSetNormalizedName(update.name, key); const base = (update.op === 'a' ? this.headers.get(key) : undefined) || []; base.push(...value); this.headers.set(key, base); break; case 'd': const toDelete = update.value; if (!toDelete) { this.headers.delete(key); this.normalizedNames.delete(key); } else { let existing = this.headers.get(key); if (!existing) { return; } existing = existing.filter(value => toDelete.indexOf(value) === -1); if (existing.length === 0) { this.headers.delete(key); this.normalizedNames.delete(key); } else { this.headers.set(key, existing); } } break; } } /** * @internal */ forEach(fn) { this.init(); Array.from(this.normalizedNames.keys()) .forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key))); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Provides encoding and decoding of URL parameter and query-string values. * * Serializes and parses URL parameter keys and values to encode and decode them. * If you pass URL query parameters without encoding, * the query parameters can be misinterpreted at the receiving end. * * * @publicApi */ class HttpUrlEncodingCodec { /** * Encodes a key name for a URL parameter or query-string. * @param key The key name. * @returns The encoded key name. */ encodeKey(key) { return standardEncoding(key); } /** * Encodes the value of a URL parameter or query-string. * @param value The value. * @returns The encoded value. */ encodeValue(value) { return standardEncoding(value); } /** * Decodes an encoded URL parameter or query-string key. * @param key The encoded key name. * @returns The decoded key name. */ decodeKey(key) { return decodeURIComponent(key); } /** * Decodes an encoded URL parameter or query-string value. * @param value The encoded value. * @returns The decoded value. */ decodeValue(value) { return decodeURIComponent(value); } } function paramParser(rawParams, codec) { const map = new Map(); if (rawParams.length > 0) { // The `window.location.search` can be used while creating an instance of the `HttpParams` class // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search` // may start with the `?` char, so we strip it if it's present. const params = rawParams.replace(/^\?/, '').split('&'); params.forEach((param) => { const eqIdx = param.indexOf('='); const [key, val] = eqIdx == -1 ? [codec.decodeKey(param), ''] : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))]; const list = map.get(key) || []; list.push(val); map.set(key, list); }); } return map; } function standardEncoding(v) { return encodeURIComponent(v) .replace(/%40/gi, '@') .replace(/%3A/gi, ':') .replace(/%24/gi, '$') .replace(/%2C/gi, ',') .replace(/%3B/gi, ';') .replace(/%2B/gi, '+') .replace(/%3D/gi, '=') .replace(/%3F/gi, '?') .replace(/%2F/gi, '/'); } /** * An HTTP request/response body that represents serialized parameters, * per the MIME type `application/x-www-form-urlencoded`. * * This class is immutable; all mutation operations return a new instance. * * @publicApi */ class HttpParams { constructor(options = {}) { this.updates = null; this.cloneFrom = null; this.encoder = options.encoder || new HttpUrlEncodingCodec(); if (!!options.fromString) { if (!!options.fromObject) { throw new Error(`Cannot specify both fromString and fromObject.`); } this.map = paramParser(options.fromString, this.encoder); } else if (!!options.fromObject) { this.map = new Map(); Object.keys(options.fromObject).forEach(key => { const value = options.fromObject[key]; this.map.set(key, Array.isArray(value) ? value : [value]); }); } else { this.map = null; } } /** * Reports whether the body includes one or more values for a given parameter. * @param param The parameter name. * @returns True if the parameter has one or more values, * false if it has no value or is not present. */ has(param) { this.init(); return this.map.has(param); } /** * Retrieves the first value for a parameter. * @param param The parameter name. * @returns The first value of the given parameter, * or `null` if the parameter is not present. */ get(param) { this.init(); const res = this.map.get(param); return !!res ? res[0] : null; } /** * Retrieves all values for a parameter. * @param param The parameter name. * @returns All values in a string array, * or `null` if the parameter not present. */ getAll(param) { this.init(); return this.map.get(param) || null; } /** * Retrieves all the parameters for this body. * @returns The parameter names in a string array. */ keys() { this.init(); return Array.from(this.map.keys()); } /** * Appends a new value to existing values for a parameter. * @param param The parameter name. * @param value The new value to add. * @return A new body with the appended value. */ append(param, value) { return this.clone({ param, value, op: 'a' }); } /** * Constructs a new body with appended values for the given parameter name. * @param params parameters and values * @return A new body with the new value. */ appendAll(params) { const updates = []; Object.keys(params).forEach(param => { const value = params[param]; if (Array.isArray(value)) { value.forEach(_value => { updates.push({ param, value: _value, op: 'a' }); }); } else { updates.push({ param, value, op: 'a' }); } }); return this.clone(updates); } /** * Replaces the value for a parameter. * @param param The parameter name. * @param value The new value. * @return A new body with the new value. */ set(param, value) { return this.clone({ param, value, op: 's' }); } /** * Removes a given value or all values from a parameter. * @param param The parameter name. * @param value The value to remove, if provided. * @return A new body with the given value removed, or with all values * removed if no value is specified. */ delete(param, value) { return this.clone({ param, value, op: 'd' }); } /** * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are * separated by `&`s. */ toString() { this.init(); return this.keys() .map(key => { const eKey = this.encoder.encodeKey(key); // `a: ['1']` produces `'a=1'` // `b: []` produces `''` // `c: ['1', '2']` produces `'c=1&c=2'` return this.map.get(key).map(value => eKey + '=' + this.encoder.encodeValue(value)) .join('&'); }) // filter out empty values because `b: []` produces `''` // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't .filter(param => param !== '') .join('&'); } clone(update) { const clone = new HttpParams({ encoder: this.encoder }); clone.cloneFrom = this.cloneFrom || this; clone.updates = (this.updates || []).concat(update); return clone; } init() { if (this.map === null) { this.map = new Map(); } if (this.cloneFrom !== null) { this.cloneFrom.init(); this.cloneFrom.keys().forEach(key => this.map.set(key, this.cloneFrom.map.get(key))); this.updates.forEach(update => { switch (update.op) { case 'a': case 's': const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || []; base.push(update.value); this.map.set(update.param, base); break; case 'd': if (update.value !== undefined) { let base = this.map.get(update.param) || []; const idx = base.indexOf(update.value); if (idx !== -1) { base.splice(idx, 1); } if (base.length > 0) { this.map.set(update.param, base); } else { this.map.delete(update.param); } } else { this.map.delete(update.param); break; } } }); this.cloneFrom = this.updates = null; } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Determine whether the given HTTP method may include a body. */ function mightHaveBody(method) { switch (method) { case 'DELETE': case 'GET': case 'HEAD': case 'OPTIONS': case 'JSONP': return false; default: return true; } } /** * Safely assert whether the given value is an ArrayBuffer. * * In some execution environments ArrayBuffer is not defined. */ function isArrayBuffer(value) { return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer; } /** * Safely assert whether the given value is a Blob. * * In some execution environments Blob is not defined. */ function isBlob(value) { return typeof Blob !== 'undefined' && value instanceof Blob; } /** * Safely assert whether the given value is a FormData instance. * * In some execution environments FormData is not defined. */ function isFormData(value) { return typeof FormData !== 'undefined' && value instanceof FormData; } /** * An outgoing HTTP request with an optional typed body. * * `HttpRequest` represents an outgoing request, including URL, method, * headers, body, and other request configuration options. Instances should be * assumed to be immutable. To modify a `HttpRequest`, the `clone` * method should be used. * * @publicApi */ class HttpRequest { constructor(method, url, third, fourth) { this.url = url; /** * The request body, or `null` if one isn't set. * * Bodies are not enforced to be immutable, as they can include a reference to any * user-defined data type. However, interceptors should take care to preserve * idempotence by treating them as such. */ this.body = null; /** * Whether this request should be made in a way that exposes progress events. * * Progress events are expensive (change detection runs on each event) and so * they should only be requested if the consumer intends to monitor them. */ this.reportProgress = false; /** * Whether this request should be sent with outgoing credentials (cookies). */ this.withCredentials = false; /** * The expected response type of the server. * * This is used to parse the response appropriately before returning it to * the requestee. */ this.responseType = 'json'; this.method = method.toUpperCase(); // Next, need to figure out which argument holds the HttpRequestInit // options, if any. let options; // Check whether a body argument is expected. The only valid way to omit // the body argument is to use a known no-body method like GET. if (mightHaveBody(this.method) || !!fourth) { // Body is the third argument, options are the fourth. this.body = (third !== undefined) ? third : null; options = fourth; } else { // No body required, options are the third argument. The body stays null. options = third; } // If options have been passed, interpret them. if (options) { // Normalize reportProgress and withCredentials. this.reportProgress = !!options.reportProgress; this.withCredentials = !!options.withCredentials; // Override default response type of 'json' if one is provided. if (!!options.responseType) { this.responseType = options.responseType; } // Override headers if they're provided. if (!!options.headers) { this.headers = options.headers; } if (!!options.params) { this.params = options.params; } } // If no headers have been passed in, construct a new HttpHeaders instance. if (!this.headers) { this.headers = new HttpHeaders(); } // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance. if (!this.params) { this.params = new HttpParams(); this.urlWithParams = url; } else { // Encode the parameters to a string in preparation for inclusion in the URL. const params = this.params.toString(); if (params.length === 0) { // No parameters, the visible URL is just the URL given at creation time. this.urlWithParams = url; } else { // Does the URL already have query parameters? Look for '?'. const qIdx = url.indexOf('?'); // There are 3 cases to handle: // 1) No existing parameters -> append '?' followed by params. // 2) '?' exists and is followed by existing query string -> // append '&' followed by params. // 3) '?' exists at the end of the url -> append params directly. // This basically amounts to determining the character, if any, with // which to join the URL and parameters. const sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : ''); this.urlWithParams = url + sep + params; } } } /** * Transform the free-form body into a serialized format suitable for * transmission to the server. */ serializeBody() { // If no body is present, no need to serialize it. if (this.body === null) { return null; } // Check whether the body is already in a serialized form. If so, // it can just be returned directly. if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) || typeof this.body === 'string') { return this.body; } // Check whether the body is an instance of HttpUrlEncodedParams. if (this.body instanceof HttpParams) { return this.body.toString(); } // Check whether the body is an object or array, and serialize with JSON if so. if (typeof this.body === 'object' || typeof this.body === 'boolean' || Array.isArray(this.body)) { return JSON.stringify(this.body); } // Fall back on toString() for everything else. return this.body.toString(); } /** * Examine the body and attempt to infer an appropriate MIME type * for it. * * If no such type can be inferred, this method will return `null`. */ detectContentTypeHeader() { // An empty body has no content type. if (this.body === null) { return null; } // FormData bodies rely on the browser's content type assignment. if (isFormData(this.body)) { return null; } // Blobs usually have their own content type. If it doesn't, then // no type can be inferred. if (isBlob(this.body)) { return this.body.type || null; } // Array buffers have unknown contents and thus no type can be inferred. if (isArrayBuffer(this.body)) { return null; } // Technically, strings could be a form of JSON data, but it's safe enough // to assume they're plain strings. if (typeof this.body === 'string') { return 'text/plain'; } // `HttpUrlEncodedParams` has its own content-type. if (this.body instanceof HttpParams) { return 'application/x-www-form-urlencoded;charset=UTF-8'; } // Arrays, objects, and numbers will be encoded as JSON. if (typeof this.body === 'object' || typeof this.body === 'number' || Array.isArray(this.body)) { return 'application/json'; } // No type could be inferred. return null; } clone(update = {}) { // For method, url, and responseType, take the current value unless // it is overridden in the update hash. const method = update.method || this.method; const url = update.url || this.url; const responseType = update.responseType || this.responseType; // The body is somewhat special - a `null` value in update.body means // whatever current body is present is being overridden with an empty // body, whereas an `undefined` value in update.body implies no // override. const body = (update.body !== undefined) ? update.body : this.body; // Carefully handle the boolean options to differentiate between // `false` and `undefined` in the update args. const withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials; const reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress; // Headers and params may be appended to if `setHeaders` or // `setParams` are used. let headers = update.headers || this.headers; let params = update.params || this.params; // Check whether the caller has asked to add headers. if (update.setHeaders !== undefined) { // Set every requested header. headers = Object.keys(update.setHeaders) .reduce((headers, name) => headers.set(name, update.setHeaders[name]), headers); } // Check whether the caller has asked to set params. if (update.setParams) { // Set every requested param. params = Object.keys(update.setParams) .reduce((params, param) => params.set(param, update.setParams[param]), params); } // Finally, construct the new HttpRequest using the pieces from above. return new HttpRequest(method, url, body, { params, headers, reportProgress, responseType, withCredentials, }); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Type enumeration for the different kinds of `HttpEvent`. * * @publicApi */ var HttpEventType; (function (HttpEventType) { /** * The request was sent out over the wire. */ HttpEventType[HttpEventType["Sent"] = 0] = "Sent"; /** * An upload progress event was received. */ HttpEventType[HttpEventType["UploadProgress"] = 1] = "UploadProgress"; /** * The response status code and headers were received. */ HttpEventType[HttpEventType["ResponseHeader"] = 2] = "ResponseHeader"; /** * A download progress event was received. */ HttpEventType[HttpEventType["DownloadProgress"] = 3] = "DownloadProgress"; /** * The full response including the body was received. */ HttpEventType[HttpEventType["Response"] = 4] = "Response"; /** * A custom event from an interceptor or a backend. */ HttpEventType[HttpEventType["User"] = 5] = "User"; })(HttpEventType || (HttpEventType = {})); /** * Base class for both `HttpResponse` and `HttpHeaderResponse`. * * @publicApi */ class HttpResponseBase { /** * Super-constructor for all responses. * * The single parameter accepted is an initialization hash. Any properties * of the response passed there will override the default values. */ constructor(init, defaultStatus = 200, defaultStatusText = 'OK') { // If the hash has values passed, use them to initialize the response. // Otherwise use the default values. this.headers = init.headers || new HttpHeaders(); this.status = init.status !== undefined ? init.status : defaultStatus; this.statusText = init.statusText || defaultStatusText; this.url = init.url || null; // Cache the ok value to avoid defining a getter. this.ok = this.status >= 200 && this.status < 300; } } /** * A partial HTTP response which only includes the status and header data, * but no response body. * * `HttpHeaderResponse` is a `HttpEvent` available on the response * event stream, only when progress events are requested. * * @publicApi */ class HttpHeaderResponse extends HttpResponseBase { /** * Create a new `HttpHeaderResponse` with the given parameters. */ constructor(init = {}) { super(init); this.type = HttpEventType.ResponseHeader; } /** * Copy this `HttpHeaderResponse`, overriding its contents with the * given parameter hash. */ clone(update = {}) { // Perform a straightforward initialization of the new HttpHeaderResponse, // overriding the current parameters with new ones if given. return new HttpHeaderResponse({ headers: update.headers || this.headers, status: update.status !== undefined ? update.status : this.status, statusText: update.statusText || this.statusText, url: update.url || this.url || undefined, }); } } /** * A full HTTP response, including a typed response body (which may be `null` * if one was not returned). * * `HttpResponse` is a `HttpEvent` available on the response event * stream. * * @publicApi */ class HttpResponse extends HttpResponseBase { /** * Construct a new `HttpResponse`. */ constructor(init = {}) { super(init); this.type = HttpEventType.Response; this.body = init.body !== undefined ? init.body : null; } clone(update = {}) { return new HttpResponse({ body: (update.body !== undefined) ? update.body : this.body, headers: update.headers || this.headers, status: (update.status !== undefined) ? update.status : this.status, statusText: update.statusText || this.statusText, url: update.url || this.url || undefined, }); } } /** * A response that represents an error or failure, either from a * non-successful HTTP status, an error while executing the request, * or some other failure which occurred during the parsing of the response. * * Any error returned on the `Observable` response stream will be * wrapped in an `HttpErrorResponse` to provide additional context about * the state of the HTTP layer when the error occurred. The error property * will contain either a wrapped Error object or the error response returned * from the server. * * @publicApi */ class HttpErrorResponse extends HttpResponseBase { constructor(init) { // Initialize with a default status of 0 / Unknown Error. super(init, 0, 'Unknown Error'); this.name = 'HttpErrorResponse'; /** * Errors are never okay, even when the status code is in the 2xx success range. */ this.ok = false; // If the response was successful, then this was a parse error. Otherwise, it was // a protocol-level failure of some sort. Either the request failed in transit // or the server returned an unsuccessful status code. if (this.status >= 200 && this.status < 300) { this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`; } else { this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`; } this.error = init.error || null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and * the given `body`. This function clones the object and adds the body. * * Note that the `responseType` *options* value is a String that identifies the * single data type of the response. * A single overload version of the method handles each response type. * The value of `responseType` cannot be a union, as the combined signature could imply. * */ function addBody(options, body) { return { body, headers: options.headers, observe: options.observe, params: options.params, reportProgress: options.reportProgress, responseType: options.responseType, withCredentials: options.withCredentials, }; } /** * Performs HTTP requests. * This service is available as an injectable class, with methods to perform HTTP requests. * Each request method has multiple signatures, and the return type varies based on * the signature that is called (mainly the values of `observe` and `responseType`). * * Note that the `responseType` *options* value is a String that identifies the * single data type of the response. * A single overload version of the method handles each response type. * The value of `responseType` cannot be a union, as the combined signature could imply. * * @usageNotes * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application. * * ### HTTP Request Example * * ``` * // GET heroes whose name contains search term * searchHeroes(term: string): observable<Hero[]>{ * * const params = new HttpParams({fromString: 'name=term'}); * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params}); * } * ``` * * Alternatively, the parameter string can be used without invoking HttpParams * by directly joining to the URL. * ``` * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'}); * ``` * * * ### JSONP Example * ``` * requestJsonp(url, callback = 'callback') { * return this.httpClient.jsonp(this.heroesURL, callback); * } * ``` * * ### PATCH Example * ``` * // PATCH one of the heroes' name * patchHero (id: number, heroName: string): Observable<{}> { * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42 * return this.httpClient.patch(url, {name: heroName}, httpOptions) * .pipe(catchError(this.handleError('patchHero'))); * } * ``` * * @see [HTTP Guide](guide/http) * @see [HTTP Request](api/common/http/HttpRequest) * * @publicApi */ class HttpClient { constructor(handler) { this.handler = handler; } /** * Constructs an observable for a generic HTTP request that, when subscribed, * fires the request through the chain of registered interceptors and on to the * server. * * You can pass an `HttpRequest` directly as the only parameter. In this case, * the call returns an observable of the raw `HttpEvent` stream. * * Alternatively you can pass an HTTP method as the first parameter, * a URL string as the second, and an options hash containing the request body as the third. * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the * type of returned observable. * * The `responseType` value determines how a successful response body is parsed. * * If `responseType` is the default `json`, you can pass a type interface for the resulting * object as a type parameter to the call. * * The `observe` value determines the return type, according to what you are interested in * observing. * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including * progress events by default. * * An `observe` value of response returns an observable of `HttpResponse<T>`, * where the `T` parameter depends on the `responseType` and any optionally provided type * parameter. * * An `observe` value of body returns an observable of `<T>` with the same `T` body type. * */ request(first, url, options = {}) { let req; // First, check whether the primary argument is an instance of `HttpRequest`. if (first instanceof HttpRequest) { // It is. The other arguments must be undefined (per the signatures) and can be // ignored. req = first; } else { // It's a string, so it represents a URL. Construct a request based on it, // and incorporate the remaining arguments (assuming `GET` unless a method is // provided. // Figure out the headers. let headers = undefined; if (options.headers instanceof HttpHeaders) { headers = options.headers; } else { headers = new HttpHeaders(options.headers); } // Sort out parameters. let params = undefined; if (!!options.params) { if (options.params instanceof HttpParams) { params = options.params; } else { params = new HttpParams({ fromObject: options.params }); } } // Construct the request. req = new HttpRequest(first, url, (options.body !== undefined ? options.body : null), { headers, params, reportProgress: options.reportProgress, // By default, JSON is assumed to be returned for all calls. responseType: options.responseType || 'json', withCredentials: options.withCredentials, }); } // Start with an Observable.of() the initial request, and run the handler (which // includes all interceptors) inside a concatMap(). This way, the handler runs // inside an Observable chain, which causes interceptors to be re-run on every // subscription (this also makes retries re-run the handler, including interceptors). const events$ = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(req).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["concatMap"])((req) => this.handler.handle(req))); // If coming via the API signature which accepts a previously constructed HttpRequest, // the only option is to get the event stream. Otherwise, return the event stream if // that is what was requested. if (first instanceof HttpRequest || options.observe === 'events') { return events$; } // The requested stream contains either the full response or the body. In either // case, the first step is to filter the event stream to extract a stream of // responses(s). const res$ = events$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["filter"])((event) => event instanceof HttpResponse)); // Decide which stream to return. switch (options.observe || 'body') { case 'body': // The requested stream is the body. Map the response stream to the response // body. This could be done more simply, but a misbehaving interceptor might // transform the response body into a different format and ignore the requested // responseType. Guard against this by validating that the response is of the // requested type. switch (req.responseType) { case 'arraybuffer': return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => { // Validate that the body is an ArrayBuffer. if (res.body !== null && !(res.body instanceof ArrayBuffer)) { throw new Error('Response is not an ArrayBuffer.'); } return res.body; })); case 'blob': return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => { // Validate that the body is a Blob. if (res.body !== null && !(res.body instanceof Blob)) { throw new Error('Response is not a Blob.'); } return res.body; })); case 'text': return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => { // Validate that the body is a string. if (res.body !== null && typeof res.body !== 'string') { throw new Error('Response is not a string.'); } return res.body; })); case 'json': default: // No validation needed for JSON responses, as they can be of any type. return res$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])((res) => res.body)); } case 'response': // The response stream was requested directly, so return it. return res$; default: // Guard against new future observe types being added. throw new Error(`Unreachable: unhandled observe type ${options.observe}}`); } } /** * Constructs an observable that, when subscribed, causes the configured * `DELETE` request to execute on the server. See the individual overloads for * details on the return type. * * @param url The endpoint URL. * @param options The HTTP options to send with the request. * */ delete(url, options = {}) { return this.request('DELETE', url, options); } /** * Constructs an observable that, when subscribed, causes the configured * `GET` request to execute on the server. See the individual overloads for * details on the return type. */ get(url, options = {}) { return this.request('GET', url, options); } /** * Constructs an observable that, when subscribed, causes the configured * `HEAD` request to execute on the server. The `HEAD` method returns * meta information about the resource without transferring the * resource itself. See the individual overloads for * details on the return type. */ head(url, options = {}) { return this.request('HEAD', url, options); } /** * Constructs an `Observable` that, when subscribed, causes a request with the special method * `JSONP` to be dispatched via the interceptor pipeline. * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain * API endpoints that don't support newer, * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol. * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the * requests even if the API endpoint is not located on the same domain (origin) as the client-side * application making the request. * The endpoint API must support JSONP callback for JSONP requests to work. * The resource API returns the JSON response wrapped in a callback function. * You can pass the callback function name as one of the query parameters. * Note that JSONP requests can only be used with `GET` requests. * * @param url The resource URL. * @param callbackParam The callback function name. * */ jsonp(url, callbackParam) { return this.request('JSONP', url, { params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'), observe: 'body', responseType: 'json', }); } /** * Constructs an `Observable` that, when subscribed, causes the configured * `OPTIONS` request to execute on the server. This method allows the client * to determine the supported HTTP methods and other capabilites of an endpoint, * without implying a resource action. See the individual overloads for * details on the return type. */ options(url, options = {}) { return this.request('OPTIONS', url, options); } /** * Constructs an observable that, when subscribed, causes the configured * `PATCH` request to execute on the server. See the individual overloads for * details on the return type. */ patch(url, body, options = {}) { return this.request('PATCH', url, addBody(options, body)); } /** * Constructs an observable that, when subscribed, causes the configured * `POST` request to execute on the server. The server responds with the location of * the replaced resource. See the individual overloads for * details on the return type. */ post(url, body, options = {}) { return this.request('POST', url, addBody(options, body)); } /** * Constructs an observable that, when subscribed, causes the configured * `PUT` request to execute on the server. The `PUT` method replaces an existing resource * with a new set of values. * See the individual overloads for details on the return type. */ put(url, body, options = {}) { return this.request('PUT', url, addBody(options, body)); } } HttpClient.ɵfac = function HttpClient_Factory(t) { return new (t || HttpClient)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpHandler)); }; HttpClient.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpClient, factory: HttpClient.ɵfac }); HttpClient.ctorParameters = () => [ { type: HttpHandler } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClient, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: HttpHandler }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`. * * */ class HttpInterceptorHandler { constructor(next, interceptor) { this.next = next; this.interceptor = interceptor; } handle(req) { return this.interceptor.intercept(req, this.next); } } /** * A multi-provider token that represents the array of registered * `HttpInterceptor` objects. * * @publicApi */ const HTTP_INTERCEPTORS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('HTTP_INTERCEPTORS'); class NoopInterceptor { intercept(req, next) { return next.handle(req); } } NoopInterceptor.ɵfac = function NoopInterceptor_Factory(t) { return new (t || NoopInterceptor)(); }; NoopInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: NoopInterceptor, factory: NoopInterceptor.ɵfac }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NoopInterceptor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // Every request made through JSONP needs a callback name that's unique across the // whole page. Each request is assigned an id and the callback name is constructed // from that. The next id to be assigned is tracked in a global variable here that // is shared among all applications on the page. let nextRequestId = 0; // Error text given when a JSONP script is injected, but doesn't invoke the callback // passed in its URL. const JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.'; // Error text given when a request is passed to the JsonpClientBackend that doesn't // have a request method JSONP. const JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.'; const JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.'; /** * DI token/abstract type representing a map of JSONP callbacks. * * In the browser, this should always be the `window` object. * * */ class JsonpCallbackContext { } /** * Processes an `HttpRequest` with the JSONP method, * by performing JSONP style requests. * @see `HttpHandler` * @see `HttpXhrBackend` * * @publicApi */ class JsonpClientBackend { constructor(callbackMap, document) { this.callbackMap = callbackMap; this.document = document; /** * A resolved promise that can be used to schedule microtasks in the event handlers. */ this.resolvedPromise = Promise.resolve(); } /** * Get the name of the next callback method, by incrementing the global `nextRequestId`. */ nextCallback() { return `ng_jsonp_callback_${nextRequestId++}`; } /** * Processes a JSONP request and returns an event stream of the results. * @param req The request object. * @returns An observable of the response events. * */ handle(req) { // Firstly, check both the method and response type. If either doesn't match // then the request was improperly routed here and cannot be handled. if (req.method !== 'JSONP') { throw new Error(JSONP_ERR_WRONG_METHOD); } else if (req.responseType !== 'json') { throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE); } // Everything else happens inside the Observable boundary. return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"]((observer) => { // The first step to make a request is to generate the callback name, and replace the // callback placeholder in the URL with the name. Care has to be taken here to ensure // a trailing &, if matched, gets inserted back into the URL in the correct place. const callback = this.nextCallback(); const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`); // Construct the <script> tag and point it at the URL. const node = this.document.createElement('script'); node.src = url; // A JSONP request requires waiting for multiple callbacks. These variables // are closed over and track state across those callbacks. // The response object, if one has been received, or null otherwise. let body = null; // Whether the response callback has been called. let finished = false; // Whether the request has been cancelled (and thus any other callbacks) // should be ignored. let cancelled = false; // Set the response callback in this.callbackMap (which will be the window // object in the browser. The script being loaded via the <script> tag will // eventually call this callback. this.callbackMap[callback] = (data) => { // Data has been received from the JSONP script. Firstly, delete this callback. delete this.callbackMap[callback]; // Next, make sure the request wasn't cancelled in the meantime. if (cancelled) { return; } // Set state to indicate data was received. body = data; finished = true; }; // cleanup() is a utility closure that removes the <script> from the page and // the response callback from the window. This logic is used in both the // success, error, and cancellation paths, so it's extracted out for convenience. const cleanup = () => { // Remove the <script> tag if it's still on the page. if (node.parentNode) { node.parentNode.removeChild(node); } // Remove the response callback from the callbackMap (window object in the // browser). delete this.callbackMap[callback]; }; // onLoad() is the success callback which runs after the response callback // if the JSONP script loads successfully. The event itself is unimportant. // If something went wrong, onLoad() may run without the response callback // having been invoked. const onLoad = (event) => { // Do nothing if the request has been cancelled. if (cancelled) { return; } // We wrap it in an extra Promise, to ensure the microtask // is scheduled after the loaded endpoint has executed any potential microtask itself, // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496 this.resolvedPromise.then(() => { // Cleanup the page. cleanup(); // Check whether the response callback has run. if (!finished) { // It hasn't, something went wrong with the request. Return an error via // the Observable error path. All JSONP errors have status 0. observer.error(new HttpErrorResponse({ url, status: 0, statusText: 'JSONP Error', error: new Error(JSONP_ERR_NO_CALLBACK), })); return; } // Success. body either contains the response body or null if none was // returned. observer.next(new HttpResponse({ body, status: 200, statusText: 'OK', url, })); // Complete the stream, the response is over. observer.complete(); }); }; // onError() is the error callback, which runs if the script returned generates // a Javascript error. It emits the error via the Observable error channel as // a HttpErrorResponse. const onError = (error) => { // If the request was already cancelled, no need to emit anything. if (cancelled) { return; } cleanup(); // Wrap the error in a HttpErrorResponse. observer.error(new HttpErrorResponse({ error, status: 0, statusText: 'JSONP Error', url, })); }; // Subscribe to both the success (load) and error events on the <script> tag, // and add it to the page. node.addEventListener('load', onLoad); node.addEventListener('error', onError); this.document.body.appendChild(node); // The request has now been successfully sent. observer.next({ type: HttpEventType.Sent }); // Cancellation handler. return () => { // Track the cancellation so event listeners won't do anything even if already scheduled. cancelled = true; // Remove the event listeners so they won't run if the events later fire. node.removeEventListener('load', onLoad); node.removeEventListener('error', onError); // And finally, clean up the page. cleanup(); }; }); } } JsonpClientBackend.ɵfac = function JsonpClientBackend_Factory(t) { return new (t || JsonpClientBackend)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](JsonpCallbackContext), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"])); }; JsonpClientBackend.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: JsonpClientBackend, factory: JsonpClientBackend.ɵfac }); JsonpClientBackend.ctorParameters = () => [ { type: JsonpCallbackContext }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonpClientBackend, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]] }] }]; }, null); })(); /** * Identifies requests with the method JSONP and * shifts them to the `JsonpClientBackend`. * * @see `HttpInterceptor` * * @publicApi */ class JsonpInterceptor { constructor(jsonp) { this.jsonp = jsonp; } /** * Identifies and handles a given JSONP request. * @param req The outgoing request object to handle. * @param next The next interceptor in the chain, or the backend * if no interceptors remain in the chain. * @returns An observable of the event stream. */ intercept(req, next) { if (req.method === 'JSONP') { return this.jsonp.handle(req); } // Fall through for normal HTTP requests. return next.handle(req); } } JsonpInterceptor.ɵfac = function JsonpInterceptor_Factory(t) { return new (t || JsonpInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](JsonpClientBackend)); }; JsonpInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: JsonpInterceptor, factory: JsonpInterceptor.ɵfac }); JsonpInterceptor.ctorParameters = () => [ { type: JsonpClientBackend } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonpInterceptor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: JsonpClientBackend }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const XSSI_PREFIX = /^\)\]\}',?\n/; /** * Determine an appropriate URL for the response, by checking either * XMLHttpRequest.responseURL or the X-Request-URL header. */ function getResponseUrl(xhr) { if ('responseURL' in xhr && xhr.responseURL) { return xhr.responseURL; } if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) { return xhr.getResponseHeader('X-Request-URL'); } return null; } /** * A wrapper around the `XMLHttpRequest` constructor. * * @publicApi */ class XhrFactory { } /** * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API. * */ class BrowserXhr { constructor() { } build() { return (new XMLHttpRequest()); } } BrowserXhr.ɵfac = function BrowserXhr_Factory(t) { return new (t || BrowserXhr)(); }; BrowserXhr.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: BrowserXhr, factory: BrowserXhr.ɵfac }); BrowserXhr.ctorParameters = () => []; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserXhr, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return []; }, null); })(); /** * Uses `XMLHttpRequest` to send requests to a backend server. * @see `HttpHandler` * @see `JsonpClientBackend` * * @publicApi */ class HttpXhrBackend { constructor(xhrFactory) { this.xhrFactory = xhrFactory; } /** * Processes a request and returns a stream of response events. * @param req The request object. * @returns An observable of the response events. */ handle(req) { // Quick check to give a better error message when a user attempts to use // HttpClient.jsonp() without installing the HttpClientJsonpModule if (req.method === 'JSONP') { throw new Error(`Attempted to construct Jsonp request without HttpClientJsonpModule installed.`); } // Everything happens on Observable subscription. return new rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"]((observer) => { // Start by setting up the XHR object with request method, URL, and withCredentials flag. const xhr = this.xhrFactory.build(); xhr.open(req.method, req.urlWithParams); if (!!req.withCredentials) { xhr.withCredentials = true; } // Add all the requested headers. req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(','))); // Add an Accept header if one isn't present already. if (!req.headers.has('Accept')) { xhr.setRequestHeader('Accept', 'application/json, text/plain, */*'); } // Auto-detect the Content-Type header if one isn't present already. if (!req.headers.has('Content-Type')) { const detectedType = req.detectContentTypeHeader(); // Sometimes Content-Type detection fails. if (detectedType !== null) { xhr.setRequestHeader('Content-Type', detectedType); } } // Set the responseType if one was requested. if (req.responseType) { const responseType = req.responseType.toLowerCase(); // JSON responses need to be processed as text. This is because if the server // returns an XSSI-prefixed JSON response, the browser will fail to parse it, // xhr.response will be null, and xhr.responseText cannot be accessed to // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON // is parsed by first requesting text and then applying JSON.parse. xhr.responseType = ((responseType !== 'json') ? responseType : 'text'); } // Serialize the request body if one is present. If not, this will be set to null. const reqBody = req.serializeBody(); // If progress events are enabled, response headers will be delivered // in two events - the HttpHeaderResponse event and the full HttpResponse // event. However, since response headers don't change in between these // two events, it doesn't make sense to parse them twice. So headerResponse // caches the data extracted from the response whenever it's first parsed, // to ensure parsing isn't duplicated. let headerResponse = null; // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest // state, and memoizes it into headerResponse. const partialFromXhr = () => { if (headerResponse !== null) { return headerResponse; } // Read status and normalize an IE9 bug (https://bugs.jquery.com/ticket/1450). const status = xhr.status === 1223 ? 204 : xhr.status; const statusText = xhr.statusText || 'OK'; // Parse headers from XMLHttpRequest - this step is lazy. const headers = new HttpHeaders(xhr.getAllResponseHeaders()); // Read the response URL from the XMLHttpResponse instance and fall back on the // request URL. const url = getResponseUrl(xhr) || req.url; // Construct the HttpHeaderResponse and memoize it. headerResponse = new HttpHeaderResponse({ headers, status, statusText, url }); return headerResponse; }; // Next, a few closures are defined for the various events which XMLHttpRequest can // emit. This allows them to be unregistered as event listeners later. // First up is the load event, which represents a response being fully available. const onLoad = () => { // Read response state from the memoized partial data. let { headers, status, statusText, url } = partialFromXhr(); // The body will be read out if present. let body = null; if (status !== 204) { // Use XMLHttpRequest.response if set, responseText otherwise. body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response; } // Normalize another potential bug (this one comes from CORS). if (status === 0) { status = !!body ? 200 : 0; } // ok determines whether the response will be transmitted on the event or // error channel. Unsuccessful status codes (not 2xx) will always be errors, // but a successful status code can still result in an error if the user // asked for JSON data and the body cannot be parsed as such. let ok = status >= 200 && status < 300; // Check whether the body needs to be parsed as JSON (in many cases the browser // will have done that already). if (req.responseType === 'json' && typeof body === 'string') { // Save the original body, before attempting XSSI prefix stripping. const originalBody = body; body = body.replace(XSSI_PREFIX, ''); try { // Attempt the parse. If it fails, a parse error should be delivered to the user. body = body !== '' ? JSON.parse(body) : null; } catch (error) { // Since the JSON.parse failed, it's reasonable to assume this might not have been a // JSON response. Restore the original body (including any XSSI prefix) to deliver // a better error response. body = originalBody; // If this was an error request to begin with, leave it as a string, it probably // just isn't JSON. Otherwise, deliver the parsing error to the user. if (ok) { // Even though the response status was 2xx, this is still an error. ok = false; // The parse error contains the text of the body that failed to parse. body = { error, text: body }; } } } if (ok) { // A successful response is delivered on the event stream. observer.next(new HttpResponse({ body, headers, status, statusText, url: url || undefined, })); // The full body has been received and delivered, no further events // are possible. This request is complete. observer.complete(); } else { // An unsuccessful request is delivered on the error channel. observer.error(new HttpErrorResponse({ // The error in this case is the response body (error from the server). error: body, headers, status, statusText, url: url || undefined, })); } }; // The onError callback is called when something goes wrong at the network level. // Connection timeout, DNS error, offline, etc. These are actual errors, and are // transmitted on the error channel. const onError = (error) => { const { url } = partialFromXhr(); const res = new HttpErrorResponse({ error, status: xhr.status || 0, statusText: xhr.statusText || 'Unknown Error', url: url || undefined, }); observer.error(res); }; // The sentHeaders flag tracks whether the HttpResponseHeaders event // has been sent on the stream. This is necessary to track if progress // is enabled since the event will be sent on only the first download // progerss event. let sentHeaders = false; // The download progress event handler, which is only registered if // progress events are enabled. const onDownProgress = (event) => { // Send the HttpResponseHeaders event if it hasn't been sent already. if (!sentHeaders) { observer.next(partialFromXhr()); sentHeaders = true; } // Start building the download progress event to deliver on the response // event stream. let progressEvent = { type: HttpEventType.DownloadProgress, loaded: event.loaded, }; // Set the total number of bytes in the event if it's available. if (event.lengthComputable) { progressEvent.total = event.total; } // If the request was for text content and a partial response is // available on XMLHttpRequest, include it in the progress event // to allow for streaming reads. if (req.responseType === 'text' && !!xhr.responseText) { progressEvent.partialText = xhr.responseText; } // Finally, fire the event. observer.next(progressEvent); }; // The upload progress event handler, which is only registered if // progress events are enabled. const onUpProgress = (event) => { // Upload progress events are simpler. Begin building the progress // event. let progress = { type: HttpEventType.UploadProgress, loaded: event.loaded, }; // If the total number of bytes being uploaded is available, include // it. if (event.lengthComputable) { progress.total = event.total; } // Send the event. observer.next(progress); }; // By default, register for load and error events. xhr.addEventListener('load', onLoad); xhr.addEventListener('error', onError); xhr.addEventListener('timeout', onError); xhr.addEventListener('abort', onError); // Progress events are only enabled if requested. if (req.reportProgress) { // Download progress is always enabled if requested. xhr.addEventListener('progress', onDownProgress); // Upload progress depends on whether there is a body to upload. if (reqBody !== null && xhr.upload) { xhr.upload.addEventListener('progress', onUpProgress); } } // Fire the request, and notify the event stream that it was fired. xhr.send(reqBody); observer.next({ type: HttpEventType.Sent }); // This is the return from the Observable function, which is the // request cancellation handler. return () => { // On a cancellation, remove all registered event listeners. xhr.removeEventListener('error', onError); xhr.removeEventListener('abort', onError); xhr.removeEventListener('load', onLoad); xhr.removeEventListener('timeout', onError); if (req.reportProgress) { xhr.removeEventListener('progress', onDownProgress); if (reqBody !== null && xhr.upload) { xhr.upload.removeEventListener('progress', onUpProgress); } } // Finally, abort the in-flight request. if (xhr.readyState !== xhr.DONE) { xhr.abort(); } }; }); } } HttpXhrBackend.ɵfac = function HttpXhrBackend_Factory(t) { return new (t || HttpXhrBackend)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XhrFactory)); }; HttpXhrBackend.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpXhrBackend, factory: HttpXhrBackend.ɵfac }); HttpXhrBackend.ctorParameters = () => [ { type: XhrFactory } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXhrBackend, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: XhrFactory }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const XSRF_COOKIE_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_COOKIE_NAME'); const XSRF_HEADER_NAME = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('XSRF_HEADER_NAME'); /** * Retrieves the current XSRF token to use with the next outgoing request. * * @publicApi */ class HttpXsrfTokenExtractor { } /** * `HttpXsrfTokenExtractor` which retrieves the token from a cookie. */ class HttpXsrfCookieExtractor { constructor(doc, platform, cookieName) { this.doc = doc; this.platform = platform; this.cookieName = cookieName; this.lastCookieString = ''; this.lastToken = null; /** * @internal for testing */ this.parseCount = 0; } getToken() { if (this.platform === 'server') { return null; } const cookieString = this.doc.cookie || ''; if (cookieString !== this.lastCookieString) { this.parseCount++; this.lastToken = Object(_angular_common__WEBPACK_IMPORTED_MODULE_3__["ɵparseCookieValue"])(cookieString, this.cookieName); this.lastCookieString = cookieString; } return this.lastToken; } } HttpXsrfCookieExtractor.ɵfac = function HttpXsrfCookieExtractor_Factory(t) { return new (t || HttpXsrfCookieExtractor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XSRF_COOKIE_NAME)); }; HttpXsrfCookieExtractor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpXsrfCookieExtractor, factory: HttpXsrfCookieExtractor.ɵfac }); HttpXsrfCookieExtractor.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"],] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"],] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_COOKIE_NAME,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXsrfCookieExtractor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_common__WEBPACK_IMPORTED_MODULE_3__["DOCUMENT"]] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["PLATFORM_ID"]] }] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_COOKIE_NAME] }] }]; }, null); })(); /** * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests. */ class HttpXsrfInterceptor { constructor(tokenService, headerName) { this.tokenService = tokenService; this.headerName = headerName; } intercept(req, next) { const lcUrl = req.url.toLowerCase(); // Skip both non-mutating requests and absolute URLs. // Non-mutating requests don't require a token, and absolute URLs require special handling // anyway as the cookie set // on our origin is not the same as the token expected by another origin. if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') || lcUrl.startsWith('https://')) { return next.handle(req); } const token = this.tokenService.getToken(); // Be careful not to overwrite an existing header of the same name. if (token !== null && !req.headers.has(this.headerName)) { req = req.clone({ headers: req.headers.set(this.headerName, token) }); } return next.handle(req); } } HttpXsrfInterceptor.ɵfac = function HttpXsrfInterceptor_Factory(t) { return new (t || HttpXsrfInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpXsrfTokenExtractor), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](XSRF_HEADER_NAME)); }; HttpXsrfInterceptor.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpXsrfInterceptor, factory: HttpXsrfInterceptor.ɵfac }); HttpXsrfInterceptor.ctorParameters = () => [ { type: HttpXsrfTokenExtractor }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_HEADER_NAME,] }] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpXsrfInterceptor, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: HttpXsrfTokenExtractor }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [XSRF_HEADER_NAME] }] }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * An injectable `HttpHandler` that applies multiple interceptors * to a request before passing it to the given `HttpBackend`. * * The interceptors are loaded lazily from the injector, to allow * interceptors to themselves inject classes depending indirectly * on `HttpInterceptingHandler` itself. * @see `HttpInterceptor` */ class HttpInterceptingHandler { constructor(backend, injector) { this.backend = backend; this.injector = injector; this.chain = null; } handle(req) { if (this.chain === null) { const interceptors = this.injector.get(HTTP_INTERCEPTORS, []); this.chain = interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), this.backend); } return this.chain.handle(req); } } HttpInterceptingHandler.ɵfac = function HttpInterceptingHandler_Factory(t) { return new (t || HttpInterceptingHandler)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HttpBackend), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"])); }; HttpInterceptingHandler.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: HttpInterceptingHandler, factory: HttpInterceptingHandler.ɵfac }); HttpInterceptingHandler.ctorParameters = () => [ { type: HttpBackend }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpInterceptingHandler, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] }], function () { return [{ type: HttpBackend }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injector"] }]; }, null); })(); /** * Constructs an `HttpHandler` that applies interceptors * to a request before passing it to the given `HttpBackend`. * * Use as a factory function within `HttpClientModule`. * * */ function interceptingHandler(backend, interceptors = []) { if (!interceptors) { return backend; } return interceptors.reduceRight((next, interceptor) => new HttpInterceptorHandler(next, interceptor), backend); } /** * Factory function that determines where to store JSONP callbacks. * * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist * in test environments. In that case, callbacks are stored on an anonymous object instead. * * */ function jsonpCallbackContext() { if (typeof window === 'object') { return window; } return {}; } /** * Configures XSRF protection support for outgoing requests. * * For a server that supports a cookie-based XSRF protection system, * use directly to configure XSRF protection with the correct * cookie and header names. * * If no names are supplied, the default cookie name is `XSRF-TOKEN` * and the default header name is `X-XSRF-TOKEN`. * * @publicApi */ class HttpClientXsrfModule { /** * Disable the default XSRF protection. */ static disable() { return { ngModule: HttpClientXsrfModule, providers: [ { provide: HttpXsrfInterceptor, useClass: NoopInterceptor }, ], }; } /** * Configure XSRF protection. * @param options An object that can specify either or both * cookie name or header name. * - Cookie name default is `XSRF-TOKEN`. * - Header name default is `X-XSRF-TOKEN`. * */ static withOptions(options = {}) { return { ngModule: HttpClientXsrfModule, providers: [ options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [], options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [], ], }; } } HttpClientXsrfModule.ɵfac = function HttpClientXsrfModule_Factory(t) { return new (t || HttpClientXsrfModule)(); }; HttpClientXsrfModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: HttpClientXsrfModule }); HttpClientXsrfModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ HttpXsrfInterceptor, { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true }, { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor }, { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' }, { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' }, ] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientXsrfModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ providers: [ HttpXsrfInterceptor, { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true }, { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor }, { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' }, { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' }, ] }] }], null, null); })(); /** * Configures the [dependency injector](guide/glossary#injector) for `HttpClient` * with supporting services for XSRF. Automatically imported by `HttpClientModule`. * * You can add interceptors to the chain behind `HttpClient` by binding them to the * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`. * * @publicApi */ class HttpClientModule { } HttpClientModule.ɵfac = function HttpClientModule_Factory(t) { return new (t || HttpClientModule)(); }; HttpClientModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: HttpClientModule }); HttpClientModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ HttpClient, { provide: HttpHandler, useClass: HttpInterceptingHandler }, HttpXhrBackend, { provide: HttpBackend, useExisting: HttpXhrBackend }, BrowserXhr, { provide: XhrFactory, useExisting: BrowserXhr }, ], imports: [[ HttpClientXsrfModule.withOptions({ cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN' }), ]] }); (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](HttpClientModule, { imports: [HttpClientXsrfModule] }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ /** * Optional configuration for XSRF protection. */ imports: [ HttpClientXsrfModule.withOptions({ cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN' }), ], /** * Configures the [dependency injector](guide/glossary#injector) where it is imported * with supporting services for HTTP communications. */ providers: [ HttpClient, { provide: HttpHandler, useClass: HttpInterceptingHandler }, HttpXhrBackend, { provide: HttpBackend, useExisting: HttpXhrBackend }, BrowserXhr, { provide: XhrFactory, useExisting: BrowserXhr }, ] }] }], null, null); })(); /** * Configures the [dependency injector](guide/glossary#injector) for `HttpClient` * with supporting services for JSONP. * Without this module, Jsonp requests reach the backend * with method JSONP, where they are rejected. * * You can add interceptors to the chain behind `HttpClient` by binding them to the * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`. * * @publicApi */ class HttpClientJsonpModule { } HttpClientJsonpModule.ɵfac = function HttpClientJsonpModule_Factory(t) { return new (t || HttpClientJsonpModule)(); }; HttpClientJsonpModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: HttpClientJsonpModule }); HttpClientJsonpModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ providers: [ JsonpClientBackend, { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext }, { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true }, ] }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HttpClientJsonpModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ providers: [ JsonpClientBackend, { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext }, { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true }, ] }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=http.js.map /***/ }), /***/ "tnsW": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/audit.js ***! \****************************************************************/ /*! exports provided: audit */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function audit(durationSelector) { return function auditOperatorFunction(source) { return source.lift(new AuditOperator(durationSelector)); }; } class AuditOperator { constructor(durationSelector) { this.durationSelector = durationSelector; } call(subscriber, source) { return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector)); } } class AuditSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, durationSelector) { super(destination); this.durationSelector = durationSelector; this.hasValue = false; } _next(value) { this.value = value; this.hasValue = true; if (!this.throttled) { let duration; try { const { durationSelector } = this; duration = durationSelector(value); } catch (err) { return this.destination.error(err); } const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this)); if (!innerSubscription || innerSubscription.closed) { this.clearThrottle(); } else { this.add(this.throttled = innerSubscription); } } } clearThrottle() { const { value, hasValue, throttled } = this; if (throttled) { this.remove(throttled); this.throttled = undefined; throttled.unsubscribe(); } if (hasValue) { this.value = undefined; this.hasValue = false; this.destination.next(value); } } notifyNext() { this.clearThrottle(); } notifyComplete() { this.clearThrottle(); } } //# sourceMappingURL=audit.js.map /***/ }), /***/ "tvR+": /*!********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/treemap/index.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round.js */ "DdT1"); /* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify.js */ "I4jL"); /* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors.js */ "IeU1"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ "CSvP"); /* harmony default export */ __webpack_exports__["default"] = (function() { var tile = _squarify_js__WEBPACK_IMPORTED_MODULE_1__["default"], round = false, dx = 1, dy = 1, paddingStack = [0], paddingInner = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingTop = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingRight = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingBottom = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"], paddingLeft = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"]; function treemap(root) { root.x0 = root.y0 = 0; root.x1 = dx; root.y1 = dy; root.eachBefore(positionNode); paddingStack = [0]; if (round) root.eachBefore(_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]); return root; } function positionNode(node) { var p = paddingStack[node.depth], x0 = node.x0 + p, y0 = node.y0 + p, x1 = node.x1 - p, y1 = node.y1 - p; if (x1 < x0) x0 = x1 = (x0 + x1) / 2; if (y1 < y0) y0 = y1 = (y0 + y1) / 2; node.x0 = x0; node.y0 = y0; node.x1 = x1; node.y1 = y1; if (node.children) { p = paddingStack[node.depth + 1] = paddingInner(node) / 2; x0 += paddingLeft(node) - p; y0 += paddingTop(node) - p; x1 -= paddingRight(node) - p; y1 -= paddingBottom(node) - p; if (x1 < x0) x0 = x1 = (x0 + x1) / 2; if (y1 < y0) y0 = y1 = (y0 + y1) / 2; tile(node, x0, y0, x1, y1); } } treemap.round = function(x) { return arguments.length ? (round = !!x, treemap) : round; }; treemap.size = function(x) { return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy]; }; treemap.tile = function(x) { return arguments.length ? (tile = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_2__["required"])(x), treemap) : tile; }; treemap.padding = function(x) { return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner(); }; treemap.paddingInner = function(x) { return arguments.length ? (paddingInner = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingInner; }; treemap.paddingOuter = function(x) { return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop(); }; treemap.paddingTop = function(x) { return arguments.length ? (paddingTop = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingTop; }; treemap.paddingRight = function(x) { return arguments.length ? (paddingRight = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingRight; }; treemap.paddingBottom = function(x) { return arguments.length ? (paddingBottom = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingBottom; }; treemap.paddingLeft = function(x) { return arguments.length ? (paddingLeft = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingLeft; }; return treemap; }); /***/ }), /***/ "tyNb": /*!**********************************************************************!*\ !*** ./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js ***! \**********************************************************************/ /*! exports provided: ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, provideRoutes, ɵEmptyOutletComponent, ɵROUTER_PROVIDERS, ɵangular_packages_router_router_a, ɵangular_packages_router_router_b, ɵangular_packages_router_router_c, ɵangular_packages_router_router_d, ɵangular_packages_router_router_e, ɵangular_packages_router_router_f, ɵangular_packages_router_router_g, ɵangular_packages_router_router_h, ɵangular_packages_router_router_i, ɵangular_packages_router_router_j, ɵangular_packages_router_router_k, ɵangular_packages_router_router_l, ɵangular_packages_router_router_m, ɵangular_packages_router_router_n, ɵangular_packages_router_router_o, ɵassignExtraOptionsToRouter, ɵflatten */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivatedRoute", function() { return ActivatedRoute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivatedRouteSnapshot", function() { return ActivatedRouteSnapshot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationEnd", function() { return ActivationEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationStart", function() { return ActivationStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseRouteReuseStrategy", function() { return BaseRouteReuseStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildActivationEnd", function() { return ChildActivationEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildActivationStart", function() { return ChildActivationStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChildrenOutletContexts", function() { return ChildrenOutletContexts; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultUrlSerializer", function() { return DefaultUrlSerializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardsCheckEnd", function() { return GuardsCheckEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GuardsCheckStart", function() { return GuardsCheckStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationCancel", function() { return NavigationCancel; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationEnd", function() { return NavigationEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationError", function() { return NavigationError; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NavigationStart", function() { return NavigationStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoPreloading", function() { return NoPreloading; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OutletContext", function() { return OutletContext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRIMARY_OUTLET", function() { return PRIMARY_OUTLET; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloadAllModules", function() { return PreloadAllModules; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PreloadingStrategy", function() { return PreloadingStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTER_CONFIGURATION", function() { return ROUTER_CONFIGURATION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTER_INITIALIZER", function() { return ROUTER_INITIALIZER; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ROUTES", function() { return ROUTES; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolveEnd", function() { return ResolveEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolveStart", function() { return ResolveStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteConfigLoadEnd", function() { return RouteConfigLoadEnd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteConfigLoadStart", function() { return RouteConfigLoadStart; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouteReuseStrategy", function() { return RouteReuseStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return Router; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterEvent", function() { return RouterEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLink", function() { return RouterLink; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLinkActive", function() { return RouterLinkActive; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterLinkWithHref", function() { return RouterLinkWithHref; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterModule", function() { return RouterModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterOutlet", function() { return RouterOutlet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterPreloader", function() { return RouterPreloader; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterState", function() { return RouterState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RouterStateSnapshot", function() { return RouterStateSnapshot; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoutesRecognized", function() { return RoutesRecognized; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scroll", function() { return Scroll; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlHandlingStrategy", function() { return UrlHandlingStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSegment", function() { return UrlSegment; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSegmentGroup", function() { return UrlSegmentGroup; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlSerializer", function() { return UrlSerializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UrlTree", function() { return UrlTree; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToParamMap", function() { return convertToParamMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "provideRoutes", function() { return provideRoutes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵEmptyOutletComponent", function() { return ɵEmptyOutletComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵROUTER_PROVIDERS", function() { return ROUTER_PROVIDERS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_a", function() { return ROUTER_FORROOT_GUARD; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_b", function() { return routerNgProbeToken; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_c", function() { return createRouterScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_d", function() { return provideLocationStrategy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_e", function() { return provideForRootGuard; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_f", function() { return setupRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_g", function() { return rootRoute; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_h", function() { return RouterInitializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_i", function() { return getAppInitializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_j", function() { return getBootstrapListener; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_k", function() { return provideRouterInitializer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_l", function() { return ɵEmptyOutletComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_m", function() { return Tree; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_n", function() { return TreeNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵangular_packages_router_router_o", function() { return RouterScroller; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵassignExtraOptionsToRouter", function() { return assignExtraOptionsToRouter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ɵflatten", function() { return flatten; }); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "ofXK"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "fXoL"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "qCKp"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "kU1M"); /** * @license Angular v11.2.9 * (c) 2010-2021 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Base for events the router goes through, as opposed to events tied to a specific * route. Fired one time for any given navigation. * * The following code shows how a class subscribes to router events. * * ```ts * class MyService { * constructor(public router: Router, logger: Logger) { * router.events.pipe( * filter((e: Event): e is RouterEvent => e instanceof RouterEvent) * ).subscribe((e: RouterEvent) => { * logger.log(e.id, e.url); * }); * } * } * ``` * * @see `Event` * @see [Router events summary](guide/router#router-events) * @publicApi */ class RouterEvent { constructor( /** A unique ID that the router assigns to every router navigation. */ id, /** The URL that is the destination for this navigation. */ url) { this.id = id; this.url = url; } } /** * An event triggered when a navigation starts. * * @publicApi */ class NavigationStart extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ navigationTrigger = 'imperative', /** @docsNotRequired */ restoredState = null) { super(id, url); this.navigationTrigger = navigationTrigger; this.restoredState = restoredState; } /** @docsNotRequired */ toString() { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; } } /** * An event triggered when a navigation ends successfully. * * @see `NavigationStart` * @see `NavigationCancel` * @see `NavigationError` * * @publicApi */ class NavigationEnd extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; } /** @docsNotRequired */ toString() { return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`; } } /** * An event triggered when a navigation is canceled, directly or indirectly. * This can happen when a route guard * returns `false` or initiates a redirect by returning a `UrlTree`. * * @see `NavigationStart` * @see `NavigationEnd` * @see `NavigationError` * * @publicApi */ class NavigationCancel extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ reason) { super(id, url); this.reason = reason; } /** @docsNotRequired */ toString() { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; } } /** * An event triggered when a navigation fails due to an unexpected error. * * @see `NavigationStart` * @see `NavigationEnd` * @see `NavigationCancel` * * @publicApi */ class NavigationError extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ error) { super(id, url); this.error = error; } /** @docsNotRequired */ toString() { return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`; } } /** * An event triggered when routes are recognized. * * @publicApi */ class RoutesRecognized extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } /** @docsNotRequired */ toString() { return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered at the start of the Guard phase of routing. * * @see `GuardsCheckEnd` * * @publicApi */ class GuardsCheckStart extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } toString() { return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered at the end of the Guard phase of routing. * * @see `GuardsCheckStart` * * @publicApi */ class GuardsCheckEnd extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state, /** @docsNotRequired */ shouldActivate) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; this.shouldActivate = shouldActivate; } toString() { return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`; } } /** * An event triggered at the start of the Resolve phase of routing. * * Runs in the "resolve" phase whether or not there is anything to resolve. * In future, may change to only run when there are things to be resolved. * * @see `ResolveEnd` * * @publicApi */ class ResolveStart extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } toString() { return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered at the end of the Resolve phase of routing. * @see `ResolveStart`. * * @publicApi */ class ResolveEnd extends RouterEvent { constructor( /** @docsNotRequired */ id, /** @docsNotRequired */ url, /** @docsNotRequired */ urlAfterRedirects, /** @docsNotRequired */ state) { super(id, url); this.urlAfterRedirects = urlAfterRedirects; this.state = state; } toString() { return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`; } } /** * An event triggered before lazy loading a route configuration. * * @see `RouteConfigLoadEnd` * * @publicApi */ class RouteConfigLoadStart { constructor( /** @docsNotRequired */ route) { this.route = route; } toString() { return `RouteConfigLoadStart(path: ${this.route.path})`; } } /** * An event triggered when a route has been lazy loaded. * * @see `RouteConfigLoadStart` * * @publicApi */ class RouteConfigLoadEnd { constructor( /** @docsNotRequired */ route) { this.route = route; } toString() { return `RouteConfigLoadEnd(path: ${this.route.path})`; } } /** * An event triggered at the start of the child-activation * part of the Resolve phase of routing. * @see `ChildActivationEnd` * @see `ResolveStart` * * @publicApi */ class ChildActivationStart { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ChildActivationStart(path: '${path}')`; } } /** * An event triggered at the end of the child-activation part * of the Resolve phase of routing. * @see `ChildActivationStart` * @see `ResolveStart` * @publicApi */ class ChildActivationEnd { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ChildActivationEnd(path: '${path}')`; } } /** * An event triggered at the start of the activation part * of the Resolve phase of routing. * @see `ActivationEnd` * @see `ResolveStart` * * @publicApi */ class ActivationStart { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ActivationStart(path: '${path}')`; } } /** * An event triggered at the end of the activation part * of the Resolve phase of routing. * @see `ActivationStart` * @see `ResolveStart` * * @publicApi */ class ActivationEnd { constructor( /** @docsNotRequired */ snapshot) { this.snapshot = snapshot; } toString() { const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || ''; return `ActivationEnd(path: '${path}')`; } } /** * An event triggered by scrolling. * * @publicApi */ class Scroll { constructor( /** @docsNotRequired */ routerEvent, /** @docsNotRequired */ position, /** @docsNotRequired */ anchor) { this.routerEvent = routerEvent; this.position = position; this.anchor = anchor; } toString() { const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null; return `Scroll(anchor: '${this.anchor}', position: '${pos}')`; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The primary routing outlet. * * @publicApi */ const PRIMARY_OUTLET = 'primary'; class ParamsAsMap { constructor(params) { this.params = params || {}; } has(name) { return Object.prototype.hasOwnProperty.call(this.params, name); } get(name) { if (this.has(name)) { const v = this.params[name]; return Array.isArray(v) ? v[0] : v; } return null; } getAll(name) { if (this.has(name)) { const v = this.params[name]; return Array.isArray(v) ? v : [v]; } return []; } get keys() { return Object.keys(this.params); } } /** * Converts a `Params` instance to a `ParamMap`. * @param params The instance to convert. * @returns The new map instance. * * @publicApi */ function convertToParamMap(params) { return new ParamsAsMap(params); } const NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError'; function navigationCancelingError(message) { const error = Error('NavigationCancelingError: ' + message); error[NAVIGATION_CANCELING_ERROR] = true; return error; } function isNavigationCancelingError(error) { return error && error[NAVIGATION_CANCELING_ERROR]; } // Matches the route configuration (`route`) against the actual URL (`segments`). function defaultUrlMatcher(segments, segmentGroup, route) { const parts = route.path.split('/'); if (parts.length > segments.length) { // The actual URL is shorter than the config, no match return null; } if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || parts.length < segments.length)) { // The config is longer than the actual URL but we are looking for a full match, return null return null; } const posParams = {}; // Check each config part against the actual URL for (let index = 0; index < parts.length; index++) { const part = parts[index]; const segment = segments[index]; const isParameter = part.startsWith(':'); if (isParameter) { posParams[part.substring(1)] = segment; } else if (part !== segment.path) { // The actual URL part does not match the config, no match return null; } } return { consumed: segments.slice(0, parts.length), posParams }; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function shallowEqualArrays(a, b) { if (a.length !== b.length) return false; for (let i = 0; i < a.length; ++i) { if (!shallowEqual(a[i], b[i])) return false; } return true; } function shallowEqual(a, b) { // While `undefined` should never be possible, it would sometimes be the case in IE 11 // and pre-chromium Edge. The check below accounts for this edge case. const k1 = a ? Object.keys(a) : undefined; const k2 = b ? Object.keys(b) : undefined; if (!k1 || !k2 || k1.length != k2.length) { return false; } let key; for (let i = 0; i < k1.length; i++) { key = k1[i]; if (!equalArraysOrString(a[key], b[key])) { return false; } } return true; } /** * Test equality for arrays of strings or a string. */ function equalArraysOrString(a, b) { if (Array.isArray(a) && Array.isArray(b)) { if (a.length !== b.length) return false; const aSorted = [...a].sort(); const bSorted = [...b].sort(); return aSorted.every((val, index) => bSorted[index] === val); } else { return a === b; } } /** * Flattens single-level nested arrays. */ function flatten(arr) { return Array.prototype.concat.apply([], arr); } /** * Return the last element of an array. */ function last(a) { return a.length > 0 ? a[a.length - 1] : null; } /** * Verifys all booleans in an array are `true`. */ function and(bools) { return !bools.some(v => !v); } function forEach(map, callback) { for (const prop in map) { if (map.hasOwnProperty(prop)) { callback(map[prop], prop); } } } function wrapIntoObservable(value) { if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisObservable"])(value)) { return value; } if (Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵisPromise"])(value)) { // Use `Promise.resolve()` to wrap promise-like instances. // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the // change detection. return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(Promise.resolve(value)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(value); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function createEmptyUrlTree() { return new UrlTree(new UrlSegmentGroup([], {}), {}, null); } function containsTree(container, containee, exact) { if (exact) { return equalQueryParams(container.queryParams, containee.queryParams) && equalSegmentGroups(container.root, containee.root); } return containsQueryParams(container.queryParams, containee.queryParams) && containsSegmentGroup(container.root, containee.root); } function equalQueryParams(container, containee) { // TODO: This does not handle array params correctly. return shallowEqual(container, containee); } function equalSegmentGroups(container, containee) { if (!equalPath(container.segments, containee.segments)) return false; if (container.numberOfChildren !== containee.numberOfChildren) return false; for (const c in containee.children) { if (!container.children[c]) return false; if (!equalSegmentGroups(container.children[c], containee.children[c])) return false; } return true; } function containsQueryParams(container, containee) { return Object.keys(containee).length <= Object.keys(container).length && Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key])); } function containsSegmentGroup(container, containee) { return containsSegmentGroupHelper(container, containee, containee.segments); } function containsSegmentGroupHelper(container, containee, containeePaths) { if (container.segments.length > containeePaths.length) { const current = container.segments.slice(0, containeePaths.length); if (!equalPath(current, containeePaths)) return false; if (containee.hasChildren()) return false; return true; } else if (container.segments.length === containeePaths.length) { if (!equalPath(container.segments, containeePaths)) return false; for (const c in containee.children) { if (!container.children[c]) return false; if (!containsSegmentGroup(container.children[c], containee.children[c])) return false; } return true; } else { const current = containeePaths.slice(0, container.segments.length); const next = containeePaths.slice(container.segments.length); if (!equalPath(container.segments, current)) return false; if (!container.children[PRIMARY_OUTLET]) return false; return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next); } } /** * @description * * Represents the parsed URL. * * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a * serialized tree. * UrlTree is a data structure that provides a lot of affordances in dealing with URLs * * @usageNotes * ### Example * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const tree: UrlTree = * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment'); * const f = tree.fragment; // return 'fragment' * const q = tree.queryParams; // returns {debug: 'true'} * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET]; * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33' * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor' * g.children['support'].segments; // return 1 segment 'help' * } * } * ``` * * @publicApi */ class UrlTree { /** @internal */ constructor( /** The root segment group of the URL tree */ root, /** The query params of the URL */ queryParams, /** The fragment of the URL */ fragment) { this.root = root; this.queryParams = queryParams; this.fragment = fragment; } get queryParamMap() { if (!this._queryParamMap) { this._queryParamMap = convertToParamMap(this.queryParams); } return this._queryParamMap; } /** @docsNotRequired */ toString() { return DEFAULT_SERIALIZER.serialize(this); } } /** * @description * * Represents the parsed URL segment group. * * See `UrlTree` for more information. * * @publicApi */ class UrlSegmentGroup { constructor( /** The URL segments of this group. See `UrlSegment` for more information */ segments, /** The list of children of this group */ children) { this.segments = segments; this.children = children; /** The parent node in the url tree */ this.parent = null; forEach(children, (v, k) => v.parent = this); } /** Whether the segment has child segments */ hasChildren() { return this.numberOfChildren > 0; } /** Number of child segments */ get numberOfChildren() { return Object.keys(this.children).length; } /** @docsNotRequired */ toString() { return serializePaths(this); } } /** * @description * * Represents a single URL segment. * * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix * parameters associated with the segment. * * @usageNotes * ### Example * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const tree: UrlTree = router.parseUrl('/team;id=33'); * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET]; * const s: UrlSegment[] = g.segments; * s[0].path; // returns 'team' * s[0].parameters; // returns {id: 33} * } * } * ``` * * @publicApi */ class UrlSegment { constructor( /** The path part of a URL segment */ path, /** The matrix parameters associated with a segment */ parameters) { this.path = path; this.parameters = parameters; } get parameterMap() { if (!this._parameterMap) { this._parameterMap = convertToParamMap(this.parameters); } return this._parameterMap; } /** @docsNotRequired */ toString() { return serializePath(this); } } function equalSegments(as, bs) { return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters)); } function equalPath(as, bs) { if (as.length !== bs.length) return false; return as.every((a, i) => a.path === bs[i].path); } function mapChildrenIntoArray(segment, fn) { let res = []; forEach(segment.children, (child, childOutlet) => { if (childOutlet === PRIMARY_OUTLET) { res = res.concat(fn(child, childOutlet)); } }); forEach(segment.children, (child, childOutlet) => { if (childOutlet !== PRIMARY_OUTLET) { res = res.concat(fn(child, childOutlet)); } }); return res; } /** * @description * * Serializes and deserializes a URL string into a URL tree. * * The url serialization strategy is customizable. You can * make all URLs case insensitive by providing a custom UrlSerializer. * * See `DefaultUrlSerializer` for an example of a URL serializer. * * @publicApi */ class UrlSerializer { } /** * @description * * A default implementation of the `UrlSerializer`. * * Example URLs: * * ``` * /inbox/33(popup:compose) * /inbox/33;open=true/messages/44 * ``` * * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to * specify route specific parameters. * * @publicApi */ class DefaultUrlSerializer { /** Parses a url into a `UrlTree` */ parse(url) { const p = new UrlParser(url); return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment()); } /** Converts a `UrlTree` into a url */ serialize(tree) { const segment = `/${serializeSegment(tree.root, true)}`; const query = serializeQueryParams(tree.queryParams); const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : ''; return `${segment}${query}${fragment}`; } } const DEFAULT_SERIALIZER = new DefaultUrlSerializer(); function serializePaths(segment) { return segment.segments.map(p => serializePath(p)).join('/'); } function serializeSegment(segment, root) { if (!segment.hasChildren()) { return serializePaths(segment); } if (root) { const primary = segment.children[PRIMARY_OUTLET] ? serializeSegment(segment.children[PRIMARY_OUTLET], false) : ''; const children = []; forEach(segment.children, (v, k) => { if (k !== PRIMARY_OUTLET) { children.push(`${k}:${serializeSegment(v, false)}`); } }); return children.length > 0 ? `${primary}(${children.join('//')})` : primary; } else { const children = mapChildrenIntoArray(segment, (v, k) => { if (k === PRIMARY_OUTLET) { return [serializeSegment(segment.children[PRIMARY_OUTLET], false)]; } return [`${k}:${serializeSegment(v, false)}`]; }); // use no parenthesis if the only child is a primary outlet route if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) { return `${serializePaths(segment)}/${children[0]}`; } return `${serializePaths(segment)}/(${children.join('//')})`; } } /** * Encodes a URI string with the default encoding. This function will only ever be called from * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't * have to be encoded per https://url.spec.whatwg.org. */ function encodeUriString(s) { return encodeURIComponent(s) .replace(/%40/g, '@') .replace(/%3A/gi, ':') .replace(/%24/g, '$') .replace(/%2C/gi, ','); } /** * This function should be used to encode both keys and values in a query string key/value. In * the following URL, you need to call encodeUriQuery on "k" and "v": * * http://www.site.org/html;mk=mv?k=v#f */ function encodeUriQuery(s) { return encodeUriString(s).replace(/%3B/gi, ';'); } /** * This function should be used to encode a URL fragment. In the following URL, you need to call * encodeUriFragment on "f": * * http://www.site.org/html;mk=mv?k=v#f */ function encodeUriFragment(s) { return encodeURI(s); } /** * This function should be run on any URI segment as well as the key and value in a key/value * pair for matrix params. In the following URL, you need to call encodeUriSegment on "html", * "mk", and "mv": * * http://www.site.org/html;mk=mv?k=v#f */ function encodeUriSegment(s) { return encodeUriString(s).replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/%26/gi, '&'); } function decode(s) { return decodeURIComponent(s); } // Query keys/values should have the "+" replaced first, as "+" in a query string is " ". // decodeURIComponent function will not decode "+" as a space. function decodeQuery(s) { return decode(s.replace(/\+/g, '%20')); } function serializePath(path) { return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`; } function serializeMatrixParams(params) { return Object.keys(params) .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`) .join(''); } function serializeQueryParams(params) { const strParams = Object.keys(params).map((name) => { const value = params[name]; return Array.isArray(value) ? value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`; }); return strParams.length ? `?${strParams.join('&')}` : ''; } const SEGMENT_RE = /^[^\/()?;=#]+/; function matchSegments(str) { const match = str.match(SEGMENT_RE); return match ? match[0] : ''; } const QUERY_PARAM_RE = /^[^=?&#]+/; // Return the name of the query param at the start of the string or an empty string function matchQueryParams(str) { const match = str.match(QUERY_PARAM_RE); return match ? match[0] : ''; } const QUERY_PARAM_VALUE_RE = /^[^?&#]+/; // Return the value of the query param at the start of the string or an empty string function matchUrlQueryParamValue(str) { const match = str.match(QUERY_PARAM_VALUE_RE); return match ? match[0] : ''; } class UrlParser { constructor(url) { this.url = url; this.remaining = url; } parseRootSegment() { this.consumeOptional('/'); if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) { return new UrlSegmentGroup([], {}); } // The root segment group never has segments return new UrlSegmentGroup([], this.parseChildren()); } parseQueryParams() { const params = {}; if (this.consumeOptional('?')) { do { this.parseQueryParam(params); } while (this.consumeOptional('&')); } return params; } parseFragment() { return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null; } parseChildren() { if (this.remaining === '') { return {}; } this.consumeOptional('/'); const segments = []; if (!this.peekStartsWith('(')) { segments.push(this.parseSegment()); } while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) { this.capture('/'); segments.push(this.parseSegment()); } let children = {}; if (this.peekStartsWith('/(')) { this.capture('/'); children = this.parseParens(true); } let res = {}; if (this.peekStartsWith('(')) { res = this.parseParens(false); } if (segments.length > 0 || Object.keys(children).length > 0) { res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children); } return res; } // parse a segment with its matrix parameters // ie `name;k1=v1;k2` parseSegment() { const path = matchSegments(this.remaining); if (path === '' && this.peekStartsWith(';')) { throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`); } this.capture(path); return new UrlSegment(decode(path), this.parseMatrixParams()); } parseMatrixParams() { const params = {}; while (this.consumeOptional(';')) { this.parseParam(params); } return params; } parseParam(params) { const key = matchSegments(this.remaining); if (!key) { return; } this.capture(key); let value = ''; if (this.consumeOptional('=')) { const valueMatch = matchSegments(this.remaining); if (valueMatch) { value = valueMatch; this.capture(value); } } params[decode(key)] = decode(value); } // Parse a single query parameter `name[=value]` parseQueryParam(params) { const key = matchQueryParams(this.remaining); if (!key) { return; } this.capture(key); let value = ''; if (this.consumeOptional('=')) { const valueMatch = matchUrlQueryParamValue(this.remaining); if (valueMatch) { value = valueMatch; this.capture(value); } } const decodedKey = decodeQuery(key); const decodedVal = decodeQuery(value); if (params.hasOwnProperty(decodedKey)) { // Append to existing values let currentVal = params[decodedKey]; if (!Array.isArray(currentVal)) { currentVal = [currentVal]; params[decodedKey] = currentVal; } currentVal.push(decodedVal); } else { // Create a new value params[decodedKey] = decodedVal; } } // parse `(a/b//outlet_name:c/d)` parseParens(allowPrimary) { const segments = {}; this.capture('('); while (!this.consumeOptional(')') && this.remaining.length > 0) { const path = matchSegments(this.remaining); const next = this.remaining[path.length]; // if is is not one of these characters, then the segment was unescaped // or the group was not closed if (next !== '/' && next !== ')' && next !== ';') { throw new Error(`Cannot parse url '${this.url}'`); } let outletName = undefined; if (path.indexOf(':') > -1) { outletName = path.substr(0, path.indexOf(':')); this.capture(outletName); this.capture(':'); } else if (allowPrimary) { outletName = PRIMARY_OUTLET; } const children = this.parseChildren(); segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] : new UrlSegmentGroup([], children); this.consumeOptional('//'); } return segments; } peekStartsWith(str) { return this.remaining.startsWith(str); } // Consumes the prefix when it is present and returns whether it has been consumed consumeOptional(str) { if (this.peekStartsWith(str)) { this.remaining = this.remaining.substring(str.length); return true; } return false; } capture(str) { if (!this.consumeOptional(str)) { throw new Error(`Expected "${str}".`); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class Tree { constructor(root) { this._root = root; } get root() { return this._root.value; } /** * @internal */ parent(t) { const p = this.pathFromRoot(t); return p.length > 1 ? p[p.length - 2] : null; } /** * @internal */ children(t) { const n = findNode(t, this._root); return n ? n.children.map(t => t.value) : []; } /** * @internal */ firstChild(t) { const n = findNode(t, this._root); return n && n.children.length > 0 ? n.children[0].value : null; } /** * @internal */ siblings(t) { const p = findPath(t, this._root); if (p.length < 2) return []; const c = p[p.length - 2].children.map(c => c.value); return c.filter(cc => cc !== t); } /** * @internal */ pathFromRoot(t) { return findPath(t, this._root).map(s => s.value); } } // DFS for the node matching the value function findNode(value, node) { if (value === node.value) return node; for (const child of node.children) { const node = findNode(value, child); if (node) return node; } return null; } // Return the path to the node with the given value using DFS function findPath(value, node) { if (value === node.value) return [node]; for (const child of node.children) { const path = findPath(value, child); if (path.length) { path.unshift(node); return path; } } return []; } class TreeNode { constructor(value, children) { this.value = value; this.children = children; } toString() { return `TreeNode(${this.value})`; } } // Return the list of T indexed by outlet name function nodeChildrenAsMap(node) { const map = {}; if (node) { node.children.forEach(child => map[child.value.outlet] = child); } return map; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Represents the state of the router as a tree of activated routes. * * @usageNotes * * Every node in the route tree is an `ActivatedRoute` instance * that knows about the "consumed" URL segments, the extracted parameters, * and the resolved data. * Use the `ActivatedRoute` properties to traverse the tree from any node. * * The following fragment shows how a component gets the root node * of the current state to establish its own route tree: * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const state: RouterState = router.routerState; * const root: ActivatedRoute = state.root; * const child = root.firstChild; * const id: Observable<string> = child.params.map(p => p.id); * //... * } * } * ``` * * @see `ActivatedRoute` * @see [Getting route information](guide/router#getting-route-information) * * @publicApi */ class RouterState extends Tree { /** @internal */ constructor(root, /** The current snapshot of the router state */ snapshot) { super(root); this.snapshot = snapshot; setRouterState(this, root); } toString() { return this.snapshot.toString(); } } function createEmptyState(urlTree, rootComponent) { const snapshot = createEmptyStateSnapshot(urlTree, rootComponent); const emptyUrl = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]([new UrlSegment('', {})]); const emptyParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({}); const emptyData = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({}); const emptyQueryParams = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({}); const fragment = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](''); const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root); activated.snapshot = snapshot.root; return new RouterState(new TreeNode(activated, []), snapshot); } function createEmptyStateSnapshot(urlTree, rootComponent) { const emptyParams = {}; const emptyData = {}; const emptyQueryParams = {}; const fragment = ''; const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {}); return new RouterStateSnapshot('', new TreeNode(activated, [])); } /** * Provides access to information about a route associated with a component * that is loaded in an outlet. * Use to traverse the `RouterState` tree and extract information from nodes. * * The following example shows how to construct a component using information from a * currently activated route. * * {@example router/activated-route/module.ts region="activated-route" * header="activated-route.component.ts"} * * @see [Getting route information](guide/router#getting-route-information) * * @publicApi */ class ActivatedRoute { /** @internal */ constructor( /** An observable of the URL segments matched by this route. */ url, /** An observable of the matrix parameters scoped to this route. */ params, /** An observable of the query parameters shared by all the routes. */ queryParams, /** An observable of the URL fragment shared by all the routes. */ fragment, /** An observable of the static and resolved data of this route. */ data, /** The outlet name of the route, a constant. */ outlet, /** The component of the route, a constant. */ // TODO(vsavkin): remove |string component, futureSnapshot) { this.url = url; this.params = params; this.queryParams = queryParams; this.fragment = fragment; this.data = data; this.outlet = outlet; this.component = component; this._futureSnapshot = futureSnapshot; } /** The configuration used to match this route. */ get routeConfig() { return this._futureSnapshot.routeConfig; } /** The root of the router state. */ get root() { return this._routerState.root; } /** The parent of this route in the router state tree. */ get parent() { return this._routerState.parent(this); } /** The first child of this route in the router state tree. */ get firstChild() { return this._routerState.firstChild(this); } /** The children of this route in the router state tree. */ get children() { return this._routerState.children(this); } /** The path from the root of the router state tree to this route. */ get pathFromRoot() { return this._routerState.pathFromRoot(this); } /** * An Observable that contains a map of the required and optional parameters * specific to the route. * The map supports retrieving single and multiple values from the same parameter. */ get paramMap() { if (!this._paramMap) { this._paramMap = this.params.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((p) => convertToParamMap(p))); } return this._paramMap; } /** * An Observable that contains a map of the query parameters available to all routes. * The map supports retrieving single and multiple values from the query parameter. */ get queryParamMap() { if (!this._queryParamMap) { this._queryParamMap = this.queryParams.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((p) => convertToParamMap(p))); } return this._queryParamMap; } toString() { return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`; } } /** * Returns the inherited params, data, and resolve for a given route. * By default, this only inherits values up to the nearest path-less or component-less route. * @internal */ function inheritedParamsDataResolve(route, paramsInheritanceStrategy = 'emptyOnly') { const pathFromRoot = route.pathFromRoot; let inheritingStartingFrom = 0; if (paramsInheritanceStrategy !== 'always') { inheritingStartingFrom = pathFromRoot.length - 1; while (inheritingStartingFrom >= 1) { const current = pathFromRoot[inheritingStartingFrom]; const parent = pathFromRoot[inheritingStartingFrom - 1]; // current route is an empty path => inherits its parent's params and data if (current.routeConfig && current.routeConfig.path === '') { inheritingStartingFrom--; // parent is componentless => current route should inherit its params and data } else if (!parent.component) { inheritingStartingFrom--; } else { break; } } } return flattenInherited(pathFromRoot.slice(inheritingStartingFrom)); } /** @internal */ function flattenInherited(pathFromRoot) { return pathFromRoot.reduce((res, curr) => { const params = Object.assign(Object.assign({}, res.params), curr.params); const data = Object.assign(Object.assign({}, res.data), curr.data); const resolve = Object.assign(Object.assign({}, res.resolve), curr._resolvedData); return { params, data, resolve }; }, { params: {}, data: {}, resolve: {} }); } /** * @description * * Contains the information about a route associated with a component loaded in an * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to * traverse the router state tree. * * The following example initializes a component with route information extracted * from the snapshot of the root node at the time of creation. * * ``` * @Component({templateUrl:'./my-component.html'}) * class MyComponent { * constructor(route: ActivatedRoute) { * const id: string = route.snapshot.params.id; * const url: string = route.snapshot.url.join(''); * const user = route.snapshot.data.user; * } * } * ``` * * @publicApi */ class ActivatedRouteSnapshot { /** @internal */ constructor( /** The URL segments matched by this route */ url, /** * The matrix parameters scoped to this route. * * You can compute all params (or data) in the router state or to get params outside * of an activated component by traversing the `RouterState` tree as in the following * example: * ``` * collectRouteParams(router: Router) { * let params = {}; * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root]; * while (stack.length > 0) { * const route = stack.pop()!; * params = {...params, ...route.params}; * stack.push(...route.children); * } * return params; * } * ``` */ params, /** The query parameters shared by all the routes */ queryParams, /** The URL fragment shared by all the routes */ fragment, /** The static and resolved data of this route */ data, /** The outlet name of the route */ outlet, /** The component of the route */ component, routeConfig, urlSegment, lastPathIndex, resolve) { this.url = url; this.params = params; this.queryParams = queryParams; this.fragment = fragment; this.data = data; this.outlet = outlet; this.component = component; this.routeConfig = routeConfig; this._urlSegment = urlSegment; this._lastPathIndex = lastPathIndex; this._resolve = resolve; } /** The root of the router state */ get root() { return this._routerState.root; } /** The parent of this route in the router state tree */ get parent() { return this._routerState.parent(this); } /** The first child of this route in the router state tree */ get firstChild() { return this._routerState.firstChild(this); } /** The children of this route in the router state tree */ get children() { return this._routerState.children(this); } /** The path from the root of the router state tree to this route */ get pathFromRoot() { return this._routerState.pathFromRoot(this); } get paramMap() { if (!this._paramMap) { this._paramMap = convertToParamMap(this.params); } return this._paramMap; } get queryParamMap() { if (!this._queryParamMap) { this._queryParamMap = convertToParamMap(this.queryParams); } return this._queryParamMap; } toString() { const url = this.url.map(segment => segment.toString()).join('/'); const matched = this.routeConfig ? this.routeConfig.path : ''; return `Route(url:'${url}', path:'${matched}')`; } } /** * @description * * Represents the state of the router at a moment in time. * * This is a tree of activated route snapshots. Every node in this tree knows about * the "consumed" URL segments, the extracted parameters, and the resolved data. * * The following example shows how a component is initialized with information * from the snapshot of the root node's state at the time of creation. * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const state: RouterState = router.routerState; * const snapshot: RouterStateSnapshot = state.snapshot; * const root: ActivatedRouteSnapshot = snapshot.root; * const child = root.firstChild; * const id: Observable<string> = child.params.map(p => p.id); * //... * } * } * ``` * * @publicApi */ class RouterStateSnapshot extends Tree { /** @internal */ constructor( /** The url from which this snapshot was created */ url, root) { super(root); this.url = url; setRouterState(this, root); } toString() { return serializeNode(this._root); } } function setRouterState(state, node) { node.value._routerState = state; node.children.forEach(c => setRouterState(state, c)); } function serializeNode(node) { const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : ''; return `${node.value}${c}`; } /** * The expectation is that the activate route is created with the right set of parameters. * So we push new values into the observables only when they are not the initial values. * And we detect that by checking if the snapshot field is set. */ function advanceActivatedRoute(route) { if (route.snapshot) { const currentSnapshot = route.snapshot; const nextSnapshot = route._futureSnapshot; route.snapshot = nextSnapshot; if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) { route.queryParams.next(nextSnapshot.queryParams); } if (currentSnapshot.fragment !== nextSnapshot.fragment) { route.fragment.next(nextSnapshot.fragment); } if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) { route.params.next(nextSnapshot.params); } if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) { route.url.next(nextSnapshot.url); } if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) { route.data.next(nextSnapshot.data); } } else { route.snapshot = route._futureSnapshot; // this is for resolved data route.data.next(route._futureSnapshot.data); } } function equalParamsAndUrlSegments(a, b) { const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url); const parentsMismatch = !a.parent !== !b.parent; return equalUrlParams && !parentsMismatch && (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function createRouterState(routeReuseStrategy, curr, prevState) { const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined); return new RouterState(root, curr); } function createNode(routeReuseStrategy, curr, prevState) { // reuse an activated route that is currently displayed on the screen if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) { const value = prevState.value; value._futureSnapshot = curr.value; const children = createOrReuseChildren(routeReuseStrategy, curr, prevState); return new TreeNode(value, children); // retrieve an activated route that is used to be displayed, but is not currently displayed } else { const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value); if (detachedRouteHandle) { const tree = detachedRouteHandle.route; setFutureSnapshotsOfActivatedRoutes(curr, tree); return tree; } else { const value = createActivatedRoute(curr.value); const children = curr.children.map(c => createNode(routeReuseStrategy, c)); return new TreeNode(value, children); } } } function setFutureSnapshotsOfActivatedRoutes(curr, result) { if (curr.value.routeConfig !== result.value.routeConfig) { throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route'); } if (curr.children.length !== result.children.length) { throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children'); } result.value._futureSnapshot = curr.value; for (let i = 0; i < curr.children.length; ++i) { setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]); } } function createOrReuseChildren(routeReuseStrategy, curr, prevState) { return curr.children.map(child => { for (const p of prevState.children) { if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) { return createNode(routeReuseStrategy, child, p); } } return createNode(routeReuseStrategy, child); }); } function createActivatedRoute(c) { return new ActivatedRoute(new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.url), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.params), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.queryParams), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.fragment), new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"](c.data), c.outlet, c.component, c); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function createUrlTree(route, urlTree, commands, queryParams, fragment) { if (commands.length === 0) { return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment); } const nav = computeNavigation(commands); if (nav.toRoot()) { return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment); } const startingPosition = findStartingPosition(nav, urlTree, route); const segmentGroup = startingPosition.processChildren ? updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) : updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands); return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment); } function isMatrixParams(command) { return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath; } /** * Determines if a given command has an `outlets` map. When we encounter a command * with an outlets k/v map, we need to apply each outlet individually to the existing segment. */ function isCommandWithOutlets(command) { return typeof command === 'object' && command != null && command.outlets; } function tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) { let qp = {}; if (queryParams) { forEach(queryParams, (value, name) => { qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`; }); } if (urlTree.root === oldSegmentGroup) { return new UrlTree(newSegmentGroup, qp, fragment); } return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment); } function replaceSegment(current, oldSegment, newSegment) { const children = {}; forEach(current.children, (c, outletName) => { if (c === oldSegment) { children[outletName] = newSegment; } else { children[outletName] = replaceSegment(c, oldSegment, newSegment); } }); return new UrlSegmentGroup(current.segments, children); } class Navigation { constructor(isAbsolute, numberOfDoubleDots, commands) { this.isAbsolute = isAbsolute; this.numberOfDoubleDots = numberOfDoubleDots; this.commands = commands; if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) { throw new Error('Root segment cannot have matrix parameters'); } const cmdWithOutlet = commands.find(isCommandWithOutlets); if (cmdWithOutlet && cmdWithOutlet !== last(commands)) { throw new Error('{outlets:{}} has to be the last command'); } } toRoot() { return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/'; } } /** Transforms commands to a normalized `Navigation` */ function computeNavigation(commands) { if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') { return new Navigation(true, 0, commands); } let numberOfDoubleDots = 0; let isAbsolute = false; const res = commands.reduce((res, cmd, cmdIdx) => { if (typeof cmd === 'object' && cmd != null) { if (cmd.outlets) { const outlets = {}; forEach(cmd.outlets, (commands, name) => { outlets[name] = typeof commands === 'string' ? commands.split('/') : commands; }); return [...res, { outlets }]; } if (cmd.segmentPath) { return [...res, cmd.segmentPath]; } } if (!(typeof cmd === 'string')) { return [...res, cmd]; } if (cmdIdx === 0) { cmd.split('/').forEach((urlPart, partIndex) => { if (partIndex == 0 && urlPart === '.') { // skip './a' } else if (partIndex == 0 && urlPart === '') { // '/a' isAbsolute = true; } else if (urlPart === '..') { // '../a' numberOfDoubleDots++; } else if (urlPart != '') { res.push(urlPart); } }); return res; } return [...res, cmd]; }, []); return new Navigation(isAbsolute, numberOfDoubleDots, res); } class Position { constructor(segmentGroup, processChildren, index) { this.segmentGroup = segmentGroup; this.processChildren = processChildren; this.index = index; } } function findStartingPosition(nav, tree, route) { if (nav.isAbsolute) { return new Position(tree.root, true, 0); } if (route.snapshot._lastPathIndex === -1) { const segmentGroup = route.snapshot._urlSegment; // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children // see issue #26224, #13011, #35687 // However, if the ActivatedRoute is the root we should process children like above. const processChildren = segmentGroup === tree.root; return new Position(segmentGroup, processChildren, 0); } const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1; const index = route.snapshot._lastPathIndex + modifier; return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots); } function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) { let g = group; let ci = index; let dd = numberOfDoubleDots; while (dd > ci) { dd -= ci; g = g.parent; if (!g) { throw new Error('Invalid number of \'../\''); } ci = g.segments.length; } return new Position(g, false, ci - dd); } function getOutlets(commands) { if (isCommandWithOutlets(commands[0])) { return commands[0].outlets; } return { [PRIMARY_OUTLET]: commands }; } function updateSegmentGroup(segmentGroup, startIndex, commands) { if (!segmentGroup) { segmentGroup = new UrlSegmentGroup([], {}); } if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) { return updateSegmentGroupChildren(segmentGroup, startIndex, commands); } const m = prefixedWith(segmentGroup, startIndex, commands); const slicedCommands = commands.slice(m.commandIndex); if (m.match && m.pathIndex < segmentGroup.segments.length) { const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {}); g.children[PRIMARY_OUTLET] = new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children); return updateSegmentGroupChildren(g, 0, slicedCommands); } else if (m.match && slicedCommands.length === 0) { return new UrlSegmentGroup(segmentGroup.segments, {}); } else if (m.match && !segmentGroup.hasChildren()) { return createNewSegmentGroup(segmentGroup, startIndex, commands); } else if (m.match) { return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands); } else { return createNewSegmentGroup(segmentGroup, startIndex, commands); } } function updateSegmentGroupChildren(segmentGroup, startIndex, commands) { if (commands.length === 0) { return new UrlSegmentGroup(segmentGroup.segments, {}); } else { const outlets = getOutlets(commands); const children = {}; forEach(outlets, (commands, outlet) => { if (typeof commands === 'string') { commands = [commands]; } if (commands !== null) { children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands); } }); forEach(segmentGroup.children, (child, childOutlet) => { if (outlets[childOutlet] === undefined) { children[childOutlet] = child; } }); return new UrlSegmentGroup(segmentGroup.segments, children); } } function prefixedWith(segmentGroup, startIndex, commands) { let currentCommandIndex = 0; let currentPathIndex = startIndex; const noMatch = { match: false, pathIndex: 0, commandIndex: 0 }; while (currentPathIndex < segmentGroup.segments.length) { if (currentCommandIndex >= commands.length) return noMatch; const path = segmentGroup.segments[currentPathIndex]; const command = commands[currentCommandIndex]; // Do not try to consume command as part of the prefixing if it has outlets because it can // contain outlets other than the one being processed. Consuming the outlets command would // result in other outlets being ignored. if (isCommandWithOutlets(command)) { break; } const curr = `${command}`; const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null; if (currentPathIndex > 0 && curr === undefined) break; if (curr && next && (typeof next === 'object') && next.outlets === undefined) { if (!compare(curr, next, path)) return noMatch; currentCommandIndex += 2; } else { if (!compare(curr, {}, path)) return noMatch; currentCommandIndex++; } currentPathIndex++; } return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex }; } function createNewSegmentGroup(segmentGroup, startIndex, commands) { const paths = segmentGroup.segments.slice(0, startIndex); let i = 0; while (i < commands.length) { const command = commands[i]; if (isCommandWithOutlets(command)) { const children = createNewSegmentChildren(command.outlets); return new UrlSegmentGroup(paths, children); } // if we start with an object literal, we need to reuse the path part from the segment if (i === 0 && isMatrixParams(commands[0])) { const p = segmentGroup.segments[startIndex]; paths.push(new UrlSegment(p.path, stringify(commands[0]))); i++; continue; } const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`; const next = (i < commands.length - 1) ? commands[i + 1] : null; if (curr && next && isMatrixParams(next)) { paths.push(new UrlSegment(curr, stringify(next))); i += 2; } else { paths.push(new UrlSegment(curr, {})); i++; } } return new UrlSegmentGroup(paths, {}); } function createNewSegmentChildren(outlets) { const children = {}; forEach(outlets, (commands, outlet) => { if (typeof commands === 'string') { commands = [commands]; } if (commands !== null) { children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands); } }); return children; } function stringify(params) { const res = {}; forEach(params, (v, k) => res[k] = `${v}`); return res; } function compare(path, params, segment) { return path == segment.path && shallowEqual(params, segment.parameters); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent) => Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(t => { new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent) .activate(rootContexts); return t; }); class ActivateRoutes { constructor(routeReuseStrategy, futureState, currState, forwardEvent) { this.routeReuseStrategy = routeReuseStrategy; this.futureState = futureState; this.currState = currState; this.forwardEvent = forwardEvent; } activate(parentContexts) { const futureRoot = this.futureState._root; const currRoot = this.currState ? this.currState._root : null; this.deactivateChildRoutes(futureRoot, currRoot, parentContexts); advanceActivatedRoute(this.futureState.root); this.activateChildRoutes(futureRoot, currRoot, parentContexts); } // De-activate the child route that are not re-used for the future state deactivateChildRoutes(futureNode, currNode, contexts) { const children = nodeChildrenAsMap(currNode); // Recurse on the routes active in the future state to de-activate deeper children futureNode.children.forEach(futureChild => { const childOutletName = futureChild.value.outlet; this.deactivateRoutes(futureChild, children[childOutletName], contexts); delete children[childOutletName]; }); // De-activate the routes that will not be re-used forEach(children, (v, childName) => { this.deactivateRouteAndItsChildren(v, contexts); }); } deactivateRoutes(futureNode, currNode, parentContext) { const future = futureNode.value; const curr = currNode ? currNode.value : null; if (future === curr) { // Reusing the node, check to see if the children need to be de-activated if (future.component) { // If we have a normal route, we need to go through an outlet. const context = parentContext.getContext(future.outlet); if (context) { this.deactivateChildRoutes(futureNode, currNode, context.children); } } else { // if we have a componentless route, we recurse but keep the same outlet map. this.deactivateChildRoutes(futureNode, currNode, parentContext); } } else { if (curr) { // Deactivate the current route which will not be re-used this.deactivateRouteAndItsChildren(currNode, parentContext); } } } deactivateRouteAndItsChildren(route, parentContexts) { if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) { this.detachAndStoreRouteSubtree(route, parentContexts); } else { this.deactivateRouteAndOutlet(route, parentContexts); } } detachAndStoreRouteSubtree(route, parentContexts) { const context = parentContexts.getContext(route.value.outlet); if (context && context.outlet) { const componentRef = context.outlet.detach(); const contexts = context.children.onOutletDeactivated(); this.routeReuseStrategy.store(route.value.snapshot, { componentRef, route, contexts }); } } deactivateRouteAndOutlet(route, parentContexts) { const context = parentContexts.getContext(route.value.outlet); // The context could be `null` if we are on a componentless route but there may still be // children that need deactivating. const contexts = context && route.value.component ? context.children : parentContexts; const children = nodeChildrenAsMap(route); for (const childOutlet of Object.keys(children)) { this.deactivateRouteAndItsChildren(children[childOutlet], contexts); } if (context && context.outlet) { // Destroy the component context.outlet.deactivate(); // Destroy the contexts for all the outlets that were in the component context.children.onOutletDeactivated(); } } activateChildRoutes(futureNode, currNode, contexts) { const children = nodeChildrenAsMap(currNode); futureNode.children.forEach(c => { this.activateRoutes(c, children[c.value.outlet], contexts); this.forwardEvent(new ActivationEnd(c.value.snapshot)); }); if (futureNode.children.length) { this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot)); } } activateRoutes(futureNode, currNode, parentContexts) { const future = futureNode.value; const curr = currNode ? currNode.value : null; advanceActivatedRoute(future); // reusing the node if (future === curr) { if (future.component) { // If we have a normal route, we need to go through an outlet. const context = parentContexts.getOrCreateContext(future.outlet); this.activateChildRoutes(futureNode, currNode, context.children); } else { // if we have a componentless route, we recurse but keep the same outlet map. this.activateChildRoutes(futureNode, currNode, parentContexts); } } else { if (future.component) { // if we have a normal route, we need to place the component into the outlet and recurse. const context = parentContexts.getOrCreateContext(future.outlet); if (this.routeReuseStrategy.shouldAttach(future.snapshot)) { const stored = this.routeReuseStrategy.retrieve(future.snapshot); this.routeReuseStrategy.store(future.snapshot, null); context.children.onOutletReAttached(stored.contexts); context.attachRef = stored.componentRef; context.route = stored.route.value; if (context.outlet) { // Attach right away when the outlet has already been instantiated // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated context.outlet.attach(stored.componentRef, stored.route.value); } advanceActivatedRouteNodeAndItsChildren(stored.route); } else { const config = parentLoadedConfig(future.snapshot); const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null; context.attachRef = null; context.route = future; context.resolver = cmpFactoryResolver; if (context.outlet) { // Activate the outlet when it has already been instantiated // Otherwise it will get activated from its `ngOnInit` when instantiated context.outlet.activateWith(future, cmpFactoryResolver); } this.activateChildRoutes(futureNode, null, context.children); } } else { // if we have a componentless route, we recurse but keep the same outlet map. this.activateChildRoutes(futureNode, null, parentContexts); } } } } function advanceActivatedRouteNodeAndItsChildren(node) { advanceActivatedRoute(node.value); node.children.forEach(advanceActivatedRouteNodeAndItsChildren); } function parentLoadedConfig(snapshot) { for (let s = snapshot.parent; s; s = s.parent) { const route = s.routeConfig; if (route && route._loadedConfig) return route._loadedConfig; if (route && route.component) return null; } return null; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class LoadedRouterConfig { constructor(routes, module) { this.routes = routes; this.module = module; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Simple function check, but generic so type inference will flow. Example: * * function product(a: number, b: number) { * return a * b; * } * * if (isFunction<product>(fn)) { * return fn(1, 2); * } else { * throw "Must provide the `product` function"; * } */ function isFunction(v) { return typeof v === 'function'; } function isBoolean(v) { return typeof v === 'boolean'; } function isUrlTree(v) { return v instanceof UrlTree; } function isCanLoad(guard) { return guard && isFunction(guard.canLoad); } function isCanActivate(guard) { return guard && isFunction(guard.canActivate); } function isCanActivateChild(guard) { return guard && isFunction(guard.canActivateChild); } function isCanDeactivate(guard) { return guard && isFunction(guard.canDeactivate); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const INITIAL_VALUE = Symbol('INITIAL_VALUE'); function prioritizedGuardValue() { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(obs => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["combineLatest"])(obs.map(o => o.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["take"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["startWith"])(INITIAL_VALUE)))) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["scan"])((acc, list) => { let isPending = false; return list.reduce((innerAcc, val, i) => { if (innerAcc !== INITIAL_VALUE) return innerAcc; // Toggle pending flag if any values haven't been set yet if (val === INITIAL_VALUE) isPending = true; // Any other return values are only valid if we haven't yet hit a pending // call. This guarantees that in the case of a guard at the bottom of the // tree that returns a redirect, we will wait for the higher priority // guard at the top to finish before performing the redirect. if (!isPending) { // Early return when we hit a `false` value as that should always // cancel navigation if (val === false) return val; if (i === list.length - 1 || isUrlTree(val)) { return val; } } return innerAcc; }, acc); }, INITIAL_VALUE), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(item => item !== INITIAL_VALUE), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(item => isUrlTree(item) ? item : item === true), // Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["take"])(1)); }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * This component is used internally within the router to be a placeholder when an empty * router-outlet is needed. For example, with a config such as: * * `{path: 'parent', outlet: 'nav', children: [...]}` * * In order to render, there needs to be a component on this config, which will default * to this `EmptyOutletComponent`. */ class ɵEmptyOutletComponent { } ɵEmptyOutletComponent.ɵfac = function ɵEmptyOutletComponent_Factory(t) { return new (t || ɵEmptyOutletComponent)(); }; ɵEmptyOutletComponent.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ type: ɵEmptyOutletComponent, selectors: [["ng-component"]], decls: 1, vars: 0, template: function ɵEmptyOutletComponent_Template(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "router-outlet"); } }, directives: function () { return [RouterOutlet]; }, encapsulation: 2 }); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](ɵEmptyOutletComponent, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"], args: [{ template: `<router-outlet></router-outlet>` }] }], null, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function validateConfig(config, parentPath = '') { // forEach doesn't iterate undefined values for (let i = 0; i < config.length; i++) { const route = config[i]; const fullPath = getFullPath(parentPath, route); validateNode(route, fullPath); } } function validateNode(route, fullPath) { if (typeof ngDevMode === 'undefined' || ngDevMode) { if (!route) { throw new Error(` Invalid configuration of route '${fullPath}': Encountered undefined route. The reason might be an extra comma. Example: const routes: Routes = [ { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, { path: 'dashboard', component: DashboardComponent },, << two commas { path: 'detail/:id', component: HeroDetailComponent } ]; `); } if (Array.isArray(route)) { throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`); } if (!route.component && !route.children && !route.loadChildren && (route.outlet && route.outlet !== PRIMARY_OUTLET)) { throw new Error(`Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`); } if (route.redirectTo && route.children) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`); } if (route.redirectTo && route.loadChildren) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`); } if (route.children && route.loadChildren) { throw new Error(`Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`); } if (route.redirectTo && route.component) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`); } if (route.redirectTo && route.canActivate) { throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` + `so canActivate will never be executed.`); } if (route.path && route.matcher) { throw new Error(`Invalid configuration of route '${fullPath}': path and matcher cannot be used together`); } if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) { throw new Error(`Invalid configuration of route '${fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`); } if (route.path === void 0 && route.matcher === void 0) { throw new Error(`Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`); } if (typeof route.path === 'string' && route.path.charAt(0) === '/') { throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`); } if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) { const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`; throw new Error(`Invalid configuration of route '{path: "${fullPath}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`); } if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') { throw new Error(`Invalid configuration of route '${fullPath}': pathMatch can only be set to 'prefix' or 'full'`); } } if (route.children) { validateConfig(route.children, fullPath); } } function getFullPath(parentPath, currentRoute) { if (!currentRoute) { return parentPath; } if (!parentPath && !currentRoute.path) { return ''; } else if (parentPath && !currentRoute.path) { return `${parentPath}/`; } else if (!parentPath && currentRoute.path) { return currentRoute.path; } else { return `${parentPath}/${currentRoute.path}`; } } /** * Makes a copy of the config and adds any default required properties. */ function standardizeConfig(r) { const children = r.children && r.children.map(standardizeConfig); const c = children ? Object.assign(Object.assign({}, r), { children }) : Object.assign({}, r); if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) { c.component = ɵEmptyOutletComponent; } return c; } /** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */ function getOutlet(route) { return route.outlet || PRIMARY_OUTLET; } /** * Sorts the `routes` such that the ones with an outlet matching `outletName` come first. * The order of the configs is otherwise preserved. */ function sortByMatchingOutlets(routes, outletName) { const sortedConfig = routes.filter(r => getOutlet(r) === outletName); sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName)); return sortedConfig; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const noMatch = { matched: false, consumedSegments: [], lastChild: 0, parameters: {}, positionalParamSegments: {} }; function match(segmentGroup, route, segments) { var _a; if (route.path === '') { if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) { return Object.assign({}, noMatch); } return { matched: true, consumedSegments: [], lastChild: 0, parameters: {}, positionalParamSegments: {} }; } const matcher = route.matcher || defaultUrlMatcher; const res = matcher(segments, segmentGroup, route); if (!res) return Object.assign({}, noMatch); const posParams = {}; forEach(res.posParams, (v, k) => { posParams[k] = v.path; }); const parameters = res.consumed.length > 0 ? Object.assign(Object.assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) : posParams; return { matched: true, consumedSegments: res.consumed, lastChild: res.consumed.length, // TODO(atscott): investigate combining parameters and positionalParamSegments parameters, positionalParamSegments: (_a = res.posParams) !== null && _a !== void 0 ? _a : {} }; } function split(segmentGroup, consumedSegments, slicedSegments, config, relativeLinkResolution = 'corrected') { if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) { const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children))); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; return { segmentGroup: s, slicedSegments: [] }; } if (slicedSegments.length === 0 && containsEmptyPathMatches(segmentGroup, slicedSegments, config)) { const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution)); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; return { segmentGroup: s, slicedSegments }; } const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; return { segmentGroup: s, slicedSegments }; } function addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) { const res = {}; for (const r of routes) { if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) { const s = new UrlSegmentGroup([], {}); s._sourceSegment = segmentGroup; if (relativeLinkResolution === 'legacy') { s._segmentIndexShift = segmentGroup.segments.length; } else { s._segmentIndexShift = consumedSegments.length; } res[getOutlet(r)] = s; } } return Object.assign(Object.assign({}, children), res); } function createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) { const res = {}; res[PRIMARY_OUTLET] = primarySegment; primarySegment._sourceSegment = segmentGroup; primarySegment._segmentIndexShift = consumedSegments.length; for (const r of routes) { if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) { const s = new UrlSegmentGroup([], {}); s._sourceSegment = segmentGroup; s._segmentIndexShift = consumedSegments.length; res[getOutlet(r)] = s; } } return res; } function containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) { return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET); } function containsEmptyPathMatches(segmentGroup, slicedSegments, routes) { return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r)); } function emptyPathMatch(segmentGroup, slicedSegments, r) { if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') { return false; } return r.path === ''; } /** * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without * verifying that its children are a full match for the remainder of the `rawSegment` children as * well. */ function isImmediateMatch(route, rawSegment, segments, outlet) { // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to // a config like // * `{path: '', children: [{path: 'b', outlet: 'b'}]}` // or even // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]` // // The exception here is when the segment outlet is for the primary outlet. This would // result in a match inside the named outlet because all children there are written as primary // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like // * `{path: '', outlet: 'x' children: [{path: 'b'}]}` // This should only match if the url is `/(x:b)`. if (getOutlet(route) !== outlet && (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) { return false; } if (route.path === '**') { return true; } return match(rawSegment, route, segments).matched; } function noLeftoversInUrl(segmentGroup, segments, outlet) { return segments.length === 0 && !segmentGroup.children[outlet]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NoMatch { constructor(segmentGroup) { this.segmentGroup = segmentGroup || null; } } class AbsoluteRedirect { constructor(urlTree) { this.urlTree = urlTree; } } function noMatch$1(segmentGroup) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(new NoMatch(segmentGroup))); } function absoluteRedirect(newTree) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(new AbsoluteRedirect(newTree))); } function namedOutletsRedirect(redirectTo) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`))); } function canLoadFails(route) { return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(navigationCancelingError(`Cannot load children because the guard of the route "path: '${route.path}'" returned false`))); } /** * Returns the `UrlTree` with the redirection applied. * * Lazy modules are loaded along the way. */ function applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) { return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply(); } class ApplyRedirects { constructor(moduleInjector, configLoader, urlSerializer, urlTree, config) { this.configLoader = configLoader; this.urlSerializer = urlSerializer; this.urlTree = urlTree; this.config = config; this.allowRedirects = true; this.ngModule = moduleInjector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]); } apply() { const splitGroup = split(this.urlTree.root, [], [], this.config).segmentGroup; // TODO(atscott): creating a new segment removes the _sourceSegment _segmentIndexShift, which is // only necessary to prevent failures in tests which assert exact object matches. The `split` is // now shared between `applyRedirects` and `recognize` but only the `recognize` step needs these // properties. Before the implementations were merged, the `applyRedirects` would not assign // them. We should be able to remove this logic as a "breaking change" but should do some more // investigation into the failures first. const rootSegmentGroup = new UrlSegmentGroup(splitGroup.segments, splitGroup.children); const expanded$ = this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET); const urlTrees$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((rootSegmentGroup) => { return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment); })); return urlTrees$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { if (e instanceof AbsoluteRedirect) { // after an absolute redirect we do not apply any more redirects! this.allowRedirects = false; // we need to run matching, so we can fetch all lazy-loaded modules return this.match(e.urlTree); } if (e instanceof NoMatch) { throw this.noMatchError(e); } throw e; })); } match(tree) { const expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET); const mapped$ = expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((rootSegmentGroup) => { return this.createUrlTree(squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment); })); return mapped$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { if (e instanceof NoMatch) { throw this.noMatchError(e); } throw e; })); } noMatchError(e) { return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`); } createUrlTree(rootCandidate, queryParams, fragment) { const root = rootCandidate.segments.length > 0 ? new UrlSegmentGroup([], { [PRIMARY_OUTLET]: rootCandidate }) : rootCandidate; return new UrlTree(root, queryParams, fragment); } expandSegmentGroup(ngModule, routes, segmentGroup, outlet) { if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) { return this.expandChildren(ngModule, routes, segmentGroup) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((children) => new UrlSegmentGroup([], children))); } return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true); } // Recursively expand segment groups for all the child outlets expandChildren(ngModule, routes, segmentGroup) { // Expand outlets one at a time, starting with the primary outlet. We need to do it this way // because an absolute redirect from the primary outlet takes precedence. const childOutlets = []; for (const child of Object.keys(segmentGroup.children)) { if (child === 'primary') { childOutlets.unshift(child); } else { childOutlets.push(child); } } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(childOutlets) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(childOutlet => { const child = segmentGroup.children[childOutlet]; // Sort the routes so routes with outlets that match the segment appear // first, followed by routes for other outlets, which might match if they have an // empty path. const sortedRoutes = sortByMatchingOutlets(routes, childOutlet); return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(s => ({ segment: s, outlet: childOutlet }))); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["scan"])((children, expandedChild) => { children[expandedChild.outlet] = expandedChild.segment; return children; }, {}), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["last"])()); } expandSegment(ngModule, segmentGroup, routes, segments, outlet, allowRedirects) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(routes).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])((r) => { const expanded$ = this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects); return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { if (e instanceof NoMatch) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } throw e; })); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])((s) => !!s), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e, _) => { if (e instanceof rxjs__WEBPACK_IMPORTED_MODULE_2__["EmptyError"] || e.name === 'EmptyError') { if (noLeftoversInUrl(segmentGroup, segments, outlet)) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup([], {})); } throw new NoMatch(segmentGroup); } throw e; })); } expandSegmentAgainstRoute(ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) { if (!isImmediateMatch(route, segmentGroup, paths, outlet)) { return noMatch$1(segmentGroup); } if (route.redirectTo === undefined) { return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet); } if (allowRedirects && this.allowRedirects) { return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet); } return noMatch$1(segmentGroup); } expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) { if (route.path === '**') { return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet); } return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet); } expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet) { const newTree = this.applyRedirectCommands([], route.redirectTo, {}); if (route.redirectTo.startsWith('/')) { return absoluteRedirect(newTree); } return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((newSegments) => { const group = new UrlSegmentGroup(newSegments, {}); return this.expandSegment(ngModule, group, routes, newSegments, outlet, false); })); } expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet) { const { matched, consumedSegments, lastChild, positionalParamSegments } = match(segmentGroup, route, segments); if (!matched) return noMatch$1(segmentGroup); const newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments); if (route.redirectTo.startsWith('/')) { return absoluteRedirect(newTree); } return this.lineralizeSegments(route, newTree).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((newSegments) => { return this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false); })); } matchSegmentAgainstRoute(ngModule, rawSegmentGroup, route, segments, outlet) { if (route.path === '**') { if (route.loadChildren) { const loaded$ = route._loadedConfig ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig) : this.configLoader.load(ngModule.injector, route); return loaded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((cfg) => { route._loadedConfig = cfg; return new UrlSegmentGroup(segments, {}); })); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(segments, {})); } const { matched, consumedSegments, lastChild } = match(rawSegmentGroup, route, segments); if (!matched) return noMatch$1(rawSegmentGroup); const rawSlicedSegments = segments.slice(lastChild); const childConfig$ = this.getChildConfig(ngModule, route, segments); return childConfig$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((routerConfig) => { const childModule = routerConfig.module; const childConfig = routerConfig.routes; const { segmentGroup: splitSegmentGroup, slicedSegments } = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig); // See comment on the other call to `split` about why this is necessary. const segmentGroup = new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children); if (slicedSegments.length === 0 && segmentGroup.hasChildren()) { const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup); return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((children) => new UrlSegmentGroup(consumedSegments, children))); } if (childConfig.length === 0 && slicedSegments.length === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new UrlSegmentGroup(consumedSegments, {})); } const matchedOnOutlet = getOutlet(route) === outlet; const expanded$ = this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true); return expanded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((cs) => new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children))); })); } getChildConfig(ngModule, route, segments) { if (route.children) { // The children belong to the same module return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig(route.children, ngModule)); } if (route.loadChildren) { // lazy children belong to the loaded module if (route._loadedConfig !== undefined) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig); } return this.runCanLoadGuards(ngModule.injector, route, segments) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((shouldLoadResult) => { if (shouldLoadResult) { return this.configLoader.load(ngModule.injector, route) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((cfg) => { route._loadedConfig = cfg; return cfg; })); } return canLoadFails(route); })); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(new LoadedRouterConfig([], ngModule)); } runCanLoadGuards(moduleInjector, route, segments) { const canLoad = route.canLoad; if (!canLoad || canLoad.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); const canLoadObservables = canLoad.map((injectionToken) => { const guard = moduleInjector.get(injectionToken); let guardVal; if (isCanLoad(guard)) { guardVal = guard.canLoad(route, segments); } else if (isFunction(guard)) { guardVal = guard(route, segments); } else { throw new Error('Invalid CanLoad guard'); } return wrapIntoObservable(guardVal); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canLoadObservables) .pipe(prioritizedGuardValue(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])((result) => { if (!isUrlTree(result)) return; const error = navigationCancelingError(`Redirecting to "${this.urlSerializer.serialize(result)}"`); error.url = result; throw error; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(result => result === true)); } lineralizeSegments(route, urlTree) { let res = []; let c = urlTree.root; while (true) { res = res.concat(c.segments); if (c.numberOfChildren === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(res); } if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) { return namedOutletsRedirect(route.redirectTo); } c = c.children[PRIMARY_OUTLET]; } } applyRedirectCommands(segments, redirectTo, posParams) { return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams); } applyRedirectCreatreUrlTree(redirectTo, urlTree, segments, posParams) { const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams); return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment); } createQueryParams(redirectToParams, actualParams) { const res = {}; forEach(redirectToParams, (v, k) => { const copySourceValue = typeof v === 'string' && v.startsWith(':'); if (copySourceValue) { const sourceName = v.substring(1); res[k] = actualParams[sourceName]; } else { res[k] = v; } }); return res; } createSegmentGroup(redirectTo, group, segments, posParams) { const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams); let children = {}; forEach(group.children, (child, name) => { children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams); }); return new UrlSegmentGroup(updatedSegments, children); } createSegments(redirectTo, redirectToSegments, actualSegments, posParams) { return redirectToSegments.map(s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) : this.findOrReturn(s, actualSegments)); } findPosParam(redirectTo, redirectToUrlSegment, posParams) { const pos = posParams[redirectToUrlSegment.path.substring(1)]; if (!pos) throw new Error(`Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`); return pos; } findOrReturn(redirectToUrlSegment, actualSegments) { let idx = 0; for (const s of actualSegments) { if (s.path === redirectToUrlSegment.path) { actualSegments.splice(idx); return s; } idx++; } return redirectToUrlSegment; } } /** * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`. * * When a segment group has only one child which is a primary outlet, merges that child into the * parent. That is, the child segment group's segments are merged into the `s` and the child's * children become the children of `s`. Think of this like a 'squash', merging the child segment * group into the parent. */ function mergeTrivialChildren(s) { if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) { const c = s.children[PRIMARY_OUTLET]; return new UrlSegmentGroup(s.segments.concat(c.segments), c.children); } return s; } /** * Recursively merges primary segment children into their parents and also drops empty children * (those which have no segments and no children themselves). The latter prevents serializing a * group into something like `/a(aux:)`, where `aux` is an empty child segment. */ function squashSegmentGroup(segmentGroup) { const newChildren = {}; for (const childOutlet of Object.keys(segmentGroup.children)) { const child = segmentGroup.children[childOutlet]; const childCandidate = squashSegmentGroup(child); // don't add empty children if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) { newChildren[childOutlet] = childCandidate; } } const s = new UrlSegmentGroup(segmentGroup.segments, newChildren); return mergeTrivialChildren(s); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(urlAfterRedirects => (Object.assign(Object.assign({}, t), { urlAfterRedirects }))))); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class CanActivate { constructor(path) { this.path = path; this.route = this.path[this.path.length - 1]; } } class CanDeactivate { constructor(component, route) { this.component = component; this.route = route; } } function getAllRouteGuards(future, curr, parentContexts) { const futureRoot = future._root; const currRoot = curr ? curr._root : null; return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]); } function getCanActivateChild(p) { const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null; if (!canActivateChild || canActivateChild.length === 0) return null; return { node: p, guards: canActivateChild }; } function getToken(token, snapshot, moduleInjector) { const config = getClosestLoadedConfig(snapshot); const injector = config ? config.module.injector : moduleInjector; return injector.get(token); } function getClosestLoadedConfig(snapshot) { if (!snapshot) return null; for (let s = snapshot.parent; s; s = s.parent) { const route = s.routeConfig; if (route && route._loadedConfig) return route._loadedConfig; } return null; } function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = { canDeactivateChecks: [], canActivateChecks: [] }) { const prevChildren = nodeChildrenAsMap(currNode); // Process the children of the future route futureNode.children.forEach(c => { getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks); delete prevChildren[c.value.outlet]; }); // Process any children left from the current route (not active for the future route) forEach(prevChildren, (v, k) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks)); return checks; } function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = { canDeactivateChecks: [], canActivateChecks: [] }) { const future = futureNode.value; const curr = currNode ? currNode.value : null; const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null; // reusing the node if (curr && future.routeConfig === curr.routeConfig) { const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers); if (shouldRun) { checks.canActivateChecks.push(new CanActivate(futurePath)); } else { // we need to set the data future.data = curr.data; future._resolvedData = curr._resolvedData; } // If we have a component, we need to go through an outlet. if (future.component) { getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks); // if we have a componentless route, we recurse but keep the same outlet map. } else { getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks); } if (shouldRun && context && context.outlet && context.outlet.isActivated) { checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr)); } } else { if (curr) { deactivateRouteAndItsChildren(currNode, context, checks); } checks.canActivateChecks.push(new CanActivate(futurePath)); // If we have a component, we need to go through an outlet. if (future.component) { getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks); // if we have a componentless route, we recurse but keep the same outlet map. } else { getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks); } } return checks; } function shouldRunGuardsAndResolvers(curr, future, mode) { if (typeof mode === 'function') { return mode(curr, future); } switch (mode) { case 'pathParamsChange': return !equalPath(curr.url, future.url); case 'pathParamsOrQueryParamsChange': return !equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams); case 'always': return true; case 'paramsOrQueryParamsChange': return !equalParamsAndUrlSegments(curr, future) || !shallowEqual(curr.queryParams, future.queryParams); case 'paramsChange': default: return !equalParamsAndUrlSegments(curr, future); } } function deactivateRouteAndItsChildren(route, context, checks) { const children = nodeChildrenAsMap(route); const r = route.value; forEach(children, (node, childName) => { if (!r.component) { deactivateRouteAndItsChildren(node, context, checks); } else if (context) { deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks); } else { deactivateRouteAndItsChildren(node, null, checks); } }); if (!r.component) { checks.canDeactivateChecks.push(new CanDeactivate(null, r)); } else if (context && context.outlet && context.outlet.isActivated) { checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r)); } else { checks.canDeactivateChecks.push(new CanDeactivate(null, r)); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function checkGuards(moduleInjector, forwardEvent) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(t => { const { targetSnapshot, currentSnapshot, guards: { canActivateChecks, canDeactivateChecks } } = t; if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object.assign(Object.assign({}, t), { guardsResult: true })); } return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(canDeactivate => { return canDeactivate && isBoolean(canDeactivate) ? runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) : Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canDeactivate); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(guardsResult => (Object.assign(Object.assign({}, t), { guardsResult })))); }); } function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(result => { return result !== true; }, true)); } function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(checks).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])((check) => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["concat"])(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, moduleInjector), runCanActivate(futureSnapshot, check.route, moduleInjector)); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])(result => { return result !== true; }, true)); } /** * This should fire off `ActivationStart` events for each route being activated at this * level. * In other words, if you're activating `a` and `b` below, `path` will contain the * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always * return * `true` so checks continue to run. */ function fireActivationStart(snapshot, forwardEvent) { if (snapshot !== null && forwardEvent) { forwardEvent(new ActivationStart(snapshot)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); } /** * This should fire off `ChildActivationStart` events for each route being activated at this * level. * In other words, if you're activating `a` and `b` below, `path` will contain the * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always * return * `true` so checks continue to run. */ function fireChildActivationStart(snapshot, forwardEvent) { if (snapshot !== null && forwardEvent) { forwardEvent(new ChildActivationStart(snapshot)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); } function runCanActivate(futureRSS, futureARS, moduleInjector) { const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null; if (!canActivate || canActivate.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); const canActivateObservables = canActivate.map((c) => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["defer"])(() => { const guard = getToken(c, futureARS, moduleInjector); let observable; if (isCanActivate(guard)) { observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS)); } else if (isFunction(guard)) { observable = wrapIntoObservable(guard(futureARS, futureRSS)); } else { throw new Error('Invalid CanActivate guard'); } return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])()); }); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canActivateObservables).pipe(prioritizedGuardValue()); } function runCanActivateChild(futureRSS, path, moduleInjector) { const futureARS = path[path.length - 1]; const canActivateChildGuards = path.slice(0, path.length - 1) .reverse() .map(p => getCanActivateChild(p)) .filter(_ => _ !== null); const canActivateChildGuardsMapped = canActivateChildGuards.map((d) => { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["defer"])(() => { const guardsMapped = d.guards.map((c) => { const guard = getToken(c, d.node, moduleInjector); let observable; if (isCanActivateChild(guard)) { observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS)); } else if (isFunction(guard)) { observable = wrapIntoObservable(guard(futureARS, futureRSS)); } else { throw new Error('Invalid CanActivateChild guard'); } return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])()); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(guardsMapped).pipe(prioritizedGuardValue()); }); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canActivateChildGuardsMapped).pipe(prioritizedGuardValue()); } function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) { const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null; if (!canDeactivate || canDeactivate.length === 0) return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(true); const canDeactivateObservables = canDeactivate.map((c) => { const guard = getToken(c, currARS, moduleInjector); let observable; if (isCanDeactivate(guard)) { observable = wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS)); } else if (isFunction(guard)) { observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS)); } else { throw new Error('Invalid CanDeactivate guard'); } return observable.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["first"])()); }); return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(canDeactivateObservables).pipe(prioritizedGuardValue()); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class NoMatch$1 { } function newObservableError(e) { // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead. return new rxjs__WEBPACK_IMPORTED_MODULE_2__["Observable"]((obs) => obs.error(e)); } function recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy = 'emptyOnly', relativeLinkResolution = 'legacy') { try { const result = new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) .recognize(); if (result === null) { return newObservableError(new NoMatch$1()); } else { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(result); } } catch (e) { // Catch the potential error from recognize due to duplicate outlet matches and return as an // `Observable` error instead. return newObservableError(e); } } class Recognizer { constructor(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) { this.rootComponentType = rootComponentType; this.config = config; this.urlTree = urlTree; this.url = url; this.paramsInheritanceStrategy = paramsInheritanceStrategy; this.relativeLinkResolution = relativeLinkResolution; } recognize() { const rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined), this.relativeLinkResolution) .segmentGroup; const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET); if (children === null) { return null; } // Use Object.freeze to prevent readers of the Router state from modifying it outside of a // navigation, resulting in the router being out of sync with the browser. const root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {}); const rootNode = new TreeNode(root, children); const routeState = new RouterStateSnapshot(this.url, rootNode); this.inheritParamsAndData(routeState._root); return routeState; } inheritParamsAndData(routeNode) { const route = routeNode.value; const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy); route.params = Object.freeze(i.params); route.data = Object.freeze(i.data); routeNode.children.forEach(n => this.inheritParamsAndData(n)); } processSegmentGroup(config, segmentGroup, outlet) { if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) { return this.processChildren(config, segmentGroup); } return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet); } /** * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if * we cannot find a match for _any_ of the children. * * @param config - The `Routes` to match against * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the * config. */ processChildren(config, segmentGroup) { const children = []; for (const childOutlet of Object.keys(segmentGroup.children)) { const child = segmentGroup.children[childOutlet]; // Sort the config so that routes with outlets that match the one being activated appear // first, followed by routes for other outlets, which might match if they have an empty path. const sortedConfig = sortByMatchingOutlets(config, childOutlet); const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet); if (outletChildren === null) { // Configs must match all segment children so because we did not find a match for this // outlet, return `null`. return null; } children.push(...outletChildren); } // Because we may have matched two outlets to the same empty path segment, we can have multiple // activated results for the same outlet. We should merge the children of these results so the // final return value is only one `TreeNode` per outlet. const mergedChildren = mergeEmptyPathMatches(children); if (typeof ngDevMode === 'undefined' || ngDevMode) { // This should really never happen - we are only taking the first match for each outlet and // merge the empty path matches. checkOutletNameUniqueness(mergedChildren); } sortActivatedRouteSnapshots(mergedChildren); return mergedChildren; } processSegment(config, segmentGroup, segments, outlet) { for (const r of config) { const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet); if (children !== null) { return children; } } if (noLeftoversInUrl(segmentGroup, segments, outlet)) { return []; } return null; } processSegmentAgainstRoute(route, rawSegment, segments, outlet) { if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null; let snapshot; let consumedSegments = []; let rawSlicedSegments = []; if (route.path === '**') { const params = segments.length > 0 ? last(segments).parameters : {}; snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route)); } else { const result = match(rawSegment, route, segments); if (!result.matched) { return null; } consumedSegments = result.consumedSegments; rawSlicedSegments = segments.slice(result.lastChild); snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route)); } const childConfig = getChildConfig(route); const { segmentGroup, slicedSegments } = split(rawSegment, consumedSegments, rawSlicedSegments, // Filter out routes with redirectTo because we are trying to create activated route // snapshots and don't handle redirects here. That should have been done in // `applyRedirects`. childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution); if (slicedSegments.length === 0 && segmentGroup.hasChildren()) { const children = this.processChildren(childConfig, segmentGroup); if (children === null) { return null; } return [new TreeNode(snapshot, children)]; } if (childConfig.length === 0 && slicedSegments.length === 0) { return [new TreeNode(snapshot, [])]; } const matchedOnOutlet = getOutlet(route) === outlet; // If we matched a config due to empty path match on a different outlet, we need to continue // passing the current outlet for the segment rather than switch to PRIMARY. // Note that we switch to primary when we have a match because outlet configs look like this: // {path: 'a', outlet: 'a', children: [ // {path: 'b', component: B}, // {path: 'c', component: C}, // ]} // Notice that the children of the named outlet are configured with the primary outlet const children = this.processSegment(childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet); if (children === null) { return null; } return [new TreeNode(snapshot, children)]; } } function sortActivatedRouteSnapshots(nodes) { nodes.sort((a, b) => { if (a.value.outlet === PRIMARY_OUTLET) return -1; if (b.value.outlet === PRIMARY_OUTLET) return 1; return a.value.outlet.localeCompare(b.value.outlet); }); } function getChildConfig(route) { if (route.children) { return route.children; } if (route.loadChildren) { return route._loadedConfig.routes; } return []; } function hasEmptyPathConfig(node) { const config = node.value.routeConfig; return config && config.path === '' && config.redirectTo === undefined; } /** * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the * children from each duplicate. This is necessary because different outlets can match a single * empty path route config and the results need to then be merged. */ function mergeEmptyPathMatches(nodes) { const result = []; for (const node of nodes) { if (!hasEmptyPathConfig(node)) { result.push(node); continue; } const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig); if (duplicateEmptyPathNode !== undefined) { duplicateEmptyPathNode.children.push(...node.children); } else { result.push(node); } } return result; } function checkOutletNameUniqueness(nodes) { const names = {}; nodes.forEach(n => { const routeWithSameOutletName = names[n.value.outlet]; if (routeWithSameOutletName) { const p = routeWithSameOutletName.url.map(s => s.toString()).join('/'); const c = n.value.url.map(s => s.toString()).join('/'); throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`); } names[n.value.outlet] = n.value; }); } function getSourceSegmentGroup(segmentGroup) { let s = segmentGroup; while (s._sourceSegment) { s = s._sourceSegment; } return s; } function getPathIndexShift(segmentGroup) { let s = segmentGroup; let res = (s._segmentIndexShift ? s._segmentIndexShift : 0); while (s._sourceSegment) { s = s._sourceSegment; res += (s._segmentIndexShift ? s._segmentIndexShift : 0); } return res - 1; } function getData(route) { return route.data || {}; } function getResolve(route) { return route.resolve || {}; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(t => recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(targetSnapshot => (Object.assign(Object.assign({}, t), { targetSnapshot }))))); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function resolveData(paramsInheritanceStrategy, moduleInjector) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(t => { const { targetSnapshot, guards: { canActivateChecks } } = t; if (!canActivateChecks.length) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t); } let canActivateChecksResolved = 0; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(canActivateChecks) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(check => runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(() => canActivateChecksResolved++), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeLast"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(_ => canActivateChecksResolved === canActivateChecks.length ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t) : rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"])); }); } function runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) { const resolve = futureARS._resolve; return resolveNode(resolve, futureARS, futureRSS, moduleInjector) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((resolvedData) => { futureARS._resolvedData = resolvedData; futureARS.data = Object.assign(Object.assign({}, futureARS.data), inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve); return null; })); } function resolveNode(resolve, futureARS, futureRSS, moduleInjector) { const keys = Object.keys(resolve); if (keys.length === 0) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])({}); } const data = {}; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(keys).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((key) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])((value) => { data[key] = value; }))), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["takeLast"])(1), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])(() => { // Ensure all resolvers returned values, otherwise don't emit any "next" and just complete // the chain which will cancel navigation if (Object.keys(data).length === keys.length) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(data); } return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; })); } function getResolver(injectionToken, futureARS, futureRSS, moduleInjector) { const resolver = getToken(injectionToken, futureARS, moduleInjector); return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) : wrapIntoObservable(resolver(futureARS, futureRSS)); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Perform a side effect through a switchMap for every emission on the source Observable, * but return an Observable that is identical to the source. It's essentially the same as * the `tap` operator, but if the side effectful `next` function returns an ObservableInput, * it will wait before continuing with the original value. */ function switchTap(next) { return Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(v => { const nextResult = next(v); if (nextResult) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(nextResult).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(() => v)); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(v); }); } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Provides a way to customize when activated routes get reused. * * @publicApi */ class RouteReuseStrategy { } /** * @description * * This base route reuse strategy only reuses routes when the matched router configs are * identical. This prevents components from being destroyed and recreated * when just the fragment or query parameters change * (that is, the existing component is _reused_). * * This strategy does not store any routes for later reuse. * * Angular uses this strategy by default. * * * It can be used as a base class for custom route reuse strategies, i.e. you can create your own * class that extends the `BaseRouteReuseStrategy` one. * @publicApi */ class BaseRouteReuseStrategy { /** * Whether the given route should detach for later reuse. * Always returns false for `BaseRouteReuseStrategy`. * */ shouldDetach(route) { return false; } /** * A no-op; the route is never stored since this strategy never detaches routes for later re-use. */ store(route, detachedTree) { } /** Returns `false`, meaning the route (and its subtree) is never reattached */ shouldAttach(route) { return false; } /** Returns `null` because this strategy does not store routes for later re-use. */ retrieve(route) { return null; } /** * Determines if a route should be reused. * This strategy returns `true` when the future route config and current route config are * identical. */ shouldReuseRoute(future, curr) { return future.routeConfig === curr.routeConfig; } } class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy { } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The [DI token](guide/glossary/#di-token) for a router configuration. * @see `ROUTES` * @publicApi */ const ROUTES = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTES'); class RouterConfigLoader { constructor(loader, compiler, onLoadStartListener, onLoadEndListener) { this.loader = loader; this.compiler = compiler; this.onLoadStartListener = onLoadStartListener; this.onLoadEndListener = onLoadEndListener; } load(parentInjector, route) { if (route._loader$) { return route._loader$; } if (this.onLoadStartListener) { this.onLoadStartListener(route); } const moduleFactory$ = this.loadModuleFactory(route.loadChildren); const loadRunner = moduleFactory$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((factory) => { if (this.onLoadEndListener) { this.onLoadEndListener(route); } const module = factory.create(parentInjector); // When loading a module that doesn't provide `RouterModule.forChild()` preloader // will get stuck in an infinite loop. The child module's Injector will look to // its parent `Injector` when it doesn't find any ROUTES so it will return routes // for it's parent module instead. return new LoadedRouterConfig(flatten(module.injector.get(ROUTES, undefined, _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectFlags"].Self | _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectFlags"].Optional)) .map(standardizeConfig), module); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((err) => { route._loader$ = undefined; throw err; })); // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much route._loader$ = new rxjs__WEBPACK_IMPORTED_MODULE_2__["ConnectableObservable"](loadRunner, () => new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]()) .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["refCount"])()); return route._loader$; } loadModuleFactory(loadChildren) { if (typeof loadChildren === 'string') { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(this.loader.load(loadChildren)); } else { return wrapIntoObservable(loadChildren()).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((t) => { if (t instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactory"]) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t); } else { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(this.compiler.compileModuleAsync(t)); } })); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Store contextual information about a `RouterOutlet` * * @publicApi */ class OutletContext { constructor() { this.outlet = null; this.route = null; this.resolver = null; this.children = new ChildrenOutletContexts(); this.attachRef = null; } } /** * Store contextual information about the children (= nested) `RouterOutlet` * * @publicApi */ class ChildrenOutletContexts { constructor() { // contexts for child outlets, by name. this.contexts = new Map(); } /** Called when a `RouterOutlet` directive is instantiated */ onChildOutletCreated(childName, outlet) { const context = this.getOrCreateContext(childName); context.outlet = outlet; this.contexts.set(childName, context); } /** * Called when a `RouterOutlet` directive is destroyed. * We need to keep the context as the outlet could be destroyed inside a NgIf and might be * re-created later. */ onChildOutletDestroyed(childName) { const context = this.getContext(childName); if (context) { context.outlet = null; } } /** * Called when the corresponding route is deactivated during navigation. * Because the component get destroyed, all children outlet are destroyed. */ onOutletDeactivated() { const contexts = this.contexts; this.contexts = new Map(); return contexts; } onOutletReAttached(contexts) { this.contexts = contexts; } getOrCreateContext(childName) { let context = this.getContext(childName); if (!context) { context = new OutletContext(); this.contexts.set(childName, context); } return context; } getContext(childName) { return this.contexts.get(childName) || null; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Provides a way to migrate AngularJS applications to Angular. * * @publicApi */ class UrlHandlingStrategy { } /** * @publicApi */ class DefaultUrlHandlingStrategy { shouldProcessUrl(url) { return true; } extract(url) { return url; } merge(newUrlPart, wholeUrl) { return newUrlPart; } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ function defaultErrorHandler(error) { throw error; } function defaultMalformedUriErrorHandler(error, urlSerializer, url) { return urlSerializer.parse('/'); } /** * @internal */ function defaultRouterHook(snapshot, runExtras) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } /** * @description * * A service that provides navigation among views and URL manipulation capabilities. * * @see `Route`. * @see [Routing and Navigation Guide](guide/router). * * @ngModule RouterModule * * @publicApi */ class Router { /** * Creates the router service. */ // TODO: vsavkin make internal after the final is out. constructor(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) { this.rootComponentType = rootComponentType; this.urlSerializer = urlSerializer; this.rootContexts = rootContexts; this.location = location; this.config = config; this.lastSuccessfulNavigation = null; this.currentNavigation = null; this.disposed = false; /** * Tracks the previously seen location change from the location subscription so we can compare * the two latest to see if they are duplicates. See setUpLocationChangeListener. */ this.lastLocationChangeInfo = null; this.navigationId = 0; this.isNgZoneEnabled = false; /** * An event stream for routing events in this NgModule. */ this.events = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); /** * A handler for navigation errors in this NgModule. */ this.errorHandler = defaultErrorHandler; /** * A handler for errors thrown by `Router.parseUrl(url)` * when `url` contains an invalid character. * The most common case is a `%` sign * that's not encoded and is not part of a percent encoded sequence. */ this.malformedUriErrorHandler = defaultMalformedUriErrorHandler; /** * True if at least one navigation event has occurred, * false otherwise. */ this.navigated = false; this.lastSuccessfulId = -1; /** * Hooks that enable you to pause navigation, * either before or after the preactivation phase. * Used by `RouterModule`. * * @internal */ this.hooks = { beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook }; /** * A strategy for extracting and merging URLs. * Used for AngularJS to Angular migrations. */ this.urlHandlingStrategy = new DefaultUrlHandlingStrategy(); /** * A strategy for re-using routes. */ this.routeReuseStrategy = new DefaultRouteReuseStrategy(); /** * How to handle a navigation request to the current URL. One of: * - `'ignore'` : The router ignores the request. * - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature. */ this.onSameUrlNavigation = 'ignore'; /** * How to merge parameters, data, and resolved data from parent to child * routes. One of: * * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data * for path-less or component-less routes. * - `'always'` : Inherit parent parameters, data, and resolved data * for all child routes. */ this.paramsInheritanceStrategy = 'emptyOnly'; /** * Determines when the router updates the browser URL. * By default (`"deferred"`), updates the browser URL after navigation has finished. * Set to `'eager'` to update the browser URL at the beginning of navigation. * You can choose to update early so that, if navigation fails, * you can show an error message with the URL that failed. */ this.urlUpdateStrategy = 'deferred'; /** * Enables a bug fix that corrects relative link resolution in components with empty paths. * @see `RouterModule` */ this.relativeLinkResolution = 'corrected'; const onLoadStart = (r) => this.triggerEvent(new RouteConfigLoadStart(r)); const onLoadEnd = (r) => this.triggerEvent(new RouteConfigLoadEnd(r)); this.ngModule = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]); this.console = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵConsole"]); const ngZone = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]); this.isNgZoneEnabled = ngZone instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"] && _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone(); this.resetConfig(config); this.currentUrlTree = createEmptyUrlTree(); this.rawUrlTree = this.currentUrlTree; this.browserUrlTree = this.currentUrlTree; this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd); this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType); this.transitions = new rxjs__WEBPACK_IMPORTED_MODULE_2__["BehaviorSubject"]({ id: 0, currentUrlTree: this.currentUrlTree, currentRawUrl: this.currentUrlTree, extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree), urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree), rawUrl: this.currentUrlTree, extras: {}, resolve: null, reject: null, promise: Promise.resolve(true), source: 'imperative', restoredState: null, currentSnapshot: this.routerState.snapshot, targetSnapshot: null, currentRouterState: this.routerState, targetRouterState: null, guards: { canActivateChecks: [], canDeactivateChecks: [] }, guardsResult: null, }); this.navigations = this.setupNavigations(this.transitions); this.processNavigations(); } setupNavigations(transitions) { const eventsSubject = this.events; return transitions.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(t => t.id !== 0), // Extract URL Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(t => (Object.assign(Object.assign({}, t), { extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl) }))), // Using switchMap so we cancel executing navigations when a new one comes in Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { let completed = false; let errored = false; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe( // Store the Navigation object Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { this.currentNavigation = { id: t.id, initialUrl: t.currentRawUrl, extractedUrl: t.extractedUrl, trigger: t.source, extras: t.extras, previousNavigation: this.lastSuccessfulNavigation ? Object.assign(Object.assign({}, this.lastSuccessfulNavigation), { previousNavigation: null }) : null }; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { const urlTransition = !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString(); const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) && this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl); if (processCurrentUrl) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe( // Fire NavigationStart event Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { const transition = this.transitions.getValue(); eventsSubject.next(new NavigationStart(t.id, this.serializeUrl(t.extractedUrl), t.source, t.restoredState)); if (transition !== this.transitions.getValue()) { return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; } // This delay is required to match old behavior that forced // navigation to always be async return Promise.resolve(t); }), // ApplyRedirects applyRedirects$1(this.ngModule.injector, this.configLoader, this.urlSerializer, this.config), // Update the currentNavigation Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { this.currentNavigation = Object.assign(Object.assign({}, this.currentNavigation), { finalUrl: t.urlAfterRedirects }); }), // Recognize recognize$1(this.rootComponentType, this.config, (url) => this.serializeUrl(url), this.paramsInheritanceStrategy, this.relativeLinkResolution), // Update URL if in `eager` update mode Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { if (this.urlUpdateStrategy === 'eager') { if (!t.extras.skipLocationChange) { this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id, t.extras.state); } this.browserUrlTree = t.urlAfterRedirects; } // Fire RoutesRecognized const routesRecognized = new RoutesRecognized(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); eventsSubject.next(routesRecognized); })); } else { const processPreviousUrl = urlTransition && this.rawUrlTree && this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree); /* When the current URL shouldn't be processed, but the previous one was, * we handle this "error condition" by navigating to the previously * successful URL, but leaving the URL intact.*/ if (processPreviousUrl) { const { id, extractedUrl, source, restoredState, extras } = t; const navStart = new NavigationStart(id, this.serializeUrl(extractedUrl), source, restoredState); eventsSubject.next(navStart); const targetSnapshot = createEmptyState(extractedUrl, this.rootComponentType).snapshot; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) })); } else { /* When neither the current or previous URL can be processed, do nothing * other than update router's internal reference to the current "settled" * URL. This way the next navigation will be coming from the current URL * in the browser. */ this.rawUrlTree = t.rawUrl; this.browserUrlTree = t.urlAfterRedirects; t.resolve(null); return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; } } }), // Before Preactivation switchTap(t => { const { targetSnapshot, id: navigationId, extractedUrl: appliedUrlTree, rawUrl: rawUrlTree, extras: { skipLocationChange, replaceUrl } } = t; return this.hooks.beforePreactivation(targetSnapshot, { navigationId, appliedUrlTree, rawUrlTree, skipLocationChange: !!skipLocationChange, replaceUrl: !!replaceUrl, }); }), // --- GUARDS --- Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { const guardsStart = new GuardsCheckStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); this.triggerEvent(guardsStart); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])(t => (Object.assign(Object.assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts) }))), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { if (isUrlTree(t.guardsResult)) { const error = navigationCancelingError(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`); error.url = t.guardsResult; throw error; } const guardsEnd = new GuardsCheckEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult); this.triggerEvent(guardsEnd); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])(t => { if (!t.guardsResult) { this.resetUrlToCurrentUrlTree(); const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), ''); eventsSubject.next(navCancel); t.resolve(false); return false; } return true; }), // --- RESOLVE --- switchTap(t => { if (t.guards.canActivateChecks.length) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { const resolveStart = new ResolveStart(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); this.triggerEvent(resolveStart); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])(t => { let dataResolved = false; return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(t).pipe(resolveData(this.paramsInheritanceStrategy, this.ngModule.injector), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])({ next: () => dataResolved = true, complete: () => { if (!dataResolved) { const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), `At least one route resolver didn't emit any value.`); eventsSubject.next(navCancel); t.resolve(false); } } })); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])(t => { const resolveEnd = new ResolveEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot); this.triggerEvent(resolveEnd); })); } return undefined; }), // --- AFTER PREACTIVATION --- switchTap((t) => { const { targetSnapshot, id: navigationId, extractedUrl: appliedUrlTree, rawUrl: rawUrlTree, extras: { skipLocationChange, replaceUrl } } = t; return this.hooks.afterPreactivation(targetSnapshot, { navigationId, appliedUrlTree, rawUrlTree, skipLocationChange: !!skipLocationChange, replaceUrl: !!replaceUrl, }); }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((t) => { const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState); return (Object.assign(Object.assign({}, t), { targetRouterState })); }), /* Once here, we are about to activate syncronously. The assumption is this will succeed, and user code may read from the Router service. Therefore before activation, we need to update router properties storing the current URL and the RouterState, as well as updated the browser URL. All this should happen *before* activating. */ Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])((t) => { this.currentUrlTree = t.urlAfterRedirects; this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl); this.routerState = t.targetRouterState; if (this.urlUpdateStrategy === 'deferred') { if (!t.extras.skipLocationChange) { this.setBrowserUrl(this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state); } this.browserUrlTree = t.urlAfterRedirects; } }), activateRoutes(this.rootContexts, this.routeReuseStrategy, (evt) => this.triggerEvent(evt)), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["tap"])({ next() { completed = true; }, complete() { completed = true; } }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["finalize"])(() => { /* When the navigation stream finishes either through error or success, we * set the `completed` or `errored` flag. However, there are some situations * where we could get here without either of those being set. For instance, a * redirect during NavigationStart. Therefore, this is a catch-all to make * sure the NavigationCancel * event is fired when a navigation gets cancelled but not caught by other * means. */ if (!completed && !errored) { // Must reset to current URL tree here to ensure history.state is set. On a // fresh page load, if a new navigation comes in before a successful // navigation completes, there will be nothing in // history.state.navigationId. This can cause sync problems with AngularJS // sync code which looks for a value here in order to determine whether or // not to handle a given popstate event or to leave it to the Angular // router. this.resetUrlToCurrentUrlTree(); const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`); eventsSubject.next(navCancel); t.resolve(false); } // currentNavigation should always be reset to null here. If navigation was // successful, lastSuccessfulTransition will have already been set. Therefore // we can safely set currentNavigation to null here. this.currentNavigation = null; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])((e) => { errored = true; /* This error type is issued during Redirect, and is handled as a * cancellation rather than an error. */ if (isNavigationCancelingError(e)) { const redirecting = isUrlTree(e.url); if (!redirecting) { // Set property only if we're not redirecting. If we landed on a page and // redirect to `/` route, the new navigation is going to see the `/` // isn't a change from the default currentUrlTree and won't navigate. // This is only applicable with initial navigation, so setting // `navigated` only when not redirecting resolves this scenario. this.navigated = true; this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl); } const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), e.message); eventsSubject.next(navCancel); // When redirecting, we need to delay resolving the navigation // promise and push it to the redirect navigation if (!redirecting) { t.resolve(false); } else { // setTimeout is required so this navigation finishes with // the return EMPTY below. If it isn't allowed to finish // processing, there can be multiple navigations to the same // URL. setTimeout(() => { const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree); const extras = { skipLocationChange: t.extras.skipLocationChange, replaceUrl: this.urlUpdateStrategy === 'eager' }; this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise }); }, 0); } /* All other errors should reset to the router's internal URL reference to * the pre-error state. */ } else { this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl); const navError = new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e); eventsSubject.next(navError); try { t.resolve(this.errorHandler(e)); } catch (ee) { t.reject(ee); } } return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"]; })); // TODO(jasonaden): remove cast once g3 is on updated TypeScript })); } /** * @internal * TODO: this should be removed once the constructor of the router made internal */ resetRootComponentType(rootComponentType) { this.rootComponentType = rootComponentType; // TODO: vsavkin router 4.0 should make the root component set to null // this will simplify the lifecycle of the router. this.routerState.root.component = this.rootComponentType; } getTransition() { const transition = this.transitions.value; // This value needs to be set. Other values such as extractedUrl are set on initial navigation // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not // processing the previous URL. transition.urlAfterRedirects = this.browserUrlTree; return transition; } setTransition(t) { this.transitions.next(Object.assign(Object.assign({}, this.getTransition()), t)); } /** * Sets up the location change listener and performs the initial navigation. */ initialNavigation() { this.setUpLocationChangeListener(); if (this.navigationId === 0) { this.navigateByUrl(this.location.path(true), { replaceUrl: true }); } } /** * Sets up the location change listener. This listener detects navigations triggered from outside * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router * navigation so that the correct events, guards, etc. are triggered. */ setUpLocationChangeListener() { // Don't need to use Zone.wrap any more, because zone.js // already patch onPopState, so location change callback will // run into ngZone if (!this.locationSubscription) { this.locationSubscription = this.location.subscribe(event => { const currentChange = this.extractLocationChangeInfoFromEvent(event); if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) { // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS // hybrid apps. setTimeout(() => { const { source, state, urlTree } = currentChange; const extras = { replaceUrl: true }; if (state) { const stateCopy = Object.assign({}, state); delete stateCopy.navigationId; if (Object.keys(stateCopy).length !== 0) { extras.state = stateCopy; } } this.scheduleNavigation(urlTree, source, state, extras); }, 0); } this.lastLocationChangeInfo = currentChange; }); } } /** Extracts router-related information from a `PopStateEvent`. */ extractLocationChangeInfoFromEvent(change) { var _a; return { source: change['type'] === 'popstate' ? 'popstate' : 'hashchange', urlTree: this.parseUrl(change['url']), // Navigations coming from Angular router have a navigationId state // property. When this exists, restore the state. state: ((_a = change.state) === null || _a === void 0 ? void 0 : _a.navigationId) ? change.state : null, transitionId: this.getTransition().id }; } /** * Determines whether two events triggered by the Location subscription are due to the same * navigation. The location subscription can fire two events (popstate and hashchange) for a * single navigation. The second one should be ignored, that is, we should not schedule another * navigation in the Router. */ shouldScheduleNavigation(previous, current) { if (!previous) return true; const sameDestination = current.urlTree.toString() === previous.urlTree.toString(); const eventsOccurredAtSameTime = current.transitionId === previous.transitionId; if (!eventsOccurredAtSameTime || !sameDestination) { return true; } if ((current.source === 'hashchange' && previous.source === 'popstate') || (current.source === 'popstate' && previous.source === 'hashchange')) { return false; } return true; } /** The current URL. */ get url() { return this.serializeUrl(this.currentUrlTree); } /** * Returns the current `Navigation` object when the router is navigating, * and `null` when idle. */ getCurrentNavigation() { return this.currentNavigation; } /** @internal */ triggerEvent(event) { this.events.next(event); } /** * Resets the route configuration used for navigation and generating links. * * @param config The route array for the new configuration. * * @usageNotes * * ``` * router.resetConfig([ * { path: 'team/:id', component: TeamCmp, children: [ * { path: 'simple', component: SimpleCmp }, * { path: 'user/:name', component: UserCmp } * ]} * ]); * ``` */ resetConfig(config) { validateConfig(config); this.config = config.map(standardizeConfig); this.navigated = false; this.lastSuccessfulId = -1; } /** @nodoc */ ngOnDestroy() { this.dispose(); } /** Disposes of the router. */ dispose() { this.transitions.complete(); if (this.locationSubscription) { this.locationSubscription.unsubscribe(); this.locationSubscription = undefined; } this.disposed = true; } /** * Appends URL segments to the current URL tree to create a new URL tree. * * @param commands An array of URL fragments with which to construct the new URL tree. * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path * segments, followed by the parameters for each segment. * The fragments are applied to the current URL tree or the one provided in the `relativeTo` * property of the options object, if supplied. * @param navigationExtras Options that control the navigation strategy. * @returns The new URL tree. * * @usageNotes * * ``` * // create /team/33/user/11 * router.createUrlTree(['/team', 33, 'user', 11]); * * // create /team/33;expand=true/user/11 * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]); * * // you can collapse static segments like this (this works only with the first passed-in value): * router.createUrlTree(['/team/33/user', userId]); * * // If the first segment can contain slashes, and you do not want the router to split it, * // you can do the following: * router.createUrlTree([{segmentPath: '/one/two'}]); * * // create /team/33/(user/11//right:chat) * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]); * * // remove the right secondary node * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]); * * // assuming the current url is `/team/33/user/11` and the route points to `user/11` * * // navigate to /team/33/user/11/details * router.createUrlTree(['details'], {relativeTo: route}); * * // navigate to /team/33/user/22 * router.createUrlTree(['../22'], {relativeTo: route}); * * // navigate to /team/44/user/22 * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route}); * * Note that a value of `null` or `undefined` for `relativeTo` indicates that the * tree should be created relative to the root. * ``` */ createUrlTree(commands, navigationExtras = {}) { const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras; const a = relativeTo || this.routerState.root; const f = preserveFragment ? this.currentUrlTree.fragment : fragment; let q = null; switch (queryParamsHandling) { case 'merge': q = Object.assign(Object.assign({}, this.currentUrlTree.queryParams), queryParams); break; case 'preserve': q = this.currentUrlTree.queryParams; break; default: q = queryParams || null; } if (q !== null) { q = this.removeEmptyProps(q); } return createUrlTree(a, this.currentUrlTree, commands, q, f); } /** * Navigates to a view using an absolute route path. * * @param url An absolute path for a defined route. The function does not apply any delta to the * current URL. * @param extras An object containing properties that modify the navigation strategy. * * @returns A Promise that resolves to 'true' when navigation succeeds, * to 'false' when navigation fails, or is rejected on error. * * @usageNotes * * The following calls request navigation to an absolute path. * * ``` * router.navigateByUrl("/team/33/user/11"); * * // Navigate without updating the URL * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true }); * ``` * * @see [Routing and Navigation guide](guide/router) * */ navigateByUrl(url, extras = { skipLocationChange: false }) { if (typeof ngDevMode === 'undefined' || ngDevMode && this.isNgZoneEnabled && !_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"].isInAngularZone()) { this.console.warn(`Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`); } const urlTree = isUrlTree(url) ? url : this.parseUrl(url); const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree); return this.scheduleNavigation(mergedTree, 'imperative', null, extras); } /** * Navigate based on the provided array of commands and a starting point. * If no starting route is provided, the navigation is absolute. * * @param commands An array of URL fragments with which to construct the target URL. * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path * segments, followed by the parameters for each segment. * The fragments are applied to the current URL or the one provided in the `relativeTo` property * of the options object, if supplied. * @param extras An options object that determines how the URL should be constructed or * interpreted. * * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation * fails, * or is rejected on error. * * @usageNotes * * The following calls request navigation to a dynamic route path relative to the current URL. * * ``` * router.navigate(['team', 33, 'user', 11], {relativeTo: route}); * * // Navigate without updating the URL, overriding the default behavior * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true}); * ``` * * @see [Routing and Navigation guide](guide/router) * */ navigate(commands, extras = { skipLocationChange: false }) { validateCommands(commands); return this.navigateByUrl(this.createUrlTree(commands, extras), extras); } /** Serializes a `UrlTree` into a string */ serializeUrl(url) { return this.urlSerializer.serialize(url); } /** Parses a string into a `UrlTree` */ parseUrl(url) { let urlTree; try { urlTree = this.urlSerializer.parse(url); } catch (e) { urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url); } return urlTree; } /** Returns whether the url is activated */ isActive(url, exact) { if (isUrlTree(url)) { return containsTree(this.currentUrlTree, url, exact); } const urlTree = this.parseUrl(url); return containsTree(this.currentUrlTree, urlTree, exact); } removeEmptyProps(params) { return Object.keys(params).reduce((result, key) => { const value = params[key]; if (value !== null && value !== undefined) { result[key] = value; } return result; }, {}); } processNavigations() { this.navigations.subscribe(t => { this.navigated = true; this.lastSuccessfulId = t.id; this.events .next(new NavigationEnd(t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree))); this.lastSuccessfulNavigation = this.currentNavigation; this.currentNavigation = null; t.resolve(true); }, e => { this.console.warn(`Unhandled Navigation Error: `); }); } scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) { if (this.disposed) { return Promise.resolve(false); } // * Imperative navigations (router.navigate) might trigger additional navigations to the same // URL via a popstate event and the locationChangeListener. We should skip these duplicate // navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router // states. // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If // the user follows that with a navigation using the back/forward button or manual URL change, // the destination may be the same as the previous imperative attempt. We should not skip // these navigations because it's a separate case from the one above -- it's not a duplicate // navigation. const lastNavigation = this.getTransition(); // We don't want to skip duplicate successful navs if they're imperative because // onSameUrlNavigation could be 'reload' (so the duplicate is intended). const browserNavPrecededByRouterNav = source !== 'imperative' && (lastNavigation === null || lastNavigation === void 0 ? void 0 : lastNavigation.source) === 'imperative'; const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id; // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison. // However, if it failed, we should compare to the final result (urlAfterRedirects). const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ? lastNavigation.rawUrl : lastNavigation.urlAfterRedirects; const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString(); if (browserNavPrecededByRouterNav && duplicateNav) { return Promise.resolve(true); // return value is not used } let resolve; let reject; let promise; if (priorPromise) { resolve = priorPromise.resolve; reject = priorPromise.reject; promise = priorPromise.promise; } else { promise = new Promise((res, rej) => { resolve = res; reject = rej; }); } const id = ++this.navigationId; this.setTransition({ id, source, restoredState, currentUrlTree: this.currentUrlTree, currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise, currentSnapshot: this.routerState.snapshot, currentRouterState: this.routerState }); // Make sure that the error is propagated even though `processNavigations` catch // handler does not rethrow return promise.catch((e) => { return Promise.reject(e); }); } setBrowserUrl(url, replaceUrl, id, state) { const path = this.urlSerializer.serialize(url); state = state || {}; if (this.location.isCurrentPathEqualTo(path) || replaceUrl) { // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace. this.location.replaceState(path, '', Object.assign(Object.assign({}, state), { navigationId: id })); } else { this.location.go(path, '', Object.assign(Object.assign({}, state), { navigationId: id })); } } resetStateAndUrl(storedState, storedUrl, rawUrl) { this.routerState = storedState; this.currentUrlTree = storedUrl; this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl); this.resetUrlToCurrentUrlTree(); } resetUrlToCurrentUrlTree() { this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId }); } } Router.ɵfac = function Router_Factory(t) { return new (t || Router)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](UrlSerializer), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](ChildrenOutletContexts), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](undefined)); }; Router.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: Router, factory: Router.ɵfac }); Router.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"] }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: undefined } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Router, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Type"] }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: undefined }]; }, null); })(); function validateCommands(commands) { for (let i = 0; i < commands.length; i++) { const cmd = commands[i]; if (cmd == null) { throw new Error(`The requested path contains ${cmd} segment at index ${i}`); } } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * When applied to an element in a template, makes that element a link * that initiates navigation to a route. Navigation opens one or more routed components * in one or more `<router-outlet>` locations on the page. * * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`, * the following creates a static link to the route: * `<a routerLink="/user/bob">link to user component</a>` * * You can use dynamic values to generate the link. * For a dynamic link, pass an array of path segments, * followed by the params for each segment. * For example, `['/team', teamId, 'user', userName, {details: true}]` * generates a link to `/team/11/user/bob;details=true`. * * Multiple static segments can be merged into one term and combined with dynamic segements. * For example, `['/team/11/user', userName, {details: true}]` * * The input that you provide to the link is treated as a delta to the current URL. * For instance, suppose the current URL is `/user/(box//aux:team)`. * The link `<a [routerLink]="['/user/jim']">Jim</a>` creates the URL * `/user/(jim//aux:team)`. * See {@link Router#createUrlTree createUrlTree} for more information. * * @usageNotes * * You can use absolute or relative paths in a link, set query parameters, * control how parameters are handled, and keep a history of navigation states. * * ### Relative link paths * * The first segment name can be prepended with `/`, `./`, or `../`. * * If the first segment begins with `/`, the router looks up the route from the root of the * app. * * If the first segment begins with `./`, or doesn't begin with a slash, the router * looks in the children of the current activated route. * * If the first segment begins with `../`, the router goes up one level in the route tree. * * ### Setting and handling query params and fragments * * The following link adds a query parameter and a fragment to the generated URL: * * ``` * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" fragment="education"> * link to user component * </a> * ``` * By default, the directive constructs the new URL using the given query parameters. * The example generates the link: `/user/bob?debug=true#education`. * * You can instruct the directive to handle query parameters differently * by specifying the `queryParamsHandling` option in the link. * Allowed values are: * * - `'merge'`: Merge the given `queryParams` into the current query params. * - `'preserve'`: Preserve the current query params. * * For example: * * ``` * <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" queryParamsHandling="merge"> * link to user component * </a> * ``` * * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}. * * ### Preserving navigation history * * You can provide a `state` value to be persisted to the browser's * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). * For example: * * ``` * <a [routerLink]="['/user/bob']" [state]="{tracingId: 123}"> * link to user component * </a> * ``` * * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart` * event: * * ``` * // Get NavigationStart events * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => { * const navigation = router.getCurrentNavigation(); * tracingService.trace({id: navigation.extras.state.tracingId}); * }); * ``` * * @ngModule RouterModule * * @publicApi */ class RouterLink { constructor(router, route, tabIndex, renderer, el) { this.router = router; this.route = route; this.commands = []; /** @internal */ this.onChanges = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); if (tabIndex == null) { renderer.setAttribute(el.nativeElement, 'tabindex', '0'); } } /** @nodoc */ ngOnChanges(changes) { // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes // to the RouterLinks it's tracking. this.onChanges.next(this); } /** * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **string**: shorthand for array of commands with just the string, i.e. `['/route']` * - **null|undefined**: shorthand for an empty array of commands, i.e. `[]` * @see {@link Router#createUrlTree Router#createUrlTree} */ set routerLink(commands) { if (commands != null) { this.commands = Array.isArray(commands) ? commands : [commands]; } else { this.commands = []; } } /** @nodoc */ onClick() { const extras = { skipLocationChange: attrBoolValue(this.skipLocationChange), replaceUrl: attrBoolValue(this.replaceUrl), state: this.state, }; this.router.navigateByUrl(this.urlTree, extras); return true; } get urlTree() { return this.router.createUrlTree(this.commands, { // If the `relativeTo` input is not defined, we want to use `this.route` by default. // Otherwise, we should use the value provided by the user in the input. relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route, queryParams: this.queryParams, fragment: this.fragment, queryParamsHandling: this.queryParamsHandling, preserveFragment: attrBoolValue(this.preserveFragment), }); } } RouterLink.ɵfac = function RouterLink_Factory(t) { return new (t || RouterLink)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('tabindex'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"])); }; RouterLink.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterLink, selectors: [["", "routerLink", "", 5, "a", 5, "area"]], hostBindings: function RouterLink_HostBindings(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function RouterLink_click_HostBindingHandler() { return ctx.onClick(); }); } }, inputs: { routerLink: "routerLink", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]] }); RouterLink.ctorParameters = () => [ { type: Router }, { type: ActivatedRoute }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['tabindex',] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] } ]; RouterLink.propDecorators = { queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLink, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: ':not(a):not(area)[routerLink]' }] }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['tabindex'] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] }]; }, { routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], /** @nodoc */ onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click'] }], queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }] }); })(); /** * @description * * Lets you link to specific routes in your app. * * See `RouterLink` for more information. * * @ngModule RouterModule * * @publicApi */ class RouterLinkWithHref { constructor(router, route, locationStrategy) { this.router = router; this.route = route; this.locationStrategy = locationStrategy; this.commands = []; /** @internal */ this.onChanges = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); this.subscription = router.events.subscribe((s) => { if (s instanceof NavigationEnd) { this.updateTargetUrlAndHref(); } }); } /** * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}. * - **string**: shorthand for array of commands with just the string, i.e. `['/route']` * - **null|undefined**: shorthand for an empty array of commands, i.e. `[]` * @see {@link Router#createUrlTree Router#createUrlTree} */ set routerLink(commands) { if (commands != null) { this.commands = Array.isArray(commands) ? commands : [commands]; } else { this.commands = []; } } /** @nodoc */ ngOnChanges(changes) { this.updateTargetUrlAndHref(); this.onChanges.next(this); } /** @nodoc */ ngOnDestroy() { this.subscription.unsubscribe(); } /** @nodoc */ onClick(button, ctrlKey, shiftKey, altKey, metaKey) { if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) { return true; } if (typeof this.target === 'string' && this.target != '_self') { return true; } const extras = { skipLocationChange: attrBoolValue(this.skipLocationChange), replaceUrl: attrBoolValue(this.replaceUrl), state: this.state }; this.router.navigateByUrl(this.urlTree, extras); return false; } updateTargetUrlAndHref() { this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)); } get urlTree() { return this.router.createUrlTree(this.commands, { // If the `relativeTo` input is not defined, we want to use `this.route` by default. // Otherwise, we should use the value provided by the user in the input. relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route, queryParams: this.queryParams, fragment: this.fragment, queryParamsHandling: this.queryParamsHandling, preserveFragment: attrBoolValue(this.preserveFragment), }); } } RouterLinkWithHref.ɵfac = function RouterLinkWithHref_Factory(t) { return new (t || RouterLinkWithHref)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"])); }; RouterLinkWithHref.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterLinkWithHref, selectors: [["a", "routerLink", ""], ["area", "routerLink", ""]], hostVars: 2, hostBindings: function RouterLinkWithHref_HostBindings(rf, ctx) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function RouterLinkWithHref_click_HostBindingHandler($event) { return ctx.onClick($event.button, $event.ctrlKey, $event.shiftKey, $event.altKey, $event.metaKey); }); } if (rf & 2) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵhostProperty"]("href", ctx.href, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsanitizeUrl"]); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("target", ctx.target); } }, inputs: { routerLink: "routerLink", target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo" }, features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]] }); RouterLinkWithHref.ctorParameters = () => [ { type: Router }, { type: ActivatedRoute }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"] } ]; RouterLinkWithHref.propDecorators = { target: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"], args: ['attr.target',] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], href: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"] }], routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'],] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLinkWithHref, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: 'a[routerLink],area[routerLink]' }] }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"] }]; }, { routerLink: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], /** @nodoc */ onClick: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostListener"], args: ['click', ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']] }], href: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"] }], target: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["HostBinding"], args: ['attr.target'] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParams: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], fragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], queryParamsHandling: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], preserveFragment: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], skipLocationChange: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], replaceUrl: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], state: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], relativeTo: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }] }); })(); function attrBoolValue(s) { return s === '' || !!s; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * * @description * * Tracks whether the linked route of an element is currently active, and allows you * to specify one or more CSS classes to add to the element when the linked route * is active. * * Use this directive to create a visual distinction for elements associated with an active route. * For example, the following code highlights the word "Bob" when the router * activates the associated route: * * ``` * <a routerLink="/user/bob" routerLinkActive="active-link">Bob</a> * ``` * * Whenever the URL is either '/user' or '/user/bob', the "active-link" class is * added to the anchor tag. If the URL changes, the class is removed. * * You can set more than one class using a space-separated string or an array. * For example: * * ``` * <a routerLink="/user/bob" routerLinkActive="class1 class2">Bob</a> * <a routerLink="/user/bob" [routerLinkActive]="['class1', 'class2']">Bob</a> * ``` * * To add the classes only when the URL matches the link exactly, add the option `exact: true`: * * ``` * <a routerLink="/user/bob" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: * true}">Bob</a> * ``` * * To directly check the `isActive` status of the link, assign the `RouterLinkActive` * instance to a template variable. * For example, the following checks the status without assigning any CSS classes: * * ``` * <a routerLink="/user/bob" routerLinkActive #rla="routerLinkActive"> * Bob {{ rla.isActive ? '(already open)' : ''}} * </a> * ``` * * You can apply the `RouterLinkActive` directive to an ancestor of linked elements. * For example, the following sets the active-link class on the `<div>` parent tag * when the URL is either '/user/jim' or '/user/bob'. * * ``` * <div routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: true}"> * <a routerLink="/user/jim">Jim</a> * <a routerLink="/user/bob">Bob</a> * </div> * ``` * * @ngModule RouterModule * * @publicApi */ class RouterLinkActive { constructor(router, element, renderer, cdr, link, linkWithHref) { this.router = router; this.element = element; this.renderer = renderer; this.cdr = cdr; this.link = link; this.linkWithHref = linkWithHref; this.classes = []; this.isActive = false; this.routerLinkActiveOptions = { exact: false }; this.routerEventsSubscription = router.events.subscribe((s) => { if (s instanceof NavigationEnd) { this.update(); } }); } /** @nodoc */ ngAfterContentInit() { // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`). Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(this.links.changes, this.linksWithHrefs.changes, Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null)).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])()).subscribe(_ => { this.update(); this.subscribeToEachLinkOnChanges(); }); } subscribeToEachLinkOnChanges() { var _a; (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe(); const allLinkChanges = [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref] .filter((link) => !!link) .map(link => link.onChanges); this.linkInputChangesSubscription = Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(allLinkChanges).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])()).subscribe(link => { if (this.isActive !== this.isLinkActive(this.router)(link)) { this.update(); } }); } set routerLinkActive(data) { const classes = Array.isArray(data) ? data : data.split(' '); this.classes = classes.filter(c => !!c); } /** @nodoc */ ngOnChanges(changes) { this.update(); } /** @nodoc */ ngOnDestroy() { var _a; this.routerEventsSubscription.unsubscribe(); (_a = this.linkInputChangesSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe(); } update() { if (!this.links || !this.linksWithHrefs || !this.router.navigated) return; Promise.resolve().then(() => { const hasActiveLinks = this.hasActiveLinks(); if (this.isActive !== hasActiveLinks) { this.isActive = hasActiveLinks; this.cdr.markForCheck(); this.classes.forEach((c) => { if (hasActiveLinks) { this.renderer.addClass(this.element.nativeElement, c); } else { this.renderer.removeClass(this.element.nativeElement, c); } }); } }); } isLinkActive(router) { return (link) => router.isActive(link.urlTree, this.routerLinkActiveOptions.exact); } hasActiveLinks() { const isActiveCheckFn = this.isLinkActive(this.router); return this.link && isActiveCheckFn(this.link) || this.linkWithHref && isActiveCheckFn(this.linkWithHref) || this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn); } } RouterLinkActive.ɵfac = function RouterLinkActive_Factory(t) { return new (t || RouterLinkActive)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](RouterLink, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](RouterLinkWithHref, 8)); }; RouterLinkActive.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterLinkActive, selectors: [["", "routerLinkActive", ""]], contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) { _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, RouterLink, 1); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](dirIndex, RouterLinkWithHref, 1); } if (rf & 2) { let _t; _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.links = _t); _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.linksWithHrefs = _t); } }, inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", routerLinkActive: "routerLinkActive" }, exportAs: ["routerLinkActive"], features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]] }); RouterLinkActive.ctorParameters = () => [ { type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] }, { type: RouterLink, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }, { type: RouterLinkWithHref, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] } ]; RouterLinkActive.propDecorators = { links: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLink, { descendants: true },] }], linksWithHrefs: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLinkWithHref, { descendants: true },] }], routerLinkActiveOptions: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], routerLinkActive: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterLinkActive, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: '[routerLinkActive]', exportAs: 'routerLinkActive' }] }], function () { return [{ type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] }, { type: RouterLink, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }, { type: RouterLinkWithHref, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }]; }, { routerLinkActiveOptions: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], routerLinkActive: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"] }], links: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLink, { descendants: true }] }], linksWithHrefs: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ContentChildren"], args: [RouterLinkWithHref, { descendants: true }] }] }); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Acts as a placeholder that Angular dynamically fills based on the current router state. * * Each outlet can have a unique name, determined by the optional `name` attribute. * The name cannot be set or changed dynamically. If not set, default value is "primary". * * ``` * <router-outlet></router-outlet> * <router-outlet name='left'></router-outlet> * <router-outlet name='right'></router-outlet> * ``` * * Named outlets can be the targets of secondary routes. * The `Route` object for a secondary route has an `outlet` property to identify the target outlet: * * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}` * * Using named outlets and secondary routes, you can target multiple outlets in * the same `RouterLink` directive. * * The router keeps track of separate branches in a navigation tree for each named outlet and * generates a representation of that tree in the URL. * The URL for a secondary route uses the following syntax to specify both the primary and secondary * routes at the same time: * * `http://base-path/primary-route-path(outlet-name:route-path)` * * A router outlet emits an activate event when a new component is instantiated, * and a deactivate event when a component is destroyed. * * ``` * <router-outlet * (activate)='onActivate($event)' * (deactivate)='onDeactivate($event)'></router-outlet> * ``` * * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets "Example of a named * outlet and secondary route configuration"). * @see `RouterLink` * @see `Route` * @ngModule RouterModule * * @publicApi */ class RouterOutlet { constructor(parentContexts, location, resolver, name, changeDetector) { this.parentContexts = parentContexts; this.location = location; this.resolver = resolver; this.changeDetector = changeDetector; this.activated = null; this._activatedRoute = null; this.activateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"](); this.deactivateEvents = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"](); this.name = name || PRIMARY_OUTLET; parentContexts.onChildOutletCreated(this.name, this); } /** @nodoc */ ngOnDestroy() { this.parentContexts.onChildOutletDestroyed(this.name); } /** @nodoc */ ngOnInit() { if (!this.activated) { // If the outlet was not instantiated at the time the route got activated we need to populate // the outlet when it is initialized (ie inside a NgIf) const context = this.parentContexts.getContext(this.name); if (context && context.route) { if (context.attachRef) { // `attachRef` is populated when there is an existing component to mount this.attach(context.attachRef, context.route); } else { // otherwise the component defined in the configuration is created this.activateWith(context.route, context.resolver || null); } } } } get isActivated() { return !!this.activated; } get component() { if (!this.activated) throw new Error('Outlet is not activated'); return this.activated.instance; } get activatedRoute() { if (!this.activated) throw new Error('Outlet is not activated'); return this._activatedRoute; } get activatedRouteData() { if (this._activatedRoute) { return this._activatedRoute.snapshot.data; } return {}; } /** * Called when the `RouteReuseStrategy` instructs to detach the subtree */ detach() { if (!this.activated) throw new Error('Outlet is not activated'); this.location.detach(); const cmp = this.activated; this.activated = null; this._activatedRoute = null; return cmp; } /** * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree */ attach(ref, activatedRoute) { this.activated = ref; this._activatedRoute = activatedRoute; this.location.insert(ref.hostView); } deactivate() { if (this.activated) { const c = this.component; this.activated.destroy(); this.activated = null; this._activatedRoute = null; this.deactivateEvents.emit(c); } } activateWith(activatedRoute, resolver) { if (this.isActivated) { throw new Error('Cannot activate an already activated outlet'); } this._activatedRoute = activatedRoute; const snapshot = activatedRoute._futureSnapshot; const component = snapshot.routeConfig.component; resolver = resolver || this.resolver; const factory = resolver.resolveComponentFactory(component); const childContexts = this.parentContexts.getOrCreateContext(this.name).children; const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector); this.activated = this.location.createComponent(factory, this.location.length, injector); // Calling `markForCheck` to make sure we will run the change detection when the // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component. this.changeDetector.markForCheck(); this.activateEvents.emit(this.activated.instance); } } RouterOutlet.ɵfac = function RouterOutlet_Factory(t) { return new (t || RouterOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](ChildrenOutletContexts), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('name'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"])); }; RouterOutlet.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({ type: RouterOutlet, selectors: [["router-outlet"]], outputs: { activateEvents: "activate", deactivateEvents: "deactivate" }, exportAs: ["outlet"] }); RouterOutlet.ctorParameters = () => [ { type: ChildrenOutletContexts }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['name',] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] } ]; RouterOutlet.propDecorators = { activateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['activate',] }], deactivateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['deactivate',] }] }; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterOutlet, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"], args: [{ selector: 'router-outlet', exportAs: 'outlet' }] }], function () { return [{ type: ChildrenOutletContexts }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"] }, { type: String, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"], args: ['name'] }] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"] }]; }, { activateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['activate'] }], deactivateEvents: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"], args: ['deactivate'] }] }); })(); class OutletInjector { constructor(route, childContexts, parent) { this.route = route; this.childContexts = childContexts; this.parent = parent; } get(token, notFoundValue) { if (token === ActivatedRoute) { return this.route; } if (token === ChildrenOutletContexts) { return this.childContexts; } return this.parent.get(token, notFoundValue); } } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @description * * Provides a preloading strategy. * * @publicApi */ class PreloadingStrategy { } /** * @description * * Provides a preloading strategy that preloads all modules as quickly as possible. * * ``` * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules}) * ``` * * @publicApi */ class PreloadAllModules { preload(route, fn) { return fn().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["catchError"])(() => Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null))); } } /** * @description * * Provides a preloading strategy that does not preload any modules. * * This strategy is enabled by default. * * @publicApi */ class NoPreloading { preload(route, fn) { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } } /** * The preloader optimistically loads all router configurations to * make navigations into lazily-loaded sections of the application faster. * * The preloader runs in the background. When the router bootstraps, the preloader * starts listening to all navigation events. After every such event, the preloader * will check if any configurations can be loaded lazily. * * If a route is protected by `canLoad` guards, the preloaded will not load it. * * @publicApi */ class RouterPreloader { constructor(router, moduleLoader, compiler, injector, preloadingStrategy) { this.router = router; this.injector = injector; this.preloadingStrategy = preloadingStrategy; const onStartLoad = (r) => router.triggerEvent(new RouteConfigLoadStart(r)); const onEndLoad = (r) => router.triggerEvent(new RouteConfigLoadEnd(r)); this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad); } setUpPreloading() { this.subscription = this.router.events .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["filter"])((e) => e instanceof NavigationEnd), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["concatMap"])(() => this.preload())) .subscribe(() => { }); } preload() { const ngModule = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleRef"]); return this.processRoutes(ngModule, this.router.config); } /** @nodoc */ ngOnDestroy() { if (this.subscription) { this.subscription.unsubscribe(); } } processRoutes(ngModule, routes) { const res = []; for (const route of routes) { // we already have the config loaded, just recurse if (route.loadChildren && !route.canLoad && route._loadedConfig) { const childConfig = route._loadedConfig; res.push(this.processRoutes(childConfig.module, childConfig.routes)); // no config loaded, fetch the config } else if (route.loadChildren && !route.canLoad) { res.push(this.preloadConfig(ngModule, route)); // recurse into children } else if (route.children) { res.push(this.processRoutes(ngModule, route.children)); } } return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["from"])(res).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeAll"])(), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((_) => void 0)); } preloadConfig(ngModule, route) { return this.preloadingStrategy.preload(route, () => { const loaded$ = route._loadedConfig ? Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(route._loadedConfig) : this.loader.load(ngModule.injector, route); return loaded$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["mergeMap"])((config) => { route._loadedConfig = config; return this.processRoutes(config.module, config.routes); })); }); } } RouterPreloader.ɵfac = function RouterPreloader_Factory(t) { return new (t || RouterPreloader)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](PreloadingStrategy)); }; RouterPreloader.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: RouterPreloader, factory: RouterPreloader.ɵfac }); RouterPreloader.ctorParameters = () => [ { type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: PreloadingStrategy } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterPreloader, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: Router }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }, { type: PreloadingStrategy }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ class RouterScroller { constructor(router, /** @docsNotRequired */ viewportScroller, options = {}) { this.router = router; this.viewportScroller = viewportScroller; this.options = options; this.lastId = 0; this.lastSource = 'imperative'; this.restoredId = 0; this.store = {}; // Default both options to 'disabled' options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled'; options.anchorScrolling = options.anchorScrolling || 'disabled'; } init() { // we want to disable the automatic scrolling because having two places // responsible for scrolling results race conditions, especially given // that browser don't implement this behavior consistently if (this.options.scrollPositionRestoration !== 'disabled') { this.viewportScroller.setHistoryScrollRestoration('manual'); } this.routerEventsSubscription = this.createScrollEvents(); this.scrollEventsSubscription = this.consumeScrollEvents(); } createScrollEvents() { return this.router.events.subscribe(e => { if (e instanceof NavigationStart) { // store the scroll position of the current stable navigations. this.store[this.lastId] = this.viewportScroller.getScrollPosition(); this.lastSource = e.navigationTrigger; this.restoredId = e.restoredState ? e.restoredState.navigationId : 0; } else if (e instanceof NavigationEnd) { this.lastId = e.id; this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment); } }); } consumeScrollEvents() { return this.router.events.subscribe(e => { if (!(e instanceof Scroll)) return; // a popstate event. The pop state event will always ignore anchor scrolling. if (e.position) { if (this.options.scrollPositionRestoration === 'top') { this.viewportScroller.scrollToPosition([0, 0]); } else if (this.options.scrollPositionRestoration === 'enabled') { this.viewportScroller.scrollToPosition(e.position); } // imperative navigation "forward" } else { if (e.anchor && this.options.anchorScrolling === 'enabled') { this.viewportScroller.scrollToAnchor(e.anchor); } else if (this.options.scrollPositionRestoration !== 'disabled') { this.viewportScroller.scrollToPosition([0, 0]); } } }); } scheduleScrollEvent(routerEvent, anchor) { this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor)); } /** @nodoc */ ngOnDestroy() { if (this.routerEventsSubscription) { this.routerEventsSubscription.unsubscribe(); } if (this.scrollEventsSubscription) { this.scrollEventsSubscription.unsubscribe(); } } } RouterScroller.ɵfac = function RouterScroller_Factory(t) { return new (t || RouterScroller)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](undefined)); }; RouterScroller.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: RouterScroller, factory: RouterScroller.ɵfac }); RouterScroller.ctorParameters = () => [ { type: Router }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"] }, { type: undefined } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterScroller, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: Router }, { type: _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"] }, { type: undefined }]; }, null); })(); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * The directives defined in the `RouterModule`. */ const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent]; /** * A [DI token](guide/glossary/#di-token) for the router service. * * @publicApi */ const ROUTER_CONFIGURATION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_CONFIGURATION'); /** * @docsNotRequired */ const ROUTER_FORROOT_GUARD = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('ROUTER_FORROOT_GUARD'); const ɵ0 = { enableTracing: false }; const ROUTER_PROVIDERS = [ _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"], { provide: UrlSerializer, useClass: DefaultUrlSerializer }, { provide: Router, useFactory: setupRouter, deps: [ UrlSerializer, ChildrenOutletContexts, _angular_common__WEBPACK_IMPORTED_MODULE_0__["Location"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["Compiler"], ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], [RouteReuseStrategy, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()] ] }, ChildrenOutletContexts, { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModuleFactoryLoader"], useClass: _angular_core__WEBPACK_IMPORTED_MODULE_1__["SystemJsNgModuleLoader"] }, RouterPreloader, NoPreloading, PreloadAllModules, { provide: ROUTER_CONFIGURATION, useValue: ɵ0 }, ]; function routerNgProbeToken() { return new _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"]('Router', Router); } /** * @description * * Adds directives and providers for in-app navigation among views defined in an application. * Use the Angular `Router` service to declaratively specify application states and manage state * transitions. * * You can import this NgModule multiple times, once for each lazy-loaded bundle. * However, only one `Router` service can be active. * To ensure this, there are two ways to register routes when importing this module: * * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given * routes, and the `Router` service itself. * * The `forChild()` method creates an `NgModule` that contains all the directives and the given * routes, but does not include the `Router` service. * * @see [Routing and Navigation guide](guide/router) for an * overview of how the `Router` service should be used. * * @publicApi */ class RouterModule { // Note: We are injecting the Router so it gets created eagerly... constructor(guard, router) { } /** * Creates and configures a module with all the router providers and directives. * Optionally sets up an application listener to perform an initial navigation. * * When registering the NgModule at the root, import as follows: * * ``` * @NgModule({ * imports: [RouterModule.forRoot(ROUTES)] * }) * class MyNgModule {} * ``` * * @param routes An array of `Route` objects that define the navigation paths for the application. * @param config An `ExtraOptions` configuration object that controls how navigation is performed. * @return The new `NgModule`. * */ static forRoot(routes, config) { return { ngModule: RouterModule, providers: [ ROUTER_PROVIDERS, provideRoutes(routes), { provide: ROUTER_FORROOT_GUARD, useFactory: provideForRootGuard, deps: [[Router, new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"](), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["SkipSelf"]()]] }, { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} }, { provide: _angular_common__WEBPACK_IMPORTED_MODULE_0__["LocationStrategy"], useFactory: provideLocationStrategy, deps: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["PlatformLocation"], [new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["APP_BASE_HREF"]), new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]()], ROUTER_CONFIGURATION] }, { provide: RouterScroller, useFactory: createRouterScroller, deps: [Router, _angular_common__WEBPACK_IMPORTED_MODULE_0__["ViewportScroller"], ROUTER_CONFIGURATION] }, { provide: PreloadingStrategy, useExisting: config && config.preloadingStrategy ? config.preloadingStrategy : NoPreloading }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgProbeToken"], multi: true, useFactory: routerNgProbeToken }, provideRouterInitializer(), ], }; } /** * Creates a module with all the router directives and a provider registering routes, * without creating a new Router service. * When registering for submodules and lazy-loaded submodules, create the NgModule as follows: * * ``` * @NgModule({ * imports: [RouterModule.forChild(ROUTES)] * }) * class MyNgModule {} * ``` * * @param routes An array of `Route` objects that define the navigation paths for the submodule. * @return The new NgModule. * */ static forChild(routes) { return { ngModule: RouterModule, providers: [provideRoutes(routes)] }; } } RouterModule.ɵfac = function RouterModule_Factory(t) { return new (t || RouterModule)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](ROUTER_FORROOT_GUARD, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Router, 8)); }; RouterModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ type: RouterModule }); RouterModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({}); RouterModule.ctorParameters = () => [ { type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [ROUTER_FORROOT_GUARD,] }] }, { type: Router, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] } ]; (function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](RouterModule, { declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] }); })(); (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterModule, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"], args: [{ declarations: ROUTER_DIRECTIVES, exports: ROUTER_DIRECTIVES, entryComponents: [ɵEmptyOutletComponent] }] }], function () { return [{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }, { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"], args: [ROUTER_FORROOT_GUARD] }] }, { type: Router, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"] }] }]; }, null); })(); function createRouterScroller(router, viewportScroller, config) { if (config.scrollOffset) { viewportScroller.setOffset(config.scrollOffset); } return new RouterScroller(router, viewportScroller, config); } function provideLocationStrategy(platformLocationStrategy, baseHref, options = {}) { return options.useHash ? new _angular_common__WEBPACK_IMPORTED_MODULE_0__["HashLocationStrategy"](platformLocationStrategy, baseHref) : new _angular_common__WEBPACK_IMPORTED_MODULE_0__["PathLocationStrategy"](platformLocationStrategy, baseHref); } function provideForRootGuard(router) { if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) { throw new Error(`RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`); } return 'guarded'; } /** * Registers a [DI provider](guide/glossary#provider) for a set of routes. * @param routes The route configuration to provide. * * @usageNotes * * ``` * @NgModule({ * imports: [RouterModule.forChild(ROUTES)], * providers: [provideRoutes(EXTRA_ROUTES)] * }) * class MyNgModule {} * ``` * * @publicApi */ function provideRoutes(routes) { return [ { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"], multi: true, useValue: routes }, { provide: ROUTES, multi: true, useValue: routes }, ]; } function setupRouter(urlSerializer, contexts, location, injector, loader, compiler, config, opts = {}, urlHandlingStrategy, routeReuseStrategy) { const router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config)); if (urlHandlingStrategy) { router.urlHandlingStrategy = urlHandlingStrategy; } if (routeReuseStrategy) { router.routeReuseStrategy = routeReuseStrategy; } assignExtraOptionsToRouter(opts, router); if (opts.enableTracing) { const dom = Object(_angular_common__WEBPACK_IMPORTED_MODULE_0__["ɵgetDOM"])(); router.events.subscribe((e) => { dom.logGroup(`Router Event: ${e.constructor.name}`); dom.log(e.toString()); dom.log(e); dom.logGroupEnd(); }); } return router; } function assignExtraOptionsToRouter(opts, router) { if (opts.errorHandler) { router.errorHandler = opts.errorHandler; } if (opts.malformedUriErrorHandler) { router.malformedUriErrorHandler = opts.malformedUriErrorHandler; } if (opts.onSameUrlNavigation) { router.onSameUrlNavigation = opts.onSameUrlNavigation; } if (opts.paramsInheritanceStrategy) { router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy; } if (opts.relativeLinkResolution) { router.relativeLinkResolution = opts.relativeLinkResolution; } if (opts.urlUpdateStrategy) { router.urlUpdateStrategy = opts.urlUpdateStrategy; } } function rootRoute(router) { return router.routerState.root; } /** * Router initialization requires two steps: * * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if * a resolver or a guard executes asynchronously. * * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the * `afterPreactivation` hook provided by the router. * The router navigation starts, reaches the point when preactivation is done, and then * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener. */ class RouterInitializer { constructor(injector) { this.injector = injector; this.initNavigation = false; this.resultOfPreactivationDone = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"](); } appInitializer() { const p = this.injector.get(_angular_common__WEBPACK_IMPORTED_MODULE_0__["LOCATION_INITIALIZED"], Promise.resolve(null)); return p.then(() => { let resolve = null; const res = new Promise(r => resolve = r); const router = this.injector.get(Router); const opts = this.injector.get(ROUTER_CONFIGURATION); if (opts.initialNavigation === 'disabled') { router.setUpLocationChangeListener(); resolve(true); } else if ( // TODO: enabled is deprecated as of v11, can be removed in v13 opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') { router.hooks.afterPreactivation = () => { // only the initial navigation should be delayed if (!this.initNavigation) { this.initNavigation = true; resolve(true); return this.resultOfPreactivationDone; // subsequent navigations should not be delayed } else { return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])(null); } }; router.initialNavigation(); } else { resolve(true); } return res; }); } bootstrapListener(bootstrappedComponentRef) { const opts = this.injector.get(ROUTER_CONFIGURATION); const preloader = this.injector.get(RouterPreloader); const routerScroller = this.injector.get(RouterScroller); const router = this.injector.get(Router); const ref = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ApplicationRef"]); if (bootstrappedComponentRef !== ref.components[0]) { return; } // Default case if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) { router.initialNavigation(); } preloader.setUpPreloading(); routerScroller.init(); router.resetRootComponentType(ref.componentTypes[0]); this.resultOfPreactivationDone.next(null); this.resultOfPreactivationDone.complete(); } } RouterInitializer.ɵfac = function RouterInitializer_Factory(t) { return new (t || RouterInitializer)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"])); }; RouterInitializer.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ token: RouterInitializer, factory: RouterInitializer.ɵfac }); RouterInitializer.ctorParameters = () => [ { type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] } ]; (function () { (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](RouterInitializer, [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] }], function () { return [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"] }]; }, null); })(); function getAppInitializer(r) { return r.appInitializer.bind(r); } function getBootstrapListener(r) { return r.bootstrapListener.bind(r); } /** * A [DI token](guide/glossary/#di-token) for the router initializer that * is called after the app is bootstrapped. * * @publicApi */ const ROUTER_INITIALIZER = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('Router Initializer'); function provideRouterInitializer() { return [ RouterInitializer, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_INITIALIZER"], multi: true, useFactory: getAppInitializer, deps: [RouterInitializer] }, { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] }, { provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["APP_BOOTSTRAP_LISTENER"], multi: true, useExisting: ROUTER_INITIALIZER }, ]; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @publicApi */ const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["Version"]('11.2.9'); /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // This file only reexports content of the `src` folder. Keep it that way. /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Generated bundle index. Do not edit. */ //# sourceMappingURL=router.js.map /***/ }), /***/ "uD/i": /*!*********************************************!*\ !*** ./node_modules/d3-geo/src/constant.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return function() { return x; }; }); /***/ }), /***/ "uQ0a": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "ece7f2a6bddb2b8cbe", "f1eef6bdc9e174a9cf0570b0", "f1eef6bdc9e174a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "uTdr": /*!****************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/onErrorResumeNext.js ***! \****************************************************************************/ /*! exports provided: onErrorResumeNext, onErrorResumeNextStatic */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; }); /* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/from */ "Cfvw"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function onErrorResumeNext(...nextSources) { if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(nextSources[0])) { nextSources = nextSources[0]; } return (source) => source.lift(new OnErrorResumeNextOperator(nextSources)); } function onErrorResumeNextStatic(...nextSources) { let source = undefined; if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(nextSources[0])) { nextSources = nextSources[0]; } source = nextSources.shift(); return Object(_observable_from__WEBPACK_IMPORTED_MODULE_0__["from"])(source).lift(new OnErrorResumeNextOperator(nextSources)); } class OnErrorResumeNextOperator { constructor(nextSources) { this.nextSources = nextSources; } call(subscriber, source) { return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources)); } } class OnErrorResumeNextSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleOuterSubscriber"] { constructor(destination, nextSources) { super(destination); this.destination = destination; this.nextSources = nextSources; } notifyError() { this.subscribeToNextSource(); } notifyComplete() { this.subscribeToNextSource(); } _error(err) { this.subscribeToNextSource(); this.unsubscribe(); } _complete() { this.subscribeToNextSource(); this.unsubscribe(); } subscribeToNextSource() { const next = this.nextSources.shift(); if (!!next) { const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["SimpleInnerSubscriber"](this); const destination = this.destination; destination.add(innerSubscriber); const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_2__["innerSubscribe"])(next, innerSubscriber); if (innerSubscription !== innerSubscriber) { destination.add(innerSubscription); } } else { this.destination.complete(); } } } //# sourceMappingURL=onErrorResumeNext.js.map /***/ }), /***/ "uV4M": /*!*************************************************!*\ !*** ./node_modules/d3-polygon/src/contains.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) { var n = polygon.length, p = polygon[n - 1], x = point[0], y = point[1], x0 = p[0], y0 = p[1], x1, y1, inside = false; for (var i = 0; i < n; ++i) { p = polygon[i], x1 = p[0], y1 = p[1]; if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside; x0 = x1, y0 = y1; } return inside; }); /***/ }), /***/ "uc95": /*!*********************************************!*\ !*** ./node_modules/d3-ease/src/elastic.js ***! \*********************************************/ /*! exports provided: elasticIn, elasticOut, elasticInOut */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticIn", function() { return elasticIn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticOut", function() { return elasticOut; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticInOut", function() { return elasticInOut; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "6ZHU"); var tau = 2 * Math.PI, amplitude = 1, period = 0.3; var elasticIn = (function custom(a, p) { var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); function elasticIn(t) { return a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(-(--t)) * Math.sin((s - t) / p); } elasticIn.amplitude = function(a) { return custom(a, p * tau); }; elasticIn.period = function(p) { return custom(a, p); }; return elasticIn; })(amplitude, period); var elasticOut = (function custom(a, p) { var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); function elasticOut(t) { return 1 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t = +t) * Math.sin((t + s) / p); } elasticOut.amplitude = function(a) { return custom(a, p * tau); }; elasticOut.period = function(p) { return custom(a, p); }; return elasticOut; })(amplitude, period); var elasticInOut = (function custom(a, p) { var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); function elasticInOut(t) { return ((t = t * 2 - 1) < 0 ? a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(-t) * Math.sin((s - t) / p) : 2 - a * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tpmt"])(t) * Math.sin((s + t) / p)) / 2; } elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; elasticInOut.period = function(p) { return custom(a, p); }; return elasticInOut; })(amplitude, period); /***/ }), /***/ "umZI": /*!*********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/sort.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(compare) { return this.eachBefore(function(node) { if (node.children) { node.children.sort(compare); } }); }); /***/ }), /***/ "un/a": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/retry.js ***! \****************************************************************/ /*! exports provided: retry */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function retry(count = -1) { return (source) => source.lift(new RetryOperator(count, source)); } class RetryOperator { constructor(count, source) { this.count = count; this.source = source; } call(subscriber, source) { return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source)); } } class RetrySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, count, source) { super(destination); this.count = count; this.source = source; } error(err) { if (!this.isStopped) { const { source, count } = this; if (count === 0) { return super.error(err); } else if (count > -1) { this.count = count - 1; } source.subscribe(this._unsubscribeAndRecycle()); } } } //# sourceMappingURL=retry.js.map /***/ }), /***/ "uvNp": /*!***********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/select.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony import */ var _selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector.js */ "b9Oj"); /* harmony default export */ __webpack_exports__["default"] = (function(select) { if (typeof select !== "function") select = Object(_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(select); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { if ("__data__" in node) subnode.__data__ = node.__data__; subgroup[i] = subnode; } } } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); }); /***/ }), /***/ "v/rI": /*!***********************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/leaves.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var leaves = []; this.eachBefore(function(node) { if (!node.children) { leaves.push(node); } }); return leaves; }); /***/ }), /***/ "v7Le": /*!******************************************************!*\ !*** ./node_modules/d3-time-format/src/isoFormat.js ***! \******************************************************/ /*! exports provided: isoSpecifier, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isoSpecifier", function() { return isoSpecifier; }); /* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "TCOF"); var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; function formatIsoNative(date) { return date.toISOString(); } var formatIso = Date.prototype.toISOString ? formatIsoNative : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"])(isoSpecifier); /* harmony default export */ __webpack_exports__["default"] = (formatIso); /***/ }), /***/ "vAb3": /*!********************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***! \********************************************************************/ /*! exports provided: cylindricalEqualAreaRaw */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cylindricalEqualAreaRaw", function() { return cylindricalEqualAreaRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); function cylindricalEqualAreaRaw(phi0) { var cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi0); function forward(lambda, phi) { return [lambda * cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi) / cosPhi0]; } forward.invert = function(x, y) { return [x / cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(y * cosPhi0)]; }; return forward; } /***/ }), /***/ "vBe5": /*!********************************************!*\ !*** ./node_modules/d3-array/src/index.js ***! \********************************************/ /*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, Adder, fsum, fcumsum, group, groups, index, indexes, rollup, rollups, groupSort, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union, InternMap, InternSet */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect.js */ "h8nK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectRight"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectLeft"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectCenter"]; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return _ascending_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector.js */ "Ki0a"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return _bisector_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./count.js */ "hiel"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _count_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cross.js */ "9j6y"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return _cross_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _cumsum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cumsum.js */ "UPWK"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cumsum", function() { return _cumsum_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descending.js */ "0sQp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return _descending_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deviation.js */ "CcBx"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return _deviation_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ "wz8V"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return _extent_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _fsum_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./fsum.js */ "xOP2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["Adder"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fsum", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["fsum"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fcumsum", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["fcumsum"]; }); /* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./group.js */ "4TqM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "group", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["groups"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "index", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["index"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["indexes"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["rollup"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["rollups"]; }); /* harmony import */ var _groupSort_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./groupSort.js */ "CXbD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupSort", function() { return _groupSort_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _bin_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./bin.js */ "PuQ0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bin", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./threshold/freedmanDiaconis.js */ "wjRQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./threshold/scott.js */ "Y7ZM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return _threshold_scott_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./threshold/sturges.js */ "Nl5w"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./max.js */ "gj+k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./maxIndex.js */ "cvkC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxIndex", function() { return _maxIndex_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); /* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./mean.js */ "V183"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); /* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./median.js */ "wKoq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return _median_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); /* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./merge.js */ "FTmn"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./min.js */ "mrVq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); /* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./minIndex.js */ "JQqb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minIndex", function() { return _minIndex_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); /* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./nice.js */ "GWx9"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nice", function() { return _nice_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); /* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./pairs.js */ "R9CD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _pairs_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); /* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./permute.js */ "MiBC"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return _permute_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./quantile.js */ "GHWt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_26__["quantileSorted"]; }); /* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./quickselect.js */ "WHjf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quickselect", function() { return _quickselect_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); /* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./range.js */ "NltA"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _range_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); /* harmony import */ var _least_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./least.js */ "tAAF"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "least", function() { return _least_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); /* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./leastIndex.js */ "/CzE"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "leastIndex", function() { return _leastIndex_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); /* harmony import */ var _greatest_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./greatest.js */ "1SON"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatest", function() { return _greatest_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); /* harmony import */ var _greatestIndex_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./greatestIndex.js */ "yb6d"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatestIndex", function() { return _greatestIndex_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); /* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./scan.js */ "Ok6N"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); /* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./shuffle.js */ "QK7T"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_34__["shuffler"]; }); /* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sum.js */ "OWWo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); /* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./ticks.js */ "7ssf"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_36__["tickIncrement"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_36__["tickStep"]; }); /* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./transpose.js */ "cyYV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); /* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./variance.js */ "7sdT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return _variance_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); /* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./zip.js */ "+y6k"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); /* harmony import */ var _every_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./every.js */ "JYaH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _every_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); /* harmony import */ var _some_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./some.js */ "SSHS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "some", function() { return _some_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./filter.js */ "AgzO"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./map.js */ "J0SQ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map_js__WEBPACK_IMPORTED_MODULE_43__["default"]; }); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./reduce.js */ "3Ryo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_44__["default"]; }); /* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./reverse.js */ "LXyZ"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reverse", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_45__["default"]; }); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./sort.js */ "Exv/"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_46__["default"]; }); /* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./difference.js */ "3oVi"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_47__["default"]; }); /* harmony import */ var _disjoint_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./disjoint.js */ "xtnD"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "disjoint", function() { return _disjoint_js__WEBPACK_IMPORTED_MODULE_48__["default"]; }); /* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./intersection.js */ "Z5Ne"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_49__["default"]; }); /* harmony import */ var _subset_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./subset.js */ "jIxI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subset", function() { return _subset_js__WEBPACK_IMPORTED_MODULE_50__["default"]; }); /* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./superset.js */ "3O/B"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "superset", function() { return _superset_js__WEBPACK_IMPORTED_MODULE_51__["default"]; }); /* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./union.js */ "fAVw"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return _union_js__WEBPACK_IMPORTED_MODULE_52__["default"]; }); /* harmony import */ var internmap__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! internmap */ "vobT"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternMap", function() { return internmap__WEBPACK_IMPORTED_MODULE_53__["InternMap"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InternSet", function() { return internmap__WEBPACK_IMPORTED_MODULE_53__["InternSet"]; }); // Deprecated; use bin. // Deprecated; use leastIndex. /***/ }), /***/ "vHEj": /*!***********************************************!*\ !*** ./node_modules/d3-geo/src/path/index.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity.js */ "IYKK"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream.js */ "tepu"); /* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area.js */ "rBOd"); /* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds.js */ "SMTj"); /* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid.js */ "5D8y"); /* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context.js */ "ikcO"); /* harmony import */ var _measure_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure.js */ "EyUX"); /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string.js */ "mLep"); /* harmony default export */ __webpack_exports__["default"] = (function(projection, context) { var pointRadius = 4.5, projectionStream, contextStream; function path(object) { if (object) { if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(contextStream)); } return contextStream.result(); } path.area = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_area_js__WEBPACK_IMPORTED_MODULE_2__["default"])); return _area_js__WEBPACK_IMPORTED_MODULE_2__["default"].result(); }; path.measure = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_measure_js__WEBPACK_IMPORTED_MODULE_6__["default"])); return _measure_js__WEBPACK_IMPORTED_MODULE_6__["default"].result(); }; path.bounds = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"])); return _bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"].result(); }; path.centroid = function(object) { Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"])); return _centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"].result(); }; path.projection = function(_) { return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"]) : (projection = _).stream, path) : projection; }; path.context = function(_) { if (!arguments.length) return context; contextStream = _ == null ? (context = null, new _string_js__WEBPACK_IMPORTED_MODULE_7__["default"]) : new _context_js__WEBPACK_IMPORTED_MODULE_5__["default"](context = _); if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); return path; }; path.pointRadius = function(_) { if (!arguments.length) return pointRadius; pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); return path; }; return path.projection(projection).context(context); }); /***/ }), /***/ "vL4l": /*!*************************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***! \*************************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "e5f5e0a1d99b31a354", "edf8e9bae4b374c476238b45", "edf8e9bae4b374c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47631a354006d2c", "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "vNJl": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/circle.js ***! \*******************************************/ /*! exports provided: circleStream, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleStream", function() { return circleStream; }); /* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian.js */ "YzSS"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "uD/i"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation.js */ "cwsO"); // Generates a circle centered at [0°, 0°], with a given radius and precision. function circleStream(stream, radius, delta, direction, t0, t1) { if (!delta) return; var cosRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius), sinRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(radius), step = direction * delta; if (t0 == null) { t0 = radius + direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; t1 = radius - step / 2; } else { t0 = circleRadius(cosRadius, t0); t1 = circleRadius(cosRadius, t1); if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; } for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])([cosRadius, -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(t), -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(t)]); stream.point(point[0], point[1]); } } // Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. function circleRadius(cosRadius, point) { point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(point), point[0] -= cosRadius; Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianNormalizeInPlace"])(point); var radius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])(-point[1]); return ((-point[2] < 0 ? -radius : radius) + _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"]; } /* harmony default export */ __webpack_exports__["default"] = (function() { var center = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([0, 0]), radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(90), precision = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(6), ring, rotate, stream = {point: point}; function point(x, y) { ring.push(x = rotate(x, y)); x[0] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"], x[1] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"]; } function circle() { var c = center.apply(this, arguments), r = radius.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], p = precision.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]; ring = []; rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_3__["rotateRadians"])(-c[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], -c[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], 0).invert; circleStream(stream, r, p, 1); c = {type: "Polygon", coordinates: [ring]}; ring = rotate = null; return c; } circle.center = function(_) { return arguments.length ? (center = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([+_[0], +_[1]]), circle) : center; }; circle.radius = function(_) { return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : radius; }; circle.precision = function(_) { return arguments.length ? (precision = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : precision; }; return circle; }); /***/ }), /***/ "vkgz": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/tap.js ***! \**************************************************************/ /*! exports provided: tap */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); /* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/noop */ "KqfI"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "n6bG"); function tap(nextOrObserver, error, complete) { return function tapOperatorFunction(source) { return source.lift(new DoOperator(nextOrObserver, error, complete)); }; } class DoOperator { constructor(nextOrObserver, error, complete) { this.nextOrObserver = nextOrObserver; this.error = error; this.complete = complete; } call(subscriber, source) { return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete)); } } class TapSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, observerOrNext, error, complete) { super(destination); this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(observerOrNext)) { this._context = this; this._tapNext = observerOrNext; } else if (observerOrNext) { this._context = observerOrNext; this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]; } } _next(value) { try { this._tapNext.call(this._context, value); } catch (err) { this.destination.error(err); return; } this.destination.next(value); } _error(err) { try { this._tapError.call(this._context, err); } catch (err) { this.destination.error(err); return; } this.destination.error(err); } _complete() { try { this._tapComplete.call(this._context); } catch (err) { this.destination.error(err); return; } return this.destination.complete(); } } //# sourceMappingURL=tap.js.map /***/ }), /***/ "vobT": /*!*********************************************!*\ !*** ./node_modules/internmap/src/index.js ***! \*********************************************/ /*! exports provided: InternMap, InternSet */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternMap", function() { return InternMap; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InternSet", function() { return InternSet; }); class InternMap extends Map { constructor(entries, key = keyof) { super(); Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}}); if (entries != null) for (const [key, value] of entries) this.set(key, value); } get(key) { return super.get(intern_get(this, key)); } has(key) { return super.has(intern_get(this, key)); } set(key, value) { return super.set(intern_set(this, key), value); } delete(key) { return super.delete(intern_delete(this, key)); } } class InternSet extends Set { constructor(values, key = keyof) { super(); Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}}); if (values != null) for (const value of values) this.add(value); } has(value) { return super.has(intern_get(this, value)); } add(value) { return super.add(intern_set(this, value)); } delete(value) { return super.delete(intern_delete(this, value)); } } function intern_get({_intern, _key}, value) { const key = _key(value); return _intern.has(key) ? _intern.get(key) : value; } function intern_set({_intern, _key}, value) { const key = _key(value); if (_intern.has(key)) return _intern.get(key); _intern.set(key, value); return value; } function intern_delete({_intern, _key}, value) { const key = _key(value); if (_intern.has(key)) { value = _intern.get(value); _intern.delete(key); } return value; } function keyof(value) { return value !== null && typeof value === "object" ? value.valueOf() : value; } /***/ }), /***/ "vqkR": /*!********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skipUntil.js ***! \********************************************************************/ /*! exports provided: skipUntil */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function skipUntil(notifier) { return (source) => source.lift(new SkipUntilOperator(notifier)); } class SkipUntilOperator { constructor(notifier) { this.notifier = notifier; } call(destination, source) { return source.subscribe(new SkipUntilSubscriber(destination, this.notifier)); } } class SkipUntilSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, notifier) { super(destination); this.hasValue = false; const innerSubscriber = new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this); this.add(innerSubscriber); this.innerSubscription = innerSubscriber; const innerSubscription = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(notifier, innerSubscriber); if (innerSubscription !== innerSubscriber) { this.add(innerSubscription); this.innerSubscription = innerSubscription; } } _next(value) { if (this.hasValue) { super._next(value); } } notifyNext() { this.hasValue = true; if (this.innerSubscription) { this.innerSubscription.unsubscribe(); } } notifyComplete() { } } //# sourceMappingURL=skipUntil.js.map /***/ }), /***/ "w1tV": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/share.js ***! \****************************************************************/ /*! exports provided: share */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; }); /* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multicast */ "oB13"); /* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./refCount */ "x+ZX"); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subject */ "XNiG"); function shareSubjectFactory() { return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"](); } function share() { return (source) => Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); } //# sourceMappingURL=share.js.map /***/ }), /***/ "w5vR": /*!*******************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Paired.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")); /***/ }), /***/ "w6Z2": /*!*****************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***! \*****************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fc8d59ffffbf91bfdb", "d7191cfdae61abd9e92c7bb6", "d7191cfdae61ffffbfabd9e92c7bb6", "d73027fc8d59fee090e0f3f891bfdb4575b4", "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "wC0G": /*!*********************************************!*\ !*** ./node_modules/d3-scale/src/symlog.js ***! \*********************************************/ /*! exports provided: symlogish, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symlogish", function() { return symlogish; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symlog; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); function transformSymlog(c) { return function(x) { return Math.sign(x) * Math.log1p(Math.abs(x / c)); }; } function transformSymexp(c) { return function(x) { return Math.sign(x) * Math.expm1(Math.abs(x)) * c; }; } function symlogish(transform) { var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); scale.constant = function(_) { return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; }; return Object(_linear_js__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale); } function symlog() { var scale = symlogish(Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["transformer"])()); scale.copy = function() { return Object(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, symlog()).constant(scale.constant()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments); } /***/ }), /***/ "wG9p": /*!**********************************************!*\ !*** ./node_modules/d3-random/src/pareto.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomPareto(source) { function randomPareto(alpha) { if ((alpha = +alpha) < 0) throw new RangeError("invalid alpha"); alpha = 1 / -alpha; return function() { return Math.pow(1 - source(), alpha); }; } randomPareto.source = sourceRandomPareto; return randomPareto; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "wIsI": /*!********************************************!*\ !*** ./node_modules/d3-shape/src/stack.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "gqw6"); /* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "2K37"); /* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ "0T5i"); /* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ "qqpY"); function stackValue(d, key) { return d[key]; } function stackSeries(key) { const series = []; series.key = key; return series; } /* harmony default export */ __webpack_exports__["default"] = (function() { var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([]), order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"], offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"], value = stackValue; function stack(data) { var sz = Array.from(keys.apply(this, arguments), stackSeries), i, n = sz.length, j = -1, oz; for (const d of data) { for (i = 0, ++j; i < n; ++i) { (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d; } } for (i = 0, oz = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["default"])(order(sz)); i < n; ++i) { sz[oz[i]].index = i; } offset(sz, oz); return sz; } stack.keys = function(_) { return arguments.length ? (keys = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Array.from(_)), stack) : keys; }; stack.value = function(_) { return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), stack) : value; }; stack.order = function(_) { return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"] : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Array.from(_)), stack) : order; }; stack.offset = function(_) { return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"] : _, stack) : offset; }; return stack; }); /***/ }), /***/ "wKaL": /*!********************************************************!*\ !*** ./node_modules/d3-geo/src/projection/gnomonic.js ***! \********************************************************/ /*! exports provided: gnomonicRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gnomonicRaw", function() { return gnomonicRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "dg0l"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "1ibS"); function gnomonicRaw(x, y) { var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy; return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k]; } gnomonicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"]); /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(gnomonicRaw) .scale(144.049) .clipAngle(60); }); /***/ }), /***/ "wKoq": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/median.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quantile.js */ "GHWt"); /* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { return Object(_quantile_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, 0.5, valueof); }); /***/ }), /***/ "wMLG": /*!********************************************!*\ !*** ./node_modules/d3-array/src/array.js ***! \********************************************/ /*! exports provided: slice, map */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); var array = Array.prototype; var slice = array.slice; var map = array.map; /***/ }), /***/ "wO+i": /*!****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/pluck.js ***! \****************************************************************/ /*! exports provided: pluck */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; }); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "lJxs"); function pluck(...properties) { const length = properties.length; if (length === 0) { throw new Error('list of properties cannot be empty.'); } return (source) => Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); } function plucker(props, length) { const mapper = (x) => { let currentProp = x; for (let i = 0; i < length; i++) { const p = currentProp != null ? currentProp[props[i]] : undefined; if (p !== void 0) { currentProp = p; } else { return undefined; } } return currentProp; }; return mapper; } //# sourceMappingURL=pluck.js.map /***/ }), /***/ "wQ3i": /*!***********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(t) { t = Math.max(0, Math.min(1, t)); return "rgb(" + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) + ")"; }); /***/ }), /***/ "wWUp": /*!****************************************!*\ !*** ./node_modules/d3-dsv/src/tsv.js ***! \****************************************/ /*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return tsvParse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return tsvParseRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return tsvFormat; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return tsvFormatBody; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return tsvFormatRows; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return tsvFormatRow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return tsvFormatValue; }); /* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "NRL+"); var tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])("\t"); var tsvParse = tsv.parse; var tsvParseRows = tsv.parseRows; var tsvFormat = tsv.format; var tsvFormatBody = tsv.formatBody; var tsvFormatRows = tsv.formatRows; var tsvFormatRow = tsv.formatRow; var tsvFormatValue = tsv.formatValue; /***/ }), /***/ "wibz": /*!************************************************!*\ !*** ./node_modules/d3-selection/src/array.js ***! \************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(x) { return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like : Array.from(x); // Map, Set, iterable, string, or anything else }); /***/ }), /***/ "wjRQ": /*!*****************************************************************!*\ !*** ./node_modules/d3-array/src/threshold/freedmanDiaconis.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "hiel"); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../quantile.js */ "GHWt"); /* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { return Math.ceil((max - min) / (2 * (Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, 0.75) - Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, 0.25)) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values), -1 / 3))); }); /***/ }), /***/ "wvSV": /*!**********************************************!*\ !*** ./node_modules/d3-quadtree/src/size.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { var size = 0; this.visit(function(node) { if (!node.length) do ++size; while (node = node.next) }); return size; }); /***/ }), /***/ "wz8V": /*!*********************************************!*\ !*** ./node_modules/d3-array/src/extent.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { let min; let max; if (valueof === undefined) { for (const value of values) { if (value != null) { if (min === undefined) { if (value >= value) min = max = value; } else { if (min > value) min = value; if (max < value) max = value; } } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null) { if (min === undefined) { if (value >= value) min = max = value; } else { if (min > value) min = value; if (max < value) max = value; } } } } return [min, max]; }); /***/ }), /***/ "x+ZX": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/refCount.js ***! \*******************************************************************/ /*! exports provided: refCount */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function refCount() { return function refCountOperatorFunction(source) { return source.lift(new RefCountOperator(source)); }; } class RefCountOperator { constructor(connectable) { this.connectable = connectable; } call(subscriber, source) { const { connectable } = this; connectable._refCount++; const refCounter = new RefCountSubscriber(subscriber, connectable); const subscription = source.subscribe(refCounter); if (!refCounter.closed) { refCounter.connection = connectable.connect(); } return subscription; } } class RefCountSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, connectable) { super(destination); this.connectable = connectable; } _unsubscribe() { const { connectable } = this; if (!connectable) { this.connection = null; return; } this.connectable = null; const refCount = connectable._refCount; if (refCount <= 0) { this.connection = null; return; } connectable._refCount = refCount - 1; if (refCount > 1) { this.connection = null; return; } const { connection } = this; const sharedConnection = connectable._connection; this.connection = null; if (sharedConnection && (!connection || sharedConnection === connection)) { sharedConnection.unsubscribe(); } } } //# sourceMappingURL=refCount.js.map /***/ }), /***/ "xD94": /*!********************************************!*\ !*** ./node_modules/d3-random/src/beta.js ***! \********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony import */ var _gamma_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./gamma.js */ "b54z"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBeta(source) { var G = _gamma_js__WEBPACK_IMPORTED_MODULE_1__["default"].source(source); function randomBeta(alpha, beta) { var X = G(alpha), Y = G(beta); return function() { var x = X(); return x === 0 ? 0 : x / (x + Y()); }; } randomBeta.source = sourceRandomBeta; return randomBeta; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "xJQu": /*!*************************************************!*\ !*** ./node_modules/d3-shape/src/symbol/wye.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var c = -0.5, s = Math.sqrt(3) / 2, k = 1 / Math.sqrt(12), a = (k / 2 + 1) * 3; /* harmony default export */ __webpack_exports__["default"] = ({ draw: function(context, size) { var r = Math.sqrt(size / a), x0 = r / 2, y0 = r * k, x1 = x0, y1 = r * k + r, x2 = -x1, y2 = y1; context.moveTo(x0, y0); context.lineTo(x1, y1); context.lineTo(x2, y2); context.lineTo(c * x0 - s * y0, s * x0 + c * y0); context.lineTo(c * x1 - s * y1, s * x1 + c * y1); context.lineTo(c * x2 - s * y2, s * x2 + c * y2); context.lineTo(c * x0 + s * y0, c * y0 - s * x0); context.lineTo(c * x1 + s * y1, c * y1 - s * x1); context.lineTo(c * x2 + s * y2, c * y2 - s * x2); context.closePath(); } }); /***/ }), /***/ "xOP2": /*!*******************************************!*\ !*** ./node_modules/d3-array/src/fsum.js ***! \*******************************************/ /*! exports provided: Adder, fsum, fcumsum */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return Adder; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fsum", function() { return fsum; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fcumsum", function() { return fcumsum; }); // https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 class Adder { constructor() { this._partials = new Float64Array(32); this._n = 0; } add(x) { const p = this._partials; let i = 0; for (let j = 0; j < this._n && j < 32; j++) { const y = p[j], hi = x + y, lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); if (lo) p[i++] = lo; x = hi; } p[i] = x; this._n = i + 1; return this; } valueOf() { const p = this._partials; let n = this._n, x, y, lo, hi = 0; if (n > 0) { hi = p[--n]; while (n > 0) { x = hi; y = p[--n]; hi = x + y; lo = y - (hi - x); if (lo) break; } if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) { y = lo * 2; x = hi + y; if (y == x - hi) hi = x; } } return hi; } } function fsum(values, valueof) { const adder = new Adder(); if (valueof === undefined) { for (let value of values) { if (value = +value) { adder.add(value); } } } else { let index = -1; for (let value of values) { if (value = +valueof(value, ++index, values)) { adder.add(value); } } } return +adder; } function fcumsum(values, valueof) { const adder = new Adder(); let index = -1; return Float64Array.from(values, valueof === undefined ? v => adder.add(+v || 0) : v => adder.add(+valueof(v, ++index, values) || 0) ); } /***/ }), /***/ "xP+1": /*!*********************************************!*\ !*** ./node_modules/d3-contour/src/area.js ***! \*********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(ring) { var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1]; while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1]; return area; }); /***/ }), /***/ "xbPD": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/defaultIfEmpty.js ***! \*************************************************************************/ /*! exports provided: defaultIfEmpty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function defaultIfEmpty(defaultValue = null) { return (source) => source.lift(new DefaultIfEmptyOperator(defaultValue)); } class DefaultIfEmptyOperator { constructor(defaultValue) { this.defaultValue = defaultValue; } call(subscriber, source) { return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue)); } } class DefaultIfEmptySubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, defaultValue) { super(destination); this.defaultValue = defaultValue; this.isEmpty = true; } _next(value) { this.isEmpty = false; this.destination.next(value); } _complete() { if (this.isEmpty) { this.destination.next(this.defaultValue); } this.destination.complete(); } } //# sourceMappingURL=defaultIfEmpty.js.map /***/ }), /***/ "xgIS": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/fromEvent.js ***! \*********************************************************************/ /*! exports provided: fromEvent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isArray */ "DH7j"); /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isFunction */ "n6bG"); /* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/map */ "lJxs"); const toString = (() => Object.prototype.toString)(); function fromEvent(target, eventName, options, resultSelector) { if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) { resultSelector = options; options = undefined; } if (resultSelector) { return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(args => Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector(...args) : resultSelector(args))); } return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => { function handler(e) { if (arguments.length > 1) { subscriber.next(Array.prototype.slice.call(arguments)); } else { subscriber.next(e); } } setupSubscription(target, eventName, handler, subscriber, options); }); } function setupSubscription(sourceObj, eventName, handler, subscriber, options) { let unsubscribe; if (isEventTarget(sourceObj)) { const source = sourceObj; sourceObj.addEventListener(eventName, handler, options); unsubscribe = () => source.removeEventListener(eventName, handler, options); } else if (isJQueryStyleEventEmitter(sourceObj)) { const source = sourceObj; sourceObj.on(eventName, handler); unsubscribe = () => source.off(eventName, handler); } else if (isNodeStyleEventEmitter(sourceObj)) { const source = sourceObj; sourceObj.addListener(eventName, handler); unsubscribe = () => source.removeListener(eventName, handler); } else if (sourceObj && sourceObj.length) { for (let i = 0, len = sourceObj.length; i < len; i++) { setupSubscription(sourceObj[i], eventName, handler, subscriber, options); } } else { throw new TypeError('Invalid event target'); } subscriber.add(unsubscribe); } function isNodeStyleEventEmitter(sourceObj) { return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function'; } function isJQueryStyleEventEmitter(sourceObj) { return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function'; } function isEventTarget(sourceObj) { return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function'; } //# sourceMappingURL=fromEvent.js.map /***/ }), /***/ "xkTb": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")); /***/ }), /***/ "xo8x": /*!**************************************************!*\ !*** ./node_modules/d3-dispatch/src/dispatch.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var noop = {value: () => {}}; function dispatch() { for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); _[t] = []; } return new Dispatch(_); } function Dispatch(_) { this._ = _; } function parseTypenames(typenames, types) { return typenames.trim().split(/^|\s+/).map(function(t) { var name = "", i = t.indexOf("."); if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); return {type: t, name: name}; }); } Dispatch.prototype = dispatch.prototype = { constructor: Dispatch, on: function(typename, callback) { var _ = this._, T = parseTypenames(typename + "", _), t, i = -1, n = T.length; // If no callback was specified, return the callback of the given type and name. if (arguments.length < 2) { while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; return; } // If a type was specified, set the callback for the given type and name. // Otherwise, if a null callback was specified, remove callbacks of the given name. if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); while (++i < n) { if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); } return this; }, copy: function() { var copy = {}, _ = this._; for (var t in _) copy[t] = _[t].slice(); return new Dispatch(copy); }, call: function(type, that) { if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); }, apply: function(type, that, args) { if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); } }; function get(type, name) { for (var i = 0, n = type.length, c; i < n; ++i) { if ((c = type[i]).name === name) { return c.value; } } } function set(type, name, callback) { for (var i = 0, n = type.length; i < n; ++i) { if (type[i].name === name) { type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); break; } } if (callback != null) type.push({name: name, value: callback}); return type; } /* harmony default export */ __webpack_exports__["default"] = (dispatch); /***/ }), /***/ "xpj1": /*!*****************************************************!*\ !*** ./node_modules/d3-interpolate/src/constant.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (x => () => x); /***/ }), /***/ "xtnD": /*!***********************************************!*\ !*** ./node_modules/d3-array/src/disjoint.js ***! \***********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return disjoint; }); function disjoint(values, other) { const iterator = other[Symbol.iterator](), set = new Set(); for (const v of values) { if (set.has(v)) return false; let value, done; while (({value, done} = iterator.next())) { if (done) break; if (Object.is(v, value)) return false; set.add(value); } } return true; } /***/ }), /***/ "yAGa": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/datum.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(value) { return arguments.length ? this.property("__data__", value) : this.node().__data__; }); /***/ }), /***/ "yCtX": /*!*********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/fromArray.js ***! \*********************************************************************/ /*! exports provided: fromArray */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); /* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToArray */ "ngJS"); /* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../scheduled/scheduleArray */ "jZKg"); function fromArray(input, scheduler) { if (!scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input)); } else { return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler); } } //# sourceMappingURL=fromArray.js.map /***/ }), /***/ "yE6J": /*!*************************************************************!*\ !*** ./node_modules/d3-hierarchy/src/hierarchy/iterator.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function*() { var node = this, current, next = [node], children, i, n; do { current = next.reverse(), next = []; while (node = current.pop()) { yield node; if (children = node.children) { for (i = 0, n = children.length; i < n; ++i) { next.push(children[i]); } } } } while (next.length); }); /***/ }), /***/ "yEp2": /*!**************************************************!*\ !*** ./node_modules/d3-interpolate/src/basis.js ***! \**************************************************/ /*! exports provided: basis, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); function basis(t1, v0, v1, v2, v3) { var t2 = t1 * t1, t3 = t2 * t1; return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6; } /* harmony default export */ __webpack_exports__["default"] = (function(values) { var n = values.length - 1; return function(t) { var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), v1 = values[i], v2 = values[i + 1], v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; return basis((t - i / n) * n, v0, v1, v2, v3); }; }); /***/ }), /***/ "yI9Y": /*!**************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/max.js ***! \**************************************************************/ /*! exports provided: max */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); /* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduce */ "128B"); function max(comparer) { const max = (typeof comparer === 'function') ? (x, y) => comparer(x, y) > 0 ? x : y : (x, y) => x > y ? x : y; return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max); } //# sourceMappingURL=max.js.map /***/ }), /***/ "yPTl": /*!**********************************************!*\ !*** ./node_modules/d3-random/src/cauchy.js ***! \**********************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _defaultSource_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource.js */ "0RZX"); /* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomCauchy(source) { function randomCauchy(a, b) { a = a == null ? 0 : +a; b = b == null ? 1 : +b; return function() { return a + b * Math.tan(Math.PI * source()); }; } randomCauchy.source = sourceRandomCauchy; return randomCauchy; })(_defaultSource_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /***/ }), /***/ "yUfG": /*!************************************************!*\ !*** ./node_modules/d3-hierarchy/src/index.js ***! \************************************************/ /*! exports provided: cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cluster_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cluster.js */ "zpdH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return _cluster_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "a8tM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _pack_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pack/index.js */ "I3Nq"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return _pack_index_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pack/siblings.js */ "W+J7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pack/enclose.js */ "7Mu7"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./partition.js */ "+Nd1"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony import */ var _stratify_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stratify.js */ "NU5n"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return _stratify_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree.js */ "UHDu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return _tree_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./treemap/index.js */ "tvR+"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treemap/binary.js */ "ivMv"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treemap/dice.js */ "FPPI"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treemap/slice.js */ "7IPS"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./treemap/sliceDice.js */ "CDC2"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./treemap/squarify.js */ "I4jL"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony import */ var _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./treemap/resquarify.js */ "1Cbu"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /***/ }), /***/ "yUst": /*!**********************************************************************!*\ !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***! \**********************************************************************/ /*! exports provided: scheme, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; }); /* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "ZtE7"); /* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "jQWc"); var scheme = new Array(3).concat( "fee8c8fdbb84e34a33", "fef0d9fdcc8afc8d59d7301f", "fef0d9fdcc8afc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59e34a33b30000", "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" ).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme)); /***/ }), /***/ "yWPb": /*!****************************************************************!*\ !*** ./node_modules/d3-geo/src/projection/conicEquidistant.js ***! \****************************************************************/ /*! exports provided: conicEquidistantRaw, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEquidistantRaw", function() { return conicEquidistantRaw; }); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "R0y8"); /* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "bN2o"); /* harmony import */ var _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular.js */ "VXJj"); function conicEquidistantRaw(y0, y1) { var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0), n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : (cy0 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / (y1 - y0), g = cy0 / n + y0; if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__["equirectangularRaw"]; function project(x, y) { var gy = g - y, nx = n * x; return [gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(nx), g - gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(nx)]; } project.invert = function(x, y) { var gy = g - y, l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(gy)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(gy); if (gy * n < 0) l -= _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(x) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(gy); return [l / n, g - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + gy * gy)]; }; return project; } /* harmony default export */ __webpack_exports__["default"] = (function() { return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEquidistantRaw) .scale(131.154) .center([0, 13.9389]); }); /***/ }), /***/ "yb6d": /*!****************************************************!*\ !*** ./node_modules/d3-array/src/greatestIndex.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return greatestIndex; }); /* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "APuy"); /* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maxIndex.js */ "cvkC"); function greatestIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { if (compare.length === 1) return Object(_maxIndex_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, compare); let maxValue; let max = -1; let index = -1; for (const value of values) { ++index; if (max < 0 ? compare(value, value) === 0 : compare(value, maxValue) > 0) { maxValue = value; max = index; } } return max; } /***/ }), /***/ "yhWi": /*!**********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/empty.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function() { return !this.node(); }); /***/ }), /***/ "yp+X": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/sort.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "5Iso"); /* harmony default export */ __webpack_exports__["default"] = (function(compare) { if (!compare) compare = ascending; function compareNode(a, b) { return a && b ? compare(a.__data__, b.__data__) : !a - !b; } for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group[i]) { sortgroup[i] = node; } } sortgroup.sort(compareNode); } return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Selection"](sortgroups, this._parents).order(); }); function ascending(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; } /***/ }), /***/ "yuhW": /*!*******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/throttle.js ***! \*******************************************************************/ /*! exports provided: defaultThrottleConfig, throttle */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); const defaultThrottleConfig = { leading: true, trailing: false }; function throttle(durationSelector, config = defaultThrottleConfig) { return (source) => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing)); } class ThrottleOperator { constructor(durationSelector, leading, trailing) { this.durationSelector = durationSelector; this.leading = leading; this.trailing = trailing; } call(subscriber, source) { return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing)); } } class ThrottleSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination, durationSelector, _leading, _trailing) { super(destination); this.destination = destination; this.durationSelector = durationSelector; this._leading = _leading; this._trailing = _trailing; this._hasValue = false; } _next(value) { this._hasValue = true; this._sendValue = value; if (!this._throttled) { if (this._leading) { this.send(); } else { this.throttle(value); } } } send() { const { _hasValue, _sendValue } = this; if (_hasValue) { this.destination.next(_sendValue); this.throttle(_sendValue); } this._hasValue = false; this._sendValue = undefined; } throttle(value) { const duration = this.tryDurationSelector(value); if (!!duration) { this.add(this._throttled = Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(duration, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } } tryDurationSelector(value) { try { return this.durationSelector(value); } catch (err) { this.destination.error(err); return null; } } throttlingDone() { const { _throttled, _trailing } = this; if (_throttled) { _throttled.unsubscribe(); } this._throttled = undefined; if (_trailing) { this.send(); } } notifyNext() { this.throttlingDone(); } notifyComplete() { this.throttlingDone(); } } //# sourceMappingURL=throttle.js.map /***/ }), /***/ "z+Ro": /*!*****************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/util/isScheduler.js ***! \*****************************************************************/ /*! exports provided: isScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; }); function isScheduler(value) { return value && typeof value.schedule === 'function'; } //# sourceMappingURL=isScheduler.js.map /***/ }), /***/ "z6FA": /*!**************************************************!*\ !*** ./node_modules/d3-quadtree/src/quadtree.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quadtree; }); /* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "9l1u"); /* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ "9ABZ"); /* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ "LMxf"); /* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "H7P7"); /* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ "HZff"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ "G0FW"); /* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ "RQVR"); /* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ "wvSV"); /* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ "EVP4"); /* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ "tSfe"); /* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ "m7tx"); /* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ "Nv8T"); function quadtree(nodes, x, y) { var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__["defaultX"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__["defaultY"] : y, NaN, NaN, NaN, NaN); return nodes == null ? tree : tree.addAll(nodes); } function Quadtree(x, y, x0, y0, x1, y1) { this._x = x; this._y = y; this._x0 = x0; this._y0 = y0; this._x1 = x1; this._y1 = y1; this._root = undefined; } function leaf_copy(leaf) { var copy = {data: leaf.data}, next = copy; while (leaf = leaf.next) next = next.next = {data: leaf.data}; return copy; } var treeProto = quadtree.prototype = Quadtree.prototype; treeProto.copy = function() { var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), node = this._root, nodes, child; if (!node) return copy; if (!node.length) return copy._root = leaf_copy(node), copy; nodes = [{source: node, target: copy._root = new Array(4)}]; while (node = nodes.pop()) { for (var i = 0; i < 4; ++i) { if (child = node.source[i]) { if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); else node.target[i] = leaf_copy(child); } } } return copy; }; treeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__["default"]; treeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__["addAll"]; treeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__["default"]; treeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__["default"]; treeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]; treeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__["default"]; treeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__["default"]; treeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__["removeAll"]; treeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__["default"]; treeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__["default"]; treeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__["default"]; treeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__["default"]; treeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__["default"]; treeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__["default"]; /***/ }), /***/ "z6cu": /*!**********************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/observable/throwError.js ***! \**********************************************************************/ /*! exports provided: throwError */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; }); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ "HDdC"); function throwError(error, scheduler) { if (!scheduler) { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => subscriber.error(error)); } else { return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](subscriber => scheduler.schedule(dispatch, 0, { error, subscriber })); } } function dispatch({ error, subscriber }) { subscriber.error(error); } //# sourceMappingURL=throwError.js.map /***/ }), /***/ "z8qe": /*!***********************************************!*\ !*** ./node_modules/d3-delaunay/src/index.js ***! \***********************************************/ /*! exports provided: Delaunay, Voronoi */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _delaunay_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./delaunay.js */ "4JcG"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Delaunay", function() { return _delaunay_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _voronoi_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./voronoi.js */ "3Ygs"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Voronoi", function() { return _voronoi_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /***/ }), /***/ "zD5G": /*!*********************************************************!*\ !*** ./node_modules/d3-shape/src/curve/linearClosed.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "0K5P"); function LinearClosed(context) { this._context = context; } LinearClosed.prototype = { areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], lineStart: function() { this._point = 0; }, lineEnd: function() { if (this._point) this._context.closePath(); }, point: function(x, y) { x = +x, y = +y; if (this._point) this._context.lineTo(x, y); else this._point = 1, this._context.moveTo(x, y); } }; /* harmony default export */ __webpack_exports__["default"] = (function(context) { return new LinearClosed(context); }); /***/ }), /***/ "zMfI": /*!**********************************************!*\ !*** ./node_modules/d3-contour/src/index.js ***! \**********************************************/ /*! exports provided: contours, contourDensity */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _contours_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contours.js */ "gy+j"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return _contours_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony import */ var _density_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./density.js */ "Sf2A"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return _density_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /***/ }), /***/ "zP0r": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/skip.js ***! \***************************************************************/ /*! exports provided: skip */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ "7o/Q"); function skip(count) { return (source) => source.lift(new SkipOperator(count)); } class SkipOperator { constructor(total) { this.total = total; } call(subscriber, source) { return source.subscribe(new SkipSubscriber(subscriber, this.total)); } } class SkipSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(destination, total) { super(destination); this.total = total; this.count = 0; } _next(x) { if (++this.count > this.total) { this.destination.next(x); } } } //# sourceMappingURL=skip.js.map /***/ }), /***/ "zcMM": /*!*************************************************************!*\ !*** ./node_modules/d3-selection/src/selection/property.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function propertyRemove(name) { return function() { delete this[name]; }; } function propertyConstant(name, value) { return function() { this[name] = value; }; } function propertyFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) delete this[name]; else this[name] = v; }; } /* harmony default export */ __webpack_exports__["default"] = (function(name, value) { return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name]; }); /***/ }), /***/ "ze3m": /*!********************************************************!*\ !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***! \********************************************************/ /*! exports provided: prefixExponent, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefixExponent", function() { return prefixExponent; }); /* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "qnQu"); var prefixExponent; /* harmony default export */ __webpack_exports__["default"] = (function(x, p) { var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(x, p); if (!d) return x + ""; var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length; return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["formatDecimalParts"])(x, Math.max(0, p + i - 1))[0]; // less than 1y! }); /***/ }), /***/ "ziQ1": /*!********************************************!*\ !*** ./node_modules/d3-scale/src/index.js ***! \********************************************/ /*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleRadial, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _band_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./band.js */ "sCaM"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return _band_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return _band_js__WEBPACK_IMPORTED_MODULE_0__["point"]; }); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "1OKp"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); /* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log.js */ "n0hd"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return _log_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); /* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog.js */ "wC0G"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return _symlog_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); /* harmony import */ var _ordinal_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ordinal.js */ "3xmg"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return _ordinal_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return _ordinal_js__WEBPACK_IMPORTED_MODULE_5__["implicit"]; }); /* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow.js */ "eJvb"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return _pow_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return _pow_js__WEBPACK_IMPORTED_MODULE_6__["sqrt"]; }); /* harmony import */ var _radial_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./radial.js */ "OrLo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleRadial", function() { return _radial_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); /* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./quantile.js */ "cmp4"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); /* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./quantize.js */ "f4CH"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); /* harmony import */ var _threshold_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./threshold.js */ "aw+z"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return _threshold_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); /* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./time.js */ "R0i0"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return _time_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); /* harmony import */ var _utcTime_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcTime.js */ "O0DV"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return _utcTime_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); /* harmony import */ var _sequential_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sequential.js */ "zmsm"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return _sequential_js__WEBPACK_IMPORTED_MODULE_13__["sequentialSymlog"]; }); /* harmony import */ var _sequentialQuantile_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sequentialQuantile.js */ "B/+g"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return _sequentialQuantile_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); /* harmony import */ var _diverging_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging.js */ "OP1V"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingLog"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingPow"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingSqrt"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return _diverging_js__WEBPACK_IMPORTED_MODULE_15__["divergingSymlog"]; }); /* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./tickFormat.js */ "ssni"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return _tickFormat_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); /***/ }), /***/ "zmsm": /*!*************************************************!*\ !*** ./node_modules/d3-scale/src/sequential.js ***! \*************************************************/ /*! exports provided: copy, default, sequentialLog, sequentialSymlog, sequentialPow, sequentialSqrt */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequential; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialLog", function() { return sequentialLog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSymlog", function() { return sequentialSymlog; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialPow", function() { return sequentialPow; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSqrt", function() { return sequentialSqrt; }); /* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "pD2Y"); /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous.js */ "6YF4"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init.js */ "1Ix/"); /* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./linear.js */ "VIqg"); /* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./log.js */ "n0hd"); /* harmony import */ var _symlog_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symlog.js */ "wC0G"); /* harmony import */ var _pow_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow.js */ "eJvb"); function transformer() { var x0 = 0, x1 = 1, t0, t1, k10, transform, interpolator = _continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"], clamp = false, unknown; function scale(x) { return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); } scale.domain = function(_) { return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; }; scale.clamp = function(_) { return arguments.length ? (clamp = !!_, scale) : clamp; }; scale.interpolator = function(_) { return arguments.length ? (interpolator = _, scale) : interpolator; }; function range(interpolate) { return function(_) { var r0, r1; return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)]; }; } scale.range = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolate"]); scale.rangeRound = range(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRound"]); scale.unknown = function(_) { return arguments.length ? (unknown = _, scale) : unknown; }; return function(t) { transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); return scale; }; } function copy(source, target) { return target .domain(source.domain()) .interpolator(source.interpolator()) .clamp(source.clamp()) .unknown(source.unknown()); } function sequential() { var scale = Object(_linear_js__WEBPACK_IMPORTED_MODULE_3__["linearish"])(transformer()(_continuous_js__WEBPACK_IMPORTED_MODULE_1__["identity"])); scale.copy = function() { return copy(scale, sequential()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialLog() { var scale = Object(_log_js__WEBPACK_IMPORTED_MODULE_4__["loggish"])(transformer()).domain([1, 10]); scale.copy = function() { return copy(scale, sequentialLog()).base(scale.base()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialSymlog() { var scale = Object(_symlog_js__WEBPACK_IMPORTED_MODULE_5__["symlogish"])(transformer()); scale.copy = function() { return copy(scale, sequentialSymlog()).constant(scale.constant()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialPow() { var scale = Object(_pow_js__WEBPACK_IMPORTED_MODULE_6__["powish"])(transformer()); scale.copy = function() { return copy(scale, sequentialPow()).exponent(scale.exponent()); }; return _init_js__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments); } function sequentialSqrt() { return sequentialPow.apply(null, arguments).exponent(0.5); } /***/ }), /***/ "znLP": /*!**********************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/scheduler/AnimationFrameScheduler.js ***! \**********************************************************************************/ /*! exports provided: AnimationFrameScheduler */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; }); /* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ "IjjT"); class AnimationFrameScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__["AsyncScheduler"] { flush(action) { this.active = true; this.scheduled = undefined; const { actions } = this; let error; let index = -1; let count = actions.length; action = action || actions.shift(); do { if (error = action.execute(action.state, action.delay)) { break; } } while (++index < count && (action = actions.shift())); this.active = false; if (error) { while (++index < count && (action = actions.shift())) { action.unsubscribe(); } throw error; } } } //# sourceMappingURL=AnimationFrameScheduler.js.map /***/ }), /***/ "znUM": /*!*************************************************!*\ !*** ./node_modules/d3-interpolate/src/zoom.js ***! \*************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var epsilon2 = 1e-12; function cosh(x) { return ((x = Math.exp(x)) + 1 / x) / 2; } function sinh(x) { return ((x = Math.exp(x)) - 1 / x) / 2; } function tanh(x) { return ((x = Math.exp(2 * x)) - 1) / (x + 1); } /* harmony default export */ __webpack_exports__["default"] = ((function zoomRho(rho, rho2, rho4) { // p0 = [ux0, uy0, w0] // p1 = [ux1, uy1, w1] function zoom(p0, p1) { var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S; // Special case for u0 ≅ u1. if (d2 < epsilon2) { S = Math.log(w1 / w0) / rho; i = function(t) { return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S) ]; } } // General case. else { var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); S = (r1 - r0) / rho; i = function(t) { var s = t * S, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0) ]; } } i.duration = S * 1000 * rho / Math.SQRT2; return i; } zoom.rho = function(_) { var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2; return zoomRho(_1, _2, _4); }; return zoom; })(Math.SQRT2, 2, 4)); /***/ }), /***/ "zp1y": /*!*************************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/withLatestFrom.js ***! \*************************************************************************/ /*! exports provided: withLatestFrom */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; }); /* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../OuterSubscriber */ "l7GE"); /* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/subscribeToResult */ "ZUHj"); function withLatestFrom(...args) { return (source) => { let project; if (typeof args[args.length - 1] === 'function') { project = args.pop(); } const observables = args; return source.lift(new WithLatestFromOperator(observables, project)); }; } class WithLatestFromOperator { constructor(observables, project) { this.observables = observables; this.project = project; } call(subscriber, source) { return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project)); } } class WithLatestFromSubscriber extends _OuterSubscriber__WEBPACK_IMPORTED_MODULE_0__["OuterSubscriber"] { constructor(destination, observables, project) { super(destination); this.observables = observables; this.project = project; this.toRespond = []; const len = observables.length; this.values = new Array(len); for (let i = 0; i < len; i++) { this.toRespond.push(i); } for (let i = 0; i < len; i++) { let observable = observables[i]; this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, observable, undefined, i)); } } notifyNext(_outerValue, innerValue, outerIndex) { this.values[outerIndex] = innerValue; const toRespond = this.toRespond; if (toRespond.length > 0) { const found = toRespond.indexOf(outerIndex); if (found !== -1) { toRespond.splice(found, 1); } } } notifyComplete() { } _next(value) { if (this.toRespond.length === 0) { const args = [value, ...this.values]; if (this.project) { this._tryProject(args); } else { this.destination.next(args); } } } _tryProject(args) { let result; try { result = this.project.apply(this, args); } catch (err) { this.destination.error(err); return; } this.destination.next(result); } } //# sourceMappingURL=withLatestFrom.js.map /***/ }), /***/ "zpdH": /*!**************************************************!*\ !*** ./node_modules/d3-hierarchy/src/cluster.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function defaultSeparation(a, b) { return a.parent === b.parent ? 1 : 2; } function meanX(children) { return children.reduce(meanXReduce, 0) / children.length; } function meanXReduce(x, c) { return x + c.x; } function maxY(children) { return 1 + children.reduce(maxYReduce, 0); } function maxYReduce(y, c) { return Math.max(y, c.y); } function leafLeft(node) { var children; while (children = node.children) node = children[0]; return node; } function leafRight(node) { var children; while (children = node.children) node = children[children.length - 1]; return node; } /* harmony default export */ __webpack_exports__["default"] = (function() { var separation = defaultSeparation, dx = 1, dy = 1, nodeSize = false; function cluster(root) { var previousNode, x = 0; // First walk, computing the initial x & y values. root.eachAfter(function(node) { var children = node.children; if (children) { node.x = meanX(children); node.y = maxY(children); } else { node.x = previousNode ? x += separation(node, previousNode) : 0; node.y = 0; previousNode = node; } }); var left = leafLeft(root), right = leafRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2; // Second walk, normalizing x & y to the desired size. return root.eachAfter(nodeSize ? function(node) { node.x = (node.x - root.x) * dx; node.y = (root.y - node.y) * dy; } : function(node) { node.x = (node.x - x0) / (x1 - x0) * dx; node.y = (1 - (root.y ? node.y / root.y : 1)) * dy; }); } cluster.separation = function(x) { return arguments.length ? (separation = x, cluster) : separation; }; cluster.size = function(x) { return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]); }; cluster.nodeSize = function(x) { return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null); }; return cluster; }); /***/ }), /***/ "zt7V": /*!******************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/operators/exhaust.js ***! \******************************************************************/ /*! exports provided: exhaust */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; }); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../innerSubscribe */ "zx2A"); function exhaust() { return (source) => source.lift(new SwitchFirstOperator()); } class SwitchFirstOperator { call(subscriber, source) { return source.subscribe(new SwitchFirstSubscriber(subscriber)); } } class SwitchFirstSubscriber extends _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleOuterSubscriber"] { constructor(destination) { super(destination); this.hasCompleted = false; this.hasSubscription = false; } _next(value) { if (!this.hasSubscription) { this.hasSubscription = true; this.add(Object(_innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["innerSubscribe"])(value, new _innerSubscribe__WEBPACK_IMPORTED_MODULE_0__["SimpleInnerSubscriber"](this))); } } _complete() { this.hasCompleted = true; if (!this.hasSubscription) { this.destination.complete(); } } notifyComplete() { this.hasSubscription = false; if (this.hasCompleted) { this.destination.complete(); } } } //# sourceMappingURL=exhaust.js.map /***/ }), /***/ "zv5K": /*!*********************************************************!*\ !*** ./node_modules/d3-selection/src/selection/each.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function(callback) { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { if (node = group[i]) callback.call(node, node.__data__, i, group); } } return this; }); /***/ }), /***/ "zx2A": /*!***************************************************************!*\ !*** ./node_modules/rxjs/_esm2015/internal/innerSubscribe.js ***! \***************************************************************/ /*! exports provided: SimpleInnerSubscriber, ComplexInnerSubscriber, SimpleOuterSubscriber, ComplexOuterSubscriber, innerSubscribe */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleInnerSubscriber", function() { return SimpleInnerSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComplexInnerSubscriber", function() { return ComplexInnerSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleOuterSubscriber", function() { return SimpleOuterSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ComplexOuterSubscriber", function() { return ComplexOuterSubscriber; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "innerSubscribe", function() { return innerSubscribe; }); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ "7o/Q"); /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Observable */ "HDdC"); /* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/subscribeTo */ "SeVD"); class SimpleInnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent) { super(); this.parent = parent; } _next(value) { this.parent.notifyNext(value); } _error(error) { this.parent.notifyError(error); this.unsubscribe(); } _complete() { this.parent.notifyComplete(); this.unsubscribe(); } } class ComplexInnerSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { constructor(parent, outerValue, outerIndex) { super(); this.parent = parent; this.outerValue = outerValue; this.outerIndex = outerIndex; } _next(value) { this.parent.notifyNext(this.outerValue, value, this.outerIndex, this); } _error(error) { this.parent.notifyError(error); this.unsubscribe(); } _complete() { this.parent.notifyComplete(this); this.unsubscribe(); } } class SimpleOuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { notifyNext(innerValue) { this.destination.next(innerValue); } notifyError(err) { this.destination.error(err); } notifyComplete() { this.destination.complete(); } } class ComplexOuterSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"] { notifyNext(_outerValue, innerValue, _outerIndex, _innerSub) { this.destination.next(innerValue); } notifyError(error) { this.destination.error(error); } notifyComplete(_innerSub) { this.destination.complete(); } } function innerSubscribe(result, innerSubscriber) { if (innerSubscriber.closed) { return undefined; } if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]) { return result.subscribe(innerSubscriber); } let subscription; try { subscription = Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_2__["subscribeTo"])(result)(innerSubscriber); } catch (error) { innerSubscriber.error(error); } return subscription; } //# sourceMappingURL=innerSubscribe.js.map /***/ }), /***/ "zyLn": /*!*************************************************************!*\ !*** ./node_modules/d3-transition/src/transition/filter.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "/TIM"); /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "0W9s"); /* harmony default export */ __webpack_exports__["default"] = (function(match) { if (typeof match !== "function") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["matcher"])(match); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { if ((node = group[i]) && match.call(node, node.__data__, i, group)) { subgroup.push(node); } } } return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, this._name, this._id); }); /***/ }), /***/ "zz/+": /*!*******************************************!*\ !*** ./node_modules/d3-geo/src/length.js ***! \*******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "vBe5"); /* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "R0y8"); /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "mPOO"); /* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "tepu"); var lengthSum, lambda0, sinPhi0, cosPhi0; var lengthStream = { sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], lineStart: lengthLineStart, lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"], polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"] }; function lengthLineStart() { lengthStream.point = lengthPointFirst; lengthStream.lineEnd = lengthLineEnd; } function lengthLineEnd() { lengthStream.point = lengthStream.lineEnd = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]; } function lengthPointFirst(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; lambda0 = lambda, sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi); lengthStream.point = lengthPoint; } function lengthPoint(lambda, phi) { lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]; var sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi), delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda - lambda0), cosDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(delta), sinDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(delta), x = cosPhi * sinDelta, y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta, z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta; lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x * x + y * y), z)); lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi; } /* harmony default export */ __webpack_exports__["default"] = (function(object) { lengthSum = new d3_array__WEBPACK_IMPORTED_MODULE_0__["Adder"](); Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, lengthStream); return +lengthSum; }); /***/ }) }]); //# sourceMappingURL=vendor.js.mapEvidence 0009765625Solution Manually confirm that the timestamp data is not sensitive, and that the data cannot be aggregated to disclose exploitable patterns.
-
-
-
Risk=Informational, Confidence=Low (1)
-
http://localhost:3000 (1)
-
Information Disclosure - Suspicious Comments (1)
GET http://localhost:3000/runtime.js
Alert tags Alert description The response appears to contain suspicious comments which may help an attacker. Note: Matches made within script blocks or files are against the entire content not only comments.
Other info The following pattern was used: \bFROM\b and was detected 2 times, the first in the element starting with: "/******/ // add entry modules from loaded chunk to deferred list", see evidence field for the suspicious comment/snippet.
Request Request line and header section (238 bytes)
GET http://localhost:3000/runtime.js HTTP/1.1 Host: localhost:3000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0 Pragma: no-cache Cache-Control: no-cache Referer: http://localhost:3000Request body (0 bytes)
Response Status line and header section (331 bytes)
HTTP/1.1 200 OK X-Powered-By: Express Accept-Ranges: bytes Cache-Control: public, max-age=0 Last-Modified: Fri, 08 Apr 2022 12:35:28 GMT ETag: W/"189b-180092c200f" Content-Type: application/javascript; charset=UTF-8 Content-Length: 6299 Date: Fri, 08 Apr 2022 13:24:08 GMT Connection: keep-alive Keep-Alive: timeout=5Response body (6299 bytes)
/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ var executeModules = data[2]; /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(data); /******/ /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ // add entry modules from loaded chunk to deferred list /******/ deferredModules.push.apply(deferredModules, executeModules || []); /******/ /******/ // run deferred modules when all chunks ready /******/ return checkDeferredModules(); /******/ }; /******/ function checkDeferredModules() { /******/ var result; /******/ for(var i = 0; i < deferredModules.length; i++) { /******/ var deferredModule = deferredModules[i]; /******/ var fulfilled = true; /******/ for(var j = 1; j < deferredModule.length; j++) { /******/ var depId = deferredModule[j]; /******/ if(installedChunks[depId] !== 0) fulfilled = false; /******/ } /******/ if(fulfilled) { /******/ deferredModules.splice(i--, 1); /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); /******/ } /******/ } /******/ /******/ return result; /******/ } /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ "runtime": 0 /******/ }; /******/ /******/ var deferredModules = []; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray = jsonpArray.slice(); /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); /******/ var parentJsonpFunction = oldJsonpFunction; /******/ /******/ /******/ // run deferred modules from other chunks /******/ checkDeferredModules(); /******/ }) /************************************************************************/ /******/ ([]); //# sourceMappingURL=runtime.js.mapEvidence fromSolution Remove all comments that return information that may help an attacker and fix any underlying problems they refer to.
-
-
Appendix
Alert types
This section contains additional information on the types of alerts in the report.
-
Absence of Anti-CSRF Tokens
Source raised by a passive scanner (Absence of Anti-CSRF Tokens) CWE ID 352 WASC ID 9 Reference -
CSP: Wildcard Directive
Source raised by a passive scanner (CSP) CWE ID 693 WASC ID 15 Reference -
Content Security Policy (CSP) Header Not Set
-
Missing Anti-clickjacking Header
Source raised by a passive scanner (Anti-clickjacking Header) CWE ID 1021 WASC ID 15 Reference -
Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s)
Source raised by a passive scanner (Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s)) CWE ID 200 WASC ID 13 Reference -
Timestamp Disclosure - Unix
Source raised by a passive scanner (Timestamp Disclosure) CWE ID 200 WASC ID 13 Reference -
X-Content-Type-Options Header Missing
Source raised by a passive scanner (X-Content-Type-Options Header Missing) CWE ID 693 WASC ID 15 Reference -
Information Disclosure - Suspicious Comments
Source raised by a passive scanner (Information Disclosure - Suspicious Comments) CWE ID 200 WASC ID 13
ZAP